@@ -52,9 +52,15 @@ elabType info syn doc fc opts n ty' = {- let ty' = piBind (params info) ty_in
52 do checkUndefined fc n
52 do checkUndefined fc n
53 ctxt <- getContext
53 ctxt <- getContext
54 i <- getIState
54 i <- getIState
56+ -- Add user one, not implicitsed one
57+ addInternalApp (fc_fname fc) (fc_line fc) ty'
58+ addIBC (IBCLineApp (fc_fname fc) (fc_line fc) ty')
55 logLvl 3 $ show n ++ " pre-type " ++ showImp Nothing True False ty'
60 logLvl 3 $ show n ++ " pre-type " ++ showImp Nothing True False ty'
56 ty' <- addUsingConstraints syn fc ty'
61 ty' <- addUsingConstraints syn fc ty'
57 ty' <- implicit syn n ty'
62 ty' <- implicit syn n ty'
58 let ty = addImpl i ty'
64 let ty = addImpl i ty'
59 logLvl 2 $ show n ++ " type " ++ showImp Nothing True False ty
65 logLvl 2 $ show n ++ " type " ++ showImp Nothing True False ty
60 ((tyT, defer, is), log) <-
66 ((tyT, defer, is), log) <-
@@ -406,10 +412,10 @@ elabRecord info syn doc fc tyn ty cdoc cn cty
406 show fn ++ " (" ++ show ty ++ ")"
412 show fn ++ " (" ++ show ty ++ ")"
407 putIState i)
413 putIState i)
409− getImplB k (PPi (Imp l s _) n Placeholder sc)
415+ getImplB k (PPi (Imp l s _ _) n Placeholder sc)
410 = getImplB k sc
416 = getImplB k sc
411− getImplB k (PPi (Imp l s d) n ty sc)
417+ getImplB k (PPi (Imp l s d p) n ty sc)
412− = getImplB (\x -> k (PPi (Imp l s d) n ty x)) sc
418+ = getImplB (\x -> k (PPi (Imp l s d p) n ty x)) sc
413 getImplB k (PPi _ n ty sc)
419 getImplB k (PPi _ n ty sc)
414 = getImplB k sc
420 = getImplB k sc
415 getImplB k _ = k
421 getImplB k _ = k
@@ -1244,8 +1250,8 @@ elabClass info syn doc fc constraints tn ps ds
1244 return [PTy doc syn fc o m ty',
1250 return [PTy doc syn fc o m ty',
1245 PClauses fc [Inlinable] m [PClause fc m lhs [] rhs []]]
1251 PClauses fc [Inlinable] m [PClause fc m lhs [] rhs []]]
1247− getMArgs (PPi (Imp _ _ _) n ty sc) = IA : getMArgs sc
1253+ getMArgs (PPi (Imp _ _ _ _) n ty sc) = IA : getMArgs sc
1248− getMArgs (PPi (Exp _ _ _) n ty sc) = EA : getMArgs sc
1254+ getMArgs (PPi (Exp _ _ _ _) n ty sc) = EA : getMArgs sc
1249 getMArgs (PPi (Constraint _ _ _) n ty sc) = CA : getMArgs sc
1255 getMArgs (PPi (Constraint _ _ _) n ty sc) = CA : getMArgs sc
1250 getMArgs _ = []
1256 getMArgs _ = []
@@ -1262,14 +1268,14 @@ elabClass info syn doc fc constraints tn ps ds
1262 rhsArgs (CA : xs) ns = pconst (PResolveTC fc) : rhsArgs xs ns
1268 rhsArgs (CA : xs) ns = pconst (PResolveTC fc) : rhsArgs xs ns
1263 rhsArgs [] _ = []
1269 rhsArgs [] _ = []
1265− insertConstraint c (PPi p@(Imp _ _ _) n ty sc)
1271+ insertConstraint c (PPi p@(Imp _ _ _ _) n ty sc)
1266 = PPi p n ty (insertConstraint c sc)
1272 = PPi p n ty (insertConstraint c sc)
1267 insertConstraint c sc = PPi constraint (MN 0 "class") c sc
1273 insertConstraint c sc = PPi constraint (MN 0 "class") c sc
1269 -- make arguments explicit and don't bind class parameters
1275 -- make arguments explicit and don't bind class parameters
1270− toExp ns e (PPi (Imp l s _) n ty sc)
1276+ toExp ns e (PPi (Imp l s _ p) n ty sc)
1271 | n `elem` ns = toExp ns e sc
1277 | n `elem` ns = toExp ns e sc
1272− | otherwise = PPi (e l s "") n ty (toExp ns e sc)
1278+ | otherwise = PPi (e l s "" p) n ty (toExp ns e sc)
1273 toExp ns e (PPi p n ty sc) = PPi p n ty (toExp ns e sc)
1279 toExp ns e (PPi p n ty sc) = PPi p n ty (toExp ns e sc)
1274 toExp ns e sc = sc
1280 toExp ns e sc = sc
@@ -1364,9 +1370,9 @@ elabInstance info syn fc cs n ps t expn ds
1364 lamBind i (PPi _ n ty sc) sc'
1370 lamBind i (PPi _ n ty sc) sc'
1365 = PLam (MN i "meth") Placeholder (lamBind (i+1) sc sc')
1371 = PLam (MN i "meth") Placeholder (lamBind (i+1) sc sc')
1366 lamBind i _ sc = sc
1372 lamBind i _ sc = sc
1367− methArgs i (PPi (Imp _ _ _) n ty sc)
1373+ methArgs i (PPi (Imp _ _ _ _) n ty sc)
1368 = PImp 0 True False n (PRef fc (MN i "meth")) "" : methArgs (i+1) sc
1374 = PImp 0 True False n (PRef fc (MN i "meth")) "" : methArgs (i+1) sc
1369− methArgs i (PPi (Exp _ _ _) n ty sc)
1375+ methArgs i (PPi (Exp _ _ _ _) n ty sc)
1370 = PExp 0 False (PRef fc (MN i "meth")) "" : methArgs (i+1) sc
1376 = PExp 0 False (PRef fc (MN i "meth")) "" : methArgs (i+1) sc
1371 methArgs i (PPi (Constraint _ _ _) n ty sc)
1377 methArgs i (PPi (Constraint _ _ _) n ty sc)
1372 = PConstraint 0 False (PResolveTC fc) "" : methArgs (i+1) sc
1378 = PConstraint 0 False (PResolveTC fc) "" : methArgs (i+1) sc
@@ -1393,7 +1399,7 @@ elabInstance info syn fc cs n ps t expn ds
1393 conbind (ty : ns) x = PPi constraint (MN 0 "class") ty (conbind ns x)
1399 conbind (ty : ns) x = PPi constraint (MN 0 "class") ty (conbind ns x)
1394 conbind [] x = x
1400 conbind [] x = x
1396− coninsert cs (PPi p@(Imp _ _ _) n t sc) = PPi p n t (coninsert cs sc)
1402+ coninsert cs (PPi p@(Imp _ _ _ _) n t sc) = PPi p n t (coninsert cs sc)
1397 coninsert cs sc = conbind cs sc
1403 coninsert cs sc = conbind cs sc
1399 insertDefaults :: IState -> Name ->
1405 insertDefaults :: IState -> Name ->