From f6b713d8e8f54d5656c75467bd2bfe8017675f18 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Mon, 9 Aug 2021 17:48:05 +0300 Subject: [PATCH] Set 5a: better error message for weird constructors --- exercises/Set5aTest.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/Set5aTest.hs b/exercises/Set5aTest.hs index 5e313b9..49fad93 100644 --- a/exercises/Set5aTest.hs +++ b/exercises/Set5aTest.hs @@ -32,7 +32,7 @@ tests = [(1,"Vehicle",[ex1]) -- -- -- -- -- -- -- -- assertNormalConstructor (Constructor _ _) = property True -assertNormalConstructor (Weird n) = counterexample (" constructor "++n++" is weird. Make it normal.") False +assertNormalConstructor (Weird n) = counterexample (" constructor "++n++" is not a normal constructor. Perhaps it's a record constructor or an infix constructor? Make it normal.") False assertNoFields (Constructor n vs) = counterexample (" constructor "++n++" should have no fields") $ null vs assertNoFields _ = property True