Skip to content

Commit

Permalink
[#16] Included a hack to remove the unused lambda argument
Browse files Browse the repository at this point in the history
Updated core ref
  • Loading branch information
JustusAdam committed Jan 17, 2019
1 parent 82d2e6c commit 27ecb0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Options.Applicative.Help.Pretty as O
import System.Directory (createDirectoryIfMissing)
import qualified System.FilePath as FP ((-<.>), takeDirectory)

import Ohua.ALang.Lang
import Ohua.Frontend.NS
import Ohua.CodeGen.Iface
import qualified Ohua.CodeGen.JSONObject as JSONGen
Expand Down Expand Up @@ -172,7 +173,11 @@ main = do
mainMod <-
registerAnd modTracker (rawMainMod ^. name) $
loadDepsAndResolve modTracker rawMainMod
expr <- getMain $ mainMod ^. decls
expr' <- getMain $ mainMod ^. decls
let expr = case expr' of
-- FIXME this is technically not correct for edge cases
Lambda "_" body -> body
e -> e
let sfDeps = gatherSFDeps expr
let (mainArity, completeExpr) = mainToEnv expr
gr <-
Expand All @@ -194,7 +199,7 @@ main = do
, entryPointName = entrypoint
, entryPointNamespace = rawMainMod ^. name
}
let outputPath = fromMaybe (nameSuggest) out
let outputPath = fromMaybe nameSuggest out
liftIO $
createDirectoryIfMissing
True
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ packages:
- .
- location:
git: https://github.com/ohua-dev/ohua-core
commit: 2933632f8dfcc39ca52c43e50a901b7193955a59
commit: 2da314763bb839ef0c0f7f191382f266455c26c6
subdirs: [core]
extra-dep: true
- location:
Expand Down

0 comments on commit 27ecb0b

Please sign in to comment.