Permalink
Browse files

NList: build fix for ghc < 7.2

  • Loading branch information...
1 parent d00dbea commit 018b9c84c1a133ee0d4f77bd80d2c839299f9ab7 @kfish committed Jan 27, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 Data/ZoomCache/NList.hs
View
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wall #-}
@@ -34,7 +35,11 @@ instance Eq a => Eq (NList n a) where
(NList _ a1) == (NList _ a2) = a1 == a2
instance Typeable a => Typeable (NList n a) where
+#if __GLASGOW_HASKELL__ >= 702
typeOf _ = mkTyConApp (mkTyCon3 "zoom-cache" "Data.ZoomCache.NList" "NList") [typeOf (undefined :: a)]
+#else
+ typeOf _ = mkTyConApp (mkTyCon "Data.ZoomCache.NList") [typeOf (undefined :: a)]
+#endif
instance (Nat n, Arbitrary a) => Arbitrary (NList n a) where
arbitrary = NList unify <$> sequence [ arbitrary | _ <- [1..(toInt unify)] ]

0 comments on commit 018b9c8

Please sign in to comment.