Last active
August 31, 2017 21:21
-
-
Save deque-blog/f433addc7f2fff3336da00b9ae02c1d0 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
logEvent : (event: Event) -> SchemaType (messageSpec event) | |
logEvent e = loop (messageSpec e) (title e ++ ": ") | |
where | |
loop : (messageSpec: Schema) -> String -> SchemaType messageSpec | |
loop [] out = out | |
loop (IntVar :: rest) out = \i => loop rest (out ++ show i) | |
loop (StrVar :: rest) out = \s => loop rest (out ++ s) | |
loop (StrCst s :: rest) out = loop rest (out ++ s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment