WxHaskell认为我的字符串长度为1个字符

WxHaskell认为我的字符串长度为1个字符,haskell,wxwidgets,Haskell,Wxwidgets,每当我在WxHaskell中使用字符串时,它都认为该字符串是一个字符(它只显示第一个字符)。它只在使用WxHaskell函数时发生,而不是像putStrLn这样的函数 例如,错误发生在这段代码中 module Main where import Graphics.UI.WX main = start hello hello = do f <- frame [text := "Hello"] quit <- button f [text := "quit", o

每当我在WxHaskell中使用字符串时,它都认为该字符串是一个字符(它只显示第一个字符)。它只在使用WxHaskell函数时发生,而不是像putStrLn这样的函数

例如,错误发生在这段代码中

module Main where
import Graphics.UI.WX

main = start hello
hello = do f <- frame [text := "Hello"]
           quit <- button f [text := "quit", on command := close f]
           set f [layout := widget quit]

不久前我有过这种行为。结果是一个unicode问题。使用某种unicode标志重新编译修复了一些问题,IIRC。

运行此程序时,我得到一个名为“Hello”的表单,其中有一个标记为“quit”的按钮。这就是我寻求帮助的原因。我看不出有什么不对。我尝试重新安装,但没有成功。这听起来很可能。如果将小写UTF-16中的英文字母解释为以零结尾的UTF-8,则看起来像一个1字符的字符串。你知道它是哪个标志吗?我可能应该说我使用的是GHC。喂?你知道它是哪面旗吗?看问题。
module Main where

main = putStrLn "hello"