@@ -526,13 +526,13 @@ elabEliminator paramPos n ty cons info = do
526526 findRecArgs (ty:rs) = findRecArgs rs
527527
528528 applyCons :: Name -> [(Name, Plicity, PTerm)] -> PTerm
529− applyCons tn targs = PApp elimFC (PRef elimFC tn) (map convertArg targs) -- ipapp
529+ applyCons tn targs = PApp elimFC (PRef elimFC tn) (map convertArg targs)
530530
531531 convertArg :: (Name, Plicity, PTerm) -> PArg
532532 convertArg (n, _, _) = pexp (PRef elimFC n)
533533
534534 applyMotive :: [PTerm] -> PTerm -> PTerm
535− applyMotive idxs t = PApp elimFC (PRef elimFC motiveName) (map pexp idxs ++ [pexp t]) -- ipapp
535+ applyMotive idxs t = PApp elimFC (PRef elimFC motiveName) (map pexp idxs ++ [pexp t])
536536
537537 getPiName :: (Name, Plicity, PTerm) -> Name
538538 getPiName (name,_,_) = name
@@ -550,13 +550,13 @@ elabEliminator paramPos n ty cons info = do
550550 let (_, generalIdxs') = splitArgPms resTy
551551 let generalIdxs = map pexp generalIdxs'
552552 consArgs <- namePis True args
553− let lhsPattern = PApp elimFC (PRef elimFC elimDeclName) (generalArgs ++ generalIdxs ++ [pexp $ applyCons cnm consArgs]) -- ipapp
553+ let lhsPattern = PApp elimFC (PRef elimFC elimDeclName) (generalArgs ++ generalIdxs ++ [pexp $ applyCons cnm consArgs])
554554 let recArgs = findRecArgs consArgs
555555 let recElims = map applyRecElim recArgs
556− let rhsExpr = PApp elimFC (PRef elimFC cnsElim) (map convertArg implidxs ++ map convertArg consArgs ++ recElims) -- ipapp
556+ let rhsExpr = PApp elimFC (PRef elimFC cnsElim) (map convertArg implidxs ++ map convertArg consArgs ++ recElims)
557557 return $ PClause elimFC elimDeclName lhsPattern [] rhsExpr []
558558 where applyRecElim :: (Name, Plicity, PTerm) -> PArg
559− applyRecElim (constr@(recCnm,_,recTy)) = pexp $ PApp elimFC (PRef elimFC elimDeclName) (generalArgs ++ map pexp idxs ++ [pexp $ PRef elimFC recCnm]) -- ipapp
559+ applyRecElim (constr@(recCnm,_,recTy)) = pexp $ PApp elimFC (PRef elimFC elimDeclName) (generalArgs ++ map pexp idxs ++ [pexp $ PRef elimFC recCnm])
560560 where (_, idxs) = splitArgPms recTy
561561
562562-- | Elaborate primitives
@@ -668,7 +668,7 @@ elabProvider info syn fc what n ty tm
668668 | what `elem` [ProvTerm, ProvAny] ->
669669 do -- Finally add a top-level definition of the provided term
670670 elabType info syn emptyDocstring [] fc [] n ty
671− elabClauses info fc [] n [PClause fc n (PApp fc (PRef fc n) []) [] (delab i tm) []] -- ipapp
671+ elabClauses info fc [] n [PClause fc n (PApp fc (PRef fc n) []) [] (delab i tm) []]
672672 logLvl 3 $ "Elaborated provider " ++ show n ++ " as: " ++ show tm
673673 | otherwise ->
674674 ierror . Msg $ "Attempted to provide a term where a postulate was expected."
@@ -741,7 +741,7 @@ elabRecord info syn doc fc tyn ty cdoc cn cty
741741 let ptys_u = getProjs [] cty
742742 let recty = getRecTy cty
743743 logLvl 6 $ show (recty, ptys)
744− let substs = map (\ (n, _) -> (n, PApp fc (PRef fc n) -- ipapp
744+ let substs = map (\ (n, _) -> (n, PApp fc (PRef fc n)
745745 [pexp (PRef fc rec)])) ptys
746746 proj_decls <- mapM (mkProj recty substs cimp) (zip ptys [0..])
747747 let nonImp = mapMaybe isNonImp (zip cimp ptys_u)
@@ -807,8 +807,8 @@ elabRecord info syn doc fc tyn ty cdoc cn cty
807807 let after = length substs - (pos + 1)
808808 let args = take before pls ++ PRef fc (mkp pn) : take after pls
809809 let iargs = map implicitise (zip cimp args)
810− let lhs = PApp fc (PRef fc pn) -- ipapp
811− [pexp (PApp fc (PRef fc cn) iargs)] -- ipapp
810+ let lhs = PApp fc (PRef fc pn)
811+ [pexp (PApp fc (PRef fc cn) iargs)]
812812 let rhs = PRef fc (mkp pn)
813813 let pclause = PClause fc pn lhs [] rhs []
814814 return [pfnTy, PClauses fc [] pn [pclause]]
@@ -826,12 +826,12 @@ elabRecord info syn doc fc tyn ty cdoc cn cty
826826 let rhsArgs = take pos pls ++ (PRef fc valname) :
827827 drop (pos + 1) pls
828828 let before = pos
829− let pclause = PClause fc setname (PApp fc (PRef fc setname) -- ipapp
829+ let pclause = PClause fc setname (PApp fc (PRef fc setname)
830830 [pexp (PRef fc valname),
831− pexp (PApp fc (PRef fc cn) -- ipapp
831+ pexp (PApp fc (PRef fc cn)
832832 (map pexp lhsArgs))])
833833 []
834− (PApp fc (PRef fc cn) -- ipapp
834+ (PApp fc (PRef fc cn)
835835 (map pexp rhsArgs)) []
836836 return (pn, pfnTy, PClauses fc [] setname [pclause])
837837
@@ -876,7 +876,7 @@ elabCon info syn tn codata (doc, argDocs, n, t_in, fc, forcenames)
876876
877877 mkLazy (PPi pl n ty sc)
878878 = let ty' = if getTyName ty
879− then PApp fc (PRef fc (sUN "Lazy'")) -- ipapp
879+ then PApp fc (PRef fc (sUN "Lazy'"))
880880 [pexp (PRef fc (sUN "LazyCodata")),
881881 pexp ty]
882882 else ty in
@@ -1341,7 +1341,7 @@ paramNames args env (p : ps)
13411341
13421342propagateParams :: [Name] -> Type -> PTerm -> PTerm
13431343propagateParams ps t tm@(PApp _ (PRef fc n) args)
1344− = PApp fc (PRef fc n) (addP t args) -- tpapp
1344+ = PApp fc (PRef fc n) (addP t args)
13451345 where addP (Bind n _ sc) (t : ts)
13461346 | Placeholder <- getTm t,
13471347 n `elem` ps,
@@ -1350,7 +1350,7 @@ propagateParams ps t tm@(PApp _ (PRef fc n) args)
13501350 addP (Bind n _ sc) (t : ts) = t : addP sc ts
13511351 addP _ ts = ts
13521352propagateParams ps t (PRef fc n)
1353− = PApp fc (PRef fc n) (map (\x -> pimp x (PRef fc x) True) ps) -- ipapp
1353+ = PApp fc (PRef fc n) (map (\x -> pimp x (PRef fc x) True) ps)
13541354propagateParams ps t x = x
13551355
13561356elabClause :: ElabInfo -> FnOpts -> (Int, PClause) ->
@@ -1509,7 +1509,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in withs rhs_in whereblock)
15091509 addErrRev (crhs, clhs)
15101510 return $ Right (clhs, crhs)
15111511 where
1512− mkLHSapp t@(PRef _ _) = trace ("APP " ++ show t) $ PApp fc t [] -- ipapp
1512+ mkLHSapp t@(PRef _ _) = trace ("APP " ++ show t) $ PApp fc t []
15131513 mkLHSapp t = t
15141514
15151515 decorate (NS x ns)
@@ -1640,7 +1640,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in withblock)
16401640 mapM_ (elabDecl EAll info) wb
16411641
16421642 -- rhs becomes: fname' ps wval
1643− let rhs = PApp fc (PRef fc wname) -- ipapp
1643+ let rhs = PApp fc (PRef fc wname)
16441644 (map (pexp . (PRef fc) . fst) bargs_pre ++
16451645 pexp wval :
16461646 (map (pexp . (PRef fc) . fst) bargs_post))
@@ -1697,14 +1697,14 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in withblock)
16971697 mkAux wname toplhs ns ns' c
16981698 = ifail $ show fc ++ "badly formed with clause"
16991699
1700− addArg (PApp fc f args) w = PApp fc f (args ++ [pexp w]) -- tpapp
1701− addArg (PRef fc f) w = PApp fc (PRef fc f) [pexp w] -- ipapp
1700+ addArg (PApp fc f args) w = PApp fc f (args ++ [pexp w])
1701+ addArg (PRef fc f) w = PApp fc (PRef fc f) [pexp w]
17021702
17031703 updateLHS n wname mvars ns_in ns_in' (PApp fc (PRef fc' n') args) w
17041704 = let ns = map (keepMvar (map fst mvars) fc') ns_in
17051705 ns' = map (keepMvar (map fst mvars) fc') ns_in' in
17061706 return $ substMatches mvars $
1707− PApp fc (PRef fc' wname) -- tpapp
1707+ PApp fc (PRef fc' wname)
17081708 (map pexp ns ++ pexp w : (map pexp ns'))
17091709 updateLHS n wname mvars ns ns' tm w
17101710 = ifail $ "Not implemented match " ++ show tm
@@ -1712,7 +1712,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in withblock)
17121712 keepMvar mvs fc v | v `elem` mvs = PRef fc v
17131713 | otherwise = Placeholder
17141714
1715− fullApp (PApp _ (PApp fc f args) xs) = fullApp (PApp fc f (args ++ xs)) -- tpapp
1715+ fullApp (PApp _ (PApp fc f args) xs) = fullApp (PApp fc f (args ++ xs))
17161716 fullApp x = x
17171717
17181718 split [] rest pre = (reverse pre, rest)
@@ -1731,7 +1731,7 @@ elabClass :: ElabInfo -> SyntaxInfo -> Docstring ->
17311731elabClass info syn doc fc constraints tn ps ds
17321732 = do let cn = SN (InstanceCtorN tn) -- sUN ("instance" ++ show tn) -- MN 0 ("instance" ++ show tn)
17331733 let tty = pibind ps PType
1734− let constraint = PApp fc (PRef fc tn) -- ipapp
1734+ let constraint = PApp fc (PRef fc tn)
17351735 (map (pexp . PRef fc) (map fst ps))
17361736 -- build data declaration
17371737 let mdecls = filter tydecl ds -- method declarations
@@ -1782,7 +1782,7 @@ elabClass info syn doc fc constraints tn ps ds
17821782 = do when (not $ null cs) . tclift
17831783 $ tfail (At fc (Msg $ "Default superclass instances can't have constraints."))
17841784 i <- getIState
1785− let t = PApp fc (PRef fc n) (map pexp ps) -- ipapp
1785+ let t = PApp fc (PRef fc n) (map pexp ps)
17861786 let isConstrained = any (== t) constraints
17871787 when (not isConstrained) . tclift
17881788 $ tfail (At fc (Msg $ "Default instances must be for a superclass constraint on the containing class."))
@@ -1829,8 +1829,8 @@ elabClass info syn doc fc constraints tn ps ds
18291829 = do let cfn = sUN ('@':'@':show cn ++ "#" ++ show con)
18301830 -- SN (ParentN cn (show con))
18311831 let mnames = take (length all) $ map (\x -> sMN x "meth") [0..]
1832− let capp = PApp fc (PRef fc cn) (map (pexp . PRef fc) mnames) -- ipapp
1833− let lhs = PApp fc (PRef fc cfn) [pconst capp] -- ipapp
1832+ let capp = PApp fc (PRef fc cn) (map (pexp . PRef fc) mnames)
1833+ let lhs = PApp fc (PRef fc cfn) [pconst capp]
18341834 let rhs = PResolveTC (fileFC "HACK")
18351835 let ty = PPi constraint (sMN 0 "pc") c con
18361836 iLOG (showTmImpls ty)
@@ -1853,11 +1853,11 @@ elabClass info syn doc fc constraints tn ps ds
18531853 tfun cn c syn all (m, (doc, o, ty))
18541854 = do let ty' = insertConstraint c ty
18551855 let mnames = take (length all) $ map (\x -> sMN x "meth") [0..]
1856− let capp = PApp fc (PRef fc cn) (map (pexp . PRef fc) mnames) -- ipapp
1856+ let capp = PApp fc (PRef fc cn) (map (pexp . PRef fc) mnames)
18571857 let margs = getMArgs ty
18581858 let anames = map (\x -> sMN x "arg") [0..]
1859− let lhs = PApp fc (PRef fc m) (pconst capp : lhsArgs margs anames) -- ipapp
1860− let rhs = PApp fc (getMeth mnames all m) (rhsArgs margs anames) -- ipapp
1859+ let lhs = PApp fc (PRef fc m) (pconst capp : lhsArgs margs anames)
1860+ let rhs = PApp fc (getMeth mnames all m) (rhsArgs margs anames)
18611861 iLOG (showTmImpls ty)
18621862 iLOG (show (m, ty', capp, margs))
18631863 iLOG (showTmImpls lhs ++ " = " ++ showTmImpls rhs)
@@ -1906,7 +1906,7 @@ elabInstance info syn what fc cs n ps t expn ds = do
19061906 (n, ci) <- case lookupCtxtName n (idris_classes i) of
19071907 [c] -> return c
19081908 _ -> ifail $ show fc ++ ":" ++ show n ++ " is not a type class"
1909− let constraint = PApp fc (PRef fc n) (map pexp ps) -- ipapp
1909+ let constraint = PApp fc (PRef fc n) (map pexp ps)
19101910 let iname = mkiname n ps expn
19111911 when (what /= EDefns) $ do
19121912 nty <- elabType' True info syn emptyDocstring [] fc [] iname t
@@ -1961,9 +1961,9 @@ elabInstance info syn what fc cs n ps t expn ds = do
19611961 _ -> Nothing
19621962 _ -> Nothing) ps
19631963-- let lhs = PRef fc iname
1964− let lhs = PApp fc (PRef fc iname) -- ipapp
1964+ let lhs = PApp fc (PRef fc iname)
19651965 (map (\n -> pimp n (PRef fc n) True) headVars)
1966− let rhs = PApp fc (PRef fc (instanceName ci)) -- ipapp
1966+ let rhs = PApp fc (PRef fc (instanceName ci))
19671967 (map (pexp . mkMethApp) mtys)
19681968
19691969 logLvl 5 $ "Instance LHS " ++ show lhs
@@ -2044,7 +2044,7 @@ elabInstance info syn what fc cs n ps t expn ds = do
20442044 methArgs i _ = []
20452045
20462046 papp fc f [] = f
2047− papp fc f as = PApp fc f as -- ipapp
2047+ papp fc f as = PApp fc f as
20482048
20492049 getWParams [] = return []
20502050 getWParams (p : ps)
@@ -2129,7 +2129,7 @@ decorateid decorate (PClauses f o n cs)
21292129 dc (PWith fc n t as w ds)
21302130 = PWith fc (decorate n) (dappname t) as w
21312131 (map (decorateid decorate) ds)
2132− dappname (PApp fc (PRef fc' n) as) = PApp fc (PRef fc' (decorate n)) as -- tpapp
2132+ dappname (PApp fc (PRef fc' n) as) = PApp fc (PRef fc' (decorate n)) as
21332133 dappname t = t
21342134
21352135