packages feed

prednote 0.30.0.0 → 0.32.0.0

raw patch · 8 files changed

+146/−128 lines, 8 filesdep ~contravariant

Dependency ranges changed: contravariant

Files

genCabal.hs view
@@ -8,7 +8,7 @@ import Control.Applicative  versionInts :: [Word]-versionInts = [0,30,0,0]+versionInts = [0,32,0,0]  base :: Package base = closedOpen "base" [4,5,0,0] [5]@@ -76,7 +76,7 @@ quickpull = closedOpen "quickpull" [0,4] [0,5]  contravariant :: Package-contravariant = closedOpen "contravariant" [1,2] [1,3]+contravariant = closedOpen "contravariant" [1,2] [1,4]  transformers :: Package transformers = closedOpen "transformers" [0,3,0,0] [0,5]
lib/Prednote/Comparisons.hs view
@@ -37,6 +37,8 @@ import Data.Monoid import qualified Data.Text as X import Data.Text (Text)+import Data.String+import Rainbow  -- | Build a Pred that compares items.  The idea is that the item on -- the right hand side is baked into the 'Pred' and that the 'Pred'@@ -58,14 +60,20 @@    -> PredM f a -compareByM rhsDesc get ord = predicateM cond pd+compareByM rhsDesc get tgt = predicateM f   where-    cond = "is" <+> ordDesc <+> rhsDesc-    ordDesc = case ord of-      EQ -> "equal to"-      LT -> "less than"-      GT -> "greater than"-    pd a = fmap (== ord) (get a)+    f a = fmap mkTup (get a)+      where+        mkTup ord = (bl, val, cond)+          where+            val = Value [fromString . show $ a]+            cond = Condition [fromText condTxt]+            condTxt = "is" <+> ordDesc <+> rhsDesc+            ordDesc = case ord of+              EQ -> "equal to"+              LT -> "less than"+              GT -> "greater than"+            bl = ord == tgt  -- | Build a Pred that compares items.  The idea is that the item on -- the right hand side is baked into the 'Pred' and that the 'Pred'@@ -118,9 +126,12 @@   -- 'True' if the items are equal; 'False' otherwise.    -> PredM f a-equalByM rhsDesc = predicateM cond+equalByM rhsDesc get = predicateM f   where-    cond = "is equal to" <+> rhsDesc+    f a = fmap mkTup (get a)+      where+        mkTup bl = (bl, Value [fromString . show $ a],+          Condition [fromText $ "is equal to" <+> rhsDesc])  -- | Builds a 'Pred' that tests items for equality. @@ -166,18 +177,21 @@    -> PredM f a -compareByMaybeM rhsDesc get ord = predicateM cond pd+compareByMaybeM rhsDesc get ord = predicateM f   where-    cond = "is" <+> ordDesc <+> rhsDesc-    ordDesc = case ord of-      EQ -> "equal to"-      LT -> "less than"-      GT -> "greater than"-    pd a = fmap f (get a)+    f a = fmap mkTup (get a)       where-        f x = case x of-          Nothing -> False-          Just o -> o == ord+        mkTup mayOrd = (bl, val, cond)+          where+            val = Value [fromString . show $ a]+            cond = Condition [fromText $ "is" <+> ordDesc <+> rhsDesc]+            ordDesc = case ord of+              EQ -> "equal to"+              LT -> "less than"+              GT -> "greater than"+            bl = case mayOrd of+              Nothing -> False+              Just o -> o == ord   -- | Builds a 'Pred' for items that might fail to return a comparison.
lib/Prednote/Core.hs view
@@ -5,6 +5,7 @@   , Pred   , predicate   , predicateM+  , contramapM    -- * Predicate combinators   -- ** Primitive combinators@@ -29,7 +30,6 @@   -- given above.   , any   , all-  , Nothing   , maybe    -- * Labeling@@ -73,27 +73,46 @@ import qualified Prelude import qualified System.IO as IO import qualified Data.Text as X-import Data.Text (Text) import Data.List (intersperse) import Data.Functor.Identity import Control.Applicative +-- | Like 'contramap' but allows the mapping function to run in a+-- monad.+contramapM+  :: Monad m+  => (a -> m b)+  -> PredM m b+  -> PredM m a+contramapM conv (PredM f) = PredM $ \a -> conv a >>= f+ -- | Describes the condition; for example, for a @'Pred' 'Int'@, -- this might be @is greater than 5@; for a @'Pred' 'String'@, this -- might be @begins with \"Hello\"@. newtype Condition = Condition [Chunk]   deriving (Eq, Ord, Show) --- | Stores the representation of a value; created using @'X.pack' '.'--- 'show'@.-newtype Value = Value Text+instance Monoid Condition where+  mempty = Condition []+  mappend (Condition x) (Condition y) = Condition (x ++ y)++-- | Stores the representation of a value.+newtype Value = Value [Chunk]   deriving (Eq, Ord, Show) +instance Monoid Value where+  mempty = Value []+  mappend (Value x) (Value y) = Value (x ++ y)+ -- | Gives additional information about a particular 'Pred' to aid the -- user when viewing the output.-newtype Label = Label Text+newtype Label = Label [Chunk]   deriving (Eq, Ord, Show) +instance Monoid Label where+  mempty = Label []+  mappend (Label x) (Label y) = Label (x ++ y)+ -- | Any type that is accompanied by a set of labels. data Labeled a = Labeled [Label] a   deriving (Eq, Ord, Show)@@ -169,34 +188,26 @@ -- gives the predicate function.  For example, if @f@ is @(> 5)@, then -- @cond@ might be @"is greater than 5"@. predicateM-  :: (Show a, Functor f)-  => Text-  -> (a -> f Bool)-  -- ^ Predicate function; this is in an arbitrary context, allowing-  -- you to perform IO, examine and change state, etc.  If you do not-  -- need to use a context, see 'predicate'.+  :: Functor f+  => (a -> f (Bool, Value, Condition))   -> PredM f a-predicateM tCond p = PredM f+predicateM f = PredM f'   where-    f a = fmap mkResult $ p a+    f' a = fmap mkResult $ f a       where-        mkResult b = Result (Labeled [] r)+        mkResult (b, val, cond) = Result (Labeled [] r)           where             r | b = Right (PTerminal val cond)               | otherwise = Left (FTerminal val cond)-            cond = Condition [fromText tCond]-            val = Value . X.pack . show $ a  -- | Creates a new 'Pred' that do not run in any context.  In -- @predicate cond f@, @cond@ describes the condition, while @f@ gives -- the predicate function.  For example, if @f@ is @(> 5)@, then -- @cond@ might be @"is greater than 5"@. predicate-  :: Show a-  => Text-  -> (a -> Bool)+  :: (a -> (Bool, Value, Condition))   -> Pred a-predicate lbl f = predicateM lbl (fmap return f)+predicate f = predicateM (fmap return f)  -- | And.  Returns 'True' if both argument 'Pred' return 'True'.  Is -- lazy in its second argment; if the first argument returns 'False',@@ -265,23 +276,29 @@   -- | Always returns 'True'-true :: (Show a, Applicative f) => PredM f a-true = predicateM "always returns True" (const (pure True))+true :: Applicative f => PredM f a+true = predicateM (const (pure trip))+  where+    trip = (True, mempty, Condition ["always returns True"])  -- | Always returns 'False'-false :: (Show a, Applicative f) => PredM f a-false = predicateM "always returns False" (const (pure False))+false :: Applicative f => PredM f a+false = predicateM (const (pure trip))+  where+    trip = (False, mempty, Condition ["always returns False"])  -- | Always returns its argument same :: Applicative f => PredM f Bool-same = predicateM "is returned" (pure . id)+same = predicateM+  (\b -> pure (b, (Value [(fromText . X.pack . show $ b)]),+                  Condition ["is returned"]))  -- | Adds descriptive text to a 'Pred'.  Gives useful information for -- the user.  The label is added to the top 'Pred' in the tree; any -- existing labels are also retained.  Labels that were added last -- will be printed first.  For an example of this, see the source code -- for 'any' and 'all'.-addLabel :: Functor f => Text -> PredM f a -> PredM f a+addLabel :: Functor f => [Chunk] -> PredM f a -> PredM f a addLabel s (PredM f) = PredM f'   where     f' a = fmap g (f a)@@ -289,59 +306,55 @@         g (Result (Labeled ss ei)) = Result (Labeled (Label s : ss) ei)  --- | Represents the end of a list.-data EndOfList = EndOfList--instance Show EndOfList where-  show _ = ""- -- | Like 'Prelude.any'; is 'True' if any of the list items are -- 'True'.  An empty list returns 'False'.  Is lazy; will stop -- processing if it encounters a 'True' item.-any :: (Functor m, Monad m, Applicative m) => PredM m a -> PredM m [a]-any pa = contramap f (switch (addLabel "cons cell" pConsCell) pEnd)+any :: (Monad m, Applicative m) => PredM m a -> PredM m [a]+any pa = contramap f (switch (addLabel ["cons cell"] pConsCell) pEnd)   where     pConsCell =-      contramap fst (addLabel "head" pa)-      ||| contramap snd (addLabel "tail" (any pa))+      contramap fst (addLabel ["head"] pa)+      ||| contramap snd (addLabel ["tail"] (any pa))     f ls = case ls of-      [] -> Right EndOfList+      [] -> Right ()       x:xs -> Left (x, xs)-    pEnd = addLabel "end of list" $ contramap (const EndOfList) false+    pEnd = predicateM (const (pure (False, Value ["end of list"],+                                    Condition ["always returns False"])))  -- | Like 'Prelude.all'; is 'True' if none of the list items is -- 'False'.  An empty list returns 'True'.  Is lazy; will stop -- processing if it encouters a 'False' item.-all :: (Functor m, Monad m, Applicative m) => PredM m a -> PredM m [a]-all pa = contramap f (switch (addLabel "cons cell" pConsCell) pEnd)+all :: (Monad m, Applicative m) => PredM m a -> PredM m [a]+all pa = contramap f (switch (addLabel ["cons cell"] pConsCell) pEnd)   where     pConsCell =-      contramap fst (addLabel "head" pa)-      &&& contramap snd (addLabel "tail" (all pa))+      contramap fst (addLabel ["head"] pa)+      &&& contramap snd (addLabel ["tail"] (all pa))     f ls = case ls of       x:xs -> Left (x, xs)-      [] -> Right EndOfList-    pEnd = addLabel "end of list" $ contramap (const EndOfList) true+      [] -> Right ()+    pEnd = predicateM (const (pure (True, Value ["end of list"],+                                    Condition ["always returns True"]))) --- | Represents 'Prelude.Nothing' of 'Maybe'.-data Nothing = CoreNothing -instance Show Nothing where-  show _ = ""- -- | Create a 'Pred' for 'Maybe'. maybe-  :: Functor m-  => PredM m Nothing-  -- ^ What to do on 'Nothing'.  Usually you wil use 'true' or 'false'.+  :: Applicative m+  => Bool+  -- ^ What to return on 'Nothing'   -> PredM m a-  -- ^ Analyzes 'Just' values.+  -- ^ Analyzes 'Just' values   -> PredM m (Maybe a)-maybe emp pa = contramap f-  (switch (addLabel "Nothing" emp) (addLabel "Just value" pa))+maybe onEmp pa = contramap f+  (switch emp (addLabel ["Just value"] pa))   where+    emp | onEmp = predicateM (const+            (pure (True, noth, Condition ["always returns True"])))+        | otherwise = predicateM (const+            (pure (False, noth, Condition ["always returns False"])))+    noth = Value ["Nothing"]     f may = case may of-      Nothing -> Left CoreNothing+      Nothing -> Left ()       Just a -> Right a  @@ -423,11 +436,11 @@ newline = ["\n"]  labelToChunks :: Label -> [Chunk]-labelToChunks (Label txt) = [fromText txt]+labelToChunks (Label cks) = cks  explainTerminal :: Value -> Condition -> [Chunk] explainTerminal (Value v) (Condition c)-  = [fromText v] <+> c+  = v ++ (" " : c)  -- | Obtain a list of 'Chunk' describing the evaluation process. passedToChunks
prednote.cabal view
@@ -3,11 +3,11 @@ -- http://www.github.com/massysett/cartel -- -- Script name used to generate: genCabal.hs--- Generated on: 2015-02-15 23:19:37.435298 EST+-- Generated on: 2015-03-09 21:41:29.216893 EDT -- Cartel library version: 0.14.2.0  name: prednote-version: 0.30.0.0+version: 0.32.0.0 cabal-version: >= 1.14 license: BSD3 license-file: LICENSE@@ -51,7 +51,7 @@     , split >= 0.2.2 && < 0.3     , text >= 0.11.2.0 && < 1.3     , containers >= 0.4.2.1 && < 0.6-    , contravariant >= 1.2 && < 1.3+    , contravariant >= 1.2 && < 1.4     , transformers >= 0.3.0.0 && < 0.5   hs-source-dirs:     lib@@ -86,7 +86,7 @@     , split >= 0.2.2 && < 0.3     , text >= 0.11.2.0 && < 1.3     , containers >= 0.4.2.1 && < 0.6-    , contravariant >= 1.2 && < 1.3+    , contravariant >= 1.2 && < 1.4     , transformers >= 0.3.0.0 && < 0.5   main-is: prednote-tests.hs   type: exitcode-stdio-1.0@@ -121,7 +121,7 @@       , split >= 0.2.2 && < 0.3       , text >= 0.11.2.0 && < 1.3       , containers >= 0.4.2.1 && < 0.6-      , contravariant >= 1.2 && < 1.3+      , contravariant >= 1.2 && < 1.4       , transformers >= 0.3.0.0 && < 0.5   else     buildable: False
tests/Decrees.hs view
@@ -10,19 +10,17 @@ decrees :: [Decree] decrees = -  [ Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 14, qName = "prop_predicateIsLazyInArguments"} ) ( Single Prednote.Core.Properties.prop_predicateIsLazyInArguments )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 17, qName = "prop_predicateIsSameAsOriginal"} ) ( Single Prednote.Core.Properties.prop_predicateIsSameAsOriginal )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 20, qName = "prop_andIsLazyInSecondArgument"} ) ( Single Prednote.Core.Properties.prop_andIsLazyInSecondArgument )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 23, qName = "prop_orIsLazyInSecondArgument"} ) ( Single Prednote.Core.Properties.prop_orIsLazyInSecondArgument )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 26, qName = "prop_andIsLikePreludeAnd"} ) ( Single Prednote.Core.Properties.prop_andIsLikePreludeAnd )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 32, qName = "prop_orIsLikePreludeOr"} ) ( Single Prednote.Core.Properties.prop_orIsLikePreludeOr )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 38, qName = "prop_notIsLikePreludeNot"} ) ( Single Prednote.Core.Properties.prop_notIsLikePreludeNot )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 43, qName = "prop_switchIsLazyInFirstArgument"} ) ( Single Prednote.Core.Properties.prop_switchIsLazyInFirstArgument )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 48, qName = "prop_switchIsLazyInSecondArgument"} ) ( Single Prednote.Core.Properties.prop_switchIsLazyInSecondArgument )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 53, qName = "prop_switch"} ) ( Single Prednote.Core.Properties.prop_switch )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 63, qName = "prop_true"} ) ( Single Prednote.Core.Properties.prop_true )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 65, qName = "prop_false"} ) ( Single Prednote.Core.Properties.prop_false )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 67, qName = "prop_same"} ) ( Single Prednote.Core.Properties.prop_same )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 69, qName = "prop_any"} ) ( Single Prednote.Core.Properties.prop_any )-  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 75, qName = "prop_all"} ) ( Single Prednote.Core.Properties.prop_all )+  [ Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 14, qName = "prop_andIsLazyInSecondArgument"} ) ( Single Prednote.Core.Properties.prop_andIsLazyInSecondArgument )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 17, qName = "prop_orIsLazyInSecondArgument"} ) ( Single Prednote.Core.Properties.prop_orIsLazyInSecondArgument )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 23, qName = "prop_andIsLikePreludeAnd"} ) ( Single Prednote.Core.Properties.prop_andIsLikePreludeAnd )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 29, qName = "prop_orIsLikePreludeOr"} ) ( Single Prednote.Core.Properties.prop_orIsLikePreludeOr )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 35, qName = "prop_notIsLikePreludeNot"} ) ( Single Prednote.Core.Properties.prop_notIsLikePreludeNot )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 40, qName = "prop_switchIsLazyInFirstArgument"} ) ( Single Prednote.Core.Properties.prop_switchIsLazyInFirstArgument )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 45, qName = "prop_switchIsLazyInSecondArgument"} ) ( Single Prednote.Core.Properties.prop_switchIsLazyInSecondArgument )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 50, qName = "prop_switch"} ) ( Single Prednote.Core.Properties.prop_switch )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 60, qName = "prop_true"} ) ( Single Prednote.Core.Properties.prop_true )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 62, qName = "prop_false"} ) ( Single Prednote.Core.Properties.prop_false )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 64, qName = "prop_same"} ) ( Single Prednote.Core.Properties.prop_same )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 66, qName = "prop_any"} ) ( Single Prednote.Core.Properties.prop_any )+  , Decree ( Meta {modDesc = ModDesc {modPath = "tests/Prednote/Core/Properties.hs", modName = ["Prednote","Core","Properties"]}, linenum = 72, qName = "prop_all"} ) ( Single Prednote.Core.Properties.prop_all )   ]
tests/Prednote/Core/Instances.hs view
@@ -6,13 +6,9 @@ import Test.QuickCheck hiding (Result) import Control.Monad import Prednote.Core-import qualified Data.Text as X  instance (CoArbitrary a, Show a) => Arbitrary (Pred a) where-  arbitrary = do-    txt <- fmap X.pack arbitrary-    fn <- arbitrary-    return $ predicate txt fn+  arbitrary = fmap predicate arbitrary  instance Arbitrary Condition where   arbitrary = fmap Condition arbitrary
tests/Prednote/Core/Properties.hs view
@@ -11,34 +11,31 @@ testInt :: Pred Int -> Int -> Bool testInt = test -prop_predicateIsLazyInArguments (Fun _ f) i-  = testInt (predicate undefined f) i || True--prop_predicateIsSameAsOriginal (Fun _ f) i-  = testInt (predicate undefined f) i == f i- prop_andIsLazyInSecondArgument i   = testInt (false &&& undefined) i || True  prop_orIsLazyInSecondArgument i   = testInt (true ||| undefined) i || True +fst3 :: (a, b, c) -> a+fst3 (a, _, _) = a+ prop_andIsLikePreludeAnd (Fun _ f1) (Fun _ f2) i-  = testInt (p1 &&& p2) i == (f1 i && f2 i)+  = testInt (p1 &&& p2) i == (fst3 (f1 i) && fst3 (f2 i))   where-    p1 = predicate undefined f1-    p2 = predicate undefined f2+    p1 = predicate f1+    p2 = predicate f2  prop_orIsLikePreludeOr (Fun _ f1) (Fun _ f2) i-  = testInt (p1 ||| p2) i == (f1 i || f2 i)+  = testInt (p1 ||| p2) i == (fst3 (f1 i) || fst3 (f2 i))   where-    p1 = predicate undefined f1-    p2 = predicate undefined f2+    p1 = predicate f1+    p2 = predicate f2  prop_notIsLikePreludeNot (Fun _ f1) i-  = testInt (not p1) i == Prelude.not (f1 i)+  = testInt (not p1) i == Prelude.not (fst3 (f1 i))   where-    p1 = predicate undefined f1+    p1 = predicate f1  prop_switchIsLazyInFirstArgument pb i   = test (switch undefined pb) (Right i) || True@@ -55,10 +52,10 @@   where     _types = ei :: Either Int Char     expected = case ei of-      Left i -> fa i-      Right c -> fb c-    pa = predicate undefined fa-    pb = predicate undefined fb+      Left i -> fst3 (fa i)+      Right c -> fst3 (fb c)+    pa = predicate fa+    pb = predicate fb      prop_true = testInt true @@ -67,14 +64,14 @@ prop_same b = test same b == b  prop_any (Fun _ f) ls-  = test (any pa) ls == Prelude.any f ls+  = test (any pa) ls == Prelude.any (fmap fst3 f) ls   where-    pa = predicate undefined f+    pa = predicate f     _types = ls :: [Int]      prop_all (Fun _ f) ls-  = test (all pa) ls == Prelude.all f ls+  = test (all pa) ls == Prelude.all (fmap fst3 f) ls   where-    pa = predicate undefined f+    pa = predicate f     _types = ls :: [Int]     
tests/prednote-visual-tests.hs view
@@ -10,6 +10,6 @@   verboseTestStdout (all $ lessEq (5 :: Int)) [0..10]   verboseTestStdout (any $ equal (4 :: Int)) [0..3]   verboseTestStdout (any $ equal (10 :: Int)) []-  verboseTestStdout (all $ maybe true (lessEq (5 :: Int)))+  verboseTestStdout (all $ maybe True (lessEq (5 :: Int)))     [Nothing, Just 1, Just 2, Nothing, Just 3, Just 4, Just 5]   return ()