Conversation

What Erlang does almost right: types can be derived from pattern matching using dialyzer. Is there a way to modify the matcher to get proper algebraic types?
2
I'm running into this with the Lure Scheme representations, which are all built out of ad-hoc s-expression matchers. How to I map those iteration patterns to a type / grammar? I'm probably at the cusp of poorly re-inventing something... (Vague recall of some nanopass framework.)
Replying to
What I'm after: I find these ad-hoc matchers are a great exploratory tool. But at some point it's probably best to crystallize into algebraic types. Is there a way to make that less painful as some kind of overlay on the s-expressions? Some optional/gradual typing thing?
1