enummapset-th 0.6.0.1 → 0.6.0.2
raw patch · 6 files changed
+24/−3 lines, 6 filesdep ~template-haskell
Dependency ranges changed: template-haskell
Files
- Data/EnumMap/Lazy.hs +4/−0
- Data/EnumMap/Strict.hs +4/−0
- Data/EnumMapSetWrapper.hs +12/−0
- Data/EnumSet.hs +3/−1
- enummapset-th.cabal +1/−1
- include/map.inc +0/−1
Data/EnumMap/Lazy.hs view
@@ -1,3 +1,7 @@ {-# LANGUAGE CPP #-}++-- | Refer to the <http://hackage.haskell.org/package/containers/docs/Data-IntMap-Lazy.html documentation>+-- for "Data.IntMap.Lazy".+ #define STRICT Lazy #include "map.inc"
Data/EnumMap/Strict.hs view
@@ -1,3 +1,7 @@ {-# LANGUAGE CPP #-}++-- | Refer to the <http://hackage.haskell.org/package/containers/docs/Data-IntMap-Strict.html documentation>+-- for "Data.IntMap.Strict".+ #define STRICT Strict #include "map.inc"
Data/EnumMapSetWrapper.hs view
@@ -104,7 +104,11 @@ #else ConT ((||) <$> (==) ''Key <*> (==) ''Int -> True) -> #endif+#if MIN_VERSION_template_haskell(2,10,0)+ (VarE 'toEnum, [ConT ''Enum `AppT` VarT k], VarT k)+#else (VarE 'toEnum, [ClassP ''Enum [VarT k]], VarT k)+#endif ConT ((==) ''IntMap -> True) `AppT` v -> (ConE enumMap, [], enumMapT k v) ConT ((==) ''IntSet -> True) ->@@ -153,7 +157,11 @@ #else ConT ((||) <$> (==) ''Key <*> (==) ''Int -> True) -> #endif+#if MIN_VERSION_template_haskell(2,10,0)+ (VarE 'fromEnum, [ConT ''Enum `AppT` VarT k], VarT k)+#else (VarE 'fromEnum, [ClassP ''Enum [VarT k]], VarT k)+#endif ConT ((==) ''IntMap -> True) `AppT` v -> (unEnumMapE, [], enumMapT k v) ConT ((==) ''IntSet -> True) ->@@ -190,9 +198,13 @@ KindedTV ((==) from -> True) k -> KindedTV to k _ -> tv subP :: Pred -> Pred+#if MIN_VERSION_template_haskell(2,10,0)+ subP = subT+#else subP p = case p of ClassP c ts -> ClassP c (map subT ts) EqualP s t -> EqualP (subT s) (subT t)+#endif w, w' :: Name -> Q [Dec] (w, w') = (wrap True, wrap False) where
Data/EnumSet.hs view
@@ -2,8 +2,10 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Trustworthy #-}+{-# LANGUAGE KindSignatures #-} --- | Documentation: <http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-IntSet.html>+-- | Refer to the <http://hackage.haskell.org/package/containers/docs/Data-IntSet.html documentation>+-- for "Data.IntSet". module Data.EnumSet where import Prelude (Eq, Ord, Enum, Functor (..), (.), ($), (>))
enummapset-th.cabal view
@@ -1,5 +1,5 @@ name: enummapset-th-version: 0.6.0.1+version: 0.6.0.2 synopsis: TH-generated EnumSet/EnumMap wrappers around IntSet/IntMap. description: This package wraps @IntSet@ and @IntMap@ from @containers@, and provides
include/map.inc view
@@ -7,7 +7,6 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Trustworthy #-} --- | Documentation: <http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-IntMap-STRICT.html> module Data.EnumMap.STRICT where import Prelude (Eq, Ord, Enum, Functor (..), (.), ($), (>))