File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 11{-# LANGUAGE NamedFieldPuns, DataKinds, OverloadedStrings #-}
22-- | Convert Agda functions to λ□ constant declarations
3- module Agda2Lambox.Compile.Function
3+ module Agda2Lambox.Compile.Function
44 ( compileFunction
55 ) where
66
@@ -107,8 +107,17 @@ compileFunction (t :: Target t) defn@Defn{defType} = do
107107 builder . flip LBox. LFix k <$>
108108 forM mdefs \ def@ Defn {defName} -> do
109109 body <- compileFunctionBody mnames def
110- return LBox. Def
111- { dName = qnameToName defName
112- , dBody = body
113- , dArgs = 0
114- }
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."
You can’t perform that action at this time.
0 commit comments