@@ -84,8 +84,11 @@ elabType' norm info syn doc argDocs fc opts n ty' = {- let ty' = piBind (params
84 ty' <- addUsingConstraints syn fc ty'
84 ty' <- addUsingConstraints syn fc ty'
85 ty' <- implicit info syn n ty'
85 ty' <- implicit info syn n ty'
87− let ty = addImpl i ty'
87+ let ty = addImpl i ty'
88+ inacc = inaccessible 0 ty
88 logLvl 3 $ show n ++ " type " ++ showTmImpls ty
89 logLvl 3 $ show n ++ " type " ++ showTmImpls ty
90+ logLvl 5 $ "Erased params: " ++ show inacc
89 ((tyT, defer, is), log) <-
92 ((tyT, defer, is), log) <-
90 tclift $ elaborate ctxt n (TType (UVal 0)) []
93 tclift $ elaborate ctxt n (TType (UVal 0)) []
91 (errAt "type of " n (erun fc (build i info False [] n ty)))
94 (errAt "type of " n (erun fc (build i info False [] n ty)))
@@ -161,6 +164,16 @@ elabType' norm info syn doc argDocs fc opts n ty' = {- let ty' = piBind (params
161 lst = txt "List"
164 lst = txt "List"
162 errrep = txt "ErrorReportPart"
165 errrep = txt "ErrorReportPart"
167+ inaccessible :: Int -> PTerm -> [Int]
168+ inaccessible i (PPi (Imp _ _ _ _) n Placeholder t)
169+ = i : inaccessible (i+1) t -- unbound implicit
170+ inaccessible i (PPi plicity n ty t)
171+ | InaccessibleArg `elem` pargopts plicity
172+ = i : inaccessible (i+1) t -- an .{erased : Implicit}
174+ = inaccessible (i+1) t -- a {regular : Implicit}
175+ inaccessible _ _ = []
164 tyIsHandler (Bind _ (Pi (P _ (NS (UN e) ns1) _))
177 tyIsHandler (Bind _ (Pi (P _ (NS (UN e) ns1) _))
165 (App (P _ (NS (UN m) ns2) _)
178 (App (P _ (NS (UN m) ns2) _)
166 (App (P _ (NS (UN l) ns3) _)
179 (App (P _ (NS (UN l) ns3) _)