Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active September 1, 2017 12:45
Show Gist options
  • Save deque-blog/4ae58d713504cb4085a1c4ab12df26f5 to your computer and use it in GitHub Desktop.
Save deque-blog/4ae58d713504cb4085a1c4ab12df26f5 to your computer and use it in GitHub Desktop.
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