@@ -289,31 +289,33 @@ type FnOpts = [FnOpt]
289inlinable :: FnOpts -> Bool
289inlinable :: FnOpts -> Bool
290inlinable = elem Inlinable
290inlinable = elem Inlinable
292−data PDecl' t = PFix FC Fixity [String] -- fixity declaration
293+ = PFix FC Fixity [String] -- fixity declaration
293− | PTy String SyntaxInfo FC FnOpts Name t -- type declaration
294+ | PTy String SyntaxInfo FC FnOpts Name t -- type declaration
295+ | PPostulate String SyntaxInfo FC FnOpts Name t
294− | PClauses FC FnOpts Name [PClause' t] -- pattern clause
296+ | PClauses FC FnOpts Name [PClause' t] -- pattern clause
295− | PCAF FC Name t -- top level constant
297+ | PCAF FC Name t -- top level constant
296− | PData String SyntaxInfo FC Bool -- codata
298+ | PData String SyntaxInfo FC Bool -- codata
297− (PData' t) -- data declaration
299+ (PData' t) -- data declaration
298− | PParams FC [(Name, t)] [PDecl' t] -- params block
300+ | PParams FC [(Name, t)] [PDecl' t] -- params block
299− | PNamespace String [PDecl' t] -- new namespace
301+ | PNamespace String [PDecl' t] -- new namespace
300− | PRecord String SyntaxInfo FC Name t String Name t -- record declaration
302+ | PRecord String SyntaxInfo FC Name t String Name t -- record declaration
301− | PClass String SyntaxInfo FC
303+ | PClass String SyntaxInfo FC
302− [t] -- constraints
304+ [t] -- constraints
304− [(Name, t)] -- parameters
306+ [(Name, t)] -- parameters
305− [PDecl' t] -- declarations
307+ [PDecl' t] -- declarations
306− | PInstance SyntaxInfo FC [t] -- constraints
308+ | PInstance SyntaxInfo FC [t] -- constraints
307− Name -- class
309+ Name -- class
308− [t] -- parameters
310+ [t] -- parameters
309− t -- full instance type
311+ t -- full instance type
310− (Maybe Name) -- explicit name
312+ (Maybe Name) -- explicit name
311− [PDecl' t]
313+ [PDecl' t]
312− | PDSL Name (DSL' t)
314+ | PDSL Name (DSL' t)
313− | PSyntax FC Syntax
315+ | PSyntax FC Syntax
314− | PMutual FC [PDecl' t]
316+ | PMutual FC [PDecl' t]
315− | PDirective (Idris ())
317+ | PDirective (Idris ())
316− deriving Functor
318+ deriving Functor
318deriving instance Binary PDecl'
320deriving instance Binary PDecl'
@@ -348,6 +350,7 @@ type PClause = PClause' PTerm
348declared :: PDecl -> [Name]
350declared :: PDecl -> [Name]
349declared (PFix _ _ _) = []
351declared (PFix _ _ _) = []
350declared (PTy _ _ _ _ n t) = [n]
352declared (PTy _ _ _ _ n t) = [n]
353+declared (PPostulate _ _ _ _ n t) = [n]
351declared (PClauses _ _ n _) = [] -- not a declaration
354declared (PClauses _ _ n _) = [] -- not a declaration
352declared (PRecord _ _ _ n _ _ c _) = [n, c]
355declared (PRecord _ _ _ n _ _ c _) = [n, c]
353declared (PData _ _ _ _ (PDatadecl n _ ts)) = n : map fstt ts
356declared (PData _ _ _ _ (PDatadecl n _ ts)) = n : map fstt ts
@@ -360,6 +363,7 @@ declared (PNamespace _ ds) = concatMap declared ds
360defined :: PDecl -> [Name]
363defined :: PDecl -> [Name]
361defined (PFix _ _ _) = []
364defined (PFix _ _ _) = []
362defined (PTy _ _ _ _ n t) = []
365defined (PTy _ _ _ _ n t) = []
366+defined (PPostulate _ _ _ _ n t) = []
363defined (PClauses _ _ n _) = [n] -- not a declaration
367defined (PClauses _ _ n _) = [n] -- not a declaration
364defined (PRecord _ _ _ n _ _ c _) = [n, c]
368defined (PRecord _ _ _ n _ _ c _) = [n, c]
365defined (PData _ _ _ _ (PDatadecl n _ ts)) = n : map fstt ts
369defined (PData _ _ _ _ (PDatadecl n _ ts)) = n : map fstt ts
@@ -657,6 +661,7 @@ instance Show PData where
658showDeclImp _ (PFix _ f ops) = show f ++ " " ++ showSep ", " ops
662showDeclImp _ (PFix _ f ops) = show f ++ " " ++ showSep ", " ops
659showDeclImp t (PTy _ _ _ _ n ty) = show n ++ " : " ++ showImp t ty
663showDeclImp t (PTy _ _ _ _ n ty) = show n ++ " : " ++ showImp t ty
664+showDeclImp t (PPostulate _ _ _ _ n ty) = show n ++ " : " ++ showImp t ty
660showDeclImp _ (PClauses _ _ n c) = showSep "\n" (map show c)
665showDeclImp _ (PClauses _ _ n c) = showSep "\n" (map show c)
661showDeclImp _ (PData _ _ _ _ d) = show d
666showDeclImp _ (PData _ _ _ _ d) = show d
662showDeclImp _ (PParams f ns ps) = "parameters " ++ show ns ++ "\n" ++
667showDeclImp _ (PParams f ns ps) = "parameters " ++ show ns ++ "\n" ++