fixed-length 0.0.0.2 → 0.1
raw patch · 2 files changed
+10/−5 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
- Data.FixedLength: class list ~ List (Position list) => C list where type family Position list :: * type family List position :: * -> *
+ Data.FixedLength: class list ~ List (Position list) => C list where type family Position list :: *
Files
- fixed-length.cabal +2/−2
- src/Data/FixedLength.hs +8/−3
fixed-length.cabal view
@@ -1,5 +1,5 @@ Name: fixed-length-Version: 0.0.0.2+Version: 0.1 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -25,7 +25,7 @@ Build-Type: Simple Source-Repository this- Tag: 0.0.0.2+ Tag: 0.1 Type: darcs Location: http://code.haskell.org/~thielema/fixed-length/
src/Data/FixedLength.hs view
@@ -33,22 +33,27 @@ import Prelude (Functor, fmap, Show, (+), error) +type family List position :: * -> *+ class (list ~ List (Position list)) => C list where type Position list :: *- type List position :: * -> * switch :: f Empty.T -> (forall list0. C list0 => f (NonEmpty.T list0)) -> f list ++type instance List Zero = Empty.T+ instance C Empty.T where type Position Empty.T = Zero- type List Zero = Empty.T switch x _ = x ++type instance List (Succ position) = NonEmpty.T (List position)+ instance C list => C (NonEmpty.T list) where type Position (NonEmpty.T list) = Succ (Position list)- type List (Succ position) = NonEmpty.T (List position) switch _ x = x