Liam O'Connor

Results 59 comments of Liam O'Connor

Yes I don't think we'll want anything even close to TemplateHaskell.

Indentations are part of concrete syntax. Why would it matter to macros?

We shouldn't allow that. Macros should work on abstract syntax.

In particular, you wouldn't be able to quote a pattern without the scrutinee, because the quote needs to be a well-formed syntactic unit.

So you could have: ~~~ macro X x (pattern p) = [| $x | Success $p -> 0 | Error _ -> 1 |] foo : -> U8 foo x...

Same rules apply as with parentheses. The |'s need to line up.

Macros _must_ work on abstract syntax, and they _must_ be hygienic with variable names. If they don't have those features, they're an immense source of bugs (just look at the...

In Lisp, the grandfather of macro systems, you literally just take a parenthesised expression and quote it by putting a `'` or the word `quote` in front. Our quoting brackets...

Having Cogent be the macro language is going to be troublesome, because Cogent is not Turing complete and doesn't even have recursion or loops. So, we'll have to layer a...

Yeah, we should do the struct-wrapping thing. Wouldn't say dargent would change this much. I'd recommend wrapping all arrays in a singleton struct.