[Haskell-beginners] help with type error in a wxHaskell program
Kim-Ee Yeoh
ky3 at atamo.com
Sun Nov 22 03:52:13 UTC 2015
On Sat, Nov 21, 2015 at 8:28 PM, Jason J. Corso <jjcorso at eecs.umich.edu>
wrote:
> But, I get a type error that I do not understand
>
> Couldn't match expected type ‘IO (Window a0)’
> with actual type ‘[Prop (Frame ())] -> IO (Frame ())’
> Probable cause: ‘frame’ is applied to too few arguments
>
This is a consequence of the line "f <- frame" in
gui :: IO ()
gui = do
f <- frame
let s = map (\t -> staticText f [text := show t]) [1..10]
set f [layout := margin 10 ( row 2 $ map (\x -> (widget x)) s)]
I have no experience at all with wxHaskell. But for the sake of forward
motion, substituting with "f <- frame []" should work.
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151122/5ee635e3/attachment.html>
More information about the Beginners
mailing list