WxHaskell thinks my strings are 1 character long

Whenever I use a string in WxHaskell, it considers the string to be one character (it only displays the first character). This only happens when using WxHaskell functions, not functions like putStrLn.

For example, an error occurs in this code

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] 

This does not happen in this program:

 module Main where main = putStrLn "hello" 
+4
source share
1 answer

I had this behavior a while ago. It turned out that this is a Unicode problem. Recompilation with some kind of fixed unicode flag, IIRC.

+4
source

All Articles