On Monday 06 August 2007, Rahul Kapoor wrote: > I am having problems coming up with nice combinators for a simple > DSEL. The abstract syntax is simply given by the types:
<snip> > Or is it a better idea to just remove the precedence rules from the > types and move it the part of the code that evaluates the expressions? Exactly thus. Say: data SearchCondition = Constant Bool | SearchCondition :||: SearchCondition | SearchCondition :&&: SearchCondition infixr 3 (:&&:) infixr 2 (:||:) And you're set. Jonathan Cast http://sourceforge.net/projects/fid-core http://sourceforge.net/projects/fid-emacs
pgpmmrE2Ge8iq.pgp
Description: PGP signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe