Skip to content

Instantly share code, notes, and snippets.

@tdammers
Created April 17, 2019 08:11
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 tdammers/df78a10a72720be2b7c95b9c1cc54cd3 to your computer and use it in GitHub Desktop.
Save tdammers/df78a10a72720be2b7c95b9c1cc54cd3 to your computer and use it in GitHub Desktop.
import This
{-#LANGUAGE TemplateHaskell #-}
module This where
import Language.Haskell.TH
$(do
runIO $ putStrLn "The Eightfold Path To Monad Satori, by Stephen Diehl"
runIO $ putStrLn ""
runIO $ putStrLn "1. Don't read the monad tutorials."
runIO $ putStrLn "2. No really, don't read the monad tutorials."
runIO $ putStrLn "3. Learn about Haskell types."
runIO $ putStrLn "4. Learn what a typeclass is."
runIO $ putStrLn "5. Read the Typeclassopedia."
runIO $ putStrLn "6. Read the monad definitions."
runIO $ putStrLn "7. Use monads in real code."
runIO $ putStrLn "8. Don't write monad-analogy tutorials."
return []
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment