on 3d4e50b help sign in
CHANGELOG.md−3
since splitsnapshots
unifiedsplit
@@ -4,9 +4,6 @@
4
4
5# CHANGELOG
5# CHANGELOG
6
6
7−## 0.1.2
8−### Added KnownPeano
9−
10## 0.1.1
7## 0.1.1
11### Fixed
8### Fixed
12* Compilable with ghc-8.0.1
9* Compilable with ghc-8.0.1
example/Main.hs−1
@@ -37,5 +37,4 @@ main = do
37 print $ prefixConstr p2
37 print $ prefixConstr p2
38 print $ prefixConstr p3
38 print $ prefixConstr p3
39 print $ uniqConstr p2
39 print $ uniqConstr p2
40− print $ peanoVal (Proxy :: Proxy (FromNat 100))
41 -- print $ uniqConstr p3 -- < ElementIsNotUniqInList Int '[Int, Bool, Int]
40 -- print $ uniqConstr p3 -- < ElementIsNotUniqInList Int '[Int, Bool, Int]
src/TypeFun/Data/Peano.hs+3−5
@@ -1,6 +1,5 @@
1module TypeFun.Data.Peano
1module TypeFun.Data.Peano
2 ( N(..)
2 ( N(..)
3− , KnownPeano(..)
4 , ToNat
3 , ToNat
5 , FromNat
4 , FromNat
6 , (:+:)
5 , (:+:)
@@ -8,15 +7,14 @@ module TypeFun.Data.Peano
8 , (:*:)
7 , (:*:)
9 ) where
8 ) where
10
9
11−import Data.Typeable
10+import Data.Typeable
12−import GHC.Generics (Generic)
11+import GHC.Generics (Generic)
13−import GHC.TypeLits
12+import GHC.TypeLits
14
13
15data N = Z | S N
14data N = Z | S N
16 deriving ( Eq, Ord, Read, Show
15 deriving ( Eq, Ord, Read, Show
17 , Generic, Typeable )
16 , Generic, Typeable )
18
17
19−-- | @since 0.1.2
20class KnownPeano (p :: N) where
18class KnownPeano (p :: N) where
21 peanoVal :: proxy p -> Integer
19 peanoVal :: proxy p -> Integer
22
20
type-fun.cabal+1−1
@@ -1,5 +1,5 @@
1name: type-fun
1name: type-fun
2−version: 0.1.2
2+version: 0.1.1
3synopsis: Collection of widely reimplemented type families
3synopsis: Collection of widely reimplemented type families
4license: BSD3
4license: BSD3
5license-file: LICENSE
5license-file: LICENSE