[Haskell-cafe] Class/Instance : what am I doing wrong in this example ?

david48 dav.vire+haskell at gmail.com
Thu Dec 20 11:10:27 EST 2007

On Dec 20, 2007 5:03 PM, Claude Heiland-Allen
<claudiusmaximus at goto10.org> wrote:

> You're trying to apply 'take n' to a value of type 'a' ('take n'
> requires [a]), moreover putting the value of 'take n s' into the FString
> further constrains its type to be [Char] == String.

First of all, thanks a lot for your reply.

I thought that in this case my type a was String ( which I know is [Char] )
since I give fInit a value of type g ( FString n _ ) and a value of type a ( s )
and I return a value of type g ( FString n (take n s) )


More information about the Haskell-Cafe mailing list