ty 0.1.2 → 0.1.3
raw patch · 2 files changed
+17/−7 lines, 2 files
Files
- src/Data/IsTy.hs +16/−6
- ty.cabal +1/−1
src/Data/IsTy.hs view
@@ -14,7 +14,7 @@ -- Type class for typed type representations ---------------------------------------------------------------------- -module Data.IsTy (IsTy(..)) where+module Data.IsTy (IsTy(..),IsTy2(..)) where import GHC.Prim (Constraint) @@ -24,8 +24,18 @@ instance Yes f a -- | Type class for typed type representations-class IsTy ty where- type IsTyConstraint ty z :: Constraint- type IsTyConstraint ty z = Yes ty z- tyEq :: (IsTyConstraint ty a, IsTyConstraint ty b) =>- ty a -> ty b -> Maybe (a :=: b)+class IsTy f where+ type IsTyConstraint f z :: Constraint+ type IsTyConstraint f z = Yes f z+ tyEq :: (IsTyConstraint f a, IsTyConstraint f b) =>+ f a -> f b -> Maybe (a :=: b)++class Yes2 (f :: * -> * -> *) a b+instance Yes2 f a b++-- | Type class for typed type representations+class IsTy2 f where+ type IsTy2Constraint f u v :: Constraint+ type IsTy2Constraint f u v = Yes2 f u v+ tyEq2 :: (IsTy2Constraint f a b, IsTy2Constraint f c d) =>+ f a b -> f c d -> Maybe (a :=: c, b :=: d)
ty.cabal view
@@ -1,5 +1,5 @@ Name: ty-Version: 0.1.2+Version: 0.1.3 Synopsis: Typed type representations and equality proofs Category: Data Cabal-Version: >= 1.6