Personal tools

Show and Read instance

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(How to implement show and read?)
 
(a new reference)
Line 8: Line 8:
 
or shall it show something user friendly, maybe even something that is formatted in a line-oriented way.
 
or shall it show something user friendly, maybe even something that is formatted in a line-oriented way.
   
[http://www.haskell.org/pipermail/libraries/2005-March/003497.html Meaning of Show and Read]
+
[http://www.haskell.org/pipermail/libraries/2005-March/003496.html Meaning of Show and Read I]
+
[http://www.haskell.org/pipermail/libraries/2005-March/003497.html Meaning of Show and Read II]
 
   
 
[http://www.haskell.org/pipermail/libraries/2006-November/006257.html Raw vs. Show]
 
[http://www.haskell.org/pipermail/libraries/2006-November/006257.html Raw vs. Show]
   
+
[http://www.haskell.org/pipermail/glasgow-haskell-users/2003-August/005586.html Show instance for Tree]
   
 
[[Category:Style]]
 
[[Category:Style]]

Revision as of 14:29, 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 something user friendly, maybe even something that is formatted in a line-oriented way.

Meaning of Show and Read I Meaning of Show and Read II

Raw vs. Show

Show instance for Tree