dependent-map 0.1.1 → 0.1.1.1
raw patch · 4 files changed
+44/−14 lines, 4 filesdep ~dependent-sumPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: dependent-sum
API changes (from Hackage documentation)
- Data.Dependent.Map: instance (GCompare f, ReadTag f) => Read (DMap f)
- Data.Dependent.Map: instance EqTag k => Eq (DMap k)
- Data.Dependent.Map: instance GCompare k => Monoid (DMap k)
- Data.Dependent.Map: instance OrdTag k => Ord (DMap k)
- Data.Dependent.Map: instance ShowTag k => Show (DMap k)
- Data.Dependent.Map: instance Typeable1 f => Typeable (DMap f)
+ Data.Dependent.Map: instance [safe] (GCompare f, ReadTag f) => Read (DMap f)
+ Data.Dependent.Map: instance [safe] EqTag k => Eq (DMap k)
+ Data.Dependent.Map: instance [safe] GCompare k => Monoid (DMap k)
+ Data.Dependent.Map: instance [safe] OrdTag k => Ord (DMap k)
+ Data.Dependent.Map: instance [safe] ShowTag k => Show (DMap k)
Files
- dependent-map.cabal +9/−2
- src/Data/Dependent/Map.hs +5/−12
- src/Data/Dependent/Map/Internal.hs +4/−0
- src/Data/Dependent/Map/Typeable.hs +26/−0
dependent-map.cabal view
@@ -1,5 +1,5 @@ name: dependent-map-version: 0.1.1+version: 0.1.1.1 stability: provisional cabal-version: >= 1.6@@ -15,7 +15,10 @@ synopsis: Dependent finite maps (partial dependent products) description: Dependent finite maps (partial dependent products) -tested-with: GHC == 7.0.4, GHC == 6.12.3, GHC == 6.10.4+tested-with: GHC == 7.2.1,+ GHC == 7.0.4,+ GHC == 6.12.3,+ GHC == 6.10.4 source-repository head type: git@@ -26,4 +29,8 @@ ghc-options: -fwarn-unused-imports -fwarn-unused-binds exposed-modules: Data.Dependent.Map other-modules: Data.Dependent.Map.Internal+ Data.Dependent.Map.Typeable build-depends: base >= 3 && < 5, containers, dependent-sum+ if impl(ghc >= 7.2)+ build-depends: dependent-sum >= 0.2.0.1+ ghc-options: -trust base -trust dependent-sum
src/Data/Dependent/Map.hs view
@@ -2,6 +2,10 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Safe #-}+#endif module Data.Dependent.Map ( DMap , DSum(..), Key(..)@@ -128,12 +132,12 @@ import Prelude hiding (null, lookup) import Data.Dependent.Map.Internal+import Data.Dependent.Map.Typeable ({- instance Typeable ... -}) import Data.Dependent.Sum import Data.GADT.Compare import Data.Maybe (isJust) import Data.Monoid-import Data.Typeable import Text.Read instance (GCompare k) => Monoid (DMap k) where@@ -1123,17 +1127,6 @@ withBar, withEmpty :: [String] -> [String] withBar bars = "| ":bars withEmpty bars = " ":bars--{--------------------------------------------------------------------- Typeable---------------------------------------------------------------------}--instance Typeable1 f => Typeable (DMap f) where- typeOf ds = mkTyConApp dMapCon [typeOfT]- where- dMapCon = mkTyCon "Data.Dependent.Map.DMap"- typeOfT = typeOf1 $ (undefined :: DMap f -> f a) ds- {-------------------------------------------------------------------- Assertions
src/Data/Dependent/Map/Internal.hs view
@@ -1,5 +1,9 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Safe #-}+#endif module Data.Dependent.Map.Internal where import Data.Dependent.Sum
+ src/Data/Dependent/Map/Typeable.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif+module Data.Dependent.Map.Typeable where++import Data.Dependent.Map.Internal+import Data.Typeable++#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702++instance Typeable1 f => Typeable (DMap f) where+ typeOf ds = mkTyConApp dMapCon [typeOfT]+ where+ dMapCon = mkTyCon3 "dependent-map" "Data.Dependent.Map" "DMap"+ typeOfT = typeOf1 $ (undefined :: DMap f -> f a) ds++#else++instance Typeable1 f => Typeable (DMap f) where+ typeOf ds = mkTyConApp dMapCon [typeOfT]+ where+ dMapCon = mkTyCon "Data.Dependent.Map.DMap"+ typeOfT = typeOf1 $ (undefined :: DMap f -> f a) ds++#endif