@@ -37,7 +37,7 @@ type ElabD a = Elab' [PDecl] a
37-- Also find deferred names in the term and their types
37-- Also find deferred names in the term and their types
39build :: IState -> ElabInfo -> Bool -> Name -> PTerm ->
39build :: IState -> ElabInfo -> Bool -> Name -> PTerm ->
40− ElabD (Term, [(Name, Type)], [PDecl])
40+ ElabD (Term, [(Name, (Int, Type))], [PDecl])
41build ist info pattern fn tm
41build ist info pattern fn tm
42 = do elab ist info pattern False fn tm
42 = do elab ist info pattern False fn tm
43 ivs <- get_instances
43 ivs <- get_instances
@@ -75,7 +75,7 @@ build ist info pattern fn tm
75-- know about yet on the LHS of a pattern def)
75-- know about yet on the LHS of a pattern def)
77buildTC :: IState -> ElabInfo -> Bool -> Bool -> Name -> PTerm ->
77buildTC :: IState -> ElabInfo -> Bool -> Bool -> Name -> PTerm ->
78− ElabD (Term, [(Name, Type)], [PDecl])
78+ ElabD (Term, [(Name, (Int, Type))], [PDecl])
79buildTC ist info pattern tcgen fn tm
79buildTC ist info pattern tcgen fn tm
80 = do elab ist info pattern tcgen fn tm
80 = do elab ist info pattern tcgen fn tm
81 probs <- get_probs
81 probs <- get_probs
@@ -751,10 +751,10 @@ resolveTC depth fn ist
751 where isImp (PImp p _ _ _ _ _) = (True, p)
751 where isImp (PImp p _ _ _ _ _) = (True, p)
752 isImp arg = (False, priority arg)
752 isImp arg = (False, priority arg)
754−collectDeferred :: Term -> State [(Name, Type)] Term
754+collectDeferred :: Term -> State [(Name, (Int, Type))] Term
755−collectDeferred (Bind n (GHole t) app) =
755+collectDeferred (Bind n (GHole i t) app) =
756 do ds <- get
756 do ds <- get
757− when (not (n `elem` map fst ds)) $ put ((n, t) : ds)
757+ when (not (n `elem` map fst ds)) $ put ((n, (i, t)) : ds)
758 collectDeferred app
758 collectDeferred app
759collectDeferred (Bind n b t) = do b' <- cdb b
759collectDeferred (Bind n b t) = do b' <- cdb b
760 t' <- collectDeferred t
760 t' <- collectDeferred t
@@ -1123,7 +1123,7 @@ reifyTTBinderApp reif f [x, y]
1123reifyTTBinderApp reif f [t]
1123reifyTTBinderApp reif f [t]
1124 | f == reflm "Hole" = liftM Hole (reif t)
1124 | f == reflm "Hole" = liftM Hole (reif t)
1125reifyTTBinderApp reif f [t]
1125reifyTTBinderApp reif f [t]
1126− | f == reflm "GHole" = liftM GHole (reif t)
1126+ | f == reflm "GHole" = liftM (GHole 0) (reif t)
1127reifyTTBinderApp reif f [x, y]
1127reifyTTBinderApp reif f [x, y]
1128 | f == reflm "Guess" = liftM2 Guess (reif x) (reif y)
1128 | f == reflm "Guess" = liftM2 Guess (reif x) (reif y)
1129reifyTTBinderApp reif f [t]
1129reifyTTBinderApp reif f [t]
@@ -1237,7 +1237,7 @@ reflectBinder (NLet x y)
1237 = reflCall "NLet" [Var (reflm "TT"), reflect x, reflect y]
1237 = reflCall "NLet" [Var (reflm "TT"), reflect x, reflect y]
1238reflectBinder (Hole t)
1238reflectBinder (Hole t)
1239 = reflCall "Hole" [Var (reflm "TT"), reflect t]
1239 = reflCall "Hole" [Var (reflm "TT"), reflect t]
1240−reflectBinder (GHole t)
1240+reflectBinder (GHole _ t)
1241 = reflCall "GHole" [Var (reflm "TT"), reflect t]
1241 = reflCall "GHole" [Var (reflm "TT"), reflect t]
1242reflectBinder (Guess x y)
1242reflectBinder (Guess x y)
1243 = reflCall "Guess" [Var (reflm "TT"), reflect x, reflect y]
1243 = reflCall "Guess" [Var (reflm "TT"), reflect x, reflect y]