Personal tools

Show and Read instance

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(How to implement show and read?)
 
m
 
(2 intermediate revisions by one user not shown)

Latest revision as of 14:32, 13 November 2006

What shall the Show and Read instances show and parse, respectively? It is certainly a good thing, if

  • read
    parses, what
    show
    shows.

The next question is:

Shall
show
emit valid Haskell code, that represents the shown data,

or shall it show eye-candy, maybe even formatted in a line-oriented way.