On Wed, 24 Jan 2007, Claus Reinke wrote: > the alternative I'm aiming for, as exhibited in the consP example, would be > to build patterns systematically from view patterns used as abstract > de-constructors, composed in the same way as one would compose the > abstract constructors to build the abstract data structure. in other words, > you define your pattern constructors once, with the adt, and export them; > and anytime you want to match somethind of that abstract type, you simply > compose your pattern from those abstract pattern constructors. >
This would cause an awful lot of kludging to get around the fact you need to declare a new ADT to declare new abstract deconstructors, and requires an additional extension for abstract deconstructors to be typeclass methods - something abstract constructors can do for free. Neither seems gainful to me. -- [EMAIL PROTECTED] Performance anxiety leads to premature optimisation _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime