v0.4.0 (2023-10-13)
- Deprecate cycle, repeat, and iterate for lists #458 (treeowl)
- Compability with GHC 9.8 #457 (monoidal)
- Drop compatibility with GHC 9.0 #442 (aspiwack)
- Implements
Semigroup
/Monoid
instances forUr
#461 (konn) - Adds
Functor
instances for the linear arrow #460 (konn)- This fixes an issue with linear lenses (both
Data
andControl
) #459
- This fixes an issue with linear lenses (both
- Implement toSystemIO safely #444 (treeowl)
- Stop testing with GHC 9.2, though it this version is still expected to work #448 (tbagrel1)
- Benchmarks:
v0.3.1 (2023-03-17)
v0.3.0 (2022-10-26)
- Support GHC 9.4 in addition to GHC 9.2 and GHC 9.0 (GHC 9.0 is no longer tested though) #427 (matthew-healy)
- Update
shell.nix
to enable building with GHC 9.4.1 #429 (matthew-healy)
- Update
- Improvement of the resource-aware
IO
(RIO
) monad's interface
Monoid (Maybe a)
requires onlySemigroup a
, notMonoid a
#409 (treeowl)- Add
evalState(T)
#411 (andreasabel) - Add
Movable
instances for several primitive types, as well as (non-linear)Applicative
,Foldable
,Traversable
instances forV
. #416 (sellout) - Fix typo in comment: resrouce -> resource #421 (undergroundquizscene)
- Fix haddock hyperlink reference (minor typo) #420 (undergroundquizscene)
- Fix haddock links in
Data.Replicator.Linear
#423 (undergroundquizscene) - Add
CONTRIBUTING.md
#426 (tbagrel1)
v0.2.0 - 2022-03-25
- Remove
Prelude.Linear.asTypeOf
#397 (tbagrel1) - Add (and use) linear generics for many classes #394 (treeowl)
Control.Functor.Linear.Functor
,Data.Functor.Linear.{Functor,Applicative}
can now be derived throughGenerically1
Data.Functor.Linear.Traversable
cannot be derived directly, but one can getgenericTraverse
for aGeneric1
type and then settraverse = genericTraverse
Data.Unrestricted.Linear.{Consumable,Dupable,Movable}
can be derived throughGenerically
- Rework
Data.Monoid.Linear
module (affects linearSemigroup
andMonoid
) #314 (sjoerdvisscher), #381 (tbagrel1)- Remove superclass constraint on
Prelude.{Semigroup,Monoid}
forData.Monoid.Linear.{Semigroup,Monoid}
.Data.Monoid.Linear.Monoid
instances now have to definemempty
- Add many missing instances of
Data.Monoid.Linear.{Semigroup,Monoid}
- Deprecate
Data.Monoid.Linear.{Adding,Multiplying,getAdded,getMultiplied}
in favor ofData.Semigroup.{Sum,Product}
(reexported underData.Monoid.Linear
) which now have linearSemigroup
andMonoid
instance.Sum
andProduct
inner values can be extracted linearly with pattern-matching Data.Semigroup
is no longer reexported as a whole underData.Monoid.Linear
. Instead, only newtypes with a linearSemigroup
instance are reexported
- Remove superclass constraint on
- Add missing fixity declarations for every operator of
linear-base
#386, (tbagrel1)- Unchanged (already present):
infixr 0 $
,infixl 1 &
,infixr 2 ||
,infixr 3 &&
,
infix 4 ==, /=, <=, <, >, >=
,infixr 5 :>
- Add:
infixr 0 `lseq`, `seq`, $!
- Add:
infixl 1 <&>, >>=, >>, &
- Add:
infixr 3 ***
- Add:
infix 4 `compare`, `elem`
- Add:
infixl 4 <$>, <$, <*>, <*
- Add:
infixr 5 ++
- Add:
infixr 6 <>
- Add:
infixl 6 +, -
- Add:
infixl 7 *
- Add:
infixr 9 #., .>, .
- Previously missing fixity declarations defaulted to
infixl 9
, so some code might subtly break when updating to v0.2.0
- Unchanged (already present):
- Improve consistency of module naming #383 (tbagrel1)
System.IO.Resource
->System.IO.Resource.Linear
- Rework
Data.V.Linear
API #360 (tbagrel1)Data.Functor.Linear.Applicative
instanceempty :: forall a. V 0 a
consume :: V 0 a %1 -> ()
cons :: forall n a. a %1 -> V (n - 1) a %1 -> V n a
uncons# :: 1 <= n => V n a %1 -> (# a, V (n - 1) a #)
uncons :: 1 <= n => V n a %1 -> (a, V (n - 1) a)
elim :: forall (n :: Nat) a b f. IsFunN a b f => f %1 -> V n a %1 -> b
make :: forall (n :: Nat) a f. IsFunN a (V n a) f => f
fromReplicator :: forall n a. KnownNat n => Replicator a %1 -> V n a
theLength :: forall n. KnownNat n => Prelude.Int
dupV
is now part ofData.V.Linear
:
dupV :: forall n a. (KnownNat n, Dupable a) => a %1 -> V n a
- Replace
dupV
in the minimal definition ofData.Unrestricted.Linear.Dupable
withdupR :: a %1 -> Replicator a
#360 (tbagrel1) #365 (facundominguez)- Introduce a new data type
Data.Replicator.Linear.Replicator
, which represents an infinite linear stream producing values of typea
, with a stream-like API and aData.Functor.Linear.Applicative
instance Data.Unrestricted.Linear.Dupable
no longer depends onData.V.Linear
- Add
dup3
,dup4
,dup5
,dup6
,dup7
- Introduce a new data type
- Polymorphise the type of some
Prelude.Linear
functions in levity and multiplicity #353 (treeowl)($) :: forall {rep} a (b :: TYPE rep) p q. (a %p-> b) %q-> a %p-> b
(&) :: forall {rep} a (b :: TYPE rep) p q. a %p-> (a %p-> b) %q-> b
($!) :: forall {rep} a (b :: TYPE rep) p q. (a %p-> b) %q-> a %p-> b
(.) :: forall {rep} b (c :: TYPE rep) a q m n. (b %1-> c) %q-> (a %1-> b) %m-> a %n-> c
forget :: forall {rep} a (b :: TYPE rep). (a %1-> b) %1-> a -> b
- Multiplicity-polymorphise the type of some
Prelude.Linear
functions #319 (aspiwack)id :: a %q-> a
const :: a %q-> b -> a
asTypeOf :: a %q-> a -> a
seq :: a -> b %q-> b
curry :: ((a, b) %p-> c) %q-> a %p-> b %p-> c
uncurry :: (a %p-> b %p-> c) %q-> (a, b) %p-> c
runIdentity' :: Identity a %p-> a
- Remove
LinearArrow
usage inControl.Optics.Linear
and useFUN 'One
instead #308 (sjoerdvisscher)- This change add a
Data.Profunctor.Linear.Profunctor
instance toFUN 'One
- This change add a
- Add
.Linear.Internal
modules (and only export parts of them in publicly-exposed.Linear
modules) #306 (ekmett)Data.Array.Destination[.Internal]
Data.Array.Mutable.Linear[.Internal]
Data.HashMap.Mutable.Linear[.Internal]
Data.Set.Mutable.Linear[.Internal]
Data.Vector.Mutable.Linear[.Internal]
Foreign.Marshal.Pure[.Internal]
System.IO.Resource.Linear.[.Internal]
- This principle has been applied for newly-created modules in the subsequent PRs
- Add
Data.Arity.Linear
module containing type-level helpers to deal with n-ary linear functions and type-level structural integers #390 (aspiwack), #391 (tbagrel1) - Add
void
function to consumeControl.Functor.Linear.Functor
inner value #387 (tbagrel1) - Add inspection tests to check inlining of
Data.Replicator.Linear.elim
andData.V.Linear.{make,elim}
#367 (tbagrel1) - Add
genericTraverse
toData.Functor.Linear
forGenerics.Linear.Generic1
types #366 (tbagrel1), #384 (aspiwack), #385 (treeowl) - Add
Unsafe.toLinearN
(and narrow the scope of some coercions in the module internals) #346 (treeowl) - Add newtype
Data.Unrestricted.Linear.AsMovable
to deriveConsumable
andDupable
fromMovable
#357 (tbagrel1) - Add
Data.Unrestricted.Linear.{Consumable,Dupable,Moveable}
instances for all Word and Int types #352 (googleson78) - Add benchmarks for
Data.HashMap.Linear
#338 (utdemir) - Add benchmarks for
Data.Array.Mutable.Linear
#331 (utdemir) - Add
Data.Unrestricted.Linear.{Consumable,Dupable}
instances toData.V.Linear.V
#324 (aspiwack) - Add
Data.Unrestricted.Linear.UrT
, the unrestricted monad transformer #304 (sjoerdvisscher)
- Add robustness improvements to
Data.Replicator.Linear.elim
andData.V.Linear.{make,elim}
#364 (tbagrel1), #382 (tbagrel1), #390 (aspiwack), #391 (tbagrel1) - Add various optimisations for
Data.HashMap.Linear
#337 (utdemir) - Improve
Data.Array.Mutable.Unlifted.Linear.map
performance #334 (utdemir) - Remove one
unsafeCoerce
use fromUnsafe.coerce
#330 (utdemir) - Improve
Prelude.Linear.seq
performance #329 (utdemir) - Use safer
Vector.fromArray
inData.Array.Mutable.Linear
internals #327 (utdemir) - Remove some incomplete pattern matches in
Data.List.Linear.{scanr,scanr1}
#299 (utdemir)
- Move CI tests from the
cabal
job to thestack
job #398 (tbagrel1) - Set warnings for
ghcide
in the cabal file #378 (aspiwack) - Disable all
hlint
hints except those related to pragmas #362 (tbagrel1) - Enable doctesting through
cabal-docspec
in the CI #361 (andreabedini) - Format the codebase with
ormolu
and add anormolu
check to the CI #355 (tbagrel1), #358 (tbagrel1) - CI and
shell.nix
overhaul #322 (aspiwack), #323 (aspiwack), #325 (utdemir), #332 (utdemir), #348 (aspiwack), #355 (tbagrel1), #359 (tbagrel1)- Bump
nixpkgs
andstackage
pinned versions to recentunstable
/nightly
ones - Move CI from Buildkite to Github Action
- Automatically run the CI on pull requests
- Add
stack
/Nix integration whenstack
is provided bynix-shell
/shell.nix
(the project still builds with a globally installedstack
)
- Bump
- Force resolving test dependencies on
cabal
#342 (utdemir) - Remove
cabal-docspec
reference fromSetup.hs
#335 (facundominguez) - Start using upstream
nixpkgs
(instead of our own fork) #302 (utdemir)
- Change relative links for absolute ones in the README #401 (tbagrel1)
- Add comparison table between
Prelude
andPrelude.Linear
classes #368 (tbagrel1) - Add Hackage and Stackage badges #336 (utdemir)
- Hide internal modules from
haddock
documentation #326 (utdemir), #363 (tbagrel1) - Add a note that GHC 9.2 fixes linear
case
in the user guide #320 (monoidal) - Replace
#->
with%1 ->
in the documentation #315 (sjoerdvisscher) - Fix rendering in
Data.Unrestricted.Linear.Ur
documentation #303 (sjoerdvisscher) - Fix a typo in
Data.Array.Mutable.Linear.unsafeWrite
documentation #301 (daig) - Add a list of introduction talks about linear types in the README #300 (aspiwack)
- Improve developer documentation in
Data.Array.Polarized.Push
#294 (Divesh-Otwani)
v0.1.0 - 2021-02-09
- Initial release