flexible contexts and context reduction

Sittampalam, Ganesh ganesh.sittampalam at credit-suisse.com
Thu Mar 27 11:48:05 EDT 2008


 
> > Because I want to be able to make Foo values where the parameter type 
> > isn't in Ord, too. I just want unFoo to work on specific Foo values where it is.

> but your recursive function requires a recursive constraint, which your data 
> type does not guarantee byconstruction, and which the Ord instances do not guarantee
> due to lack of closed classes.

Yeah. As you imply, I'm probably out of luck.

> a rather pedestrian approach would record during construction whether or not
> all parts are in Ord (see below).

Unfortunately I need a (fully) polymorphic construction function, so this isn't
possible. I'm trying to generalise the trick described at http://hsenag.livejournal.com/11803.html
to arrows, but getting stuck with the "first" combinator.

Thanks,

Ganesh

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================



More information about the Glasgow-haskell-users mailing list