[Haskell-cafe] Pattern combinators
David Menendez
dave at zednenem.com
Mon Dec 22 16:20:14 EST 2008
On Sun, Dec 21, 2008 at 10:14 PM, Andrew Wagner <wagner.andrew at gmail.com> wrote:
> I'd love to see a copy of this go up on hackage for experimentation. Would
> you care to upload your code, or send it to me so I can upload it?
I've uploaded my latest version to <http://hpaste.org/13263>. It
explicitly makes patterns polymorphic over the answer type of the case
statement by making Pattern a newtype and universally quantifying the
(un)currying and matching functions.
For example,
(->>) :: Pattern a () vec -> Curry vec ans -> Case a ans
I'm not sure it makes sense to create a package just yet. At the very
least, you should ask Morten Rhiger first. The type signatures are
mine, but the code is mostly straight transcriptions from his paper.
--
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>
More information about the Haskell-Cafe
mailing list