-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A simplified view on the haskell-src-exts AST
--   
--   This package provides a shim for haskell-src-exts (HSE), exposing the
--   same AST but without annotations, using ghc's pattern synonyms.
--   
--   See README.md for further information and compatibility
--   considerations.
@package haskell-src-exts-simple
@version 1.20.0.0


-- | This module reexports <a>Language.Haskell.Exts.Build</a>.
module Language.Haskell.Exts.Simple.Build


-- | This module reexports <a>Language.Haskell.Exts.Extension</a>.
module Language.Haskell.Exts.Simple.Extension


-- | This module reexports <a>Language.Haskell.Exts.Pretty</a>.
module Language.Haskell.Exts.Simple.Pretty


-- | This module reexports a simplified view on
--   <a>Language.Haskell.Exts.Syntax</a>. The idea is to expose datatypes
--   like
--   
--   <pre>
--   data Name l = Ident l String | Symbol l String
--   </pre>
--   
--   using ghc's pattern synonyms:
--   
--   <pre>
--   type Name = H.Name ()
--   pattern Ident a = H.Ident () a
--   pattern Symbol a = H.Symbol () a
--   </pre>
--   
--   This works nicely for all datatypes with two exception:
--   
--   <ul>
--   <li><a>ImportDecl</a> has a record constructor. Record type synonyms
--   are only supported ghc-8.0 and later, so for ghc-7.10 and earlier, the
--   constructor is exported as a plain constructor, and the record fields
--   as function.</li>
--   <li><a>Literal</a> has constructors with an extra <a>String</a>
--   argument that is not used by <a>Pretty</a>. This module uses
--   explicitly bidirectional pattern synonyms to support this type, but
--   support for that is only available in ghc-7.10 and later.</li>
--   </ul>
--   
--   <b>IMPORTANT</b>: if you require compatiblity with ghc 7.8, you should
--   use the functions <a>charL</a>, <a>stringL</a> etc. for constructing
--   <a>Literal</a> values!
module Language.Haskell.Exts.Simple.Syntax
type Alt = Alt ()
type FieldUpdate = FieldUpdate ()
type QualStmt = QualStmt ()
type Stmt = Stmt ()
type PatField = PatField ()
type RPat = RPat ()
type RPatOp = RPatOp ()
type PXAttr = PXAttr ()
type Pat = Pat ()
type WarningText = WarningText ()
type RuleVar = RuleVar ()
type Rule = Rule ()
type Activation = Activation ()
type Overlap = Overlap ()
type ModulePragma = ModulePragma ()
type CallConv = CallConv ()
type Safety = Safety ()
type Splice = Splice ()
type Bracket = Bracket ()
type XAttr = XAttr ()
type XName = XName ()
type Exp = Exp ()
type Sign = Sign ()

