From a3d4ce4bcc307ab772a9469cacd5d475a7672735 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Sun, 18 Oct 2020 16:21:12 +0200 Subject: [PATCH] Make tests compile with ghc-8.10.2 --- test/Test/Cat.hs | 2 +- test/Test/Queue.hs | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/Test/Cat.hs b/test/Test/Cat.hs index b996b99..425eb87 100644 --- a/test/Test/Cat.hs +++ b/test/Test/Cat.hs @@ -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) diff --git a/test/Test/Queue.hs b/test/Test/Queue.hs index 6ec48a5..203b86b 100644 --- a/test/Test/Queue.hs +++ b/test/Test/Queue.hs @@ -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