Skip to content

Commit 27ecb0b

Browse files
committed
[#16] Included a hack to remove the unused lambda argument
Updated core ref
1 parent 82d2e6c commit 27ecb0b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/Main.hs

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Options.Applicative.Help.Pretty as O
1616
import System.Directory (createDirectoryIfMissing)
1717
import qualified System.FilePath as FP ((-<.>), takeDirectory)
1818

19+
import Ohua.ALang.Lang
1920
import Ohua.Frontend.NS
2021
import Ohua.CodeGen.Iface
2122
import qualified Ohua.CodeGen.JSONObject as JSONGen
@@ -172,7 +173,11 @@ main = do
172173
mainMod <-
173174
registerAnd modTracker (rawMainMod ^. name) $
174175
loadDepsAndResolve modTracker rawMainMod
175-
expr <- getMain $ mainMod ^. decls
176+
expr' <- getMain $ mainMod ^. decls
177+
let expr = case expr' of
178+
-- FIXME this is technically not correct for edge cases
179+
Lambda "_" body -> body
180+
e -> e
176181
let sfDeps = gatherSFDeps expr
177182
let (mainArity, completeExpr) = mainToEnv expr
178183
gr <-
@@ -194,7 +199,7 @@ main = do
194199
, entryPointName = entrypoint
195200
, entryPointNamespace = rawMainMod ^. name
196201
}
197-
let outputPath = fromMaybe (nameSuggest) out
202+
let outputPath = fromMaybe nameSuggest out
198203
liftIO $
199204
createDirectoryIfMissing
200205
True

stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ packages:
33
- .
44
- location:
55
git: https://github.com/ohua-dev/ohua-core
6-
commit: 2933632f8dfcc39ca52c43e50a901b7193955a59
6+
commit: 2da314763bb839ef0c0f7f191382f266455c26c6
77
subdirs: [core]
88
extra-dep: true
99
- location:

0 commit comments

Comments
 (0)