Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- hsSpecificationP :: ModuleName -> [(SourcePos, String)] -> [BPspec] -> Either [Error] (ModName, BareSpec)
- specSpecificationP :: SourceName -> String -> Either Error (ModName, BareSpec)
- singleSpecP :: SourcePos -> String -> Either Error BPspec
- type BPspec = Pspec LocBareType LocSymbol
- data Pspec ty ctor
- = Meas (Measure ty ctor)
- | Assm (LocSymbol, ty)
- | Asrt (LocSymbol, ty)
- | LAsrt (LocSymbol, ty)
- | Asrts ([LocSymbol], (ty, Maybe [Located Expr]))
- | Impt Symbol
- | DDecl DataDecl
- | NTDecl DataDecl
- | Class (RClass ty)
- | CLaws (RClass ty)
- | ILaws (RILaws ty)
- | RInst (RInstance ty)
- | Incl FilePath
- | Invt ty
- | Using (ty, ty)
- | Alias (Located (RTAlias Symbol BareType))
- | EAlias (Located (RTAlias Symbol Expr))
- | Embed (LocSymbol, FTycon, TCArgs)
- | Qualif Qualifier
- | Decr (LocSymbol, [Int])
- | LVars LocSymbol
- | Lazy LocSymbol
- | Fail LocSymbol
- | Rewrite LocSymbol
- | Rewritewith (LocSymbol, [LocSymbol])
- | Insts (LocSymbol, Maybe Int)
- | HMeas LocSymbol
- | Reflect LocSymbol
- | Inline LocSymbol
- | Ignore LocSymbol
- | ASize LocSymbol
- | HBound LocSymbol
- | PBound (Bound ty Expr)
- | Pragma (Located String)
- | CMeas (Measure ty ())
- | IMeas (Measure ty ctor)
- | Varia (LocSymbol, [Variance])
- | BFix ()
- | Define (LocSymbol, Symbol)
- parseSymbolToLogic :: SourceName -> String -> Either Error LogicMap
Documentation
hsSpecificationP :: ModuleName -> [(SourcePos, String)] -> [BPspec] -> Either [Error] (ModName, BareSpec) #
Top Level Parsing API -----------------------------------------------------
Used to parse .hs and .lhs files (via ApiAnnotations)
specSpecificationP :: SourceName -> String -> Either Error (ModName, BareSpec) #
type BPspec = Pspec LocBareType LocSymbol #
The AST for a single parsed spec.
Meas (Measure ty ctor) |
|
Assm (LocSymbol, ty) |
|
Asrt (LocSymbol, ty) |
|
LAsrt (LocSymbol, ty) |
|
Asrts ([LocSymbol], (ty, Maybe [Located Expr])) | RJ: what is this |
Impt Symbol | 'import' a specification module |
DDecl DataDecl | refined 'data' declaration |
NTDecl DataDecl | refined 'newtype' declaration |
Class (RClass ty) | refined 'class' definition |
CLaws (RClass ty) | 'class laws' definition |
ILaws (RILaws ty) | |
RInst (RInstance ty) | refined 'instance' definition |
Incl FilePath |
|
Invt ty |
|
Using (ty, ty) |
|
Alias (Located (RTAlias Symbol BareType)) | 'type' alias declaration |
EAlias (Located (RTAlias Symbol Expr)) |
|
Embed (LocSymbol, FTycon, TCArgs) |
|
Qualif Qualifier |
|
Decr (LocSymbol, [Int]) |
|
LVars LocSymbol |
|
Lazy LocSymbol |
|
Fail LocSymbol |
|
Rewrite LocSymbol |
|
Rewritewith (LocSymbol, [LocSymbol]) |
|
Insts (LocSymbol, Maybe Int) | 'auto-inst' or |
HMeas LocSymbol |
|
Reflect LocSymbol |
|
Inline LocSymbol |
|
Ignore LocSymbol |
|
ASize LocSymbol |
|
HBound LocSymbol |
|
PBound (Bound ty Expr) |
|
Pragma (Located String) |
|
CMeas (Measure ty ()) | 'class measure' definition |
IMeas (Measure ty ctor) | 'instance measure' definition |
Varia (LocSymbol, [Variance]) |
|
BFix () | fixity annotation |
Define (LocSymbol, Symbol) |
|
Instances
(Data ty, Data ctor) => Data (Pspec ty ctor) # | |
Defined in Language.Haskell.Liquid.Parse gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pspec ty ctor -> c (Pspec ty ctor) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Pspec ty ctor) # toConstr :: Pspec ty ctor -> Constr # dataTypeOf :: Pspec ty ctor -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Pspec ty ctor)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Pspec ty ctor)) # gmapT :: (forall b. Data b => b -> b) -> Pspec ty ctor -> Pspec ty ctor # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pspec ty ctor -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pspec ty ctor -> r # gmapQ :: (forall d. Data d => d -> u) -> Pspec ty ctor -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pspec ty ctor -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pspec ty ctor -> m (Pspec ty ctor) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pspec ty ctor -> m (Pspec ty ctor) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pspec ty ctor -> m (Pspec ty ctor) # | |
(PPrint ty, PPrint ctor) => PPrint (Pspec ty ctor) # | |
Defined in Language.Haskell.Liquid.Parse pprintTidy :: Tidy -> Pspec ty ctor -> Doc # pprintPrec :: Int -> Tidy -> Pspec ty ctor -> Doc # |
parseSymbolToLogic :: SourceName -> String -> Either Error LogicMap #