-- | Beware that the constructors only work in a pattern context in
--   ghc-7.8, because that version does not support explicitly
--   bidirectional pattern synonyms.
--   
--   For code that needs to work with ghc-7.8, we provide functions
--   <a>charL</a>, <a>stringL</a>, <a>intL</a>, <a>fracL</a>, etc. for
--   constructing <a>Literal</a> values.
type Literal = Literal ()
type Asst = Asst ()
type Context = Context ()
type FunDep = FunDep ()
type Kind = Kind ()
type TyVarBind = TyVarBind ()
type Promoted = Promoted ()
type MaybePromotedName = MaybePromotedName ()
type Type = Type ()
type GuardedRhs = GuardedRhs ()
type Rhs = Rhs ()
type Unpackedness = Unpackedness ()
type BangType = BangType ()
type InstDecl = InstDecl ()
type ClassDecl = ClassDecl ()
type GadtDecl = GadtDecl ()
type FieldDecl = FieldDecl ()
type ConDecl = ConDecl ()
type QualConDecl = QualConDecl ()
type Match = Match ()
type IPBind = IPBind ()
type Binds = Binds ()
type DerivStrategy = DerivStrategy ()
type Deriving = Deriving ()
type InstHead = InstHead ()
type InstRule = InstRule ()
type DeclHead = DeclHead ()
type ResultSig = ResultSig ()
type InjectivityInfo = InjectivityInfo ()
type DataOrNew = DataOrNew ()
type Role = Role ()
type BooleanFormula = BooleanFormula ()
type Annotation = Annotation ()
type TypeEqn = TypeEqn ()
type PatternSynDirection = PatternSynDirection ()
type Decl = Decl ()
type Assoc = Assoc ()
type ImportSpec = ImportSpec ()
type ImportSpecList = ImportSpecList ()
type ImportDecl = ImportDecl ()
type Namespace = Namespace ()
type EWildcard = EWildcard ()
type ExportSpec = ExportSpec ()
type ExportSpecList = ExportSpecList ()
type ModuleHead = ModuleHead ()
type Module = Module ()
type CName = CName ()
type Op = Op ()
type QOp = QOp ()
type IPName = IPName ()
type Name = Name ()
type QName = QName ()
type SpecialCon = SpecialCon ()
type ModuleName = ModuleName ()
pattern Alt :: () => () => Pat -> Rhs -> Maybe Binds -> Alt
pattern FieldWildcard :: () => () => FieldUpdate
pattern FieldPun :: () => () => QName -> FieldUpdate
pattern FieldUpdate :: () => () => QName -> Exp -> FieldUpdate
pattern GroupByUsing :: () => () => Exp -> Exp -> QualStmt
pattern GroupUsing :: () => () => Exp -> QualStmt
pattern GroupBy :: () => () => Exp -> QualStmt
pattern ThenBy :: () => () => Exp -> Exp -> QualStmt
pattern ThenTrans :: () => () => Exp -> QualStmt
pattern QualStmt :: () => () => Stmt -> QualStmt
pattern RecStmt :: () => () => [Stmt] -> Stmt
pattern LetStmt :: () => () => Binds -> Stmt
pattern Qualifier :: () => () => Exp -> Stmt
pattern Generator :: () => () => Pat -> Exp -> Stmt
pattern PFieldWildcard :: () => () => PatField
pattern PFieldPun :: () => () => QName -> PatField
pattern PFieldPat :: () => () => QName -> Pat -> PatField
pattern RPPat :: () => () => Pat -> RPat
pattern RPParen :: () => () => RPat -> RPat
pattern RPAs :: () => () => Name -> RPat -> RPat
pattern RPCAs :: () => () => Name -> RPat -> RPat
pattern RPGuard :: () => () => Pat -> [Stmt] -> RPat
pattern RPSeq :: () => () => [RPat] -> RPat
pattern RPEither :: () => () => RPat -> RPat -> RPat
pattern RPOp :: () => () => RPat -> RPatOp -> RPat
pattern RPOptG :: () => () => RPatOp
pattern RPOpt :: () => () => RPatOp
pattern RPPlusG :: () => () => RPatOp
pattern RPPlus :: () => () => RPatOp
pattern RPStarG :: () => () => RPatOp
pattern RPStar :: () => () => RPatOp
pattern PXAttr :: () => () => XName -> Pat -> PXAttr
pattern PBangPat :: () => () => Pat -> Pat
pattern PQuasiQuote :: () => () => String -> String -> Pat
pattern PSplice :: () => () => Splice -> Pat
pattern PXRPats :: () => () => [RPat] -> Pat
pattern PXPatTag :: () => () => Pat -> Pat
pattern PXPcdata :: () => () => String -> Pat
pattern PXETag :: () => () => XName -> [PXAttr] -> Maybe Pat -> Pat
pattern PXTag :: () => () => XName -> [PXAttr] -> Maybe Pat -> [Pat] -> Pat
pattern PRPat :: () => () => [RPat] -> Pat
pattern PViewPat :: () => () => Exp -> Pat -> Pat
pattern PatTypeSig :: () => () => Pat -> Type -> Pat
pattern PIrrPat :: () => () => Pat -> Pat
pattern PWildCard :: () => () => Pat
pattern PAsPat :: () => () => Name -> Pat -> Pat
pattern PRec :: () => () => QName -> [PatField] -> Pat
pattern PParen :: () => () => Pat -> Pat
pattern PList :: () => () => [Pat] -> Pat
pattern PUnboxedSum :: () => () => Int -> Int -> Pat -> Pat
pattern PTuple :: () => () => Boxed -> [Pat] -> Pat
pattern PApp :: () => () => QName -> [Pat] -> Pat
pattern PInfixApp :: () => () => Pat -> QName -> Pat -> Pat
pattern PNPlusK :: () => () => Name -> Integer -> Pat
pattern PLit :: () => () => Sign -> Literal -> Pat
pattern PVar :: () => () => Name -> Pat
pattern WarnText :: () => () => String -> WarningText
pattern DeprText :: () => () => String -> WarningText
pattern TypedRuleVar :: () => () => Name -> Type -> RuleVar
pattern RuleVar :: () => () => Name -> RuleVar
pattern Rule :: () => () => String -> Maybe Activation -> Maybe [RuleVar] -> Exp -> Exp -> Rule
pattern ActiveUntil :: () => () => Int -> Activation
pattern ActiveFrom :: () => () => Int -> Activation
pattern Incoherent :: () => () => Overlap
pattern Overlappable :: () => () => Overlap
pattern Overlaps :: () => () => Overlap
pattern Overlapping :: () => () => Overlap
pattern Overlap :: () => () => Overlap
pattern NoOverlap :: () => () => Overlap
pattern AnnModulePragma :: () => () => Annotation -> ModulePragma
pattern OptionsPragma :: () => () => Maybe Tool -> String -> ModulePragma
pattern LanguagePragma :: () => () => [Name] -> ModulePragma
pattern CApi :: () => () => CallConv
pattern JavaScript :: () => () => CallConv
pattern Js :: () => () => CallConv
pattern Jvm :: () => () => CallConv
pattern DotNet :: () => () => CallConv
pattern CPlusPlus :: () => () => CallConv
pattern CCall :: () => () => CallConv
pattern StdCall :: () => () => CallConv
pattern PlayInterruptible :: () => () => Safety
pattern PlaySafe :: () => () => Bool -> Safety
pattern PlayRisky :: () => () => Safety
pattern ParenSplice :: () => () => Exp -> Splice
pattern IdSplice :: () => () => String -> Splice
pattern DeclBracket :: () => () => [Decl] -> Bracket
pattern TypeBracket :: () => () => Type -> Bracket
pattern PatBracket :: () => () => Pat -> Bracket
pattern ExpBracket :: () => () => Exp -> Bracket
pattern XAttr :: () => () => XName -> Exp -> XAttr
pattern XDomName :: () => () => String -> String -> XName
pattern XName :: () => () => String -> XName
pattern LCase :: () => () => [Alt] -> Exp
pattern RightArrHighApp :: () => () => Exp -> Exp -> Exp
pattern LeftArrHighApp :: () => () => Exp -> Exp -> Exp
pattern RightArrApp :: () => () => Exp -> Exp -> Exp
pattern LeftArrApp :: () => () => Exp -> Exp -> Exp
pattern Proc :: () => () => Pat -> Exp -> Exp
pattern GenPragma :: () => () => String -> (Int, Int) -> (Int, Int) -> Exp -> Exp
pattern SCCPragma :: () => () => String -> Exp -> Exp
pattern CorePragma :: () => () => String -> Exp -> Exp
pattern XChildTag :: () => () => [Exp] -> Exp
pattern XExpTag :: () => () => Exp -> Exp
pattern XPcdata :: () => () => String -> Exp
pattern XETag :: () => () => XName -> [XAttr] -> Maybe Exp -> Exp
pattern XTag :: () => () => XName -> [XAttr] -> Maybe Exp -> [Exp] -> Exp
pattern TypeApp :: () => () => Type -> Exp
pattern QuasiQuote :: () => () => String -> String -> Exp
pattern SpliceExp :: () => () => Splice -> Exp
pattern BracketExp :: () => () => Bracket -> Exp
pattern TypQuote :: () => () => QName -> Exp
pattern VarQuote :: () => () => QName -> Exp
pattern ExpTypeSig :: () => () => Exp -> Type -> Exp
pattern ParArrayComp :: () => () => Exp -> [[QualStmt]] -> Exp
pattern ParComp :: () => () => Exp -> [[QualStmt]] -> Exp
pattern ListComp :: () => () => Exp -> [QualStmt] -> Exp
pattern ParArrayFromThenTo :: () => () => Exp -> Exp -> Exp -> Exp
pattern ParArrayFromTo :: () => () => Exp -> Exp -> Exp
pattern EnumFromThenTo :: () => () => Exp -> Exp -> Exp -> Exp
pattern EnumFromThen :: () => () => Exp -> Exp -> Exp
pattern EnumFromTo :: () => () => Exp -> Exp -> Exp
pattern EnumFrom :: () => () => Exp -> Exp
pattern RecUpdate :: () => () => Exp -> [FieldUpdate] -> Exp
pattern RecConstr :: () => () => QName -> [FieldUpdate] -> Exp
pattern RightSection :: () => () => QOp -> Exp -> Exp
pattern LeftSection :: () => () => Exp -> QOp -> Exp
pattern Paren :: () => () => Exp -> Exp
pattern ParArray :: () => () => [Exp] -> Exp
pattern List :: () => () => [Exp] -> Exp
pattern TupleSection :: () => () => Boxed -> [Maybe Exp] -> Exp
pattern UnboxedSum :: () => () => Int -> Int -> Exp -> Exp
pattern Tuple :: () => () => Boxed -> [Exp] -> Exp
pattern MDo :: () => () => [Stmt] -> Exp
pattern Do :: () => () => [Stmt] -> Exp
pattern Case :: () => () => Exp -> [Alt] -> Exp
pattern MultiIf :: () => () => [GuardedRhs] -> Exp
pattern If :: () => () => Exp -> Exp -> Exp -> Exp
pattern Let :: () => () => Binds -> Exp -> Exp
pattern Lambda :: () => () => [Pat] -> Exp -> Exp
pattern NegApp :: () => () => Exp -> Exp
pattern App :: () => () => Exp -> Exp -> Exp
pattern InfixApp :: () => () => Exp -> QOp -> Exp -> Exp
pattern Lit :: () => () => Literal -> Exp
pattern Con :: () => () => QName -> Exp
pattern IPVar :: () => () => IPName -> Exp
pattern OverloadedLabel :: () => () => String -> Exp
pattern Var :: () => () => QName -> Exp
pattern Negative :: () => () => Sign
pattern Signless :: () => () => Sign
pattern PrimString :: () => () => String -> Literal
pattern PrimChar :: () => () => Char -> Literal
pattern PrimDouble :: () => () => Rational -> Literal
pattern PrimFloat :: () => () => Rational -> Literal
pattern PrimWord :: () => () => Integer -> Literal
pattern PrimInt :: () => () => Integer -> Literal
pattern Frac :: () => () => Rational -> Literal
pattern Int :: () => () => Integer -> Literal
pattern String :: () => () => String -> Literal
pattern Char :: () => () => Char -> Literal
pattern WildCardA :: () => () => Maybe Name -> Asst
pattern ParenA :: () => () => Asst -> Asst
pattern EqualP :: () => () => Type -> Type -> Asst
pattern IParam :: () => () => IPName -> Type -> Asst
pattern InfixA :: () => () => Type -> QName -> Type -> Asst
pattern AppA :: () => () => Name -> [Type] -> Asst
pattern ClassA :: () => () => QName -> [Type] -> Asst
pattern CxEmpty :: () => () => Context
pattern CxTuple :: () => () => [Asst] -> Context
pattern CxSingle :: () => () => Asst -> Context
pattern FunDep :: () => () => [Name] -> [Name] -> FunDep
pattern KindList :: () => () => Kind -> Kind
pattern KindTuple :: () => () => [Kind] -> Kind
pattern KindApp :: () => () => Kind -> Kind -> Kind
pattern KindVar :: () => () => QName -> Kind
pattern KindParen :: () => () => Kind -> Kind
pattern KindFn :: () => () => Kind -> Kind -> Kind
pattern KindStar :: () => () => Kind
pattern UnkindedVar :: () => () => Name -> TyVarBind
pattern KindedVar :: () => () => Name -> Kind -> TyVarBind
pattern PromotedUnit :: () => () => Promoted
pattern PromotedTuple :: () => () => [Type] -> Promoted
pattern PromotedList :: () => () => Bool -> [Type] -> Promoted
pattern PromotedCon :: () => () => Bool -> QName -> Promoted
pattern PromotedString :: () => () => String -> String -> Promoted
pattern PromotedInteger :: () => () => Integer -> String -> Promoted
pattern UnpromotedName :: () => () => QName -> MaybePromotedName
pattern PromotedName :: () => () => QName -> MaybePromotedName
pattern TyQuasiQuote :: () => () => String -> String -> Type
pattern TyWildCard :: () => () => Maybe Name -> Type
pattern TyBang :: () => () => BangType -> Unpackedness -> Type -> Type
pattern TySplice :: () => () => Splice -> Type
pattern TyEquals :: () => () => Type -> Type -> Type
pattern TyPromoted :: () => () => Promoted -> Type
pattern TyKind :: () => () => Type -> Kind -> Type
pattern TyInfix :: () => () => Type -> MaybePromotedName -> Type -> Type
pattern TyParen :: () => () => Type -> Type
pattern TyCon :: () => () => QName -> Type
pattern TyVar :: () => () => Name -> Type
pattern TyApp :: () => () => Type -> Type -> Type
pattern TyParArray :: () => () => Type -> Type
pattern TyList :: () => () => Type -> Type
pattern TyUnboxedSum :: () => () => [Type] -> Type
pattern TyTuple :: () => () => Boxed -> [Type] -> Type
pattern TyFun :: () => () => Type -> Type -> Type
pattern TyForall :: () => () => Maybe [TyVarBind] -> Maybe Context -> Type -> Type
pattern GuardedRhs :: () => () => [Stmt] -> Exp -> GuardedRhs
pattern GuardedRhss :: () => () => [GuardedRhs] -> Rhs
pattern UnGuardedRhs :: () => () => Exp -> Rhs
pattern NoUnpackPragma :: () => () => Unpackedness
pattern NoUnpack :: () => () => Unpackedness
pattern Unpack :: () => () => Unpackedness
pattern NoStrictAnnot :: () => () => BangType
pattern LazyTy :: () => () => BangType
pattern BangedTy :: () => () => BangType
pattern InsGData :: () => () => DataOrNew -> Type -> Maybe Kind -> [GadtDecl] -> [Deriving] -> InstDecl
pattern InsData :: () => () => DataOrNew -> Type -> [QualConDecl] -> [Deriving] -> InstDecl
pattern InsType :: () => () => Type -> Type -> InstDecl
pattern InsDecl :: () => () => Decl -> InstDecl
pattern ClsDefSig :: () => () => Name -> Type -> ClassDecl
pattern ClsTyDef :: () => () => TypeEqn -> ClassDecl
pattern ClsTyFam :: () => () => DeclHead -> Maybe ResultSig -> Maybe InjectivityInfo -> ClassDecl
pattern ClsDataFam :: () => () => Maybe Context -> DeclHead -> Maybe ResultSig -> ClassDecl
pattern ClsDecl :: () => () => Decl -> ClassDecl
pattern GadtDecl :: () => () => Name -> Maybe [FieldDecl] -> Type -> GadtDecl
pattern FieldDecl :: () => () => [Name] -> Type -> FieldDecl
pattern RecDecl :: () => () => Name -> [FieldDecl] -> ConDecl
pattern InfixConDecl :: () => () => Type -> Name -> Type -> ConDecl
pattern ConDecl :: () => () => Name -> [Type] -> ConDecl
pattern QualConDecl :: () => () => Maybe [TyVarBind] -> Maybe Context -> ConDecl -> QualConDecl
pattern InfixMatch :: () => () => Pat -> Name -> [Pat] -> Rhs -> Maybe Binds -> Match
pattern Match :: () => () => Name -> [Pat] -> Rhs -> Maybe Binds -> Match
pattern IPBind :: () => () => IPName -> Exp -> IPBind
pattern IPBinds :: () => () => [IPBind] -> Binds
pattern BDecls :: () => () => [Decl] -> Binds
pattern DerivNewtype :: () => () => DerivStrategy
pattern DerivAnyclass :: () => () => DerivStrategy
pattern DerivStock :: () => () => DerivStrategy
pattern Deriving :: () => () => Maybe DerivStrategy -> [InstRule] -> Deriving
pattern IHApp :: () => () => InstHead -> Type -> InstHead
pattern IHParen :: () => () => InstHead -> InstHead
pattern IHInfix :: () => () => Type -> QName -> InstHead
pattern IHCon :: () => () => QName -> InstHead
pattern IParen :: () => () => InstRule -> InstRule
pattern IRule :: () => () => Maybe [TyVarBind] -> Maybe Context -> InstHead -> InstRule
pattern DHApp :: () => () => DeclHead -> TyVarBind -> DeclHead
pattern DHParen :: () => () => DeclHead -> DeclHead
pattern DHInfix :: () => () => TyVarBind -> Name -> DeclHead
pattern DHead :: () => () => Name -> DeclHead
pattern TyVarSig :: () => () => TyVarBind -> ResultSig
pattern KindSig :: () => () => Kind -> ResultSig
pattern InjectivityInfo :: () => () => Name -> [Name] -> InjectivityInfo
pattern NewType :: () => () => DataOrNew
pattern DataType :: () => () => DataOrNew
pattern RoleWildcard :: () => () => Role
pattern Phantom :: () => () => Role
pattern Representational :: () => () => Role
pattern Nominal :: () => () => Role
pattern ParenFormula :: () => () => BooleanFormula -> BooleanFormula
pattern OrFormula :: () => () => [BooleanFormula] -> BooleanFormula
pattern AndFormula :: () => () => [BooleanFormula] -> BooleanFormula
pattern VarFormula :: () => () => Name -> BooleanFormula
pattern ModuleAnn :: () => () => Exp -> Annotation
pattern TypeAnn :: () => () => Name -> Exp -> Annotation
pattern Ann :: () => () => Name -> Exp -> Annotation
pattern TypeEqn :: () => () => Type -> Type -> TypeEqn
pattern ExplicitBidirectional :: () => () => [Decl] -> PatternSynDirection
pattern ImplicitBidirectional :: () => () => PatternSynDirection
pattern Unidirectional :: () => () => PatternSynDirection
pattern CompletePragma :: () => () => [Name] -> Maybe QName -> Decl
pattern RoleAnnotDecl :: () => () => QName -> [Role] -> Decl
pattern MinimalPragma :: () => () => Maybe BooleanFormula -> Decl
pattern AnnPragma :: () => () => Annotation -> Decl
pattern InstSig :: () => () => InstRule -> Decl
pattern SpecInlineSig :: () => () => Bool -> Maybe Activation -> QName -> [Type] -> Decl
pattern SpecSig :: () => () => Maybe Activation -> QName -> [Type] -> Decl
pattern InlineConlikeSig :: () => () => Maybe Activation -> QName -> Decl
pattern InlineSig :: () => () => Bool -> Maybe Activation -> QName -> Decl
pattern WarnPragmaDecl :: () => () => [([Name], String)] -> Decl
pattern DeprPragmaDecl :: () => () => [([Name], String)] -> Decl
pattern RulePragmaDecl :: () => () => [Rule] -> Decl
pattern ForExp :: () => () => CallConv -> Maybe String -> Name -> Type -> Decl
pattern ForImp :: () => () => CallConv -> Maybe Safety -> Maybe String -> Name -> Type -> Decl
pattern PatSyn :: () => () => Pat -> Pat -> PatternSynDirection -> Decl
pattern PatBind :: () => () => Pat -> Rhs -> Maybe Binds -> Decl
pattern FunBind :: () => () => [Match] -> Decl
pattern PatSynSig :: () => () => [Name] -> Maybe [TyVarBind] -> Maybe Context -> Maybe Context -> Type -> Decl
pattern TypeSig :: () => () => [Name] -> Type -> Decl
pattern SpliceDecl :: () => () => Exp -> Decl
pattern DefaultDecl :: () => () => [Type] -> Decl
pattern InfixDecl :: () => () => Assoc -> Maybe Int -> [Op] -> Decl
pattern DerivDecl :: () => () => Maybe DerivStrategy -> Maybe Overlap -> InstRule -> Decl
pattern InstDecl :: () => () => Maybe Overlap -> InstRule -> Maybe [InstDecl] -> Decl
pattern ClassDecl :: () => () => Maybe Context -> DeclHead -> [FunDep] -> Maybe [ClassDecl] -> Decl
pattern GDataInsDecl :: () => () => DataOrNew -> Type -> Maybe Kind -> [GadtDecl] -> [Deriving] -> Decl
pattern DataInsDecl :: () => () => DataOrNew -> Type -> [QualConDecl] -> [Deriving] -> Decl
pattern TypeInsDecl :: () => () => Type -> Type -> Decl
pattern DataFamDecl :: () => () => Maybe Context -> DeclHead -> Maybe ResultSig -> Decl
pattern GDataDecl :: () => () => DataOrNew -> Maybe Context -> DeclHead -> Maybe Kind -> [GadtDecl] -> [Deriving] -> Decl
pattern DataDecl :: () => () => DataOrNew -> Maybe Context -> DeclHead -> [QualConDecl] -> [Deriving] -> Decl
pattern ClosedTypeFamDecl :: () => () => DeclHead -> Maybe ResultSig -> Maybe InjectivityInfo -> [TypeEqn] -> Decl
pattern TypeFamDecl :: () => () => DeclHead -> Maybe ResultSig -> Maybe InjectivityInfo -> Decl
pattern TypeDecl :: () => () => DeclHead -> Type -> Decl
pattern AssocRight :: () => () => Assoc
pattern AssocLeft :: () => () => Assoc
pattern AssocNone :: () => () => Assoc
pattern IThingWith :: () => () => Name -> [CName] -> ImportSpec
pattern IThingAll :: () => () => Name -> ImportSpec
pattern IAbs :: () => () => Namespace -> Name -> ImportSpec
pattern IVar :: () => () => Name -> ImportSpec
pattern ImportSpecList :: () => () => Bool -> [ImportSpec] -> ImportSpecList

