1
1
mirror of https://github.com/coot/free-category.git synced 2024-11-25 22:53:26 +03:00

Make tests compile with ghc-8.10.2

This commit is contained in:
Marcin Szamotulski 2020-10-18 16:21:12 +02:00
parent f82a7e7ce1
commit a3d4ce4bcc
2 changed files with 10 additions and 5 deletions

View File

@ -288,7 +288,7 @@ instance Monoid (IntCat '() '()) where
instance Arbitrary (IntCat '() '()) where
arbitrary = IntCat <$> arbitrary
fromList :: forall (a :: k) m f.
fromList :: forall k (a :: k) m f.
( FreeAlgebra2 m
, AlgebraType0 m f
, Category (m f)

View File

@ -59,10 +59,15 @@ instance Arbitrary (Queue Tr 'K 'K) where
prop_unconsQ :: Queue Tr 'K 'K -> Bool
prop_unconsQ q = case (q, toList q) of
(ConsQ a@A{} _, a' : _) -> a == a'
(NilQ, []) -> True
_ -> False
prop_unconsQ q =
case q of
ConsQ a@A{} _ ->
case as of
a' : _ -> a == a'
[] -> False
NilQ -> null as
where
as = toList q
prop_consQ :: Tr 'K 'K -> Queue Tr 'K 'K -> Bool