Haskell: Show screwed up?

前端 未结 6 508
小鲜肉
小鲜肉 2021-01-17 17:34

The show function in Haskell doesn\'t seem to do what it should:

Prelude> let str = \"stack\\n\\noverflow\"
Prelude> putStrLn str
stack


overfl         


        
6条回答
  •  粉色の甜心
    2021-01-17 18:13

    I'm not really sure the point in what your trying to do. It would help if you clarified a bit. Show is doing what it is supposed to do. Show simply produces a string containing what it was shown.

提交回复
热议问题