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

时间:2011-08-20 12:40:30

标签: 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", on command := close f]
           set f [layout := widget quit]

在这个程序中没有发生:

module Main where

main = putStrLn "hello"

1 个答案:

答案 0 :(得分:4)

我有一段时间没有这种行为。原来是一个unicode问题。用某种unicode标记重新编译固定的东西,IIRC。