
18 May
2012
18 May
'12
6:02 p.m.
I wonder if you want a typeclass here, rather than a type? A Normal Rule is pretty much a State Transformer, while a Meta Rule seems like a higher-order function on Normal Rules[*]. These are different kinds of things --- and I say "kind" advisedly --- so perhaps better to define the specific commonalities you need than to try to shoehorn them both into one type. [*]: Possibly related question: Can a Meta Rule depend upon an implementation detail of a Normal rule? In other words, does rule1 g == rule2 g imply myMetaRule rule1 == myMetaRule rule2 ?