Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- hsSpecificationP :: ModuleName -> [(SourcePos, String)] -> [BPspec] -> Either [Error] (ModName, BareSpec)
- specSpecificationP :: SourceName -> String -> Either (ParseErrorBundle String Void) (ModName, BareSpec)
- singleSpecP :: SourcePos -> String -> Either (ParseErrorBundle String Void) 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
- | Relational (LocSymbol, LocSymbol, ty, ty, RelExpr, RelExpr)
- | AssmRel (LocSymbol, LocSymbol, ty, ty, RelExpr, RelExpr)
- | 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
- | 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])
- | DSize ([ty], LocSymbol)
- | BFix ()
- | Define (LocSymbol, Symbol)
- parseSymbolToLogic :: SourceName -> String -> Either (ParseErrorBundle String Void) LogicMap
- parseTest' :: Show a => Parser a -> String -> IO ()
Documentation
hsSpecificationP :: ModuleName -> [(SourcePos, String)] -> [BPspec] -> Either [Error] (ModName, BareSpec) Source #
Used to parse .hs and .lhs files (via ApiAnnotations).
specSpecificationP :: SourceName -> String -> Either (ParseErrorBundle String Void) (ModName, BareSpec) Source #
Used to parse .spec files.
singleSpecP :: SourcePos -> String -> Either (ParseErrorBundle String Void) BPspec Source #
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])) | TODO RJ: what is this |
Impt Symbol | 'import' a specification module |
DDecl DataDecl | refined 'data' declaration |
NTDecl DataDecl | refined 'newtype' declaration |
Relational (LocSymbol, LocSymbol, ty, ty, RelExpr, RelExpr) | relational signature |
AssmRel (LocSymbol, LocSymbol, ty, ty, RelExpr, RelExpr) |
|
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 |
|
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]) |
|
DSize ([ty], LocSymbol) | 'data size' annotations, generating fancy termination metric |
BFix () | fixity annotation |
Define (LocSymbol, Symbol) |
|
Instances
(Data ty, Data ctor) => Data (Pspec ty ctor) Source # | |
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, Show ty) => Show (Pspec ty ctor) Source # | |
(PPrint ty, PPrint ctor) => PPrint (Pspec ty ctor) Source # | |
Defined in Language.Haskell.Liquid.Parse |