
27 Jan
2016
27 Jan
'16
8:40 p.m.
Hello all, I've written my own Read and Show instances for a type, which is essentially data Crust a = Open [a] | Closed [a] "Show" does something like *Main> Closed [1,2,3] <1,2,3> *Main> Open [1,2,3] <1,2,3..> And Read faithully parses each stings and turns it into a Crust again. Problem is: when I just type <1,2,3..> in GHCi I get a "parse error on input ‘<’". However when I spell out the custructor as above it parses it okay. Is it possible at all to write my own <> constructor, or something like it=