I have the following data
data A = C1 String | A :@: A
deriving(Show)
app inp = case inp of
a1 :@: a2 -> (C1 "a") :@: (C1 "b")
_ -> C1 "c"
Why does the case return the input instead of (C1 "a") :@: (C1 "b")
?
*Test> app (C1 "c") :@: (C1 "d")
C1 "c" :@: C1 "d"
Works fine if i'll change A :@: A
to C2 A A