Skip to content

Commit 512cdd8

Browse files
committed
Fix runtime exception if we cannot find arity of a function call cycle.
1 parent 3de0d46 commit 512cdd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/Generate/JavaScript.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ makeArgLookup graph home name =
5454
Just arity
5555
Just (Opt.Link global) ->
5656
case Map.lookup global graph of
57-
Just (Opt.Cycle names _ defs _) ->
57+
Just (Opt.Cycle _ _ defs _) ->
5858
case List.find (\d -> defName d == name) defs of
5959
Just (Opt.Def _ _ (Opt.Function _ args _)) ->
6060
Just (length args)
6161
Just (Opt.TailDef _ _ args _) ->
6262
Just (length args)
6363
_ ->
64-
error (show names)
64+
Nothing
6565
_ ->
6666
Nothing
6767
_ ->

0 commit comments

Comments
 (0)