Why must recursion be in a separate file in hugs?

Posted by Casebash on Stack Overflow See other posts from Stack Overflow or by Casebash
Published on 2010-03-30T10:11:46Z Indexed on 2010/03/30 10:13 UTC
Read the original article Hit count: 422

Filed under:
|

In Haskell in 5 steps the factorial function is defined as follows:

let fac n = if n == 0 then 1 else n * fac (n-1)

But for hugs, it says that fac needs to be in fac.h. Can anyone explain why this is the case - missing the ability to define recursion seems like a massive limitation for an interpreter.

© Stack Overflow or respective owner

Related posts about haskell

Related posts about hugs