Haskell Hacking: a journal of Haskell programming

Haskell Hacking has moved => Go here.
2006-08-03

main :: IO a

Noticed today that in the ghc 6.5 branch, the following program is valid:
main :: IO String
main = return "hello, world"
This works for any return type, in Show, it seems. (Except, notably, ()).
$ runhaskell A.hs 
"hello, world"

/home :: /haskell :: permalink :: rss

About

Real World Haskell

RWH Book Cover

Archives

Recommended

Blog Roll

Syndicate