[Haskell-beginners] Showing control characters

Russ Abbott russ.abbott at gmail.com
Tue Nov 9 12:40:47 EST 2010


Is there some way to include control characters in a Show string so that
they take effect when the element is Shown?

For example, if I define a String "a\nb" and use putStrLn on it, the \n
causes a return, but when I simply return the string from a function, the \n
is shown as \n.  Is there a way to get the \n to execute when it's embedded
in a returned value?

Thanks
*
-- Russ Abbott
_____________________________________________*
*  Professor, Computer Science
  California State University, Los Angeles

  Google voice: 424-235-5752 (424-cell-rja)
  blog: http://russabbott.blogspot.com/
  vita:  http://sites.google.com/site/russabbott/
_____________________________________________*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20101109/cf03f536/attachment.html


More information about the Beginners mailing list