[Haskell-cafe] A voyage of undiscovery

wren ng thornton wren at freegeek.org
Sat Jul 18 20:01:53 EDT 2009


Andrew Coppin wrote:
> 
> That seems simple enough (although problematic to implement). However, 
> the Report seems to say that it matters whether or not the bindings are 
> muturally recursive [but I'm not sure precisely *how* it matters...]

Seriously, check out the classic Milner paper. Of languages in the ML 
tradition, Haskell is actually a bit strange in that it doesn't require 
the programmer to explicitly annotate recursive functions and recursive 
groups. That's *very* nice for programmers (since the compiler needs to 
and can figure it out anyways), though it hides some of the 
implementation complexity since you need to discover the "implicit" 
annotations.

Polymorphic recursion was one of the big bugbears in the original HM 
inference algorithm. We can deal with it now, like we can deal with 
rank-N polymorphism (aka polymorphic lambda-binding) and many other 
improvements, but it's easiest to start out with the original algorithm 
when learning everything.

-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list