我最近开始学习 Haskell,想将一些内容转换为小写。我查了“toLower”函数,但似乎不起作用。
Prelude> import Data.Text
Prelude Data.Text> toLower "JhELlo"
<interactive>:2:9: error:
* Couldn't match expected type `Text' with actual type `[Char]'
* In the first argument of `toLower', namely `"JhELlo"'
In the expression: toLower "JhELlo"
In an equation for `it': it = toLower "JhELlo"
Prelude Data.Text> toLower 'JhELlo'
<interactive>:3:9: error:
* Syntax error on 'JhELlo'
Perhaps you intended to use TemplateHaskell or TemplateHaskellQuotes
* In the Template Haskell quotation 'JhELlo'
Prelude Data.Text>