File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -106,18 +106,12 @@ compileFunction (t :: Target t) defn@Defn{defType} = do
106106
107107 builder . flip LBox. LFix k <$>
108108 forM mdefs \ def@ Defn {defName} -> do
109- body <- compileFunctionBody mnames def
110- case body of
111- LBox. LLambda {} ->
112- return LBox. Def
113- { dName = qnameToName defName
114- , dBody = body
115- , dArgs = 0
116- }
117- LBox. LBox ->
118- return LBox. Def
119- { dName = qnameToName defName
120- , dBody = LBox. LLambda LBox. Anon body
121- , dArgs = 0
122- }
123- _ -> genericError " Fixpoint body must be Lambda."
109+ body <- compileFunctionBody mnames def >>= \ case
110+ l@ LBox. LLambda {} -> pure l
111+ LBox. LBox -> pure $ LBox. LLambda LBox. Anon LBox. LBox
112+ _ -> genericError " Fixpoint body must be Lambda."
113+ return LBox. Def
114+ { dName = qnameToName defName
115+ , dBody = body
116+ , dArgs = 0
117+ }
You can’t perform that action at this time.
0 commit comments