Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created November 16, 2017 18:49
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 deque-blog/f182c348a73e95e5a50e06e8a15bca2e to your computer and use it in GitHub Desktop.
Save deque-blog/f182c348a73e95e5a50e06e8a15bca2e to your computer and use it in GitHub Desktop.
interpret : IOSpec r -> IO r
interpret (Pure a) = pure a
interpret (Bind a f) = interpret a >>= interpret . f
interpret ReadLine = getLine
interpret (WriteLine s) = putStrLn s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment