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
fix:: ((a->b) ->a->b) ->a->b
fix f x = f (\y -> fix f y) x
fac::Int->Int
fac x = fix (\go n ->if n >0then n * go (n-1) else1) x
This typechecks under GHC, but Gibbon yields the following error:
gibbon: arrIns: Not an arrow type: ForAll [] (MetaTv (Meta 23))
CallStack (from HasCallStack):
error, called at src/Gibbon/L0/Syntax.hs:305:14 in gibbon-0.2-inplace:Gibbon.L0.Syntax
Note that fix can successfully typecheck on it's own, but typechecking it's application is bugged. I think this is an issue with higher-order functions in general rather than a fixpoint function specifically, another example of this would be helpful.
The text was updated successfully, but these errors were encountered:
Consider the following:
This typechecks under GHC, but Gibbon yields the following error:
Note that
fix
can successfully typecheck on it's own, but typechecking it's application is bugged. I think this is an issue with higher-order functions in general rather than a fixpoint function specifically, another example of this would be helpful.The text was updated successfully, but these errors were encountered: