Changelog for fs-sim-0.4.0.0
Revision history for fs-sim
?.?.?.? -- ????-??-??
0.4.0.0 -- 2025-05-30
Breaking
-
Fix a bug where
withErrors
would not put back the previousErrors
when 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
Stream
s. 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 theStream
functions. Still, the conceptual change should make the use ofStreams
more ergonomic going forward.As a result of and in addition to the conceptual change, the
Stream
interface got an overhaul. The concrete changes are:- The internals of the
Stream
are now exposed, but with big warnings about unsafe usage related to finiteness. - Added new
runStreamN
andrunStreamIndefinitely
functions. - Renamed
mkInfinite
tounsafeMkInfinite
. - Added new
isFinite
andisInfinite
queries. - Added a new
genFiniteN
function. - Removed
genMaybe'
, as it was just a specific instantiation ofgenMaybe
that has no clear benefit being its own top-level function. - Added a new
liftShrinkStream
function. - 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
MustExist
option forAllowExisting
that was added infs-api
.
0.3.1.0 -- 2024-12-10
Non-breaking
- Expose
openHandles
for testing.
Patch
- Make
genInfinite
generate truly infinite streams. - The shrinker for
Errors
now truly shrinks towards empty errors.
0.3.0.1 -- 2024-10-02
Patch
- Support
io-classes-1.6
andio-classes-1.7
. In these versions,strict-stm
has become a public sub-library ofio-classes
. As a result, older versions ofio-classes
are no longer supported, and we now depend onio-classes:strict-stm
instead ofstrict-stm
.
0.3.0.0 -- 2024-08-26
Breaking
- Orphan
Show
instance forForeign.C.Error.Errno
removed byfs-api
. - Rename some functions related to partial reads/writes and corruption in
System.FS.Sim.Error
:- Replace
hGetSomePartial
bypartialiseByteCount
/partialiseWord64
. - Replace
hPutSomePartial
bypartialiseByteString
- Replace
corrupt
bycorruptByteString
- Replace
- Remove
System.FS.Sim.Pure
module. - Adapt
simHasFS
to the newHasFS
primitives. This leads to two breaking changes:- Add a
PrimMonad m
constraint torunSimFS
,simHasFS'
andsimHasFS
. - Change the
StrictTVar
argument tosimHasFS
to aStrictTMVar
.
- Add a
- Adapt
mkSimErrorHasFS
to the newHasFS
primitives. This leads to two breaking changes:- Add a
PrimMonad m
constraint torunSimErrorFS
,mkSimErrorHasFS'
andmkSimErrorHasFS
. - Change the
StrictTVar
argument tomkSimErrorHasFS
to aStrictTMVar
.
- Add a
- Rename
mkSimErrorHasFS
tosimErrorHasFS
. - Rename
mkSimErrorHasFS'
tosimErrorHasFS'
.
Non-breaking
- New constructors for the
Errors
type:hGetBufSomeE
,hGetBufSomeAtE
,hGetBufSomeE
, andhPutBufSomeAtE
. - Expose the new
System.FS.Sim.Prim
module.
Patch
allNull
was not actually checking whether all streams in the argumentErrors
are empty.- The
Show Errors
instance was not printing every stream. - The shrinker for
Errors
was not shrinking every stream. - Adapt to moving of
Util
modules infs-api
. - Make it build with
ghc-9.10
. - New
primitive ^>=0.9
dependency - New
safe-wild-cards^>=1.0
dependency - 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-classes
andstrict-stm
to1.3
0.2.0.0 -- 2023-06-02
Breaking
- Move
Stream
-related functions to newSystem.FS.Sim.Stream
module. - Remove
Semigroup
andMonoid
instances forStream
andErrors
types. - Overhaul
Stream
type and related functions. TheStream
type now behaves similarly toTest.QuickCheck
'sInfiniteList
, which improves showing, generation and shrinking.
Non-breaking
- Add
simHasFS'
andmkSimErrorHasFS'
, which are alternatives tosimHasFS
andmkSimErrorHasFS
that createTVar
s internally. - Add new
emptyErrors
function. - Adapt the
Errors
type to use the overhauledStream
type. As a bonus:- Arbitrary
Errors
now contain infinite errorStream
s by default, instead of finite ones. - Shrinking of
Errors
that contain infinite errorStream
s now terminates.
- Arbitrary
Patch
- Enable building with
ghc-9.4
. - Remove
asserts
package 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.