packages feed

type-eq 0.3 → 0.4

raw patch · 5 files changed

+44/−10 lines, 5 filesdep ~base

Dependency ranges changed: base

Files

Type/Eq.hs view
@@ -3,6 +3,8 @@ #include "macros.h"  LANGUAGE_POLYKINDS+LANGUAGE_AUTODERIVETYPEABLE+LANGUAGE_ALLOWAMBIGUOUSTYPES  LANGUAGE_TRUSTWORTHY  {-# OPTIONS_GHC -fno-warn-unused-imports #-}@@ -22,7 +24,15 @@ --import Control.Category.Product (Tensor(..)) --import Data.Groupoid            (Groupoid(..)) --import Data.Semigroupoid        (Semigroupoid(..))-import Data.Typeable     hiding (cast)+import Data.Typeable     (Typeable, gcast)+#if !(MIN_VERSION_base(4, 7, 0))+import Data.Typeable     (Typeable2, typeOf2, mkTyConApp)+#endif+#if MIN_VERSION_base(4, 4, 0)+import Data.Typeable     (mkTyCon3)+#else+import Data.Typeable     (mkTyCon)+#endif import Type.Eq.Unsafe import Prelude           hiding ((.)) import Unsafe.Coerce@@ -35,12 +45,12 @@ --   are very useful for working with values of type @Maybe (a :~: b)@. data a :~: b where     Eq :: (a ~ b) => a :~: b---- FIXME ifdef this for 7.8+#if !(MIN_VERSION_base(4, 7, 0)) -- deriving Typeable and PolyKinds don't play well instance Typeable2 (:~:) where     typeOf2 = const $ mkTyConApp tyCon []         where tyCon = MK_TY_CON("Type.Eq",":~:")+#endif  -- | Unpack equality evidence and use it. -- 
Type/Eq/Higher.hs view
@@ -9,10 +9,16 @@ -- |  Types and functions for storing and manipulating evidence of equality between types of higher kind. --  --    Available up to @* -> * -> *@. Yell if you need more.+-- +--    In GHC 7.8, this module uses @Data.OldTypeable@. Future uncertain.  module Type.Eq.Higher (module Type.Eq, module Type.Eq.Higher) where +#if MIN_VERSION_base(4,7,0)+import Data.OldTypeable hiding (cast)+#else import Data.Typeable hiding (cast)+#endif import Type.Eq import Type.Eq.Higher.Unsafe import Unsafe.Coerce
Type/Eq/Poly.hs view
@@ -3,18 +3,27 @@ #include "macros.h"  LANGUAGE_TRUSTWORTHY+LANGUAGE_AUTODERIVETYPEABLE  {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-orphans #-}  -- | Kind-polymorphic functions for manipulating type equality evidence. --  --   This module is available only if @PolyKinds@ are available (GHC 7.6+).+-- +--   In GHC 7.8, this module uses @Data.OldTypeable@. Future uncertain.+-- +--   For kind-polymorphic @Data.Typeable@, use 'dynamicEq' from the "Type.Eq" module.  module Type.Eq.Poly (module Type.Eq, module Type.Eq.Poly) where  import Control.Applicative ((<$>)) import Control.Category ((.)) -- for haddock+#if MIN_VERSION_base(4,7,0)+import Data.OldTypeable hiding (cast)+#else import Data.Typeable hiding (cast)+#endif import Type.Eq import Type.Eq.Higher ((::~::)(..), (:::~:::)(..), OuterEq1(..), InnerEq1(..)) import Type.Eq.Unsafe
macros.h view
@@ -38,7 +38,8 @@ #endif  -- http://hackage.haskell.org/trac/ghc/ticket/5591-#if (__GLASGOW_HASKELL__ >= 702) && (__GLASGOW_HASKELL__ <= 706)+-- should be fixed in 7.8, but still having problems! TODO look into this later+#if (__GLASGOW_HASKELL__ >= 702) && (__GLASGOW_HASKELL__ <= 708) #   define BUG_5591(X) (unsafeCoerce X) #else #   define BUG_5591(X) X@@ -60,6 +61,14 @@ #   define LANGUAGE_POLYKINDS {-# LANGUAGE PolyKinds #-} #else #   define LANGUAGE_POLYKINDS+#endif++#if (__GLASGOW_HASKELL__ >= 707)+#   define LANGUAGE_AUTODERIVETYPEABLE  {-# LANGUAGE AutoDeriveTypeable  #-}+#   define LANGUAGE_ALLOWAMBIGUOUSTYPES {-# LANGUAGE AllowAmbiguousTypes #-}+#else+#   define LANGUAGE_AUTODERIVETYPEABLE+#   define LANGUAGE_ALLOWAMBIGUOUSTYPES #endif  #endif
type-eq.cabal view
@@ -1,10 +1,10 @@ name:          type-eq category:      Type System-version:       0.3+version:       0.4 author:        Gábor Lehel-maintainer:    Gábor Lehel <illissius@gmail.com>-homepage:      http://github.com/glehel/type-eq-copyright:     Copyright (C) 2012 Gábor Lehel+maintainer:    Gábor Lehel <glaebhoerl@gmail.com>+homepage:      http://github.com/glaebhoerl/type-eq+copyright:     Copyright (C) 2012-2013 Gábor Lehel license:       BSD3 license-file:  LICENSE stability:     experimental@@ -44,7 +44,7 @@  source-repository head     type:      git-    location:  git://github.com/glehel/type-eq.git+    location:  git://github.com/glaebhoerl/type-eq.git  library     default-language:@@ -60,7 +60,7 @@         FlexibleContexts      build-depends:-        base >= 3.0 && < 4.7+        base >= 3.0 && < 4.8      exposed-modules:         Type.Eq