[Haskell-beginners] Referring to several constructors at once
shaolintl at gmail.com
Mon Jan 12 04:06:05 EST 2009
Thanks, I think this is just what I looked for.. I solved it at the end by
having a function to return the type and a list of rules for any rule, but
certainly your solution looks much better.
2009/1/12 David Morse <dcmorse at gmail.com>
> One beginner to another, what about just breaking down and using multiple
> data declarations, then packing the rules into the outer data type and the
> misc. parameters into the inner data type?:
> data RuleBox = Rule0 RuleZero | Rule1 RuleOne Rule | Rule2 RuleTwo Rule
> data RuleZero = Axiom Sequent
> data RuleOne = WeakeningL Sequent FormulaOccur | WeakeningR Sequent
> FormulaOccur | ContractionL ... | Contraction R ... | PermutationL ... |
> PermutationR ... | NotL ... | NotR ...
> data RuleTwo = Mix Sequent FormulaOccur | AndL ... | AndR ...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners