[Haskell-beginners] ~ type operator

Guy guytsalmaves-h at yahoo.com
Fri Jun 24 13:44:36 CEST 2011


On 24/06/2011 12:10, Daniel Fischer wrote:
> On Friday 24 June 2011, 10:26:42, Guy wrote:
>> What does the ~ type operator mean? I've sometimes seen types such as (a
>> ~ b) in error messages, but can't understand what GHC is trying to tell
>> me.
>
> Type equality, (a ~ b) means that a and b are the same type (rather, that
> the compiler can prove they're the same).

So where is it useful to say a ~ b, rather than using a twice?




More information about the Beginners mailing list