packages feed

type-equality 0.1.0 → 0.1.0.1

raw patch · 2 files changed

+23/−6 lines, 2 filesdep −base

Dependencies removed: base

Files

src/Data/Type/Equality.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE TypeOperators            , GADTs+           , FlexibleInstances            , CPP            #-} -------------------------------------------------------------------------------@@ -44,6 +45,17 @@   Refl :: a :=: a  infix 4 :=:++-- | Any value is just shown as "Refl", but this cannot be derived for+-- a GADT, so it is defined here manually.+instance Show (a :=: b) where+  showsPrec _ Refl = showString "Refl"++-- | We can only read values if the result is @a :=: a@, not @a :=: b@+-- since that is not true, in general. We just parse the string+-- "Refl", optionally surrounded with parentheses, and return 'Refl'.+instance Read (a :=: a) where+  readsPrec _ = readParen False (\s -> [(Refl, r) | ("Refl", r) <- lex s])  #if __GLASGOW_HASKELL__ >= 609 instance Category (:=:) where
type-equality.cabal view
@@ -1,5 +1,5 @@ Name:             type-equality-Version:          0.1.0+Version:          0.1.0.1 Synopsis:         Type equality, coercion/cast and other operations. Description:      In the presence of GADTs, sometimes a proof is                   needed that two types are equal. This package@@ -10,7 +10,7 @@                   producing equality proofs, providing some form of                   decidable equality on types. Category:         Data-Cabal-Version:    >= 1.2.1+Cabal-Version:    >= 1.6 Author:           Erik Hesselink, Martijn van Steenbergen License:          BSD3 License-File:     LICENSE@@ -19,8 +19,13 @@ Stability:        experimental Build-Type:       Simple Build-Depends:    base >= 3 && < 5-Tested-With:      GHC == 6.8.2, GHC == 6.10.3+Tested-With:      GHC == 6.8.2, GHC == 6.10.3, GHC == 6.12.3, GHC == 7.0.2, GHC == 7.2.1 -HS-Source-Dirs:   src-GHC-Options:      -Wall-Exposed-Modules:  Data.Type.Equality+Library+  HS-Source-Dirs:   src+  GHC-Options:      -Wall+  Exposed-Modules:  Data.Type.Equality++Source-Repository head+  Type:             git+  Location:         git://github.com/hesselink/type-equality.git