@@ -289,31 +289,33 @@ type FnOpts = [FnOpt]
289289inlinable :: FnOpts -> Bool
290290inlinable = elem Inlinable
291291
292−data PDecl' t = PFix FC Fixity [String] -- fixity declaration
293− | PTy String SyntaxInfo FC FnOpts Name t -- type declaration
294− | PClauses FC FnOpts Name [PClause' t] -- pattern clause
295− | PCAF FC Name t -- top level constant
296− | PData String SyntaxInfo FC Bool -- codata
297− (PData' t) -- data declaration
298− | PParams FC [(Name, t)] [PDecl' t] -- params block
299− | PNamespace String [PDecl' t] -- new namespace
300− | PRecord String SyntaxInfo FC Name t String Name t -- record declaration
301− | PClass String SyntaxInfo FC
302− [t] -- constraints
303− Name
304− [(Name, t)] -- parameters
305− [PDecl' t] -- declarations
306− | PInstance SyntaxInfo FC [t] -- constraints
307− Name -- class
308− [t] -- parameters
309− t -- full instance type
310− (Maybe Name) -- explicit name
311− [PDecl' t]
312− | PDSL Name (DSL' t)
313− | PSyntax FC Syntax
314− | PMutual FC [PDecl' t]
315− | PDirective (Idris ())
316− deriving Functor
292+data PDecl' t
293+ = PFix FC Fixity [String] -- fixity declaration
294+ | PTy String SyntaxInfo FC FnOpts Name t -- type declaration
295+ | PPostulate String SyntaxInfo FC FnOpts Name t
296+ | PClauses FC FnOpts Name [PClause' t] -- pattern clause
297+ | PCAF FC Name t -- top level constant
298+ | PData String SyntaxInfo FC Bool -- codata
299+ (PData' t) -- data declaration
300+ | PParams FC [(Name, t)] [PDecl' t] -- params block
301+ | PNamespace String [PDecl' t] -- new namespace
302+ | PRecord String SyntaxInfo FC Name t String Name t -- record declaration
303+ | PClass String SyntaxInfo FC
304+ [t] -- constraints
305+ Name
306+ [(Name, t)] -- parameters
307+ [PDecl' t] -- declarations
308+ | PInstance SyntaxInfo FC [t] -- constraints
309+ Name -- class
310+ [t] -- parameters
311+ t -- full instance type
312+ (Maybe Name) -- explicit name
313+ [PDecl' t]
314+ | PDSL Name (DSL' t)
315+ | PSyntax FC Syntax
316+ | PMutual FC [PDecl' t]
317+ | PDirective (Idris ())
318+ deriving Functor
317319{-!
318320deriving instance Binary PDecl'
319321!-}
@@ -348,6 +350,7 @@ type PClause = PClause' PTerm
348350declared :: PDecl -> [Name]
349351declared (PFix _ _ _) = []
350352declared (PTy _ _ _ _ n t) = [n]
353+declared (PPostulate _ _ _ _ n t) = [n]
351354declared (PClauses _ _ n _) = [] -- not a declaration
352355declared (PRecord _ _ _ n _ _ c _) = [n, c]
353356declared (PData _ _ _ _ (PDatadecl n _ ts)) = n : map fstt ts
@@ -360,6 +363,7 @@ declared (PNamespace _ ds) = concatMap declared ds
360363defined :: PDecl -> [Name]
361364defined (PFix _ _ _) = []
362365defined (PTy _ _ _ _ n t) = []
366+defined (PPostulate _ _ _ _ n t) = []
363367defined (PClauses _ _ n _) = [n] -- not a declaration
364368defined (PRecord _ _ _ n _ _ c _) = [n, c]
365369defined (PData _ _ _ _ (PDatadecl n _ ts)) = n : map fstt ts
@@ -657,6 +661,7 @@ instance Show PData where
657661
658662showDeclImp _ (PFix _ f ops) = show f ++ " " ++ showSep ", " ops
659663showDeclImp t (PTy _ _ _ _ n ty) = show n ++ " : " ++ showImp t ty
664+showDeclImp t (PPostulate _ _ _ _ n ty) = show n ++ " : " ++ showImp t ty
660665showDeclImp _ (PClauses _ _ n c) = showSep "\n" (map show c)
661666showDeclImp _ (PData _ _ _ _ d) = show d
662667showDeclImp _ (PParams f ns ps) = "parameters " ++ show ns ++ "\n" ++