[Haskell-cafe] Re: fix

Dan Weston westondan at imageworks.com
Tue Mar 20 22:45:47 EDT 2007

But in fact it seems to me that the type variable "a" not only can, but 
must unify with "b->c".

Is there any use of fix for which this is not true? If this is true, is 
the type "a" instead of "b->c" because it is not possible in general for 
the type checker to verify this fact, making it some kind of underivable 
true statement?

If it is not true, I would dearly love to see a use of fix with a type 
for which functional application is not defined.

For me, it is this aspect (the type of fix) that has made it so much 
harder to understand fix than it should have been.


Pete Kazmier wrote:
> "Matthew Brecknell" <haskell at brecknell.org> writes:
>> As others have pointed out, fix is polymorphic, so "a" can stand for any
>> type, including "(b -> c)". Removing redundant parentheses, this means
>> fix can directly specialise to:
>>> fix :: ((b -> c) -> b -> c) -> b -> c
> I understand now.  I think part of my problem was that I was trying to
> grasp one too many new things all at once.  This makes perfect sense.
> Thanks,
> Pete

More information about the Haskell-Cafe mailing list