-- | Note, this is originally a record constructor, and we use a pattern
--   record synonym for ghc-8.0. But for earlier ghc versions,
--   <a>ImportDecl</a> is a plain pattern synonym, and the selectors are
--   exported as functions.
pattern ImportDecl :: () => () => ModuleName () -> Bool -> Bool -> Bool -> Maybe String -> Maybe (ModuleName ()) -> Maybe (ImportSpecList ()) -> ImportDecl
importModule :: ImportDecl -> ModuleName ()
importQualified :: ImportDecl -> Bool
importSrc :: ImportDecl -> Bool
importSafe :: ImportDecl -> Bool
importPkg :: ImportDecl -> Maybe String
importAs :: ImportDecl -> Maybe (ModuleName ())
importSpecs :: ImportDecl -> Maybe (ImportSpecList ())
pattern PatternNamespace :: () => () => Namespace
pattern TypeNamespace :: () => () => Namespace
pattern NoNamespace :: () => () => Namespace
pattern EWildcard :: () => () => Int -> EWildcard
pattern NoWildcard :: () => () => EWildcard
pattern EModuleContents :: () => () => ModuleName -> ExportSpec
pattern EThingWith :: () => () => EWildcard -> QName -> [CName] -> ExportSpec
pattern EAbs :: () => () => Namespace -> QName -> ExportSpec
pattern EVar :: () => () => QName -> ExportSpec
pattern ExportSpecList :: () => () => [ExportSpec] -> ExportSpecList
pattern ModuleHead :: () => () => ModuleName -> Maybe WarningText -> Maybe ExportSpecList -> ModuleHead
pattern XmlHybrid :: () => () => Maybe ModuleHead -> [ModulePragma] -> [ImportDecl] -> [Decl] -> XName -> [XAttr] -> Maybe Exp -> [Exp] -> Module
pattern XmlPage :: () => () => ModuleName -> [ModulePragma] -> XName -> [XAttr] -> Maybe Exp -> [Exp] -> Module
pattern Module :: () => () => Maybe ModuleHead -> [ModulePragma] -> [ImportDecl] -> [Decl] -> Module
pattern ConName :: () => () => Name -> CName
pattern VarName :: () => () => Name -> CName
pattern ConOp :: () => () => Name -> Op
pattern VarOp :: () => () => Name -> Op
pattern QConOp :: () => () => QName -> QOp
pattern QVarOp :: () => () => QName -> QOp
pattern IPLin :: () => () => String -> IPName
pattern IPDup :: () => () => String -> IPName
pattern Symbol :: () => () => String -> Name
pattern Ident :: () => () => String -> Name
pattern Special :: () => () => SpecialCon -> QName
pattern UnQual :: () => () => Name -> QName
pattern Qual :: () => () => ModuleName -> Name -> QName
pattern ExprHole :: () => () => SpecialCon
pattern UnboxedSingleCon :: () => () => SpecialCon
pattern Cons :: () => () => SpecialCon
pattern TupleCon :: () => () => Boxed -> Int -> SpecialCon
pattern FunCon :: () => () => SpecialCon
pattern ListCon :: () => () => SpecialCon
pattern UnitCon :: () => () => SpecialCon
pattern ModuleName :: () => () => String -> ModuleName
charL :: Char -> Literal
stringL :: String -> Literal
intL :: Integer -> Literal
fracL :: Rational -> Literal
primIntL :: Integer -> Literal
primWordL :: Integer -> Literal
primFloatL :: Rational -> Literal
primDoubleL :: Rational -> Literal
primCharL :: Char -> Literal
primStringL :: String -> Literal
prelude_mod :: ModuleName
main_mod :: ModuleName
main_name :: Name
unit_con_name :: QName
tuple_con_name :: Boxed -> Int -> QName
list_cons_name :: QName
unboxed_singleton_con_name :: QName
unit_con :: Exp
tuple_con :: Boxed -> Int -> Exp
unboxed_singleton_con :: Exp
as_name :: Name
qualified_name :: Name
hiding_name :: Name
minus_name :: Name
bang_name :: Name
dot_name :: Name
star_name :: Name
hole_name :: QName
export_name :: Name
safe_name :: Name
unsafe_name :: Name
interruptible_name :: Name
threadsafe_name :: Name
stdcall_name :: Name
ccall_name :: Name
cplusplus_name :: Name
dotnet_name :: Name
jvm_name :: Name
js_name :: Name
javascript_name :: Name
capi_name :: Name
forall_name :: Name
family_name :: Name
role_name :: Name
stock_name :: Name
anyclass_name :: Name
unit_tycon_name :: QName
fun_tycon_name :: QName
list_tycon_name :: QName
unboxed_singleton_tycon_name :: QName
tuple_tycon_name :: Boxed -> Int -> QName
unit_tycon :: Type
fun_tycon :: Type
list_tycon :: Type
unboxed_singleton_tycon :: Type
tuple_tycon :: Boxed -> Int -> Type

