Copyright | (c) 2022 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Expands PropGuards into a top-level definition for each case, and rewrites the body of each case to be an appropriate call to the respectively generated function.
Synopsis
- type ExpandPropGuardsM a = Either Error a
- runExpandPropGuardsM :: ExpandPropGuardsM a -> Either Error a
- data Error = NoSignature (Located PName)
- expandPropGuards :: ModuleG mname PName -> ExpandPropGuardsM (ModuleG mname PName)
- expandModuleDef :: ModuleDefinition PName -> ExpandPropGuardsM (ModuleDefinition PName)
- expandTopDecl :: TopDecl PName -> ExpandPropGuardsM [TopDecl PName]
- expandDecl :: Decl PName -> ExpandPropGuardsM [Decl PName]
- expandBind :: Bind PName -> ExpandPropGuardsM [Bind PName]
- patternToExpr :: Pattern PName -> Expr PName
- newName :: Located PName -> [Prop PName] -> ExpandPropGuardsM (Located PName)
Documentation
type ExpandPropGuardsM a = Either Error a Source #
Monad
runExpandPropGuardsM :: ExpandPropGuardsM a -> Either Error a Source #
Error
expandPropGuards :: ModuleG mname PName -> ExpandPropGuardsM (ModuleG mname PName) Source #
expandDecl :: Decl PName -> ExpandPropGuardsM [Decl PName] Source #
expandBind :: Bind PName -> ExpandPropGuardsM [Bind PName] Source #