1. Aleksey Khudyakov
  2. fixed-vector

Commits

Aleksey Khudyakov  committed 51c23a3

Add instance for Proxy (GHC>=7.8)

  • Participants
  • Parent commits 7cf54a6
  • Branches default

Comments (0)

Files changed (1)

File fixed-vector/Data/Vector/Fixed/Cont.hs

View file
+{-# LANGUAGE CPP                   #-}
 {-# LANGUAGE EmptyDataDecls        #-}
 {-# LANGUAGE DeriveDataTypeable    #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 import Control.Applicative (Applicative(..),(<$>))
 import Control.Monad       (liftM)
 import Data.Complex        (Complex(..))
-import Data.Data           (Typeable(..),Data)
+import Data.Data           (Typeable,Data)
+#if __GLASGOW_HASKELL__ >= 708
+import Data.Typeable       (Proxy(..))
+#endif
 import qualified Data.Foldable    as F
 import qualified Data.Traversable as F
 
   inspect (a,b,c,d,e,f,g) (Fun fun) = fun a b c d e f g
   {-# INLINE construct #-}
   {-# INLINE inspect #-}
+
+#if __GLASGOW_HASKELL__ >= 708
+type instance Dim Proxy = Z
+
+instance Vector Proxy a where
+  construct = Fun Proxy
+  inspect _ = unFun
+#endif