Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.