@@ -34,7 +34,7 @@ compile target f tm
34 hdrs <- getHdrs
34 hdrs <- getHdrs
35 let defs = defsIn ++ [(MN 0 "runMain", maindef)]
35 let defs = defsIn ++ [(MN 0 "runMain", maindef)]
36 -- iputStrLn $ showSep "\n" (map show defs)
36 -- iputStrLn $ showSep "\n" (map show defs)
37− let (nexttag, tagged) = addTags 0 (liftAll defs)
37+ let (nexttag, tagged) = addTags 65536 (liftAll defs)
38 let ctxtIn = addAlist tagged emptyContext
38 let ctxtIn = addAlist tagged emptyContext
39 let defuns = defunctionalise nexttag ctxtIn
39 let defuns = defunctionalise nexttag ctxtIn
40 -- iputStrLn $ showSep "\n" (map show (toAlist defuns))
40 -- iputStrLn $ showSep "\n" (map show (toAlist defuns))
@@ -100,7 +100,7 @@ mkLDecl n (Function tm _) = do e <- ir tm
100 return (declArgs [] n e)
100 return (declArgs [] n e)
101mkLDecl n (CaseOp _ _ pats _ _ args sc) = do e <- ir (args, sc)
101mkLDecl n (CaseOp _ _ pats _ _ args sc) = do e <- ir (args, sc)
102 return (declArgs [] n e)
102 return (declArgs [] n e)
103−mkLDecl n (TyDecl (DCon t a) _) = return $ LConstructor n (-1) a
103+mkLDecl n (TyDecl (DCon t a) _) = return $ LConstructor n t a
104mkLDecl n (TyDecl (TCon t a) _) = return $ LConstructor n (-1) a
104mkLDecl n (TyDecl (TCon t a) _) = return $ LConstructor n (-1) a
105mkLDecl n _ = return (LFun n [] (LError ("Impossible declaration " ++ show n)))
105mkLDecl n _ = return (LFun n [] (LError ("Impossible declaration " ++ show n)))