ty 0.1.0 → 0.1.2
raw patch · 2 files changed
+16/−4 lines, 2 filesdep +ghc-primdep ~base
Dependencies added: ghc-prim
Dependency ranges changed: base
Files
- src/Data/IsTy.hs +11/−1
- ty.cabal +5/−3
src/Data/IsTy.hs view
@@ -1,4 +1,6 @@ {-# LANGUAGE TypeOperators #-}+{-# LANGUAGE TypeFamilies, ConstraintKinds, KindSignatures+ , FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -Wall #-} ---------------------------------------------------------------------- -- |@@ -14,8 +16,16 @@ module Data.IsTy (IsTy(..)) where +import GHC.Prim (Constraint)+ import Data.Proof.EQ ((:=:)) +class Yes (f :: * -> *) a+instance Yes f a+ -- | Type class for typed type representations class IsTy ty where- tyEq :: ty a -> ty b -> Maybe (a :=: b)+ 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)
ty.cabal view
@@ -1,5 +1,5 @@ Name: ty-Version: 0.1.0+Version: 0.1.2 Synopsis: Typed type representations and equality proofs Category: Data Cabal-Version: >= 1.6@@ -12,7 +12,7 @@ Author: Conal Elliott Maintainer: conal@conal.net Homepage: https://github.com/conal/ty-Copyright: (c) 2009-2012 by Conal Elliott+Copyright: (c) 2009-2013 by Conal Elliott License: BSD3 License-File: COPYING Stability: experimental@@ -24,9 +24,11 @@ Library hs-Source-Dirs: src- Build-Depends: base<5+ Build-Depends: base<5, ghc-prim Exposed-Modules: Data.Proof.EQ Data.IsTy Data.Ty ghc-options: -Wall++ ghc-prof-options: -prof -auto-all