最佳答案
假设我有这个带换行符的字符串:
file :: String
file = "the first line\nthe second line\nthe third line"
有什么方法可以把它写成这样吗?
file :: String
file = "the first line
the second line
the third line"
上面的尝试导致了这个错误:
factor.hs:58:33:
lexical error in string/character literal at character '\n'
Failed, modules loaded: none.