-- | Flag denoting whether a tuple is boxed or unboxed.
data Boxed
Boxed :: Boxed
Unboxed :: Boxed

-- | Recognised tools for OPTIONS pragmas.
data Tool
GHC :: Tool
HUGS :: Tool
NHC98 :: Tool
YHC :: Tool
HADDOCK :: Tool
UnknownTool :: String -> Tool


-- | This module partially reexports <a>Language.Haskell.Exts.Parser</a>
--   with adaptations.
--   
--   <b>IMPORTANT</b>: if you require compatiblity with ghc 7.8, you should
--   use the function <a>listOf</a> for constructing <a>ListOf</a> values!
module Language.Haskell.Exts.Simple.Parser
type ModuleHeadAndImports = ModuleHeadAndImports ()
type PragmasAndModuleHead = PragmasAndModuleHead ()
type PragmasAndModuleName = PragmasAndModuleName ()

-- | Beware that the <a>ListOf</a> constructor only works in a pattern
--   context in ghc-7.8, because that version does not support explicitly
--   bidirectional pattern synonyms.
--   
--   For code that needs to work with ghc-7.8, we provide the <a>listOf</a>
--   function constructing <a>ListOf</a> values.
type ListOf = ListOf
pattern ModuleHeadAndImports :: () => () => [ModulePragma] -> Maybe ModuleHead -> [ImportDecl] -> ModuleHeadAndImports ()
pattern PragmasAndModuleHead :: () => () => [ModulePragma] -> Maybe ModuleHead -> PragmasAndModuleHead ()
pattern PragmasAndModuleName :: () => () => [ModulePragma] -> Maybe ModuleName -> PragmasAndModuleName
pattern ListOf :: forall a. () => () => [a] -> ListOf a
listOf :: [a] -> ListOf a
parse :: (Parseable (ast SrcSpanInfo), Functor ast) => String -> ParseResult (ast ())
parseWithMode :: (Parseable (ast SrcSpanInfo), Functor ast) => ParseMode -> String -> ParseResult (ast ())
parseModule :: String -> ParseResult Module
parseModuleWithMode :: ParseMode -> String -> ParseResult Module
parseExp :: String -> ParseResult Exp
parseExpWithMode :: ParseMode -> String -> ParseResult Exp
parseStmt :: String -> ParseResult Stmt
parseStmtWithMode :: ParseMode -> String -> ParseResult Stmt
parsePat :: String -> ParseResult Pat
parsePatWithMode :: ParseMode -> String -> ParseResult Pat
parseDecl :: String -> ParseResult Decl
parseDeclWithMode :: ParseMode -> String -> ParseResult Decl
parseType :: String -> ParseResult Type
parseTypeWithMode :: ParseMode -> String -> ParseResult Type
parseImportDecl :: String -> ParseResult ImportDecl
parseImportDeclWithMode :: ParseMode -> String -> ParseResult ImportDecl
getTopPragmas :: String -> ParseResult [ModulePragma]
unListOf :: () => ListOf a -> [a]

-- | Instances of <a>Parseable</a> for <tt>NonGreedy a</tt> will only
--   consume the input until <tt>a</tt> is fully parsed. This means that
--   parse errors that come later in the input will be ignored. It's also
--   more efficient, as it's fully lazy in the remainder of the input:
--   
--   <pre>
--   &gt;&gt;&gt; parse (unlines ("module A where" : "main =" : repeat "blah")) :: ParseResult PragmasAndModuleHead
--   ParseOk (NonGreedy {unNonGreedy = PragmasAndModuleHead [] (ModuleName "A",Nothing,Nothing)})
--   </pre>
--   
--   (this example uses the simplified AST)
newtype NonGreedy a
NonGreedy :: a -> NonGreedy a
[unNonGreedy] :: NonGreedy a -> a

-- | Default parameters for a parse. The default is an unknown filename, no
--   extensions (i.e. Haskell 98), don't ignore LANGUAGE pragmas, do ignore
--   LINE pragmas, and be aware of fixities from the <tt>Prelude</tt>.
defaultParseMode :: ParseMode

-- | Retrieve the result of a successful parse, throwing an error if the
--   parse is actually not successful.
fromParseResult :: () => ParseResult a -> a

-- | Class providing function for parsing at many different types.
--   
--   Note that for convenience of implementation, the default methods have
--   definitions equivalent to <a>undefined</a>. The minimal definition is
--   all of the visible methods.
class Parseable ast

-- | The result of a parse.
data ParseResult a

-- | The parse succeeded, yielding a value.
ParseOk :: a -> ParseResult a

-- | The parse failed at the specified source location, with an error
--   message.
ParseFailed :: SrcLoc -> String -> ParseResult a

-- | Static parameters governing a parse. Note that the various parse
--   functions in <a>Language.Haskell.Exts.Parser</a> never look at
--   LANGUAGE pragmas, regardless of what the
--   <tt>ignoreLanguagePragmas</tt> flag is set to. Only the various
--   <tt>parseFile</tt> functions in <a>Language.Haskell.Exts</a> will act
--   on it, when set to <a>False</a>.
data ParseMode
ParseMode :: String -> Language -> [Extension] -> Bool -> Bool -> Maybe [Fixity] -> Bool -> ParseMode

-- | original name of the file being parsed
[parseFilename] :: ParseMode -> String

-- | base language (e.g. Haskell98, Haskell2010)
[baseLanguage] :: ParseMode -> Language

-- | list of extensions enabled for parsing
[extensions] :: ParseMode -> [Extension]

-- | if <a>True</a>, the parser won't care about further extensions in
--   LANGUAGE pragmas in source files
[ignoreLanguagePragmas] :: ParseMode -> Bool

-- | if <a>True</a>, the parser won't read line position information from
--   LINE pragmas in source files
[ignoreLinePragmas] :: ParseMode -> Bool

-- | list of fixities to be aware of
[fixities] :: ParseMode -> Maybe [Fixity]

-- | Checks whether functions have a consistent arity
[ignoreFunctionArity] :: ParseMode -> Bool


-- | This module partially reexports <a>Language.Haskell.Exts.Fixity</a>,
--   adapting <tt>applyFixityies</tt>.
module Language.Haskell.Exts.Simple.Fixity
applyFixities :: (AppFixity ast, Functor ast, Monad m) => [Fixity] -> ast () -> m (ast ())
infix_ :: Int -> [String] -> [Fixity]
infixl_ :: Int -> [String] -> [Fixity]
infixr_ :: Int -> [String] -> [Fixity]

-- | All fixities defined in the base package.
--   
--   Note that the <tt>+++</tt> operator appears in both Control.Arrows and
--   Text.ParserCombinators.ReadP. The listed precedence for <tt>+++</tt>
--   in this list is that of Control.Arrows.
baseFixities :: [Fixity]

-- | All fixities defined in the Prelude.
preludeFixities :: [Fixity]

-- | Operator fixities are represented by their associativity (left, right
--   or none) and their precedence (0-9).
data Fixity
Fixity :: Assoc () -> Int -> QName () -> Fixity

-- | All AST elements that may include expressions which in turn may need
--   fixity tweaking will be instances of this class.
class AppFixity (ast :: Type -> Type)


-- | This module exports all relevant modules of the
--   haskell-src-exts-simple package.
--   
--   The most important module is
--   <a>Language.Haskell.Exts.Simple.Syntax</a>.
module Language.Haskell.Exts.Simple
parseFile :: FilePath -> IO (ParseResult Module)
parseFileWithExts :: [Extension] -> FilePath -> IO (ParseResult Module)
parseFileWithMode :: ParseMode -> FilePath -> IO (ParseResult Module)
parseFileContents :: String -> ParseResult Module
parseFileContentsWithExts :: [Extension] -> String -> ParseResult Module
parseFileContentsWithMode :: ParseMode -> String -> ParseResult Module
