Changelog for fs-sim-0.4.1.0
Revision history for fs-sim
0.4.1.0 -- 2025-09-29
Non-breaking
- Reimplement
partialiseWord64to allow for 32 bits architectures such as WASM.
0.4.0.0 -- 2025-05-30
Breaking
-
Fix a bug where
withErrorswould not put back the previousErrorswhen an exception is thrown during execution of the function. Though we fixed the bug, it is also a breaking change: the type signature now has an additional constraint. -
Change finiteness guarantees for
Streams. Where streams could previously be definitely finite or possibly infinite, they should now be definitely finite or definitely infinite. This is mostly a conceptual change: it was already guaranteed by most if not all of theStreamfunctions. Still, the conceptual change should make the use ofStreamsmore ergonomic going forward.As a result of and in addition to the conceptual change, the
Streaminterface got an overhaul. The concrete changes are:- The internals of the
Streamare now exposed, but with big warnings about unsafe usage related to finiteness. - Added new
runStreamNandrunStreamIndefinitelyfunctions. - Renamed
mkInfinitetounsafeMkInfinite. - Added new
isFiniteandisInfinitequeries. - Added a new
genFiniteNfunction. - Removed
genMaybe', as it was just a specific instantiation ofgenMaybethat has no clear benefit being its own top-level function. - Added a new
liftShrinkStreamfunction. - Updated documentation.
- The internals of the
Patch
- Make it build with
ghc-9.12. - Drop support for
ghc-8.10. - Support
io-classes-1.8.0.1. - Support the new
MustExistoption forAllowExistingthat was added infs-api.
0.3.1.0 -- 2024-12-10
Non-breaking
- Expose
openHandlesfor testing.
Patch
- Make
genInfinitegenerate truly infinite streams. - The shrinker for
Errorsnow truly shrinks towards empty errors.
0.3.0.1 -- 2024-10-02
Patch
- Support
io-classes-1.6andio-classes-1.7. In these versions,strict-stmhas become a public sub-library ofio-classes. As a result, older versions ofio-classesare no longer supported, and we now depend onio-classes:strict-stminstead ofstrict-stm.
0.3.0.0 -- 2024-08-26
Breaking
- Orphan
Showinstance forForeign.C.Error.Errnoremoved byfs-api. - Rename some functions related to partial reads/writes and corruption in
System.FS.Sim.Error:- Replace
hGetSomePartialbypartialiseByteCount/partialiseWord64. - Replace
hPutSomePartialbypartialiseByteString - Replace
corruptbycorruptByteString
- Replace
- Remove
System.FS.Sim.Puremodule. - Adapt
simHasFSto the newHasFSprimitives. This leads to two breaking changes:- Add a
PrimMonad mconstraint torunSimFS,simHasFS'andsimHasFS. - Change the
StrictTVarargument tosimHasFSto aStrictTMVar.
- Add a
- Adapt
mkSimErrorHasFSto the newHasFSprimitives. This leads to two breaking changes:- Add a
PrimMonad mconstraint torunSimErrorFS,mkSimErrorHasFS'andmkSimErrorHasFS. - Change the
StrictTVarargument tomkSimErrorHasFSto aStrictTMVar.
- Add a
- Rename
mkSimErrorHasFStosimErrorHasFS. - Rename
mkSimErrorHasFS'tosimErrorHasFS'.
Non-breaking
- New constructors for the
Errorstype:hGetBufSomeE,hGetBufSomeAtE,hGetBufSomeE, andhPutBufSomeAtE. - Expose the new
System.FS.Sim.Primmodule.
Patch
allNullwas not actually checking whether all streams in the argumentErrorsare empty.- The
Show Errorsinstance was not printing every stream. - The shrinker for
Errorswas not shrinking every stream. - Adapt to moving of
Utilmodules infs-api. - Make it build with
ghc-9.10. - New
primitive ^>=0.9dependency - New
safe-wild-cards^>=1.0dependency - Tight dependency bounds.
0.2.1.1 -- 2023-10-30
Patch
- Make it build with
ghc-9.8.
0.2.1.0 -- 2023-08-01
Non-breaking
- Build with
fs-api ^>=0.2.
Patch
- Bump upper version bounds for
io-classesandstrict-stmto1.3
0.2.0.0 -- 2023-06-02
Breaking
- Move
Stream-related functions to newSystem.FS.Sim.Streammodule. - Remove
SemigroupandMonoidinstances forStreamandErrorstypes. - Overhaul
Streamtype and related functions. TheStreamtype now behaves similarly toTest.QuickCheck'sInfiniteList, which improves showing, generation and shrinking.
Non-breaking
- Add
simHasFS'andmkSimErrorHasFS', which are alternatives tosimHasFSandmkSimErrorHasFSthat createTVars internally. - Add new
emptyErrorsfunction. - Adapt the
Errorstype to use the overhauledStreamtype. As a bonus:- Arbitrary
Errorsnow contain infinite errorStreams by default, instead of finite ones. - Shrinking of
Errorsthat contain infinite errorStreams now terminates.
- Arbitrary
Patch
- Enable building with
ghc-9.4. - Remove
assertspackage flag.
0.1.0.2 -- 2023-05-25
- Enable building with ghc-9.6
0.1.0.1 -- 2023-04-24
Non-breaking
Update the code to compile with io-sim-1.0.0.1.
0.1.0.0 -- 2023-03-27
- First version. Released on an unsuspecting world.