{-# LANGUAGE PatternSynonyms #-}
module Language.Haskell.Tools.Rewrite.Match.Binds where
import Language.Haskell.Tools.AST
import Language.Haskell.Tools.Rewrite.ElementTypes
pattern SimpleBind :: Pattern -> Rhs -> MaybeLocalBinds -> ValueBind
pattern SimpleBind p r l <- Ann _ (USimpleBind p r l)
pattern FunctionBind :: MatchList -> ValueBind
pattern FunctionBind matches <- Ann _ (UFunBind matches)
pattern Match :: MatchLhs -> Rhs -> MaybeLocalBinds -> Match
pattern Match lhs rhs locs <- Ann _ (UMatch lhs rhs locs)
pattern MatchLhs :: Name -> PatternList -> MatchLhs
pattern MatchLhs n pats <- Ann _ (UNormalLhs n pats)
pattern InfixLhs :: Pattern -> Operator -> Pattern -> PatternList -> MatchLhs
pattern InfixLhs lhs op rhs pats <- Ann _ (UInfixLhs lhs op rhs pats)
pattern LocalBinds :: LocalBindList -> LocalBinds
pattern LocalBinds binds <- Ann _ (ULocalBinds binds)
pattern LocalValBind :: ValueBind -> LocalBind
pattern LocalValBind bind <- Ann _ (ULocalValBind bind)
pattern LocalTypeSig :: TypeSignature -> LocalBind
pattern LocalTypeSig typeSig <- Ann _ (ULocalSignature typeSig)
pattern LocalFixity :: FixitySignature -> LocalBind
pattern LocalFixity fixity <- Ann _ (ULocalFixity fixity)
pattern TypeSignature :: NameList -> Type -> TypeSignature
pattern TypeSignature n t <- Ann _ (UTypeSignature n t)
pattern InfixL :: OperatorList -> FixitySignature
pattern InfixL op <- Ann _ (UFixitySignature (Ann _ AssocLeft) _ op)
pattern InfixR :: OperatorList -> FixitySignature
pattern InfixR op <- Ann _ (UFixitySignature (Ann _ AssocRight) _ op)
pattern Infix :: OperatorList -> FixitySignature
pattern Infix op <- Ann _ (UFixitySignature (Ann _ AssocNone) _ op)
pattern UnguardedRhs :: Expr -> Rhs
pattern UnguardedRhs expr <- Ann _ (UUnguardedRhs expr)
pattern GuardedRhss :: GuardedRhsList -> Rhs
pattern GuardedRhss rhss <- Ann _ (UGuardedRhss rhss)
pattern GuardedRhs :: RhsGuardList -> Expr -> GuardedRhs
pattern GuardedRhs guards expr <- Ann _ (UGuardedRhs guards expr)
pattern GuardBind :: Pattern -> Expr -> RhsGuard
pattern GuardBind pat expr <- Ann _ (UGuardBind pat expr)
pattern GuardLet :: LocalBindList -> RhsGuard
pattern GuardLet binds <- Ann _ (UGuardLet binds)
pattern GuardCheck :: Expr -> RhsGuard
pattern GuardCheck expr <- Ann _ (UGuardCheck expr)