Skip to content
Snippets Groups Projects
Commit a99c400a authored by Andrew Martin's avatar Andrew Martin
Browse files

Small tweaks

parent 57f26f2a
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,7 @@ sizeOf x = I# (sizeOf# x)
alignment :: Prim a => a -> Int
alignment x = I# (alignment# x)
-- | @since 0.6.5.0
-- | @since 0.9.0.0
instance Prim a => Prim (Complex a) where
sizeOf# _ = 2# *# sizeOf# (undefined :: a)
alignment# _ = alignment# (undefined :: a)
......
......@@ -153,9 +153,6 @@ main = do
, testGroup "DefaultSetMethod"
[ lawsToTest (primLaws (Proxy :: Proxy DefaultSetMethod))
]
, testGroup "Complex"
[ lawsToTest (primLaws (Proxy :: Proxy (Complex Double)))
]
#if __GLASGOW_HASKELL__ >= 805
, testGroup "PrimStorable"
[ lawsToTest (QCC.storableLaws (Proxy :: Proxy Derived))
......@@ -182,30 +179,17 @@ main = do
, renameLawsToTest "Last" (primLaws (Proxy :: Proxy (Semigroup.Last Int16)))
, renameLawsToTest "Min" (primLaws (Proxy :: Proxy (Semigroup.Min Int16)))
, renameLawsToTest "Max" (primLaws (Proxy :: Proxy (Semigroup.Max Int16)))
]
, testGroup "Newtypes"
[ lawsToTest (primLaws (Proxy :: Proxy (Const Int16 Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Down Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Identity Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Monoid.Dual Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Monoid.Sum Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Monoid.Product Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Semigroup.First Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Semigroup.Last Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Semigroup.Min Int16)))
, lawsToTest (primLaws (Proxy :: Proxy (Semigroup.Max Int16)))
, renameLawsToTest "Complex" (primLaws (Proxy :: Proxy (Complex Double)))
]
]
deriving instance Arbitrary a => Arbitrary (Down a)
-- Const, Dual, Sum, Product: all have Arbitrary instances defined
-- in QuickCheck itself
#if MIN_VERSION_base(4,9,0)
deriving instance Arbitrary a => Arbitrary (Semigroup.First a)
deriving instance Arbitrary a => Arbitrary (Semigroup.Last a)
deriving instance Arbitrary a => Arbitrary (Semigroup.Min a)
deriving instance Arbitrary a => Arbitrary (Semigroup.Max a)
#endif
word8 :: Proxy Word8
word8 = Proxy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment