Skip to content

Instantly share code, notes, and snippets.

@balodja
Created March 20, 2014 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balodja/9673677 to your computer and use it in GitHub Desktop.
Save balodja/9673677 to your computer and use it in GitHub Desktop.
Why does it leak in ghci?
import Control.Monad.Writer
import Data.List
myAct :: Int -> Writer [String] ()
myAct i = tell [show i] >> myAct (succ i)
main :: IO ()
main = putStr . intercalate "\r" . execWriter . myAct $ 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment