You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fac::Int->Int
fac x =let
go n =if n >0then n * go (n-1) else1in
go x
This compiles under GHC, but Gibbon yields the following error:
gibbon: L0.Typecheck:
Unknown function: go in Var "fac"
CallStack (from HasCallStack):
error, called at src/Gibbon/L0/Typecheck.hs:83:18 in gibbon-0.2-inplace:Gibbon.L0.Typecheck
Evidently let expressions are not typechecked with a recursive context, giving us an unbound identifier go. Supporting the singly recursive case is probably not too troublesome since a recursive context can be made with laziness, a mutually recursive case would probably be too difficult since our let expressions are separated out into single assignments at the AST level.
The text was updated successfully, but these errors were encountered:
Take the following simple example.
This compiles under GHC, but Gibbon yields the following error:
Evidently
let
expressions are not typechecked with a recursive context, giving us an unbound identifiergo
. Supporting the singly recursive case is probably not too troublesome since a recursive context can be made with laziness, a mutually recursive case would probably be too difficult since our let expressions are separated out into single assignments at the AST level.The text was updated successfully, but these errors were encountered: