do-notation

49 views
Skip to first unread message

Ben Moseley

unread,
Jun 4, 2012, 12:32:49 PM6/4/12
to idris...@googlegroups.com
Using Idris 0.9.2.1, the following code:


myact : IO ()
myact = do
putStrLn "Hello"
putStrLn "World"

main : IO ()
main = do
putStrLn "Hello"
putStrLn "World"

-- main : IO ()
-- main = myact


...the version of main which is commented out works fine, but the uncommented version gives a "parse error" at the "do" inside "main".

Is there some special consideration w.r.t. do-notation inside "main" ?

--Ben

Morel Pisum

unread,
Jun 4, 2012, 3:05:01 PM6/4/12
to idris...@googlegroups.com
Both versions work here(, I think) with Idris-0.9.3.

Cheers.

Ben Moseley

unread,
Jun 5, 2012, 4:08:21 AM6/5/12
to idris...@googlegroups.com
Thanks.

I've just confirmed that it works for me with 0.9.3 too.

--Ben
Reply all
Reply to author
Forward
0 new messages