simple putStrLn in Haskell/Yampa with arrows syntax

Posted by sisif on Stack Overflow See other posts from Stack Overflow or by sisif
Published on 2010-06-01T06:28:26Z Indexed on 2010/06/01 6:33 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

i'm using Haskell with the Yampa FRP library which uses the arrows language extension.

how can i do a simple putStrLn in a SF?

mySF = proc x -> do
    y <- identity -< x*x
    putStrLn "Hello World!" ++ show y
    returnA -< y

the arrow syntax complains about the expression not bein an arrow (of course), but even with arrows i get no output

 output <- identity -< putStrLn "Hello World!"

© Stack Overflow or respective owner

Related posts about beginner

Related posts about haskell