|
1 | 1 | # Change Log |
2 | 2 |
|
3 | | -## [0.1.0] - 2021-02-09 |
| 3 | +## [v0.2.0](https://github.com/tweag/linear-base/tree/v0.2.0) - 2022-03-17 |
| 4 | + |
| 5 | +[Full Changelog](https://github.com/tweag/linear-base/compare/v0.1.0...v0.2.0) |
| 6 | + |
| 7 | +### Breaking changes |
| 8 | + |
| 9 | +- Remove `Prelude.Linear.asTypeOf` [\#397](https://github.com/tweag/linear-base/pull/397) ([tbagrel1](https://github.com/tbagrel1)) |
| 10 | +- Add (and use) linear generics for many classes [\#394](https://github.com/tweag/linear-base/pull/394) ([treeowl](https://github.com/treeowl)) |
| 11 | + - `Control.Functor.Linear.Functor`, `Data.Functor.Linear.{Functor,Applicative}` can now be derived through `Generically1` |
| 12 | + - `Data.Functor.Linear.Traversable` cannot be derived directly, but one can get `genericTraverse` for a `Generic1` type and then set `traverse = genericTraverse` |
| 13 | + - `Data.Unrestricted.Linear.{Consumable,Dupable,Movable}` can be derived through `Generically` |
| 14 | +- Rework `Data.Monoid.Linear` module (affects linear `Semigroup` and `Monoid`) [\#314](https://github.com/tweag/linear-base/pull/314) ([sjoerdvisscher](https://github.com/sjoerdvisscher)), [\#381](https://github.com/tweag/linear-base/pull/381) ([tbagrel1](https://github.com/tbagrel1)) |
| 15 | + - **Remove superclass constraint** on `Prelude.{Semigroup,Monoid}` for `Data.Monoid.Linear.{Semigroup,Monoid}`. `Data.Monoid.Linear.Monoid` instances now have to define `mempty` |
| 16 | + - Add many missing instances of `Data.Monoid.Linear.{Semigroup,Monoid}` |
| 17 | + - Deprecate `Data.Monoid.Linear.{Adding,Multiplying,getAdded,getMultiplied}` in favor of `Data.Semigroup.{Sum,Product}` (reexported under `Data.Monoid.Linear`) which now have linear `Semigroup` and `Monoid` instance. `Sum` and `Product` inner values can be extracted linearly with pattern-matching |
| 18 | + - As a side-effect of the deprecation, `Control.Optics.Linear.lengthOf` signature changed from<br/>`lengthOf :: MultIdentity r => Optic_ (NonLinear.Kleisli (Const (Adding r))) s t a b -> s -> r` to<br/> |
| 19 | + `lengthOf :: MultIdentity r => Optic_ (NonLinear.Kleisli (Const (Sum r))) s t a b -> s -> r` |
| 20 | + - **`Data.Semigroup` is no longer reexported as a whole under `Data.Monoid.Linear`**. Instead, only newtypes with a linear `Semigroup` instance are reexported |
| 21 | +- Add missing fixity declarations for every operator of `linear-base` [\#386](https://github.com/tweag/linear-base/pull/386), ([tbagrel1](https://github.com/tbagrel1)) |
| 22 | + - **Unchanged** (already present):<br/>`infixr 0 $`, `infixl 1 &`, `infixr 2 ||`, `infixr 3 &&`,<br/> `infix 4 ==, /=, <=, <, >, >=`, `infixr 5 :>` |
| 23 | + - Add: ```infixr 0 `lseq`, `seq`, $!``` |
| 24 | + - Add: `infixl 1 <&>, >>=, >>, &` |
| 25 | + - Add: `infixr 3 ***` |
| 26 | + - Add: ```infix 4 `compare`, `elem` ``` |
| 27 | + - Add: `infixl 4 <$>, <$, <*>, <*` |
| 28 | + - Add: `infixr 5 ++` |
| 29 | + - Add: `infixr 6 <>` |
| 30 | + - Add: `infixl 6 +, -` |
| 31 | + - Add: `infixl 7 *` |
| 32 | + - Add: `infixr 9 #., .>, .` |
| 33 | + - **Previously missing fixity declarations defaulted to `infixl 9`, so some code might subtly break when updating to v0.2.0** |
| 34 | +- Improve consistency of module naming [\#383](https://github.com/tweag/linear-base/pull/383) ([tbagrel1](https://github.com/tbagrel1)) |
| 35 | + - **`System.IO.Resource` -> `System.IO.Resource.Linear`** |
| 36 | + - `Streaming.Internal` -> `System.Linear.Internal` |
| 37 | + - `Data.Unrestricted.Internal` -> `Data.Unrestricted.Linear.Internal` |
| 38 | + - `Data.Arity.Linear.Internal.Arity` -> `Data.Arity.Linear.Internal` |
| 39 | +- Rework `Data.V.Linear` API [\#360](https://github.com/tweag/linear-base/pull/360) ([tbagrel1](https://github.com/tbagrel1)) |
| 40 | + - `Data.Functor.Linear.Applicative` instance |
| 41 | + - `empty :: forall a. V 0 a` |
| 42 | + - `consume :: V 0 a %1 -> ()` |
| 43 | + - `cons :: forall n a. a %1 -> V (n - 1) a %1 -> V n a` |
| 44 | + - `uncons# :: 1 <= n => V n a %1 -> (# a, V (n - 1) a #)` |
| 45 | + - `uncons :: 1 <= n => V n a %1 -> (a, V (n - 1) a)` |
| 46 | + - `elim :: forall (n :: Nat) a b f. IsFunN a b f => f %1 -> V n a %1 -> b` |
| 47 | + - `make :: forall (n :: Nat) a f. IsFunN a (V n a) f => f` |
| 48 | + - `fromReplicator :: forall n a. KnownNat n => Replicator a %1 -> V n a` |
| 49 | + - `theLength :: forall n. KnownNat n => Prelude.Int` |
| 50 | + - **`dupV` is now part of `Data.V.Linear`:**<br/> |
| 51 | + `dupV :: forall n a. (KnownNat n, Dupable a) => a %1 -> V n a` |
| 52 | +- Replace `dupV` in the minimal definition of `Data.Unrestricted.Linear.Dupable` with `dupR :: a %1 -> Replicator a` [\#360](https://github.com/tweag/linear-base/pull/360) ([tbagrel1](https://github.com/tbagrel1)) [\#365](https://github.com/tweag/linear-base/pull/365) ([facundominguez](https://github.com/facundominguez)) |
| 53 | + - Introduce a new data type `Data.Replicator.Linear.Replicator`, which represents an infinite linear stream producing values of type `a`, with a stream-like API and a `Data.Functor.Linear.Applicative` instance |
| 54 | + - `Data.Unrestricted.Linear.Dupable` no longer depends on `Data.V.Linear` |
| 55 | + - Add `dup3`, `dup4`, `dup5`, `dup6`, `dup7` |
| 56 | +- Polymorphise the type of some `Prelude.Linear` functions in levity and multiplicity [\#353](https://github.com/tweag/linear-base/pull/353) ([treeowl](https://github.com/treeowl)) |
| 57 | + - `($) :: forall {rep} a (b :: TYPE rep) p q. (a %p-> b) %q-> a %p-> b` |
| 58 | + - `(&) :: forall {rep} a (b :: TYPE rep) p q. a %p-> (a %p-> b) %q-> b` |
| 59 | + - `($!) :: forall {rep} a (b :: TYPE rep) p q. (a %p-> b) %q-> a %p-> b` |
| 60 | + - `(.) :: forall {rep} b (c :: TYPE rep) a q m n. (b %1-> c) %q-> (a %1-> b) %m-> a %n-> c` |
| 61 | + - `forget :: forall {rep} a (b :: TYPE rep). (a %1-> b) %1-> a -> b` |
| 62 | +- Multiplicity-polymorphise the type of some `Prelude.Linear` functions [\#319](https://github.com/tweag/linear-base/pull/319) ([aspiwack](https://github.com/aspiwack)) |
| 63 | + - `id :: a %q-> a` |
| 64 | + - `const :: a %q-> b -> a` |
| 65 | + - `asTypeOf :: a %q-> a -> a` |
| 66 | + - `seq :: a -> b %q-> b` |
| 67 | + - `curry :: ((a, b) %p-> c) %q-> a %p-> b %p-> c` |
| 68 | + - `uncurry :: (a %p-> b %p-> c) %q-> (a, b) %p-> c` |
| 69 | + - `runIdentity' :: Identity a %p-> a` |
| 70 | +- Remove `LinearArrow` usage in `Control.Optics.Linear` and use `FUN 'One` instead [\#308](https://github.com/tweag/linear-base/pull/308) ([sjoerdvisscher](https://github.com/sjoerdvisscher)) |
| 71 | + - This change add a `Data.Profunctor.Linear.Profunctor` instance to `FUN 'One` |
| 72 | +- Add `.Linear.Internal` modules (and only export parts of them in publicly-exposed `.Linear` modules) [\#306](https://github.com/tweag/linear-base/pull/306) ([ekmett](https://github.com/ekmett)) |
| 73 | + - `Data.Array.Destination[.Internal]` |
| 74 | + - `Data.Array.Mutable.Linear[.Internal]` |
| 75 | + - `Data.HashMap.Mutable.Linear[.Internal]` |
| 76 | + - `Data.Set.Mutable.Linear[.Internal]` |
| 77 | + - `Data.Vector.Mutable.Linear[.Internal]` |
| 78 | + - `Foreign.Marshal.Pure[.Internal]` |
| 79 | + - `System.IO.Resource.Linear.[.Internal]` |
| 80 | + - This principle has been applied for newly-created modules in the subsequent PRs |
| 81 | + |
| 82 | +### New additions |
| 83 | + |
| 84 | +- Add `Data.Arity.Linear` module containing type-level helpers to deal with n-ary linear functions and type-level structural integers [\#390](https://github.com/tweag/linear-base/pull/390) ([aspiwack](https://github.com/aspiwack)), [\#391](https://github.com/tweag/linear-base/pull/391) ([tbagrel1](https://github.com/tbagrel1)) |
| 85 | +- Add `void` function to consume `Control.Functor.Linear.Functor` inner value [\#387](https://github.com/tweag/linear-base/pull/387) ([tbagrel1](https://github.com/tbagrel1)) |
| 86 | +- Add inspection tests to check inlining of `Data.Replicator.Linear.elim` and `Data.V.Linear.{make,elim}` [\#367](https://github.com/tweag/linear-base/pull/367) ([tbagrel1](https://github.com/tbagrel1)) |
| 87 | +- Add `genericTraverse` to `Data.Functor.Linear` for `Generics.Linear.Generic1` types [\#366](https://github.com/tweag/linear-base/pull/366) ([tbagrel1](https://github.com/tbagrel1)), [\#384](https://github.com/tweag/linear-base/pull/384) ([aspiwack](https://github.com/aspiwack)), [\#385](https://github.com/tweag/linear-base/pull/385) ([treeowl](https://github.com/treeowl)) |
| 88 | +- Add `Unsafe.toLinearN` (and narrow the scope of some coercions in the module internals) [\#346](https://github.com/tweag/linear-base/pull/346) ([treeowl](https://github.com/treeowl)) |
| 89 | +- Add newtype `Data.Unrestricted.Linear.AsMovable` to derive `Consumable` and `Dupable` from `Movable` [\#357](https://github.com/tweag/linear-base/pull/357) ([tbagrel1](https://github.com/tbagrel1)) |
| 90 | +- Add `Data.Unrestricted.Linear.{Consumable,Dupable,Moveable}` instances for all Word and Int types [\#352](https://github.com/tweag/linear-base/pull/352) ([googleson78](https://github.com/googleson78)) |
| 91 | +- Add benchmarks for `Data.HashMap.Linear` [\#338](https://github.com/tweag/linear-base/pull/338) ([utdemir](https://github.com/utdemir)) |
| 92 | +- Add benchmarks for `Data.Array.Mutable.Linear` [\#331](https://github.com/tweag/linear-base/pull/331) ([utdemir](https://github.com/utdemir)) |
| 93 | +- Add `Data.Unrestricted.Linear.{Consumable,Dupable}` instances to `Data.V.Linear.V` [\#324](https://github.com/tweag/linear-base/pull/324) ([aspiwack](https://github.com/aspiwack)) |
| 94 | +- Add `Data.Unrestricted.Linear.UrT`, the unrestricted monad transformer [\#304](https://github.com/tweag/linear-base/pull/304) ([sjoerdvisscher](https://github.com/sjoerdvisscher)) |
| 95 | + |
| 96 | +### Code improvements |
| 97 | + |
| 98 | +- Add robustness improvements to `Data.Replicator.Linear.elim` and `Data.V.Linear.{make,elim}` [\#364](https://github.com/tweag/linear-base/pull/364) ([tbagrel1](https://github.com/tbagrel1)), [\#382](https://github.com/tweag/linear-base/pull/382) ([tbagrel1](https://github.com/tbagrel1)), [\#390](https://github.com/tweag/linear-base/pull/390) ([aspiwack](https://github.com/aspiwack)), [\#391](https://github.com/tweag/linear-base/pull/391) ([tbagrel1](https://github.com/tbagrel1)) |
| 99 | +- Add various optimisations for `Data.HashMap.Linear` [\#337](https://github.com/tweag/linear-base/pull/337) ([utdemir](https://github.com/utdemir)) |
| 100 | +- Improve `Data.Array.Mutable.Unlifted.Linear.map` performance [\#334](https://github.com/tweag/linear-base/pull/334) ([utdemir](https://github.com/utdemir)) |
| 101 | +- Remove one `unsafeCoerce` use from `Unsafe.coerce` [\#330](https://github.com/tweag/linear-base/pull/330) ([utdemir](https://github.com/utdemir)) |
| 102 | +- Improve `Prelude.Linear.seq` performance [\#329](https://github.com/tweag/linear-base/pull/329) ([utdemir](https://github.com/utdemir)) |
| 103 | +- Use safer `Vector.fromArray` in `Data.Array.Mutable.Linear` internals [\#327](https://github.com/tweag/linear-base/pull/327) ([utdemir](https://github.com/utdemir)) |
| 104 | +- Remove some incomplete pattern matches in `Data.List.Linear.{scanr,scanr1}` [\#299](https://github.com/tweag/linear-base/pull/299) ([utdemir](https://github.com/utdemir)) |
| 105 | + |
| 106 | +### CI/Tooling improvements |
| 107 | + |
| 108 | +- Move CI tests from the `cabal` job to the `stack` job [\#398](https://github.com/tweag/linear-base/pull/398) ([tbagrel1](https://github.com/tbagrel1)) |
| 109 | +- Set warnings for `ghcide` in the cabal file [\#378](https://github.com/tweag/linear-base/pull/378) ([aspiwack](https://github.com/aspiwack)) |
| 110 | +- Disable all `hlint` hints except those related to pragmas [\#362](https://github.com/tweag/linear-base/pull/362) ([tbagrel1](https://github.com/tbagrel1)) |
| 111 | +- Enable doctesting through `cabal-docspec` in the CI [\#361](https://github.com/tweag/linear-base/pull/361) ([andreabedini](https://github.com/andreabedini)) |
| 112 | +- Format the codebase with [`ormolu`](https://github.com/tweag/ormolu) and add an `ormolu` check to the CI [\#355](https://github.com/tweag/linear-base/pull/355) ([tbagrel1](https://github.com/tbagrel1)), [\#358](https://github.com/tweag/linear-base/pull/358) ([tbagrel1](https://github.com/tbagrel1)) |
| 113 | +- CI and `shell.nix` overhaul [\#322](https://github.com/tweag/linear-base/pull/322) ([aspiwack](https://github.com/aspiwack)), [\#323](https://github.com/tweag/linear-base/pull/323) ([aspiwack](https://github.com/aspiwack)), [\#325](https://github.com/tweag/linear-base/pull/325) ([utdemir](https://github.com/utdemir)), [\#332](https://github.com/tweag/linear-base/pull/332) ([utdemir](https://github.com/utdemir)), [\#348](https://github.com/tweag/linear-base/pull/348) ([aspiwack](https://github.com/aspiwack)), [\#355](https://github.com/tweag/linear-base/pull/355) ([tbagrel1](https://github.com/tbagrel1)), [\#359](https://github.com/tweag/linear-base/pull/359) ([tbagrel1](https://github.com/tbagrel1)) |
| 114 | + - Bump `nixpkgs` and `stackage` pinned versions to recent `unstable`/`nightly` ones |
| 115 | + - Move CI from *Buildkite* to *Github Action* |
| 116 | + - Automatically run the CI on pull requests |
| 117 | + - Add `stack`/Nix integration when `stack` is provided by `nix-shell`/`shell.nix` (the project still builds with a globally installed `stack`) |
| 118 | +- Force resolving test dependencies on `cabal` [\#342](https://github.com/tweag/linear-base/pull/342) ([utdemir](https://github.com/utdemir)) |
| 119 | +- Remove `cabal-docspec` reference from `Setup.hs` [\#335](https://github.com/tweag/linear-base/pull/335) ([facundominguez](https://github.com/facundominguez)) |
| 120 | +- Start using upstream `nixpkgs` (instead of our own fork) [\#302](https://github.com/tweag/linear-base/pull/302) ([utdemir](https://github.com/utdemir)) |
| 121 | + |
| 122 | +### Documentation improvements |
| 123 | + |
| 124 | +- Add comparison table between `Prelude` and `Prelude.Linear` classes [\#368](https://github.com/tweag/linear-base/pull/368) ([tbagrel1](https://github.com/tbagrel1)) |
| 125 | +- Add Hackage and Stackage badges [\#336](https://github.com/tweag/linear-base/pull/336) ([utdemir](https://github.com/utdemir)) |
| 126 | +- Hide internal modules from `haddock` documentation [\#326](https://github.com/tweag/linear-base/pull/326) ([utdemir](https://github.com/utdemir)), [\#363](https://github.com/tweag/linear-base/pull/363) ([tbagrel1](https://github.com/tbagrel1)) |
| 127 | +- Add a note that GHC 9.2 fixes linear `case` in the user guide [\#320](https://github.com/tweag/linear-base/pull/320) ([monoidal](https://github.com/monoidal)) |
| 128 | +- Replace `#->` with `%1 ->` in the documentation [\#315](https://github.com/tweag/linear-base/pull/315) ([sjoerdvisscher](https://github.com/sjoerdvisscher)) |
| 129 | +- Fix rendering in `Data.Unrestricted.Linear.Ur` documentation [\#303](https://github.com/tweag/linear-base/pull/303) ([sjoerdvisscher](https://github.com/sjoerdvisscher)) |
| 130 | +- Fix a typo in `Data.Array.Mutable.Linear.unsafeWrite` documentation [\#301](https://github.com/tweag/linear-base/pull/301) ([daig](https://github.com/daig)) |
| 131 | +- Add a list of introduction talks about linear types in the README [\#300](https://github.com/tweag/linear-base/pull/300) ([aspiwack](https://github.com/aspiwack)) |
| 132 | +- Improve developer documentation in `Data.Array.Polarized.Push` [\#294](https://github.com/tweag/linear-base/pull/294) ([Divesh-Otwani](https://github.com/Divesh-Otwani)) |
| 133 | + |
| 134 | + |
| 135 | +## [v0.1.0](https://github.com/tweag/linear-base/tree/v0.1.0) - 2021-02-09 |
4 | 136 |
|
5 | 137 | * Initial release |
0 commit comments