Hi,

Am Donnerstag, den 03.12.2009, 10:22 -0800 schrieb yair...@gmail.com:
> > I guess TH could probably do this.
> 
> I think this does what you wish for:
> http://hackage.haskell.org/packages/archive/peakachu/0.2/doc/html/Data-Newtype.html
>
> Example:
> > $(mkWithNewtypeFuncs [2] ''ZipList)
> > withZipList2 (<*>) [(+3), (*3)] [6, 7]
> [9, 21]
> > $(mkInNewtypeFuncs [2] ''ZipList)
> > getZipList $ inZipList2 (++) (ZipList "hello ") (ZipList "world")
> > "hello world"
> 
> in some future this won't be in this unrelated "peakachu" package, and
> be incorporated into Neil M's derive.
> but for now this is where you can find it.

Nice, and close. It seems it does not handle the datatype in arbitrary
positions in the type (as in  Foo -> ( a -> Either Foo ())) -> (Foo,
())). But thanks for the pointer. Maybe I should give it a shot.


Greetings,
Joachim


-- 
Joachim Breitner
  e-Mail: m...@joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
  Jabber-ID: nome...@joachim-breitner.de

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to