@@ -588,6 +588,10 @@ process h fn (AddMissing updatefile l n)
588588 dens (PRef fc n) = PRef fc (nsroot n)
589589 dens t = t
590590
591+ nsroot (NS n _) = nsroot n
592+ nsroot (SN (WhereN _ _ n)) = nsroot n
593+ nsroot n = n
594+
591595 getAppName (PApp _ r _) = getAppName r
592596 getAppName (PRef _ r) = r
593597 getAppName _ = n
@@ -612,7 +616,7 @@ process h fn (MakeWith updatefile l n)
612616 unlines rest)
613617 runIO $ copyFile fb fn
614618 else ihputStrLn h with
615−process h fn (DoProofSearch updatefile l n)
619+process h fn (DoProofSearch updatefile l n hints)
616620 = do src <- runIO $ readFile fn
617621 let (before, tyline : later) = splitAt (l-1) (lines src)
618622 ctxt <- getContext
@@ -625,8 +629,8 @@ process h fn (DoProofSearch updatefile l n)
625629 Just mi -> mi
626630 _ -> (Nothing, 0)
627631 let fc = fileFC fn
628− let body t = PProof [Try (TSeq Intros (ProofSearch top n))
629− (ProofSearch t n)]
632+ let body t = PProof [Try (TSeq Intros (ProofSearch t n hints))
633+ (ProofSearch t n hints)]
630634 let def = PClause fc mn (PRef fc mn) [] (body top) []
631635 newmv <- idrisCatch
632636 (do elabDecl' EAll toplevel (PClauses fc [] mn [def])
@@ -634,7 +638,8 @@ process h fn (DoProofSearch updatefile l n)
634638 ctxt <- getContext
635639 i <- getIState
636640 return $ show (stripNS
637− (dropCtxt envlen (delab i (normaliseAll ctxt [] tm)))))
641+ (dropCtxt envlen
642+ (delab i (specialise ctxt [] [(mn, 1)] tm)))))
638643 (\e -> return ("?" ++ show n))
639644 if updatefile then
640645 do let fb = fn ++ "~"
@@ -653,6 +658,10 @@ process h fn (DoProofSearch updatefile l n)
653658 dens (PRef fc n) = PRef fc (nsroot n)
654659 dens t = t
655660
661+ nsroot (NS n _) = nsroot n
662+ nsroot (SN (WhereN _ _ n)) = nsroot n
663+ nsroot n = n
664+
656665 updateMeta ('?':cs) n new
657666 | length cs >= length n
658667 = case splitAt (length n) cs of