[Haskell-cafe] Re: Re: Re: Hit a wall with the type system

Jed Brown jed at 59A2.org
Fri Nov 30 11:06:39 EST 2007

On 30 Nov 2007, cdsmith at twu.net wrote:

> Sure.  To be more specific, here's the contract I would really like.
> 1. You need to pass in a polymorphic function a -> a, where a is, at 
> *most*, restricted to being an instance of Floating.  This part I can 
> already express via rank-N types.  For example, the diffFloating 
> function in my original post enforces this part of the contract.

It seems to me that you need the type system to ensure that the function
is differentiable.  For this, you have to export the type (though not the
constructor as long as you don't want users to be able to extend it).

Am I missing something?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20071130/a352ac1b/attachment.bin

More information about the Haskell-Cafe mailing list