Safe Haskell | None |
---|---|
Language | Haskell2010 |
UPattern matching on binding-level AST fragments for refactorings.
- pattern SimpleBind :: forall dom. Pattern dom -> Rhs dom -> MaybeLocalBinds dom -> ValueBind dom
- pattern FunctionBind :: forall dom. MatchList dom -> ValueBind dom
- pattern Match :: forall dom. MatchLhs dom -> Rhs dom -> MaybeLocalBinds dom -> Match dom
- pattern MatchLhs :: forall dom. Name dom -> PatternList dom -> MatchLhs dom
- pattern InfixLhs :: forall dom. Pattern dom -> Operator dom -> Pattern dom -> PatternList dom -> MatchLhs dom
- pattern LocalBinds :: forall dom. LocalBindList dom -> LocalBinds dom
- pattern LocalValBind :: forall dom. ValueBind dom -> LocalBind dom
- pattern LocalTypeSig :: forall dom. TypeSignature dom -> LocalBind dom
- pattern LocalFixity :: forall dom. FixitySignature dom -> LocalBind dom
- pattern TypeSignature :: forall dom. NameList dom -> Type dom -> TypeSignature dom
- pattern InfixL :: forall dom. Int -> OperatorList dom -> FixitySignature dom
- pattern InfixR :: forall dom. Int -> OperatorList dom -> FixitySignature dom
- pattern Infix :: forall dom. Int -> OperatorList dom -> FixitySignature dom
- pattern UnguardedRhs :: forall dom. Expr dom -> Rhs dom
- pattern GuardedRhss :: forall dom. GuardedRhsList dom -> Rhs dom
- pattern GuardedRhs :: forall dom. RhsGuardList dom -> Expr dom -> GuardedRhs dom
- pattern GuardBind :: forall dom. Pattern dom -> Expr dom -> RhsGuard dom
- pattern GuardLet :: forall dom. LocalBindList dom -> RhsGuard dom
- pattern GuardCheck :: forall dom. Expr dom -> RhsGuard dom
Documentation
pattern SimpleBind :: forall dom. Pattern dom -> Rhs dom -> MaybeLocalBinds dom -> ValueBind dom Source #
Non-function binding ( v = "12"
)
pattern FunctionBind :: forall dom. MatchList dom -> ValueBind dom Source #
Function binding ( f 0 = 1; f x = x
). All matches must have the same name.
pattern Match :: forall dom. MatchLhs dom -> Rhs dom -> MaybeLocalBinds dom -> Match dom Source #
Clause of function binding
pattern MatchLhs :: forall dom. Name dom -> PatternList dom -> MatchLhs dom Source #
A match lhs with the function name and parameter names ( f a b
)
pattern InfixLhs :: forall dom. Pattern dom -> Operator dom -> Pattern dom -> PatternList dom -> MatchLhs dom Source #
An infix match lhs for an operator ( a + b
)
pattern LocalBinds :: forall dom. LocalBindList dom -> LocalBinds dom Source #
Local bindings attached to a declaration ( where x = 42
)
pattern LocalValBind :: forall dom. ValueBind dom -> LocalBind dom Source #
A local binding for a value
pattern LocalTypeSig :: forall dom. TypeSignature dom -> LocalBind dom Source #
A local type signature
pattern LocalFixity :: forall dom. FixitySignature dom -> LocalBind dom Source #
A local fixity declaration
pattern TypeSignature :: forall dom. NameList dom -> Type dom -> TypeSignature dom Source #
A type signature ( f :: Int -> Int
)
pattern InfixL :: forall dom. Int -> OperatorList dom -> FixitySignature dom Source #
A left-associative fixity declaration ( infixl 5 +, -
).
pattern InfixR :: forall dom. Int -> OperatorList dom -> FixitySignature dom Source #
A right-associative fixity declaration ( infixr 5 +, -
).
pattern Infix :: forall dom. Int -> OperatorList dom -> FixitySignature dom Source #
A non-associative fixity declaration ( infix 5 +, -
).
pattern UnguardedRhs :: forall dom. Expr dom -> Rhs dom Source #
An unguarded right-hand-side ( = 3
)
pattern GuardedRhss :: forall dom. GuardedRhsList dom -> Rhs dom Source #
An unguarded right-hand-side ( | x == 1 = 3; | otherwise = 4
)
pattern GuardedRhs :: forall dom. RhsGuardList dom -> Expr dom -> GuardedRhs dom Source #
A guarded right-hand side of a value binding ( | x > 3 = 2
)
pattern GuardBind :: forall dom. Pattern dom -> Expr dom -> RhsGuard dom Source #
A bind statement in a pattern guard ( Just v <- x
)
pattern GuardLet :: forall dom. LocalBindList dom -> RhsGuard dom Source #
A let statement in a pattern guard ( let x = 3
)
pattern GuardCheck :: forall dom. Expr dom -> RhsGuard dom Source #
An expression to check for a pattern guard