Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active September 1, 2017 12:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
birthDay : Event
birthDay = MkEvent "Happy BirthDay" [IntVar, StrCst " years old, ", StrVar]
-- In the REPL:
> logEvent birthDay [IntVal 32, StrVal "Quentin"] -- Values match the placeholder expected types
Just "Happy BirthDay: 32 years old, Quentin"
> logEvent birthDay [StrVal "Quentin", IntVal 32] -- Wrong placeholder types (inverted)
Nothing
> logEvent birthDay [IntVal 32] -- Missing placeholder value
Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment