
7 Jul
2015
7 Jul
'15
6:36 a.m.
Hi Imants, On Tue, Jul 07, 2015 at 12:28:58PM +0200, Imants Cekusins wrote:
ok with a small tweak I can see "case" a1 value is x:
result1 x = case x of a1 -> trace (show a1) "one" 2 -> "two"
'a1' is new variable which is always bound to the value of 'x' and this case is always matching. You should also get a warning for this: Warning: Pattern match(es) are overlapped In a case alternative: 2 -> ... Greetings, Daniel