Last active
September 1, 2017 12:45
-
-
Save deque-blog/4ae58d713504cb4085a1c4ab12df26f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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