[Haskell-cafe] Strange space leak

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Fri Nov 4 14:44:00 UTC 2016


Can anyone explain why this leaks space:

    main :: IO ()
    main = let loop () = return () *> loop ()
           in loop ()

whilst this doesn't:

    main :: IO ()
    main = let loop = return () *> loop
           in loop

I'm stumped.


More information about the Haskell-Cafe mailing list