@@ -607,7 +607,7 @@ data PDecl' t
607 = PFix FC Fixity [String] -- ^ Fixity declaration
607 = PFix FC Fixity [String] -- ^ Fixity declaration
608 | PTy (Docstring (Either Err PTerm)) [(Name, Docstring (Either Err PTerm))] SyntaxInfo FC FnOpts Name FC t -- ^ Type declaration (last FC is precise name location)
608 | PTy (Docstring (Either Err PTerm)) [(Name, Docstring (Either Err PTerm))] SyntaxInfo FC FnOpts Name FC t -- ^ Type declaration (last FC is precise name location)
609 | PPostulate Bool -- external def if true
609 | PPostulate Bool -- external def if true
610− (Docstring (Either Err PTerm)) SyntaxInfo FC FnOpts Name t -- ^ Postulate
610+ (Docstring (Either Err PTerm)) SyntaxInfo FC FC FnOpts Name t -- ^ Postulate, second FC is precise name location
611 | PClauses FC FnOpts Name [PClause' t] -- ^ Pattern clause
611 | PClauses FC FnOpts Name [PClause' t] -- ^ Pattern clause
612 | PCAF FC Name t -- ^ Top level constant
612 | PCAF FC Name t -- ^ Top level constant
613 | PData (Docstring (Either Err PTerm)) [(Name, Docstring (Either Err PTerm))] SyntaxInfo FC DataOpts (PData' t) -- ^ Data declaration.
613 | PData (Docstring (Either Err PTerm)) [(Name, Docstring (Either Err PTerm))] SyntaxInfo FC DataOpts (PData' t) -- ^ Data declaration.
@@ -655,7 +655,7 @@ data PDecl' t
655 | PSyntax FC Syntax -- ^ Syntax definition
655 | PSyntax FC Syntax -- ^ Syntax definition
656 | PMutual FC [PDecl' t] -- ^ Mutual block
656 | PMutual FC [PDecl' t] -- ^ Mutual block
657 | PDirective Directive -- ^ Compiler directive.
657 | PDirective Directive -- ^ Compiler directive.
658− | PProvider (Docstring (Either Err PTerm)) SyntaxInfo FC (ProvideWhat' t) Name -- ^ Type provider. The first t is the type, the second is the term
658+ | PProvider (Docstring (Either Err PTerm)) SyntaxInfo FC FC (ProvideWhat' t) Name -- ^ Type provider. The first t is the type, the second is the term. The second FC is precise highlighting location.
659 | PTransform FC Bool t t -- ^ Source-to-source transformation rule. If
659 | PTransform FC Bool t t -- ^ Source-to-source transformation rule. If
660 -- bool is True, lhs and rhs must be convertible
660 -- bool is True, lhs and rhs must be convertible
661 deriving Functor
661 deriving Functor
@@ -750,7 +750,7 @@ type PClause = PClause' PTerm
750declared :: PDecl -> [Name]
750declared :: PDecl -> [Name]
751declared (PFix _ _ _) = []
751declared (PFix _ _ _) = []
752declared (PTy _ _ _ _ _ n fc t) = [n]
752declared (PTy _ _ _ _ _ n fc t) = [n]
753−declared (PPostulate _ _ _ _ _ n t) = [n]
753+declared (PPostulate _ _ _ _ _ _ n t) = [n]
754declared (PClauses _ _ n _) = [] -- not a declaration
754declared (PClauses _ _ n _) = [] -- not a declaration
755declared (PCAF _ n _) = [n]
755declared (PCAF _ n _) = [n]
756declared (PData _ _ _ _ _ (PDatadecl n _ _ ts)) = n : map fstt ts
756declared (PData _ _ _ _ _ (PDatadecl n _ _ ts)) = n : map fstt ts
@@ -771,7 +771,7 @@ declared _ = []
771tldeclared :: PDecl -> [Name]
771tldeclared :: PDecl -> [Name]
772tldeclared (PFix _ _ _) = []
772tldeclared (PFix _ _ _) = []
773tldeclared (PTy _ _ _ _ _ n _ t) = [n]
773tldeclared (PTy _ _ _ _ _ n _ t) = [n]
774−tldeclared (PPostulate _ _ _ _ _ n t) = [n]
774+tldeclared (PPostulate _ _ _ _ _ _ n t) = [n]
775tldeclared (PClauses _ _ n _) = [] -- not a declaration
775tldeclared (PClauses _ _ n _) = [] -- not a declaration
776tldeclared (PRecord _ _ _ _ n _ _ _ _ cn _ _) = n : map fst (maybeToList cn)
776tldeclared (PRecord _ _ _ _ n _ _ _ _ cn _ _) = n : map fst (maybeToList cn)
777tldeclared (PData _ _ _ _ _ (PDatadecl n _ _ ts)) = n : map fstt ts
777tldeclared (PData _ _ _ _ _ (PDatadecl n _ _ ts)) = n : map fstt ts
@@ -786,7 +786,7 @@ tldeclared _ = []
786defined :: PDecl -> [Name]
786defined :: PDecl -> [Name]
787defined (PFix _ _ _) = []
787defined (PFix _ _ _) = []
788defined (PTy _ _ _ _ _ n _ t) = []
788defined (PTy _ _ _ _ _ n _ t) = []
789−defined (PPostulate _ _ _ _ _ n t) = []
789+defined (PPostulate _ _ _ _ _ _ n t) = []
790defined (PClauses _ _ n _) = [n] -- not a declaration
790defined (PClauses _ _ n _) = [n] -- not a declaration
791defined (PCAF _ n _) = [n]
791defined (PCAF _ n _) = [n]
792defined (PData _ _ _ _ _ (PDatadecl n _ _ ts)) = n : map fstt ts
792defined (PData _ _ _ _ _ (PDatadecl n _ _ ts)) = n : map fstt ts