[Haskell-cafe] Re: [Haskell] Fixpoint combinator without recursion
Edsko de Vries
devriese at cs.tcd.ie
Wed Apr 4 17:01:51 EDT 2007
> Yeah, it's rather cool. IIRC, this style of encoding of recursion
> operators is attributed to Morris.
Do you have a reference?
> Before the advent of equality coercions, GHC typically had problems
> generating code for these kinds of definitions. Did you test this
> with a release version? If so, how did you get around the code-
> generation problem? Is it the NOINLINE pragma that does the trick?
Yep. Without the NOINLINE pragma, ghc tries to inline the definition of
fac, expanding it ad infinitum (this is a known bug in ghc and mentioned
in the ghc manual). Hugs doesn't have a problem though.
More information about the Haskell-Cafe