Skip to content

Instantly share code, notes, and snippets.

@KirinDave
Last active May 11, 2018 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 KirinDave/9609d19c9c68f2e316b09fe82e8058f5 to your computer and use it in GitHub Desktop.
Save KirinDave/9609d19c9c68f2e316b09fe82e8058f5 to your computer and use it in GitHub Desktop.
data SomeThing = SomeThing { name :: Text, age :: Int }
makeSomeThing :: (Monad m) => m Text -> m Int -> m SomeThing
makeSomeThing nameE ageE = do
name <- nameE
age <- ageE
return $ SomeThing name age
@ckampfe
Copy link

ckampfe commented May 11, 2018

Dumb question: is the return type m Something supposed to be lowercase vs SomeThing?

@KirinDave
Copy link
Author

KirinDave commented May 11, 2018

yep ;) My bad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment