mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 04:27:55 +03:00
Bug #299 doesn't seem to depend on lambdas actually...
This commit is contained in:
parent
9c9911c542
commit
83314ec9d9
@ -76,13 +76,12 @@ concretizeXObj allowAmbiguityRoot typeEnv rootEnv visitedDefinitions root =
|
||||
return [defn, nameSymbol, args, okBody]
|
||||
|
||||
-- | Fn / λ
|
||||
visitList allowAmbig env fn@(XObj (Lst [(XObj (Fn _ _) fni fnt), args@(XObj (Arr argsArr) ai at), body]) i t) =
|
||||
visitList allowAmbig env (XObj (Lst [(XObj (Fn _ _) fni fnt), args@(XObj (Arr argsArr) ai at), body]) i t) =
|
||||
-- The basic idea of this function is to first visit the body of the lambda ("in place"),
|
||||
-- then take the resulting body and put into a separate function 'defn' with a new name
|
||||
-- in the global scope. That function definition will be set as the lambdas '.callback' in
|
||||
-- the C code.
|
||||
do mapM_ (concretizeTypeOfXObj typeEnv) argsArr
|
||||
concretizeTypeOfXObj typeEnv fn
|
||||
let Just ii = i
|
||||
Just funcTy = t
|
||||
-- | TODO: This code is a copy of the one above in Defn, remove duplication:
|
||||
|
Loading…
Reference in New Issue
Block a user