Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Output
- type Out = [Decl ()]
- type Ctor = CtorDecl
- type Input = DataDecl
- sample :: Input
- outEq :: Out -> Out -> Bool
- showOut :: Pretty a => [a] -> String
- dataName :: DataDecl -> String
- dataVars :: DataDecl -> Int
- dataCtors :: DataDecl -> [CtorDecl]
- ctorName :: CtorDecl -> String
- ctorArity :: CtorDecl -> Integer
- ctorIndex :: Input -> Ctor -> Integer
- toInput :: DataDecl -> Input
- toOutput :: Data a => a -> Output
- fromOutput :: Data a => Output -> a
- coerce :: (Typeable a1, Typeable a2) => a1 -> a2
- readCon :: DataType -> [Char] -> Constr
- out :: Data a => a -> Output
- fromState :: State a x -> x
- readExtensions :: String -> Maybe (Maybe Language, [Extension])
- parseFileContentsWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment])
- parseFileContentsWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo)
- parseFileContentsWithExts :: [Extension] -> String -> ParseResult (Module SrcSpanInfo)
- parseFileContents :: String -> ParseResult (Module SrcSpanInfo)
- parseFileWithCommentsAndPragmas :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo, [Comment], [UnknownPragma]))
- parseFileWithComments :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo, [Comment]))
- parseFileWithMode :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo))
- parseFileWithExts :: [Extension] -> FilePath -> IO (ParseResult (Module SrcSpanInfo))
- parseFile :: FilePath -> IO (ParseResult (Module SrcSpanInfo))
- metaConPat :: String -> [Pat ()] -> Pat ()
- metaFunction :: String -> [Exp ()] -> Exp ()
- nameBind :: Name () -> Exp () -> Decl ()
- patBindWhere :: Pat () -> Exp () -> [Decl ()] -> Decl ()
- patBind :: Pat () -> Exp () -> Decl ()
- simpleFun :: Name () -> Name () -> Exp () -> Decl ()
- sfun :: Name () -> [Name ()] -> Rhs () -> Maybe (Binds ()) -> Decl ()
- genNames :: String -> Int -> [Name ()]
- wildcard :: Pat ()
- noBinds :: Maybe (Binds ())
- letStmt :: [Decl ()] -> Stmt ()
- genStmt :: Pat () -> Exp () -> Stmt ()
- qualStmt :: Exp () -> Stmt ()
- pParen :: Pat () -> Pat ()
- peList :: Pat ()
- eList :: Exp ()
- listE :: [Exp ()] -> Exp ()
- altGW :: Pat () -> [Stmt ()] -> Exp () -> Binds () -> Alt ()
- alt :: Pat () -> Exp () -> Alt ()
- caseE :: Exp () -> [Alt ()] -> Exp ()
- letE :: [Decl ()] -> Exp () -> Exp ()
- lamE :: [Pat ()] -> Exp () -> Exp ()
- doE :: [Stmt ()] -> Exp ()
- intP :: Integer -> Pat ()
- charP :: Char -> Pat ()
- strP :: String -> Pat ()
- intE :: Integer -> Exp ()
- charE :: Char -> Exp ()
- strE :: String -> Exp ()
- function :: String -> Exp ()
- pvarTuple :: [Name ()] -> Pat ()
- varTuple :: [Name ()] -> Exp ()
- pTuple :: [Pat ()] -> Pat ()
- tuple :: [Exp ()] -> Exp ()
- pApp :: Name () -> [Pat ()] -> Pat ()
- appFun :: Exp () -> [Exp ()] -> Exp ()
- infixApp :: Exp () -> QOp () -> Exp () -> Exp ()
- pvar :: Name () -> Pat ()
- qvar :: ModuleName () -> Name () -> Exp ()
- op :: Name () -> QOp ()
- sym :: String -> Name ()
- name :: String -> Name ()
- exactPrint :: ExactP ast => ast SrcSpanInfo -> [Comment] -> String
- class Annotated ast => ExactP (ast :: Type -> Type)
- unListOf :: ListOf a -> [a]
- getTopPragmas :: String -> ParseResult [ModulePragma SrcSpanInfo]
- parseImportDeclWithComments :: ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo, [Comment])
- parseImportDeclWithMode :: ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo)
- parseImportDecl :: String -> ParseResult (ImportDecl SrcSpanInfo)
- parseStmtWithComments :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo, [Comment])
- parseStmtWithMode :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo)
- parseStmt :: String -> ParseResult (Stmt SrcSpanInfo)
- parseTypeWithComments :: ParseMode -> String -> ParseResult (Type SrcSpanInfo, [Comment])
- parseTypeWithMode :: ParseMode -> String -> ParseResult (Type SrcSpanInfo)
- parseType :: String -> ParseResult (Type SrcSpanInfo)
- parseDeclWithComments :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo, [Comment])
- parseDeclWithMode :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo)
- parseDecl :: String -> ParseResult (Decl SrcSpanInfo)
- parsePatWithComments :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo, [Comment])
- parsePatWithMode :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo)
- parsePat :: String -> ParseResult (Pat SrcSpanInfo)
- parseExpWithComments :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo, [Comment])
- parseExpWithMode :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo)
- parseExp :: String -> ParseResult (Exp SrcSpanInfo)
- parseModuleWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment])
- parseModuleWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo)
- parseModule :: String -> ParseResult (Module SrcSpanInfo)
- data PragmasAndModuleName l = PragmasAndModuleName l [ModulePragma l] (Maybe (ModuleName l))
- data PragmasAndModuleHead l = PragmasAndModuleHead l [ModulePragma l] (Maybe (ModuleHead l))
- data ModuleHeadAndImports l = ModuleHeadAndImports l [ModulePragma l] (Maybe (ModuleHead l)) [ImportDecl l]
- newtype NonGreedy a = NonGreedy {
- unNonGreedy :: a
- data ListOf a = ListOf SrcSpanInfo [a]
- lexTokenStreamWithMode :: ParseMode -> String -> ParseResult [Loc Token]
- lexTokenStream :: String -> ParseResult [Loc Token]
- data Token
- = VarId String
- | LabelVarId String
- | QVarId (String, String)
- | IDupVarId String
- | ILinVarId String
- | ConId String
- | QConId (String, String)
- | DVarId [String]
- | VarSym String
- | ConSym String
- | QVarSym (String, String)
- | QConSym (String, String)
- | IntTok (Integer, String)
- | FloatTok (Rational, String)
- | Character (Char, String)
- | StringTok (String, String)
- | IntTokHash (Integer, String)
- | WordTokHash (Integer, String)
- | FloatTokHash (Rational, String)
- | DoubleTokHash (Rational, String)
- | CharacterHash (Char, String)
- | StringHash (String, String)
- | LeftParen
- | RightParen
- | LeftHashParen
- | RightHashParen
- | SemiColon
- | LeftCurly
- | RightCurly
- | VRightCurly
- | LeftSquare
- | RightSquare
- | ParArrayLeftSquare
- | ParArrayRightSquare
- | Comma
- | Underscore
- | BackQuote
- | Dot
- | DotDot
- | Colon
- | QuoteColon
- | DoubleColon
- | Equals
- | Backslash
- | Bar
- | LeftArrow
- | RightArrow
- | At
- | TApp
- | Tilde
- | DoubleArrow
- | Minus
- | Exclamation
- | Star
- | LeftArrowTail
- | RightArrowTail
- | LeftDblArrowTail
- | RightDblArrowTail
- | THExpQuote
- | THPatQuote
- | THDecQuote
- | THTypQuote
- | THCloseQuote
- | THIdEscape String
- | THParenEscape
- | THVarQuote
- | THTyQuote
- | THQuasiQuote (String, String)
- | RPGuardOpen
- | RPGuardClose
- | RPCAt
- | XCodeTagOpen
- | XCodeTagClose
- | XStdTagOpen
- | XStdTagClose
- | XCloseTagOpen
- | XEmptyTagClose
- | XChildTagOpen
- | XPCDATA String
- | XRPatOpen
- | XRPatClose
- | PragmaEnd
- | RULES
- | INLINE Bool
- | INLINE_CONLIKE
- | SPECIALISE
- | SPECIALISE_INLINE Bool
- | SOURCE
- | DEPRECATED
- | WARNING
- | SCC
- | GENERATED
- | CORE
- | UNPACK
- | NOUNPACK
- | OPTIONS (Maybe String, String)
- | LANGUAGE
- | ANN
- | MINIMAL
- | NO_OVERLAP
- | OVERLAP
- | OVERLAPPING
- | OVERLAPPABLE
- | OVERLAPS
- | INCOHERENT
- | COMPLETE
- | KW_As
- | KW_By
- | KW_Case
- | KW_Class
- | KW_Data
- | KW_Default
- | KW_Deriving
- | KW_Do
- | KW_MDo
- | KW_Else
- | KW_Family
- | KW_Forall
- | KW_Group
- | KW_Hiding
- | KW_If
- | KW_Import
- | KW_In
- | KW_Infix
- | KW_InfixL
- | KW_InfixR
- | KW_Instance
- | KW_Let
- | KW_Module
- | KW_NewType
- | KW_Of
- | KW_Proc
- | KW_Rec
- | KW_Role
- | KW_Then
- | KW_Type
- | KW_Using
- | KW_Where
- | KW_Qualified
- | KW_Pattern
- | KW_Stock
- | KW_Anyclass
- | KW_Foreign
- | KW_Export
- | KW_Safe
- | KW_Unsafe
- | KW_Threadsafe
- | KW_Interruptible
- | KW_StdCall
- | KW_CCall
- | KW_CPlusPlus
- | KW_DotNet
- | KW_Jvm
- | KW_Js
- | KW_JavaScript
- | KW_CApi
- | EOF
- defaultParseMode :: ParseMode
- fromParseResult :: ParseResult a -> a
- class Parseable ast where
- parse :: String -> ParseResult ast
- parseWithMode :: ParseMode -> String -> ParseResult ast
- parseWithComments :: ParseMode -> String -> ParseResult (ast, [Comment])
- data ParseResult a
- = ParseOk a
- | ParseFailed SrcLoc String
- data ParseMode = ParseMode {}
- associateHaddock :: (Annotated ast, Traversable ast) => (ast SrcSpanInfo, [Comment]) -> ast (SrcSpanInfo, [Comment])
- data Comment = Comment Bool SrcSpan String
- data UnknownPragma = UnknownPragma SrcSpan String
- infix_ :: Int -> [String] -> [Fixity]
- infixl_ :: Int -> [String] -> [Fixity]
- infixr_ :: Int -> [String] -> [Fixity]
- baseFixities :: [Fixity]
- preludeFixities :: [Fixity]
- data Fixity = Fixity (Assoc ()) Int (QName ())
- class AppFixity (ast :: Type -> Type) where
- applyFixities :: Monad m => [Fixity] -> ast SrcSpanInfo -> m (ast SrcSpanInfo)
- prettyPrimWithMode :: Pretty a => PPHsMode -> a -> Doc
- prettyPrim :: Pretty a => a -> Doc
- prettyPrint :: Pretty a => a -> String
- prettyPrintWithMode :: Pretty a => PPHsMode -> a -> String
- prettyPrintStyleMode :: Pretty a => Style -> PPHsMode -> a -> String
- defaultMode :: PPHsMode
- data PPLayout
- type Indent = Int
- data PPHsMode = PPHsMode {
- classIndent :: Indent
- doIndent :: Indent
- multiIfIndent :: Indent
- caseIndent :: Indent
- letIndent :: Indent
- whereIndent :: Indent
- onsideIndent :: Indent
- spacing :: Bool
- layout :: PPLayout
- linePragmas :: Bool
- class Pretty a
- (=~=) :: (Annotated a, Eq (a ())) => a l1 -> a l2 -> Bool
- tuple_tycon :: l -> Boxed -> Int -> Type l
- unboxed_singleton_tycon :: l -> Type l
- list_tycon :: l -> Type l
- fun_tycon :: l -> Type l
- unit_tycon :: l -> Type l
- tuple_tycon_name :: l -> Boxed -> Int -> QName l
- unboxed_singleton_tycon_name :: l -> QName l
- list_tycon_name :: l -> QName l
- fun_tycon_name :: l -> QName l
- unit_tycon_name :: l -> QName l
- anyclass_name :: l -> Name l
- stock_name :: l -> Name l
- role_name :: l -> Name l
- family_name :: l -> Name l
- forall_name :: l -> Name l
- capi_name :: l -> Name l
- javascript_name :: l -> Name l
- js_name :: l -> Name l
- jvm_name :: l -> Name l
- dotnet_name :: l -> Name l
- cplusplus_name :: l -> Name l
- ccall_name :: l -> Name l
- stdcall_name :: l -> Name l
- threadsafe_name :: l -> Name l
- interruptible_name :: l -> Name l
- unsafe_name :: l -> Name l
- safe_name :: l -> Name l
- export_name :: l -> Name l
- hole_name :: l -> QName l
- star_name :: l -> Name l
- dot_name :: l -> Name l
- bang_name :: l -> Name l
- minus_name :: l -> Name l
- hiding_name :: l -> Name l
- qualified_name :: l -> Name l
- as_name :: l -> Name l
- unboxed_singleton_con :: l -> Exp l
- tuple_con :: l -> Boxed -> Int -> Exp l
- unit_con :: l -> Exp l
- unboxed_singleton_con_name :: l -> QName l
- list_cons_name :: l -> QName l
- tuple_con_name :: l -> Boxed -> Int -> QName l
- unit_con_name :: l -> QName l
- main_name :: l -> Name l
- main_mod :: l -> ModuleName l
- prelude_mod :: l -> ModuleName l
- data ModuleName l = ModuleName l String
- data SpecialCon l
- data QName l
- = Qual l (ModuleName l) (Name l)
- | UnQual l (Name l)
- | Special l (SpecialCon l)
- data Name l
- data IPName l
- data QOp l
- data Op l
- data CName l
- data Module l
- = Module l (Maybe (ModuleHead l)) [ModulePragma l] [ImportDecl l] [Decl l]
- | XmlPage l (ModuleName l) [ModulePragma l] (XName l) [XAttr l] (Maybe (Exp l)) [Exp l]
- | XmlHybrid l (Maybe (ModuleHead l)) [ModulePragma l] [ImportDecl l] [Decl l] (XName l) [XAttr l] (Maybe (Exp l)) [Exp l]
- data ModuleHead l = ModuleHead l (ModuleName l) (Maybe (WarningText l)) (Maybe (ExportSpecList l))
- data ExportSpecList l = ExportSpecList l [ExportSpec l]
- data ExportSpec l
- = EVar l (QName l)
- | EAbs l (Namespace l) (QName l)
- | EThingWith l (EWildcard l) (QName l) [CName l]
- | EModuleContents l (ModuleName l)
- data EWildcard l
- = NoWildcard l
- | EWildcard l Int
- data Namespace l
- = NoNamespace l
- | TypeNamespace l
- | PatternNamespace l
- data ImportDecl l = ImportDecl {
- importAnn :: l
- importModule :: ModuleName l
- importQualified :: Bool
- importSrc :: Bool
- importSafe :: Bool
- importPkg :: Maybe String
- importAs :: Maybe (ModuleName l)
- importSpecs :: Maybe (ImportSpecList l)
- data ImportSpecList l = ImportSpecList l Bool [ImportSpec l]
- data ImportSpec l
- data Assoc l
- = AssocNone l
- | AssocLeft l
- | AssocRight l
- data Decl l
- = TypeDecl l (DeclHead l) (Type l)
- | TypeFamDecl l (DeclHead l) (Maybe (ResultSig l)) (Maybe (InjectivityInfo l))
- | ClosedTypeFamDecl l (DeclHead l) (Maybe (ResultSig l)) (Maybe (InjectivityInfo l)) [TypeEqn l]
- | DataDecl l (DataOrNew l) (Maybe (Context l)) (DeclHead l) [QualConDecl l] [Deriving l]
- | GDataDecl l (DataOrNew l) (Maybe (Context l)) (DeclHead l) (Maybe (Kind l)) [GadtDecl l] [Deriving l]
- | DataFamDecl l (Maybe (Context l)) (DeclHead l) (Maybe (ResultSig l))
- | TypeInsDecl l (Type l) (Type l)
- | DataInsDecl l (DataOrNew l) (Type l) [QualConDecl l] [Deriving l]
- | GDataInsDecl l (DataOrNew l) (Type l) (Maybe (Kind l)) [GadtDecl l] [Deriving l]
- | ClassDecl l (Maybe (Context l)) (DeclHead l) [FunDep l] (Maybe [ClassDecl l])
- | InstDecl l (Maybe (Overlap l)) (InstRule l) (Maybe [InstDecl l])
- | DerivDecl l (Maybe (DerivStrategy l)) (Maybe (Overlap l)) (InstRule l)
- | InfixDecl l (Assoc l) (Maybe Int) [Op l]
- | DefaultDecl l [Type l]
- | SpliceDecl l (Exp l)
- | TypeSig l [Name l] (Type l)
- | PatSynSig l [Name l] (Maybe [TyVarBind l]) (Maybe (Context l)) (Maybe (Context l)) (Type l)
- | FunBind l [Match l]
- | PatBind l (Pat l) (Rhs l) (Maybe (Binds l))
- | PatSyn l (Pat l) (Pat l) (PatternSynDirection l)
- | ForImp l (CallConv l) (Maybe (Safety l)) (Maybe String) (Name l) (Type l)
- | ForExp l (CallConv l) (Maybe String) (Name l) (Type l)
- | RulePragmaDecl l [Rule l]
- | DeprPragmaDecl l [([Name l], String)]
- | WarnPragmaDecl l [([Name l], String)]
- | InlineSig l Bool (Maybe (Activation l)) (QName l)
- | InlineConlikeSig l (Maybe (Activation l)) (QName l)
- | SpecSig l (Maybe (Activation l)) (QName l) [Type l]
- | SpecInlineSig l Bool (Maybe (Activation l)) (QName l) [Type l]
- | InstSig l (InstRule l)
- | AnnPragma l (Annotation l)
- | MinimalPragma l (Maybe (BooleanFormula l))
- | RoleAnnotDecl l (QName l) [Role l]
- | CompletePragma l [Name l] (Maybe (QName l))
- data PatternSynDirection l
- data TypeEqn l = TypeEqn l (Type l) (Type l)
- data Annotation l
- data BooleanFormula l
- = VarFormula l (Name l)
- | AndFormula l [BooleanFormula l]
- | OrFormula l [BooleanFormula l]
- | ParenFormula l (BooleanFormula l)
- data Role l
- = Nominal l
- | Representational l
- | Phantom l
- | RoleWildcard l
- data DataOrNew l
- data InjectivityInfo l = InjectivityInfo l (Name l) [Name l]
- data ResultSig l
- data DeclHead l
- data InstRule l
- data InstHead l
- data Deriving l = Deriving l (Maybe (DerivStrategy l)) [InstRule l]
- data DerivStrategy l
- = DerivStock l
- | DerivAnyclass l
- | DerivNewtype l
- data Binds l
- data IPBind l = IPBind l (IPName l) (Exp l)
- data Match l
- data QualConDecl l = QualConDecl l (Maybe [TyVarBind l]) (Maybe (Context l)) (ConDecl l)
- data ConDecl l
- data GadtDecl l = GadtDecl l (Name l) (Maybe [FieldDecl l]) (Type l)
- data ClassDecl l
- data InstDecl l
- data BangType l
- = BangedTy l
- | LazyTy l
- | NoStrictAnnot l
- data Unpackedness l
- = Unpack l
- | NoUnpack l
- | NoUnpackPragma l
- data Rhs l
- = UnGuardedRhs l (Exp l)
- | GuardedRhss l [GuardedRhs l]
- data GuardedRhs l = GuardedRhs l [Stmt l] (Exp l)
- data Type l
- = TyForall l (Maybe [TyVarBind l]) (Maybe (Context l)) (Type l)
- | TyFun l (Type l) (Type l)
- | TyTuple l Boxed [Type l]
- | TyUnboxedSum l [Type l]
- | TyList l (Type l)
- | TyParArray l (Type l)
- | TyApp l (Type l) (Type l)
- | TyVar l (Name l)
- | TyCon l (QName l)
- | TyParen l (Type l)
- | TyInfix l (Type l) (MaybePromotedName l) (Type l)
- | TyKind l (Type l) (Kind l)
- | TyPromoted l (Promoted l)
- | TyEquals l (Type l) (Type l)
- | TySplice l (Splice l)
- | TyBang l (BangType l) (Unpackedness l) (Type l)
- | TyWildCard l (Maybe (Name l))
- | TyQuasiQuote l String String
- data MaybePromotedName l
- = PromotedName l (QName l)
- | UnpromotedName l (QName l)
- data Promoted l
- = PromotedInteger l Integer String
- | PromotedString l String String
- | PromotedCon l Bool (QName l)
- | PromotedList l Bool [Type l]
- | PromotedTuple l [Type l]
- | PromotedUnit l
- data Boxed
- data TyVarBind l
- = KindedVar l (Name l) (Kind l)
- | UnkindedVar l (Name l)
- data Kind l
- data FunDep l = FunDep l [Name l] [Name l]
- data Context l
- data Asst l
- data Literal l
- data Sign l
- data Exp l
- = Var l (QName l)
- | OverloadedLabel l String
- | IPVar l (IPName l)
- | Con l (QName l)
- | Lit l (Literal l)
- | InfixApp l (Exp l) (QOp l) (Exp l)
- | NegApp l (Exp l)
- | Lambda l [Pat l] (Exp l)
- | Let l (Binds l) (Exp l)
- | If l (Exp l) (Exp l) (Exp l)
- | MultiIf l [GuardedRhs l]
- | Case l (Exp l) [Alt l]
- | Do l [Stmt l]
- | MDo l [Stmt l]
- | Tuple l Boxed [Exp l]
- | UnboxedSum l Int Int (Exp l)
- | TupleSection l Boxed [Maybe (Exp l)]
- | ParArray l [Exp l]
- | Paren l (Exp l)
- | LeftSection l (Exp l) (QOp l)
- | RightSection l (QOp l) (Exp l)
- | RecConstr l (QName l) [FieldUpdate l]
- | RecUpdate l (Exp l) [FieldUpdate l]
- | EnumFrom l (Exp l)
- | EnumFromTo l (Exp l) (Exp l)
- | EnumFromThen l (Exp l) (Exp l)
- | EnumFromThenTo l (Exp l) (Exp l) (Exp l)
- | ParArrayFromTo l (Exp l) (Exp l)
- | ParArrayFromThenTo l (Exp l) (Exp l) (Exp l)
- | ListComp l (Exp l) [QualStmt l]
- | ParComp l (Exp l) [[QualStmt l]]
- | ParArrayComp l (Exp l) [[QualStmt l]]
- | ExpTypeSig l (Exp l) (Type l)
- | VarQuote l (QName l)
- | TypQuote l (QName l)
- | BracketExp l (Bracket l)
- | SpliceExp l (Splice l)
- | QuasiQuote l String String
- | TypeApp l (Type l)
- | XTag l (XName l) [XAttr l] (Maybe (Exp l)) [Exp l]
- | XETag l (XName l) [XAttr l] (Maybe (Exp l))
- | XPcdata l String
- | XExpTag l (Exp l)
- | XChildTag l [Exp l]
- | CorePragma l String (Exp l)
- | SCCPragma l String (Exp l)
- | GenPragma l String (Int, Int) (Int, Int) (Exp l)
- | Proc l (Pat l) (Exp l)
- | LeftArrApp l (Exp l) (Exp l)
- | RightArrApp l (Exp l) (Exp l)
- | LeftArrHighApp l (Exp l) (Exp l)
- | RightArrHighApp l (Exp l) (Exp l)
- | LCase l [Alt l]
- data XName l
- data XAttr l = XAttr l (XName l) (Exp l)
- data Bracket l
- = ExpBracket l (Exp l)
- | PatBracket l (Pat l)
- | TypeBracket l (Type l)
- | DeclBracket l [Decl l]
- data Splice l
- = IdSplice l String
- | ParenSplice l (Exp l)
- data Safety l
- = PlayRisky l
- | PlaySafe l Bool
- | PlayInterruptible l
- data CallConv l
- data ModulePragma l
- = LanguagePragma l [Name l]
- | OptionsPragma l (Maybe Tool) String
- | AnnModulePragma l (Annotation l)
- data Tool
- data Overlap l
- = NoOverlap l
- | Overlap l
- | Overlapping l
- | Overlaps l
- | Overlappable l
- | Incoherent l
- data Activation l
- = ActiveFrom l Int
- | ActiveUntil l Int
- data Rule l = Rule l String (Maybe (Activation l)) (Maybe [RuleVar l]) (Exp l) (Exp l)
- data RuleVar l
- = RuleVar l (Name l)
- | TypedRuleVar l (Name l) (Type l)
- data WarningText l
- data Pat l
- = PVar l (Name l)
- | PLit l (Sign l) (Literal l)
- | PNPlusK l (Name l) Integer
- | PInfixApp l (Pat l) (QName l) (Pat l)
- | PApp l (QName l) [Pat l]
- | PTuple l Boxed [Pat l]
- | PUnboxedSum l Int Int (Pat l)
- | PList l [Pat l]
- | PParen l (Pat l)
- | PRec l (QName l) [PatField l]
- | PAsPat l (Name l) (Pat l)
- | PWildCard l
- | PIrrPat l (Pat l)
- | PatTypeSig l (Pat l) (Type l)
- | PViewPat l (Exp l) (Pat l)
- | PRPat l [RPat l]
- | PXTag l (XName l) [PXAttr l] (Maybe (Pat l)) [Pat l]
- | PXETag l (XName l) [PXAttr l] (Maybe (Pat l))
- | PXPcdata l String
- | PXPatTag l (Pat l)
- | PXRPats l [RPat l]
- | PSplice l (Splice l)
- | PQuasiQuote l String String
- | PBangPat l (Pat l)
- data PXAttr l = PXAttr l (XName l) (Pat l)
- data RPatOp l
- data RPat l
- data PatField l
- data Stmt l
- data QualStmt l
- data FieldUpdate l
- = FieldUpdate l (QName l) (Exp l)
- | FieldPun l (QName l)
- | FieldWildcard l
- data Alt l = Alt l (Pat l) (Rhs l) (Maybe (Binds l))
- class Functor ast => Annotated (ast :: Type -> Type) where
- (<^^>) :: SrcSpan -> SrcSpan -> SrcSpanInfo
- (<**) :: SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo
- (<?+>) :: Maybe SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo
- (<+?>) :: SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo
- (<++>) :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo
- combSpanMaybe :: SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo
- combSpanInfo :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo
- infoSpan :: SrcSpan -> [SrcSpan] -> SrcSpanInfo
- noSrcSpan :: SrcSpanInfo
- noInfoSpan :: SrcSpan -> SrcSpanInfo
- spanSize :: SrcSpan -> (Int, Int)
- isNullSpan :: SrcSpan -> Bool
- mergeSrcSpan :: SrcSpan -> SrcSpan -> SrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- srcSpanEnd :: SrcSpan -> (Int, Int)
- srcSpanStart :: SrcSpan -> (Int, Int)
- noLoc :: SrcLoc
- data SrcLoc = SrcLoc {}
- data SrcSpan = SrcSpan {}
- data Loc a = Loc {}
- data SrcSpanInfo = SrcSpanInfo {
- srcInfoSpan :: SrcSpan
- srcInfoPoints :: [SrcSpan]
- class SrcInfo si where
- toSrcInfo :: SrcLoc -> [SrcSpan] -> SrcLoc -> si
- fromSrcInfo :: SrcSpanInfo -> si
- getPointLoc :: si -> SrcLoc
- fileName :: si -> String
- startLine :: si -> Int
- startColumn :: si -> Int
- toExtensionList :: Language -> [Extension] -> [KnownExtension]
- prettyExtension :: Extension -> String
- parseExtension :: String -> Extension
- classifyExtension :: String -> Extension
- deprecatedExtensions :: [(Extension, Maybe Extension)]
- knownExtensions :: [Extension]
- ghcDefault :: [Extension]
- glasgowExts :: [Extension]
- impliesExts :: [KnownExtension] -> [KnownExtension]
- prettyLanguage :: Language -> String
- classifyLanguage :: String -> Language
- knownLanguages :: [Language]
- data Language
- data Extension
- data KnownExtension
- = OverlappingInstances
- | UndecidableInstances
- | IncoherentInstances
- | InstanceSigs
- | DoRec
- | RecursiveDo
- | ParallelListComp
- | MultiParamTypeClasses
- | MonomorphismRestriction
- | FunctionalDependencies
- | Rank2Types
- | RankNTypes
- | PolymorphicComponents
- | ExistentialQuantification
- | ScopedTypeVariables
- | PatternSignatures
- | ImplicitParams
- | FlexibleContexts
- | FlexibleInstances
- | EmptyDataDecls
- | CPP
- | KindSignatures
- | BangPatterns
- | TypeSynonymInstances
- | TemplateHaskell
- | ForeignFunctionInterface
- | Arrows
- | Generics
- | ImplicitPrelude
- | NamedFieldPuns
- | PatternGuards
- | GeneralizedNewtypeDeriving
- | DeriveAnyClass
- | ExtensibleRecords
- | RestrictedTypeSynonyms
- | HereDocuments
- | MagicHash
- | BinaryLiterals
- | TypeFamilies
- | StandaloneDeriving
- | UnicodeSyntax
- | UnliftedFFITypes
- | LiberalTypeSynonyms
- | TypeOperators
- | ParallelArrays
- | RecordWildCards
- | RecordPuns
- | DisambiguateRecordFields
- | OverloadedStrings
- | GADTs
- | MonoPatBinds
- | RelaxedPolyRec
- | ExtendedDefaultRules
- | UnboxedTuples
- | DeriveDataTypeable
- | ConstrainedClassMethods
- | PackageImports
- | LambdaCase
- | EmptyCase
- | ImpredicativeTypes
- | NewQualifiedOperators
- | PostfixOperators
- | QuasiQuotes
- | TransformListComp
- | ViewPatterns
- | XmlSyntax
- | RegularPatterns
- | TupleSections
- | GHCForeignImportPrim
- | NPlusKPatterns
- | DoAndIfThenElse
- | RebindableSyntax
- | ExplicitForAll
- | DatatypeContexts
- | MonoLocalBinds
- | DeriveFunctor
- | DeriveGeneric
- | DeriveTraversable
- | DeriveFoldable
- | NondecreasingIndentation
- | InterruptibleFFI
- | CApiFFI
- | JavaScriptFFI
- | ExplicitNamespaces
- | DataKinds
- | PolyKinds
- | MultiWayIf
- | SafeImports
- | Safe
- | Trustworthy
- | DefaultSignatures
- | ConstraintKinds
- | RoleAnnotations
- | PatternSynonyms
- | PartialTypeSignatures
- | NamedWildCards
- | TypeApplications
- | TypeFamilyDependencies
- | OverloadedLabels
- | DerivingStrategies
- | UnboxedSums
- data Mode
- data Style = Style {
- mode :: Mode
- lineLength :: Int
- ribbonsPerLine :: Float
- style :: Style
- type FullDataDecl = (ModuleName (), DataDecl)
- type FieldDecl = [(String, Type ())]
- type CtorDecl = Either (QualConDecl ()) (GadtDecl ())
- type DataDecl = Decl ()
- (?) :: Bool -> a -> a -> a
- foralls :: Type () -> Type ()
- tyApps :: Type () -> [Type ()] -> Type ()
- fromTyApps :: Type () -> (Type (), [Type ()])
- fromTyTuple :: Type l -> [Type l]
- fromTyParen :: Type () -> Type ()
- fromTyParens :: Type () -> Type ()
- tyRoot :: Type () -> String
- isTyFun :: Type () -> Bool
- isTyParen :: Type l -> Bool
- fromTyList :: Type l -> Maybe (Type l)
- (~=) :: Pretty a => a -> String -> Bool
- appP :: Exp () -> Exp () -> Exp ()
- simplify :: Data a => a -> a
- isGuardFalse :: Match l -> Bool
- rename :: QName () -> QName ()
- isAtom :: Exp l -> Bool
- paren :: Exp () -> Exp ()
- sl :: SrcLoc
- noSl :: Data from => from -> from
- isIdent :: [Char] -> Bool
- title :: [Char] -> [Char]
- qname :: String -> QName ()
- var :: String -> Exp ()
- con :: String -> Exp ()
- tyVar :: String -> Type ()
- tyVarBind :: String -> TyVarBind ()
- tyCon :: String -> Type ()
- pVar :: String -> Pat ()
- qvop :: String -> QOp ()
- dataDeclType :: DataDecl -> Type ()
- dataDeclFields :: DataDecl -> [String]
- moduleName :: Module l -> ModuleName l
- moduleDecls :: Module l -> [Decl l]
- moduleImports :: Module l -> [ImportDecl l]
- modulePragmas :: Module l -> [ModulePragma l]
- showDecls :: Pretty a => [a] -> String
- tyApp :: Type () -> [Type ()] -> Type ()
- tyFun :: [Type ()] -> Type ()
- apps :: Exp () -> [Exp ()] -> Exp ()
- bind :: String -> [Pat ()] -> Exp () -> Decl ()
- binds :: String -> [([Pat ()], Exp ())] -> Decl ()
- isDataDecl :: Decl () -> Bool
- dataDeclName :: DataDecl -> String
- fromDeclHead :: DeclHead a -> (Name a, [TyVarBind a])
- fromIParen :: InstRule a -> InstRule a
- fromInstHead :: InstHead a -> (QName a, [Type a])
- dataDeclVars :: DataDecl -> [String]
- dataDeclVarsStar :: DataDecl -> [String]
- dataDeclArity :: DataDecl -> Int
- dataDeclCtors :: DataDecl -> [CtorDecl]
- ctorDeclName :: CtorDecl -> String
- ctorDeclName' :: CtorDecl -> Name ()
- ctorDeclFields :: CtorDecl -> FieldDecl
- ctorDeclArity :: CtorDecl -> Int
- declName :: Decl () -> String
Documentation
Instances
Eq Output Source # | |
Data Output Source # | |
Defined in Data.Derive.DSL.HSE gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Output -> c Output # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Output # toConstr :: Output -> Constr # dataTypeOf :: Output -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Output) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Output) # gmapT :: (forall b. Data b => b -> b) -> Output -> Output # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Output -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Output -> r # gmapQ :: (forall d. Data d => d -> u) -> Output -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Output -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Output -> m Output # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Output -> m Output # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Output -> m Output # | |
Show Output Source # | |
fromOutput :: Data a => Output -> a Source #
readExtensions :: String -> Maybe (Maybe Language, [Extension]) #
Gather the extensions declared in LANGUAGE pragmas
at the top of the file. Returns Nothing
if the
parse of the pragmas fails.
parseFileContentsWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment]) #
parseFileContentsWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo) #
Parse a source file from a string using a custom parse mode.
parseFileContentsWithExts :: [Extension] -> String -> ParseResult (Module SrcSpanInfo) #
Parse a source file from a string, with an extra set of extensions to know about on top of what the file itself declares.
parseFileContents :: String -> ParseResult (Module SrcSpanInfo) #
Parse a source file from a string using the default parse mode.
parseFileWithCommentsAndPragmas :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo, [Comment], [UnknownPragma])) #
Parse a source file on disk, supplying a custom parse mode, and retaining comments as well as unknown pragmas.
parseFileWithComments :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo, [Comment])) #
parseFileWithMode :: ParseMode -> FilePath -> IO (ParseResult (Module SrcSpanInfo)) #
Parse a source file on disk, supplying a custom parse mode.
parseFileWithExts :: [Extension] -> FilePath -> IO (ParseResult (Module SrcSpanInfo)) #
Parse a source file on disk, with an extra set of extensions to know about on top of what the file itself declares.
parseFile :: FilePath -> IO (ParseResult (Module SrcSpanInfo)) #
Parse a source file on disk, using the default parse mode.
metaConPat :: String -> [Pat ()] -> Pat () #
Apply a constructor of a given name to a list of pattern arguments, forming a constructor pattern.
metaFunction :: String -> [Exp ()] -> Exp () #
Apply function of a given name to a list of arguments.
patBindWhere :: Pat () -> Exp () -> [Decl ()] -> Decl () #
A pattern bind where the pattern is a variable, and where there are no guards, but with a 'where' clause.
patBind :: Pat () -> Exp () -> Decl () #
A pattern bind where the pattern is a variable, and where there are no guards and no 'where' clause.
simpleFun :: Name () -> Name () -> Exp () -> Decl () #
A function with a single clause, a single argument, no guards and no where declarations
sfun :: Name () -> [Name ()] -> Rhs () -> Maybe (Binds ()) -> Decl () #
A function with a single clause
genNames :: String -> Int -> [Name ()] #
Generate k names by appending numbers 1 through k to a given string.
altGW :: Pat () -> [Stmt ()] -> Exp () -> Binds () -> Alt () #
An alternative with a single guard in a case
expression.
lamE :: [Pat ()] -> Exp () -> Exp () #
Lambda abstraction, given a list of argument patterns and an expression body.
A do block formed by the given statements.
The last statement in the list should be
a Qualifier
expression.
qvar :: ModuleName () -> Name () -> Exp () #
A qualified variable as expression.
A symbol identifier. The string should be a valid Haskell symbol identifier.
An identifier with the given string as its name. The string should be a valid Haskell identifier.
exactPrint :: ExactP ast => ast SrcSpanInfo -> [Comment] -> String #
Print an AST exactly as specified by the annotations on the nodes in the tree.
class Annotated ast => ExactP (ast :: Type -> Type) #
exactP
Instances
getTopPragmas :: String -> ParseResult [ModulePragma SrcSpanInfo] #
Non-greedy parse of a string starting with a series of top-level option pragmas.
parseImportDeclWithComments :: ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo, [Comment]) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
, retaining comments.
parseImportDeclWithMode :: ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo) #
Parse of a string containing a Haskell type, using an explicit ParseMode
.
parseImportDecl :: String -> ParseResult (ImportDecl SrcSpanInfo) #
Parse of a string containing a Haskell statement, using defaultParseMode
.
parseStmtWithComments :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo, [Comment]) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
, retaining comments.
parseStmtWithMode :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo) #
Parse of a string containing a Haskell type, using an explicit ParseMode
.
parseStmt :: String -> ParseResult (Stmt SrcSpanInfo) #
Parse of a string containing a Haskell statement, using defaultParseMode
.
parseTypeWithComments :: ParseMode -> String -> ParseResult (Type SrcSpanInfo, [Comment]) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
, retaining comments.
parseTypeWithMode :: ParseMode -> String -> ParseResult (Type SrcSpanInfo) #
Parse of a string containing a Haskell type, using an explicit ParseMode
.
parseType :: String -> ParseResult (Type SrcSpanInfo) #
Parse of a string containing a Haskell type, using defaultParseMode
.
parseDeclWithComments :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo, [Comment]) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
, retaining comments.
parseDeclWithMode :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo) #
Parse of a string containing a Haskell top-level declaration, using an explicit ParseMode
.
parseDecl :: String -> ParseResult (Decl SrcSpanInfo) #
Parse of a string containing a Haskell top-level declaration, using defaultParseMode
.
parsePatWithComments :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo, [Comment]) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
, retaining comments.
parsePatWithMode :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo) #
Parse of a string containing a Haskell pattern, using an explicit ParseMode
.
parsePat :: String -> ParseResult (Pat SrcSpanInfo) #
Parse of a string containing a Haskell pattern, using defaultParseMode
.
parseExpWithComments :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo, [Comment]) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
, retaining comments.
parseExpWithMode :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo) #
Parse of a string containing a Haskell expression, using an explicit ParseMode
.
parseExp :: String -> ParseResult (Exp SrcSpanInfo) #
Parse of a string containing a Haskell expression, using defaultParseMode
.
parseModuleWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment]) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
, retaining comments.
parseModuleWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo) #
Parse of a string containing a complete Haskell module, using an explicit ParseMode
.
parseModule :: String -> ParseResult (Module SrcSpanInfo) #
Parse of a string, which should contain a complete Haskell module, using defaultParseMode
.
data PragmasAndModuleName l #
Type intended to be used with Parseable
, with instances that implement a
non-greedy parse of the module name, including top-level pragmas. This
means that a parse error that comes after the module header won't be
returned. If the Maybe
value is Nothing
, then this means that there was
no module header.
PragmasAndModuleName l [ModulePragma l] (Maybe (ModuleName l)) |
Instances
data PragmasAndModuleHead l #
PragmasAndModuleHead l [ModulePragma l] (Maybe (ModuleHead l)) |
Instances
data ModuleHeadAndImports l #
ModuleHeadAndImports l [ModulePragma l] (Maybe (ModuleHead l)) [ImportDecl l] |
Instances
Instances of Parseable
for NonGreedy a
will only consume the input
until a
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:
>>>
parse (unlines ("module A where" : "main =" : repeat "blah")) :: ParseResult PragmasAndModuleHead
ParseOk (NonGreedy {unNonGreedy = PragmasAndModuleHead [] (ModuleName "A",Nothing,Nothing)})
(this example uses the simplified AST)
NonGreedy | |
|
Instances
ListOf a
stores lists of the AST type a
, along with a SrcSpanInfo
,
in order to provide Parseable
instances for lists. These instances are
provided when the type is used as a list in the syntax, and the same
delimiters are used in all of its usages. Some exceptions are made:
ListOf SrcSpanInfo [a] |
Instances
Functor ListOf | |
Eq a => Eq (ListOf a) | |
Data a => Data (ListOf a) | |
Defined in Language.Haskell.Exts.Parser gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListOf a -> c (ListOf a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ListOf a) # toConstr :: ListOf a -> Constr # dataTypeOf :: ListOf a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ListOf a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ListOf a)) # gmapT :: (forall b. Data b => b -> b) -> ListOf a -> ListOf a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListOf a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListOf a -> r # gmapQ :: (forall d. Data d => d -> u) -> ListOf a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ListOf a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a) # | |
Ord a => Ord (ListOf a) | |
Defined in Language.Haskell.Exts.Parser | |
Show a => Show (ListOf a) | |
Parseable (NonGreedy (ListOf (ModulePragma SrcSpanInfo))) | |
Defined in Language.Haskell.Exts.Parser parse :: String -> ParseResult (NonGreedy (ListOf (ModulePragma SrcSpanInfo))) # parseWithMode :: ParseMode -> String -> ParseResult (NonGreedy (ListOf (ModulePragma SrcSpanInfo))) # parseWithComments :: ParseMode -> String -> ParseResult (NonGreedy (ListOf (ModulePragma SrcSpanInfo)), [Comment]) # parser :: Maybe [Fixity] -> P (NonGreedy (ListOf (ModulePragma SrcSpanInfo))) |
lexTokenStreamWithMode :: ParseMode -> String -> ParseResult [Loc Token] #
Lex a string into a list of Haskell source tokens, using an explicit mode.
lexTokenStream :: String -> ParseResult [Loc Token] #
Lex a string into a list of Haskell 2010 source tokens.
defaultParseMode :: ParseMode #
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 Prelude
.
fromParseResult :: ParseResult a -> a #
Retrieve the result of a successful parse, throwing an error if the parse is actually not successful.
Class providing function for parsing at many different types.
Note that for convenience of implementation, the default methods have
definitions equivalent to undefined
. The minimal definition is all of
the visible methods.
parser
parse :: String -> ParseResult ast #
Parse a string with default mode.
parseWithMode :: ParseMode -> String -> ParseResult ast #
Parse a string with an explicit ParseMode
.
parseWithComments :: ParseMode -> String -> ParseResult (ast, [Comment]) #
Parse a string with an explicit ParseMode
, returning all comments along
with the AST.
Instances
data ParseResult a #
The result of a parse.
ParseOk a | The parse succeeded, yielding a value. |
ParseFailed SrcLoc String | The parse failed at the specified source location, with an error message. |
Instances
Static parameters governing a parse.
Note that the various parse functions in Language.Haskell.Exts.Parser
never look at LANGUAGE pragmas, regardless of
what the ignoreLanguagePragmas
flag is set to.
Only the various parseFile
functions in Language.Haskell.Exts will
act on it, when set to False
.
ParseMode | |
|
associateHaddock :: (Annotated ast, Traversable ast) => (ast SrcSpanInfo, [Comment]) -> ast (SrcSpanInfo, [Comment]) #
Associates an AST with Source Span Information with relevant Haddock comments
Instances
Eq Comment | |
Data Comment | |
Defined in Language.Haskell.Exts.Comments gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Comment -> c Comment # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Comment # toConstr :: Comment -> Constr # dataTypeOf :: Comment -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Comment) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment) # gmapT :: (forall b. Data b => b -> b) -> Comment -> Comment # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r # gmapQ :: (forall d. Data d => d -> u) -> Comment -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Comment -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Comment -> m Comment # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment # | |
Show Comment | |
data UnknownPragma #
An unknown pragma.
Instances
baseFixities :: [Fixity] #
All fixities defined in the base package.
Note that the +++
operator appears in both Control.Arrows and
Text.ParserCombinators.ReadP. The listed precedence for +++
in
this list is that of Control.Arrows.
preludeFixities :: [Fixity] #
All fixities defined in the Prelude.
Operator fixities are represented by their associativity (left, right or none) and their precedence (0-9).
Instances
Eq Fixity | |
Data Fixity | |
Defined in Language.Haskell.Exts.Fixity gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Ord Fixity | |
Show Fixity | |
class AppFixity (ast :: Type -> Type) where #
All AST elements that may include expressions which in turn may need fixity tweaking will be instances of this class.
:: Monad m | |
=> [Fixity] | The fixities to account for. |
-> ast SrcSpanInfo | The element to tweak. |
-> m (ast SrcSpanInfo) | The same element, but with operator expressions updated, or a failure. |
Tweak any expressions in the element to account for the fixities given. Assumes that all operator expressions are fully left associative chains to begin with.
Instances
prettyPrimWithMode :: Pretty a => PPHsMode -> a -> Doc #
pretty-print with the default style and a given mode.
prettyPrim :: Pretty a => a -> Doc #
pretty-print with the default style and defaultMode
.
prettyPrint :: Pretty a => a -> String #
pretty-print with the default style and defaultMode
.
prettyPrintWithMode :: Pretty a => PPHsMode -> a -> String #
pretty-print with the default style and a given mode.
prettyPrintStyleMode :: Pretty a => Style -> PPHsMode -> a -> String #
render the document with a given mode. renderWithMode :: PPHsMode -> Doc -> String renderWithMode = renderStyleMode P.style
render the document with defaultMode
.
render :: Doc -> String
render = renderWithMode defaultMode
pretty-print with a given style and mode.
defaultMode :: PPHsMode #
The default mode: pretty-print using the offside rule and sensible defaults.
Varieties of layout we can use.
PPOffsideRule | classical layout |
PPSemiColon | classical layout made explicit |
PPInLine | inline decls, with newlines between them |
PPNoLayout | everything on a single line |
Pretty-printing parameters.
Note: the onsideIndent
must be positive and less than all other indents.
PPHsMode | |
|
Things that can be pretty-printed, including all the syntactic objects in Language.Haskell.Exts.Syntax.
Instances
(=~=) :: (Annotated a, Eq (a ())) => a l1 -> a l2 -> Bool #
Test if two AST elements are equal modulo annotations.
tuple_tycon :: l -> Boxed -> Int -> Type l #
unboxed_singleton_tycon :: l -> Type l #
list_tycon :: l -> Type l #
unit_tycon :: l -> Type l #
tuple_tycon_name :: l -> Boxed -> Int -> QName l #
unboxed_singleton_tycon_name :: l -> QName l #
list_tycon_name :: l -> QName l #
fun_tycon_name :: l -> QName l #
unit_tycon_name :: l -> QName l #
anyclass_name :: l -> Name l #
stock_name :: l -> Name l #
family_name :: l -> Name l #
forall_name :: l -> Name l #
javascript_name :: l -> Name l #
dotnet_name :: l -> Name l #
cplusplus_name :: l -> Name l #
ccall_name :: l -> Name l #
stdcall_name :: l -> Name l #
threadsafe_name :: l -> Name l #
interruptible_name :: l -> Name l #
unsafe_name :: l -> Name l #
export_name :: l -> Name l #
minus_name :: l -> Name l #
hiding_name :: l -> Name l #
qualified_name :: l -> Name l #
unboxed_singleton_con :: l -> Exp l #
unboxed_singleton_con_name :: l -> QName l #
list_cons_name :: l -> QName l #
tuple_con_name :: l -> Boxed -> Int -> QName l #
unit_con_name :: l -> QName l #
main_mod :: l -> ModuleName l #
prelude_mod :: l -> ModuleName l #
data ModuleName l #
The name of a Haskell module.
Instances
data SpecialCon l #
Constructors with special syntax. These names are never qualified, and always refer to builtin type or data constructors.
UnitCon l | unit type and data constructor |
ListCon l | list type constructor |
FunCon l | function type constructor |
TupleCon l Boxed Int | n-ary tuple type and data
constructors |
Cons l | list data constructor |
UnboxedSingleCon l | unboxed singleton tuple constructor |
ExprHole l | An expression hole _ |
Instances
This type is used to represent qualified variables, and also qualified constructors.
Qual l (ModuleName l) (Name l) | name qualified with a module name |
UnQual l (Name l) | unqualified local name |
Special l (SpecialCon l) | built-in constructor with special syntax |
Instances
This type is used to represent variables, and also constructors.
Instances
Functor Name | |
Foldable Name | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Name m -> m # foldMap :: Monoid m => (a -> m) -> Name a -> m # foldr :: (a -> b -> b) -> b -> Name a -> b # foldr' :: (a -> b -> b) -> b -> Name a -> b # foldl :: (b -> a -> b) -> b -> Name a -> b # foldl' :: (b -> a -> b) -> b -> Name a -> b # foldr1 :: (a -> a -> a) -> Name a -> a # foldl1 :: (a -> a -> a) -> Name a -> a # elem :: Eq a => a -> Name a -> Bool # maximum :: Ord a => Name a -> a # | |
Traversable Name | |
ExactP Name | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Name SrcSpanInfo -> EP () | |
Annotated Name | |
Convert Name (Name ()) Source # | |
Defined in Language.Haskell.Convert | |
Eq l => Eq (Name l) | |
Data l => Data (Name l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name l -> c (Name l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Name l) # toConstr :: Name l -> Constr # dataTypeOf :: Name l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Name l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Name l)) # gmapT :: (forall b. Data b => b -> b) -> Name l -> Name l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name l -> r # gmapQ :: (forall d. Data d => d -> u) -> Name l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Name l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name l -> m (Name l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name l -> m (Name l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name l -> m (Name l) # | |
Ord l => Ord (Name l) | |
Show l => Show (Name l) | |
Generic (Name l) | |
Pretty (Name l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Name l -> Doc | |
Convert (Name ()) Name Source # | |
Defined in Language.Haskell.Convert | |
Convert ([Name ()], Type ()) [VarStrictType] Source # | |
Defined in Language.Haskell.Convert conv :: ([Name ()], Type ()) -> [VarStrictType] | |
type Rep (Name l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Name l) = D1 (MetaData "Name" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "Ident" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "Symbol" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) |
An implicit parameter name.
Instances
Functor IPName | |
Foldable IPName | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => IPName m -> m # foldMap :: Monoid m => (a -> m) -> IPName a -> m # foldr :: (a -> b -> b) -> b -> IPName a -> b # foldr' :: (a -> b -> b) -> b -> IPName a -> b # foldl :: (b -> a -> b) -> b -> IPName a -> b # foldl' :: (b -> a -> b) -> b -> IPName a -> b # foldr1 :: (a -> a -> a) -> IPName a -> a # foldl1 :: (a -> a -> a) -> IPName a -> a # elem :: Eq a => a -> IPName a -> Bool # maximum :: Ord a => IPName a -> a # minimum :: Ord a => IPName a -> a # | |
Traversable IPName | |
ExactP IPName | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: IPName SrcSpanInfo -> EP () | |
Annotated IPName | |
Eq l => Eq (IPName l) | |
Data l => Data (IPName l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IPName l -> c (IPName l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IPName l) # toConstr :: IPName l -> Constr # dataTypeOf :: IPName l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IPName l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IPName l)) # gmapT :: (forall b. Data b => b -> b) -> IPName l -> IPName l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IPName l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IPName l -> r # gmapQ :: (forall d. Data d => d -> u) -> IPName l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IPName l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IPName l -> m (IPName l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IPName l -> m (IPName l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IPName l -> m (IPName l) # | |
Ord l => Ord (IPName l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (IPName l) | |
Generic (IPName l) | |
Pretty (IPName l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> IPName l -> Doc | |
type Rep (IPName l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (IPName l) = D1 (MetaData "IPName" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "IPDup" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "IPLin" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) |
Possibly qualified infix operators (qop), appearing in expressions.
Instances
Functor QOp | |
Foldable QOp | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => QOp m -> m # foldMap :: Monoid m => (a -> m) -> QOp a -> m # foldr :: (a -> b -> b) -> b -> QOp a -> b # foldr' :: (a -> b -> b) -> b -> QOp a -> b # foldl :: (b -> a -> b) -> b -> QOp a -> b # foldl' :: (b -> a -> b) -> b -> QOp a -> b # foldr1 :: (a -> a -> a) -> QOp a -> a # foldl1 :: (a -> a -> a) -> QOp a -> a # elem :: Eq a => a -> QOp a -> Bool # maximum :: Ord a => QOp a -> a # | |
Traversable QOp | |
ExactP QOp | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: QOp SrcSpanInfo -> EP () | |
Annotated QOp | |
Eq l => Eq (QOp l) | |
Data l => Data (QOp l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QOp l -> c (QOp l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (QOp l) # dataTypeOf :: QOp l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (QOp l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (QOp l)) # gmapT :: (forall b. Data b => b -> b) -> QOp l -> QOp l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QOp l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QOp l -> r # gmapQ :: (forall d. Data d => d -> u) -> QOp l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> QOp l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> QOp l -> m (QOp l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QOp l -> m (QOp l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QOp l -> m (QOp l) # | |
Ord l => Ord (QOp l) | |
Show l => Show (QOp l) | |
Generic (QOp l) | |
Pretty (QOp l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> QOp l -> Doc | |
Convert (QOp ()) Exp Source # | |
Defined in Language.Haskell.Convert | |
type Rep (QOp l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (QOp l) = D1 (MetaData "QOp" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "QVarOp" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (QName l))) :+: C1 (MetaCons "QConOp" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (QName l)))) |
Operators appearing in infix
declarations are never qualified.
Instances
Functor Op | |
Foldable Op | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Op m -> m # foldMap :: Monoid m => (a -> m) -> Op a -> m # foldr :: (a -> b -> b) -> b -> Op a -> b # foldr' :: (a -> b -> b) -> b -> Op a -> b # foldl :: (b -> a -> b) -> b -> Op a -> b # foldl' :: (b -> a -> b) -> b -> Op a -> b # foldr1 :: (a -> a -> a) -> Op a -> a # foldl1 :: (a -> a -> a) -> Op a -> a # elem :: Eq a => a -> Op a -> Bool # maximum :: Ord a => Op a -> a # | |
Traversable Op | |
ExactP Op | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Op SrcSpanInfo -> EP () | |
Annotated Op | |
Eq l => Eq (Op l) | |
Data l => Data (Op l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Op l -> c (Op l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Op l) # dataTypeOf :: Op l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Op l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Op l)) # gmapT :: (forall b. Data b => b -> b) -> Op l -> Op l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op l -> r # gmapQ :: (forall d. Data d => d -> u) -> Op l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Op l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Op l -> m (Op l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Op l -> m (Op l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Op l -> m (Op l) # | |
Ord l => Ord (Op l) | |
Show l => Show (Op l) | |
Generic (Op l) | |
Pretty (Op l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Op l -> Doc | |
type Rep (Op l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Op l) = D1 (MetaData "Op" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "VarOp" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Name l))) :+: C1 (MetaCons "ConOp" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Name l)))) |
A name (cname) of a component of a class or data type in an import
or export specification.
Instances
Functor CName | |
Foldable CName | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => CName m -> m # foldMap :: Monoid m => (a -> m) -> CName a -> m # foldr :: (a -> b -> b) -> b -> CName a -> b # foldr' :: (a -> b -> b) -> b -> CName a -> b # foldl :: (b -> a -> b) -> b -> CName a -> b # foldl' :: (b -> a -> b) -> b -> CName a -> b # foldr1 :: (a -> a -> a) -> CName a -> a # foldl1 :: (a -> a -> a) -> CName a -> a # elem :: Eq a => a -> CName a -> Bool # maximum :: Ord a => CName a -> a # minimum :: Ord a => CName a -> a # | |
Traversable CName | |
ExactP CName | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: CName SrcSpanInfo -> EP () | |
Annotated CName | |
Eq l => Eq (CName l) | |
Data l => Data (CName l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CName l -> c (CName l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CName l) # toConstr :: CName l -> Constr # dataTypeOf :: CName l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CName l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CName l)) # gmapT :: (forall b. Data b => b -> b) -> CName l -> CName l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CName l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CName l -> r # gmapQ :: (forall d. Data d => d -> u) -> CName l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CName l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CName l -> m (CName l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CName l -> m (CName l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CName l -> m (CName l) # | |
Ord l => Ord (CName l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (CName l) | |
Generic (CName l) | |
Pretty (CName l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> CName l -> Doc | |
type Rep (CName l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (CName l) = D1 (MetaData "CName" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "VarName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Name l))) :+: C1 (MetaCons "ConName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Name l)))) |
A complete Haskell source module.
Module l (Maybe (ModuleHead l)) [ModulePragma l] [ImportDecl l] [Decl l] | an ordinary Haskell module |
XmlPage l (ModuleName l) [ModulePragma l] (XName l) [XAttr l] (Maybe (Exp l)) [Exp l] | a module consisting of a single XML document. The ModuleName never appears in the source but is needed for semantic purposes, it will be the same as the file name. |
XmlHybrid l (Maybe (ModuleHead l)) [ModulePragma l] [ImportDecl l] [Decl l] (XName l) [XAttr l] (Maybe (Exp l)) [Exp l] | a hybrid module combining an XML document with an ordinary module |
Instances
data ModuleHead l #
The head of a module, including the name and export specification.
ModuleHead l (ModuleName l) (Maybe (WarningText l)) (Maybe (ExportSpecList l)) |
Instances
data ExportSpecList l #
An explicit export specification.
ExportSpecList l [ExportSpec l] |
Instances
data ExportSpec l #
An item in a module's export specification.
EVar l (QName l) | variable. |
EAbs l (Namespace l) (QName l) |
|
EThingWith l (EWildcard l) (QName l) [CName l] |
|
EModuleContents l (ModuleName l) |
|
Instances
Indicates the position of the wildcard in an export list
NoWildcard l | |
EWildcard l Int |
Instances
Functor EWildcard | |
Foldable EWildcard | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => EWildcard m -> m # foldMap :: Monoid m => (a -> m) -> EWildcard a -> m # foldr :: (a -> b -> b) -> b -> EWildcard a -> b # foldr' :: (a -> b -> b) -> b -> EWildcard a -> b # foldl :: (b -> a -> b) -> b -> EWildcard a -> b # foldl' :: (b -> a -> b) -> b -> EWildcard a -> b # foldr1 :: (a -> a -> a) -> EWildcard a -> a # foldl1 :: (a -> a -> a) -> EWildcard a -> a # toList :: EWildcard a -> [a] # length :: EWildcard a -> Int # elem :: Eq a => a -> EWildcard a -> Bool # maximum :: Ord a => EWildcard a -> a # minimum :: Ord a => EWildcard a -> a # | |
Traversable EWildcard | |
Defined in Language.Haskell.Exts.Syntax | |
Annotated EWildcard | |
Eq l => Eq (EWildcard l) | |
Data l => Data (EWildcard l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EWildcard l -> c (EWildcard l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (EWildcard l) # toConstr :: EWildcard l -> Constr # dataTypeOf :: EWildcard l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (EWildcard l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (EWildcard l)) # gmapT :: (forall b. Data b => b -> b) -> EWildcard l -> EWildcard l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EWildcard l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EWildcard l -> r # gmapQ :: (forall d. Data d => d -> u) -> EWildcard l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EWildcard l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EWildcard l -> m (EWildcard l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EWildcard l -> m (EWildcard l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EWildcard l -> m (EWildcard l) # | |
Ord l => Ord (EWildcard l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (EWildcard l) | |
Generic (EWildcard l) | |
type Rep (EWildcard l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (EWildcard l) = D1 (MetaData "EWildcard" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "NoWildcard" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "EWildcard" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) |
Namespaces for imports/exports.
Instances
Functor Namespace | |
Foldable Namespace | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Namespace m -> m # foldMap :: Monoid m => (a -> m) -> Namespace a -> m # foldr :: (a -> b -> b) -> b -> Namespace a -> b # foldr' :: (a -> b -> b) -> b -> Namespace a -> b # foldl :: (b -> a -> b) -> b -> Namespace a -> b # foldl' :: (b -> a -> b) -> b -> Namespace a -> b # foldr1 :: (a -> a -> a) -> Namespace a -> a # foldl1 :: (a -> a -> a) -> Namespace a -> a # toList :: Namespace a -> [a] # length :: Namespace a -> Int # elem :: Eq a => a -> Namespace a -> Bool # maximum :: Ord a => Namespace a -> a # minimum :: Ord a => Namespace a -> a # | |
Traversable Namespace | |
Defined in Language.Haskell.Exts.Syntax | |
ExactP Namespace | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Namespace SrcSpanInfo -> EP () | |
Annotated Namespace | |
Eq l => Eq (Namespace l) | |
Data l => Data (Namespace l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Namespace l -> c (Namespace l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Namespace l) # toConstr :: Namespace l -> Constr # dataTypeOf :: Namespace l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Namespace l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Namespace l)) # gmapT :: (forall b. Data b => b -> b) -> Namespace l -> Namespace l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Namespace l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Namespace l -> r # gmapQ :: (forall d. Data d => d -> u) -> Namespace l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Namespace l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Namespace l -> m (Namespace l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Namespace l -> m (Namespace l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Namespace l -> m (Namespace l) # | |
Ord l => Ord (Namespace l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (Namespace l) | |
Generic (Namespace l) | |
Pretty (Namespace l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Namespace l -> Doc | |
type Rep (Namespace l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Namespace l) = D1 (MetaData "Namespace" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "NoNamespace" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: (C1 (MetaCons "TypeNamespace" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "PatternNamespace" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)))) |
data ImportDecl l #
An import declaration.
ImportDecl | |
|
Instances
data ImportSpecList l #
An explicit import specification list.
ImportSpecList l Bool [ImportSpec l] |
Instances
data ImportSpec l #
An import specification, representing a single explicit item imported (or hidden) from a module.
IVar l (Name l) | variable |
IAbs l (Namespace l) (Name l) |
|
IThingAll l (Name l) |
|
IThingWith l (Name l) [CName l] |
|
Instances
Associativity of an operator.
AssocNone l | non-associative operator (declared with |
AssocLeft l | left-associative operator (declared with |
AssocRight l | right-associative operator (declared with |
Instances
Functor Assoc | |
Foldable Assoc | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Assoc m -> m # foldMap :: Monoid m => (a -> m) -> Assoc a -> m # foldr :: (a -> b -> b) -> b -> Assoc a -> b # foldr' :: (a -> b -> b) -> b -> Assoc a -> b # foldl :: (b -> a -> b) -> b -> Assoc a -> b # foldl' :: (b -> a -> b) -> b -> Assoc a -> b # foldr1 :: (a -> a -> a) -> Assoc a -> a # foldl1 :: (a -> a -> a) -> Assoc a -> a # elem :: Eq a => a -> Assoc a -> Bool # maximum :: Ord a => Assoc a -> a # minimum :: Ord a => Assoc a -> a # | |
Traversable Assoc | |
ExactP Assoc | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Assoc SrcSpanInfo -> EP () | |
Annotated Assoc | |
Eq l => Eq (Assoc l) | |
Data l => Data (Assoc l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Assoc l -> c (Assoc l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Assoc l) # toConstr :: Assoc l -> Constr # dataTypeOf :: Assoc l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Assoc l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Assoc l)) # gmapT :: (forall b. Data b => b -> b) -> Assoc l -> Assoc l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Assoc l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Assoc l -> r # gmapQ :: (forall d. Data d => d -> u) -> Assoc l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Assoc l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Assoc l -> m (Assoc l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Assoc l -> m (Assoc l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Assoc l -> m (Assoc l) # | |
Ord l => Ord (Assoc l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (Assoc l) | |
Generic (Assoc l) | |
Pretty (Assoc l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Assoc l -> Doc | |
type Rep (Assoc l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Assoc l) = D1 (MetaData "Assoc" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "AssocNone" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: (C1 (MetaCons "AssocLeft" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "AssocRight" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)))) |
A top-level declaration.
TypeDecl l (DeclHead l) (Type l) | A type declaration |
TypeFamDecl l (DeclHead l) (Maybe (ResultSig l)) (Maybe (InjectivityInfo l)) | A type family declaration |
ClosedTypeFamDecl l (DeclHead l) (Maybe (ResultSig l)) (Maybe (InjectivityInfo l)) [TypeEqn l] | A closed type family declaration |
DataDecl l (DataOrNew l) (Maybe (Context l)) (DeclHead l) [QualConDecl l] [Deriving l] | A data OR newtype declaration |
GDataDecl l (DataOrNew l) (Maybe (Context l)) (DeclHead l) (Maybe (Kind l)) [GadtDecl l] [Deriving l] | A data OR newtype declaration, GADT style |
DataFamDecl l (Maybe (Context l)) (DeclHead l) (Maybe (ResultSig l)) | A data family declaration |
TypeInsDecl l (Type l) (Type l) | A type family instance declaration |
DataInsDecl l (DataOrNew l) (Type l) [QualConDecl l] [Deriving l] | A data family instance declaration |
GDataInsDecl l (DataOrNew l) (Type l) (Maybe (Kind l)) [GadtDecl l] [Deriving l] | A data family instance declaration, GADT style |
ClassDecl l (Maybe (Context l)) (DeclHead l) [FunDep l] (Maybe [ClassDecl l]) | A declaration of a type class |
InstDecl l (Maybe (Overlap l)) (InstRule l) (Maybe [InstDecl l]) | An declaration of a type class instance |
DerivDecl l (Maybe (DerivStrategy l)) (Maybe (Overlap l)) (InstRule l) | A standalone deriving declaration |
InfixDecl l (Assoc l) (Maybe Int) [Op l] | A declaration of operator fixity |
DefaultDecl l [Type l] | A declaration of default types |
SpliceDecl l (Exp l) | A Template Haskell splicing declaration |
TypeSig l [Name l] (Type l) | A type signature declaration |
PatSynSig l [Name l] (Maybe [TyVarBind l]) (Maybe (Context l)) (Maybe (Context l)) (Type l) | A pattern synonym signature declation |
FunBind l [Match l] | A set of function binding clauses |
PatBind l (Pat l) (Rhs l) (Maybe (Binds l)) | A pattern binding |
PatSyn l (Pat l) (Pat l) (PatternSynDirection l) | A pattern synonym binding |
ForImp l (CallConv l) (Maybe (Safety l)) (Maybe String) (Name l) (Type l) | A foreign import declaration |
ForExp l (CallConv l) (Maybe String) (Name l) (Type l) | A foreign export declaration |
RulePragmaDecl l [Rule l] | A RULES pragma |
DeprPragmaDecl l [([Name l], String)] | A DEPRECATED pragma |
WarnPragmaDecl l [([Name l], String)] | A WARNING pragma |
InlineSig l Bool (Maybe (Activation l)) (QName l) | An INLINE pragma |
InlineConlikeSig l (Maybe (Activation l)) (QName l) | An INLINE CONLIKE pragma |
SpecSig l (Maybe (Activation l)) (QName l) [Type l] | A SPECIALISE pragma |
SpecInlineSig l Bool (Maybe (Activation l)) (QName l) [Type l] | A SPECIALISE INLINE pragma |
InstSig l (InstRule l) | A SPECIALISE instance pragma |
AnnPragma l (Annotation l) | An ANN pragma |
MinimalPragma l (Maybe (BooleanFormula l)) | A MINIMAL pragma |
RoleAnnotDecl l (QName l) [Role l] | A role annotation |
CompletePragma l [Name l] (Maybe (QName l)) | A COMPLETE pragma |
Instances
data PatternSynDirection l #
Unidirectional | A unidirectional pattern synonym with "<-" |
ImplicitBidirectional | A bidirectional pattern synonym with "=" |
ExplicitBidirectional l [Decl l] | A birectional pattern synonym with the construction specified. |
Instances
A type equation as found in closed type families.
Instances
Functor TypeEqn | |
Foldable TypeEqn | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => TypeEqn m -> m # foldMap :: Monoid m => (a -> m) -> TypeEqn a -> m # foldr :: (a -> b -> b) -> b -> TypeEqn a -> b # foldr' :: (a -> b -> b) -> b -> TypeEqn a -> b # foldl :: (b -> a -> b) -> b -> TypeEqn a -> b # foldl' :: (b -> a -> b) -> b -> TypeEqn a -> b # foldr1 :: (a -> a -> a) -> TypeEqn a -> a # foldl1 :: (a -> a -> a) -> TypeEqn a -> a # elem :: Eq a => a -> TypeEqn a -> Bool # maximum :: Ord a => TypeEqn a -> a # minimum :: Ord a => TypeEqn a -> a # | |
Traversable TypeEqn | |
ExactP TypeEqn | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: TypeEqn SrcSpanInfo -> EP () | |
Annotated TypeEqn | |
Eq l => Eq (TypeEqn l) | |
Data l => Data (TypeEqn l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TypeEqn l -> c (TypeEqn l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TypeEqn l) # toConstr :: TypeEqn l -> Constr # dataTypeOf :: TypeEqn l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (TypeEqn l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TypeEqn l)) # gmapT :: (forall b. Data b => b -> b) -> TypeEqn l -> TypeEqn l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypeEqn l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypeEqn l -> r # gmapQ :: (forall d. Data d => d -> u) -> TypeEqn l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeEqn l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypeEqn l -> m (TypeEqn l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeEqn l -> m (TypeEqn l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeEqn l -> m (TypeEqn l) # | |
Ord l => Ord (TypeEqn l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (TypeEqn l) | |
Generic (TypeEqn l) | |
Pretty (TypeEqn l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> TypeEqn l -> Doc | |
type Rep (TypeEqn l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (TypeEqn l) = D1 (MetaData "TypeEqn" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "TypeEqn" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Type l)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Type l))))) |
data Annotation l #
An annotation through an ANN pragma.
Ann l (Name l) (Exp l) | An annotation for a declared name. |
TypeAnn l (Name l) (Exp l) | An annotation for a declared type. |
ModuleAnn l (Exp l) | An annotation for the defining module. |
Instances
data BooleanFormula l #
A boolean formula for MINIMAL pragmas.
VarFormula l (Name l) | A variable. |
AndFormula l [BooleanFormula l] | And boolean formulas. |
OrFormula l [BooleanFormula l] | Or boolean formulas. |
ParenFormula l (BooleanFormula l) | Parenthesized boolean formulas. |
Instances
Nominal l | |
Representational l | |
Phantom l | |
RoleWildcard l |
Instances
Functor Role | |
Foldable Role | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Role m -> m # foldMap :: Monoid m => (a -> m) -> Role a -> m # foldr :: (a -> b -> b) -> b -> Role a -> b # foldr' :: (a -> b -> b) -> b -> Role a -> b # foldl :: (b -> a -> b) -> b -> Role a -> b # foldl' :: (b -> a -> b) -> b -> Role a -> b # foldr1 :: (a -> a -> a) -> Role a -> a # foldl1 :: (a -> a -> a) -> Role a -> a # elem :: Eq a => a -> Role a -> Bool # maximum :: Ord a => Role a -> a # | |
Traversable Role | |
ExactP Role | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Role SrcSpanInfo -> EP () | |
Annotated Role | |
Eq l => Eq (Role l) | |
Data l => Data (Role l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role l -> c (Role l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Role l) # toConstr :: Role l -> Constr # dataTypeOf :: Role l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Role l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Role l)) # gmapT :: (forall b. Data b => b -> b) -> Role l -> Role l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role l -> r # gmapQ :: (forall d. Data d => d -> u) -> Role l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role l -> m (Role l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role l -> m (Role l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role l -> m (Role l) # | |
Ord l => Ord (Role l) | |
Show l => Show (Role l) | |
Generic (Role l) | |
Pretty (Role l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Role l -> Doc | |
type Rep (Role l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Role l) = D1 (MetaData "Role" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) ((C1 (MetaCons "Nominal" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "Representational" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l))) :+: (C1 (MetaCons "Phantom" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "RoleWildcard" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)))) |
A flag stating whether a declaration is a data or newtype declaration.
Instances
Functor DataOrNew | |
Foldable DataOrNew | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => DataOrNew m -> m # foldMap :: Monoid m => (a -> m) -> DataOrNew a -> m # foldr :: (a -> b -> b) -> b -> DataOrNew a -> b # foldr' :: (a -> b -> b) -> b -> DataOrNew a -> b # foldl :: (b -> a -> b) -> b -> DataOrNew a -> b # foldl' :: (b -> a -> b) -> b -> DataOrNew a -> b # foldr1 :: (a -> a -> a) -> DataOrNew a -> a # foldl1 :: (a -> a -> a) -> DataOrNew a -> a # toList :: DataOrNew a -> [a] # length :: DataOrNew a -> Int # elem :: Eq a => a -> DataOrNew a -> Bool # maximum :: Ord a => DataOrNew a -> a # minimum :: Ord a => DataOrNew a -> a # | |
Traversable DataOrNew | |
Defined in Language.Haskell.Exts.Syntax | |
ExactP DataOrNew | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: DataOrNew SrcSpanInfo -> EP () | |
Annotated DataOrNew | |
Eq l => Eq (DataOrNew l) | |
Data l => Data (DataOrNew l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataOrNew l -> c (DataOrNew l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataOrNew l) # toConstr :: DataOrNew l -> Constr # dataTypeOf :: DataOrNew l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DataOrNew l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DataOrNew l)) # gmapT :: (forall b. Data b => b -> b) -> DataOrNew l -> DataOrNew l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataOrNew l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataOrNew l -> r # gmapQ :: (forall d. Data d => d -> u) -> DataOrNew l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataOrNew l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataOrNew l -> m (DataOrNew l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataOrNew l -> m (DataOrNew l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataOrNew l -> m (DataOrNew l) # | |
Ord l => Ord (DataOrNew l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (DataOrNew l) | |
Generic (DataOrNew l) | |
Pretty (DataOrNew l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> DataOrNew l -> Doc | |
type Rep (DataOrNew l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (DataOrNew l) = D1 (MetaData "DataOrNew" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "DataType" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "NewType" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l))) |
data InjectivityInfo l #
Injectivity info for injective type families
InjectivityInfo l (Name l) [Name l] |
Instances
Instances
The head of a type or class declaration, which consists of the type or class name applied to some type variables
class C a b
is represented as
DHApp () (DHApp () (DHead () (Ident () "C")) (UnkindedVar () (Ident () "a"))) (UnkindedVar () (Ident () "b"))
(where the annotation type l
is instantiated with ()
)
class (a :< b) c
is represented as
DHApp () (DHParen () (DHApp () (DHInfix () (UnkindedVar () (Ident () "a")) (Symbol () ":<")) (UnkindedVar () (Ident () "b")))) (UnkindedVar () (Ident () "c"))
DHead l (Name l) | type or class name |
DHInfix l (TyVarBind l) (Name l) | infix application of the type/class name to the left operand |
DHParen l (DeclHead l) | parenthesized declaration head |
DHApp l (DeclHead l) (TyVarBind l) | application to one more type variable |
Instances
The instance declaration rule, which is, roughly, the part of the instance declaration before the where
keyword.
Example: instance Ord a => Ord (Maybe a)
is represented as
IRule () Nothing (Just (CxSingle () (ClassA () (UnQual () (Ident () "Ord")) [ TyVar () (Ident () "a") ]))) (IHApp () (IHCon () (UnQual () (Ident () "Ord"))) (TyParen () (TyApp () (TyCon () (UnQual () (Ident () "Maybe"))) (TyVar () (Ident () "a")))))
An optional explicit forall after instance
is supported:
instance forall a . Ord a => Ord (Maybe a) where
becomes
IRule () (Just [ UnkindedVar () (Ident () "a") ]) ...
Instances
The instance head. The split between rule/head allow us to represent
instance (Bounded a => Bounded [a]) where
faithfully.
The structure of InstHead
follows one of DeclHead
.
For example, instance C (Maybe a) Int where
is represented as
IHApp () (IHApp () (IHCon () (UnQual () (Ident () "C"))) (TyParen () (TyApp () (TyCon () (UnQual () (Ident () "Maybe"))) (TyVar () (Ident () "a"))))) (TyCon () (UnQual () (Ident () "Int")))))
IHCon l (QName l) | type or class name |
IHInfix l (Type l) (QName l) | infix application of the type/class name to the left operand |
IHParen l (InstHead l) | parenthesized instance head |
IHApp l (InstHead l) (Type l) | application to one more type |
Instances
A deriving clause following a data type declaration.
Deriving l (Maybe (DerivStrategy l)) [InstRule l] |
Instances
Functor Deriving | |
Foldable Deriving | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Deriving m -> m # foldMap :: Monoid m => (a -> m) -> Deriving a -> m # foldr :: (a -> b -> b) -> b -> Deriving a -> b # foldr' :: (a -> b -> b) -> b -> Deriving a -> b # foldl :: (b -> a -> b) -> b -> Deriving a -> b # foldl' :: (b -> a -> b) -> b -> Deriving a -> b # foldr1 :: (a -> a -> a) -> Deriving a -> a # foldl1 :: (a -> a -> a) -> Deriving a -> a # elem :: Eq a => a -> Deriving a -> Bool # maximum :: Ord a => Deriving a -> a # minimum :: Ord a => Deriving a -> a # | |
Traversable Deriving | |
ExactP Deriving | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Deriving SrcSpanInfo -> EP () | |
Annotated Deriving | |
Eq l => Eq (Deriving l) | |
Data l => Data (Deriving l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Deriving l -> c (Deriving l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Deriving l) # toConstr :: Deriving l -> Constr # dataTypeOf :: Deriving l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Deriving l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Deriving l)) # gmapT :: (forall b. Data b => b -> b) -> Deriving l -> Deriving l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Deriving l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Deriving l -> r # gmapQ :: (forall d. Data d => d -> u) -> Deriving l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Deriving l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Deriving l -> m (Deriving l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Deriving l -> m (Deriving l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Deriving l -> m (Deriving l) # | |
Ord l => Ord (Deriving l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (Deriving l) | |
Generic (Deriving l) | |
Pretty (Deriving l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Deriving l -> Doc | |
type Rep (Deriving l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Deriving l) = D1 (MetaData "Deriving" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "Deriving" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (DerivStrategy l))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [InstRule l])))) |
data DerivStrategy l #
Which technique the user explicitly requested when deriving an instance.
DerivStock l | GHC's "standard" strategy, which is to implement a
custom instance for the data type. This only works for
certain types that GHC knows about (e.g., |
DerivAnyclass l | -XDeriveAnyClass |
DerivNewtype l | -XGeneralizedNewtypeDeriving |
Instances
A binding group inside a let
or where
clause.
BDecls l [Decl l] | An ordinary binding group |
IPBinds l [IPBind l] | A binding group for implicit parameters |
Instances
Functor Binds | |
Foldable Binds | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Binds m -> m # foldMap :: Monoid m => (a -> m) -> Binds a -> m # foldr :: (a -> b -> b) -> b -> Binds a -> b # foldr' :: (a -> b -> b) -> b -> Binds a -> b # foldl :: (b -> a -> b) -> b -> Binds a -> b # foldl' :: (b -> a -> b) -> b -> Binds a -> b # foldr1 :: (a -> a -> a) -> Binds a -> a # foldl1 :: (a -> a -> a) -> Binds a -> a # elem :: Eq a => a -> Binds a -> Bool # maximum :: Ord a => Binds a -> a # minimum :: Ord a => Binds a -> a # | |
Traversable Binds | |
ExactP Binds | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Binds SrcSpanInfo -> EP () | |
AppFixity Binds | |
Defined in Language.Haskell.Exts.Fixity applyFixities :: Monad m => [Fixity] -> Binds SrcSpanInfo -> m (Binds SrcSpanInfo) # | |
Annotated Binds | |
Eq l => Eq (Binds l) | |
Data l => Data (Binds l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Binds l -> c (Binds l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Binds l) # toConstr :: Binds l -> Constr # dataTypeOf :: Binds l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Binds l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Binds l)) # gmapT :: (forall b. Data b => b -> b) -> Binds l -> Binds l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Binds l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Binds l -> r # gmapQ :: (forall d. Data d => d -> u) -> Binds l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Binds l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Binds l -> m (Binds l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Binds l -> m (Binds l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Binds l -> m (Binds l) # | |
Ord l => Ord (Binds l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (Binds l) | |
Generic (Binds l) | |
Convert (Maybe (Binds ())) [Dec] Source # | |
Defined in Language.Haskell.Convert | |
Convert (Binds ()) [Dec] Source # | |
Defined in Language.Haskell.Convert | |
type Rep (Binds l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Binds l) = D1 (MetaData "Binds" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "BDecls" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Decl l])) :+: C1 (MetaCons "IPBinds" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [IPBind l]))) |
A binding of an implicit parameter.
Instances
Functor IPBind | |
Foldable IPBind | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => IPBind m -> m # foldMap :: Monoid m => (a -> m) -> IPBind a -> m # foldr :: (a -> b -> b) -> b -> IPBind a -> b # foldr' :: (a -> b -> b) -> b -> IPBind a -> b # foldl :: (b -> a -> b) -> b -> IPBind a -> b # foldl' :: (b -> a -> b) -> b -> IPBind a -> b # foldr1 :: (a -> a -> a) -> IPBind a -> a # foldl1 :: (a -> a -> a) -> IPBind a -> a # elem :: Eq a => a -> IPBind a -> Bool # maximum :: Ord a => IPBind a -> a # minimum :: Ord a => IPBind a -> a # | |
Traversable IPBind | |
ExactP IPBind | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: IPBind SrcSpanInfo -> EP () | |
AppFixity IPBind | |
Defined in Language.Haskell.Exts.Fixity applyFixities :: Monad m => [Fixity] -> IPBind SrcSpanInfo -> m (IPBind SrcSpanInfo) # | |
Annotated IPBind | |
Eq l => Eq (IPBind l) | |
Data l => Data (IPBind l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IPBind l -> c (IPBind l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IPBind l) # toConstr :: IPBind l -> Constr # dataTypeOf :: IPBind l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IPBind l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IPBind l)) # gmapT :: (forall b. Data b => b -> b) -> IPBind l -> IPBind l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IPBind l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IPBind l -> r # gmapQ :: (forall d. Data d => d -> u) -> IPBind l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IPBind l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IPBind l -> m (IPBind l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IPBind l -> m (IPBind l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IPBind l -> m (IPBind l) # | |
Ord l => Ord (IPBind l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (IPBind l) | |
Generic (IPBind l) | |
Pretty (IPBind l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> IPBind l -> Doc | |
PrettyDeclLike (IPBind l) | |
Defined in Language.Haskell.Exts.Pretty wantsBlankline :: IPBind l -> Bool | |
type Rep (IPBind l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (IPBind l) = D1 (MetaData "IPBind" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "IPBind" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (IPName l)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Exp l))))) |
Clauses of a function binding.
Match l (Name l) [Pat l] (Rhs l) (Maybe (Binds l)) | A clause defined with prefix notation, i.e. the function name followed by its argument patterns, the right-hand side and an optional where clause. |
InfixMatch l (Pat l) (Name l) [Pat l] (Rhs l) (Maybe (Binds l)) | A clause defined with infix notation, i.e. first its first argument pattern, then the function name, then its following argument(s), the right-hand side and an optional where clause. Note that there can be more than two arguments to a function declared infix, hence the list of pattern arguments. |
Instances
data QualConDecl l #
A single constructor declaration within a data type declaration, which may have an existential quantification binding.
Instances
Declaration of an ordinary data constructor.
ConDecl l (Name l) [Type l] | ordinary data constructor |
InfixConDecl l (Type l) (Name l) (Type l) | infix data constructor |
RecDecl l (Name l) [FieldDecl l] | record constructor |
Instances
A single constructor declaration in a GADT data type declaration.
If the GADT is declared using the record syntax, e.g.
data Ty where TCon :: { field1 :: Int, field2 :: Bool } -> Ty
then the fields are stored as a list of FieldDecl
s, and the final type
(Ty
in the above example) is stored in the last Type
field.
If the GADT is declared using the ordinary syntax, e.g.
data Ty where TCon :: Int -> Bool -> Ty
then
is Maybe
[FieldDecl
l]Nothing
, and the whole constructor's
type (such as Int -> Bool -> Ty
) is stored in the last Type
field.
Instances
Functor GadtDecl | |
Foldable GadtDecl | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => GadtDecl m -> m # foldMap :: Monoid m => (a -> m) -> GadtDecl a -> m # foldr :: (a -> b -> b) -> b -> GadtDecl a -> b # foldr' :: (a -> b -> b) -> b -> GadtDecl a -> b # foldl :: (b -> a -> b) -> b -> GadtDecl a -> b # foldl' :: (b -> a -> b) -> b -> GadtDecl a -> b # foldr1 :: (a -> a -> a) -> GadtDecl a -> a # foldl1 :: (a -> a -> a) -> GadtDecl a -> a # elem :: Eq a => a -> GadtDecl a -> Bool # maximum :: Ord a => GadtDecl a -> a # minimum :: Ord a => GadtDecl a -> a # | |
Traversable GadtDecl | |
ExactP GadtDecl | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: GadtDecl SrcSpanInfo -> EP () | |
Annotated GadtDecl | |
Eq l => Eq (GadtDecl l) | |
Data l => Data (GadtDecl l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GadtDecl l -> c (GadtDecl l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GadtDecl l) # toConstr :: GadtDecl l -> Constr # dataTypeOf :: GadtDecl l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GadtDecl l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GadtDecl l)) # gmapT :: (forall b. Data b => b -> b) -> GadtDecl l -> GadtDecl l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GadtDecl l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GadtDecl l -> r # gmapQ :: (forall d. Data d => d -> u) -> GadtDecl l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GadtDecl l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GadtDecl l -> m (GadtDecl l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GadtDecl l -> m (GadtDecl l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GadtDecl l -> m (GadtDecl l) # | |
Ord l => Ord (GadtDecl l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (GadtDecl l) | |
Generic (GadtDecl l) | |
Pretty (GadtDecl l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> GadtDecl l -> Doc | |
type Rep (GadtDecl l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (GadtDecl l) = D1 (MetaData "GadtDecl" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "GadtDecl" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Name l))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [FieldDecl l])) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Type l))))) |
Declarations inside a class declaration.
ClsDecl l (Decl l) | ordinary declaration |
ClsDataFam l (Maybe (Context l)) (DeclHead l) (Maybe (ResultSig l)) | declaration of an associated data type |
ClsTyFam l (DeclHead l) (Maybe (ResultSig l)) (Maybe (InjectivityInfo l)) | declaration of an associated type synonym |
ClsTyDef l (TypeEqn l) | default choice for an associated type synonym |
ClsDefSig l (Name l) (Type l) | default signature |
Instances
Declarations inside an instance declaration.
InsDecl l (Decl l) | ordinary declaration |
InsType l (Type l) (Type l) | an associated type definition |
InsData l (DataOrNew l) (Type l) [QualConDecl l] [Deriving l] | an associated data type implementation |
InsGData l (DataOrNew l) (Type l) (Maybe (Kind l)) [GadtDecl l] [Deriving l] | an associated data type implemented using GADT style |
Instances
The type of a constructor argument or field, optionally including a strictness annotation.
BangedTy l | strict component, marked with " |
LazyTy l | lazy component, marked with " |
NoStrictAnnot l | No strictness information |
Instances
Functor BangType | |
Foldable BangType | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => BangType m -> m # foldMap :: Monoid m => (a -> m) -> BangType a -> m # foldr :: (a -> b -> b) -> b -> BangType a -> b # foldr' :: (a -> b -> b) -> b -> BangType a -> b # foldl :: (b -> a -> b) -> b -> BangType a -> b # foldl' :: (b -> a -> b) -> b -> BangType a -> b # foldr1 :: (a -> a -> a) -> BangType a -> a # foldl1 :: (a -> a -> a) -> BangType a -> a # elem :: Eq a => a -> BangType a -> Bool # maximum :: Ord a => BangType a -> a # minimum :: Ord a => BangType a -> a # | |
Traversable BangType | |
ExactP BangType | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: BangType SrcSpanInfo -> EP () | |
Annotated BangType | |
Eq l => Eq (BangType l) | |
Data l => Data (BangType l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BangType l -> c (BangType l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (BangType l) # toConstr :: BangType l -> Constr # dataTypeOf :: BangType l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (BangType l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (BangType l)) # gmapT :: (forall b. Data b => b -> b) -> BangType l -> BangType l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BangType l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BangType l -> r # gmapQ :: (forall d. Data d => d -> u) -> BangType l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BangType l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BangType l -> m (BangType l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BangType l -> m (BangType l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BangType l -> m (BangType l) # | |
Ord l => Ord (BangType l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (BangType l) | |
Generic (BangType l) | |
Pretty (BangType l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> BangType l -> Doc | |
type Rep (BangType l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (BangType l) = D1 (MetaData "BangType" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "BangedTy" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: (C1 (MetaCons "LazyTy" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "NoStrictAnnot" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)))) |
data Unpackedness l #
Unpack l | " |
NoUnpack l | " |
NoUnpackPragma l | No unpack pragma |
Instances
The right hand side of a function binding, pattern binding, or a case alternative.
UnGuardedRhs l (Exp l) | unguarded right hand side (exp) |
GuardedRhss l [GuardedRhs l] | guarded right hand side (gdrhs) |
Instances
Functor Rhs | |
Foldable Rhs | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Rhs m -> m # foldMap :: Monoid m => (a -> m) -> Rhs a -> m # foldr :: (a -> b -> b) -> b -> Rhs a -> b # foldr' :: (a -> b -> b) -> b -> Rhs a -> b # foldl :: (b -> a -> b) -> b -> Rhs a -> b # foldl' :: (b -> a -> b) -> b -> Rhs a -> b # foldr1 :: (a -> a -> a) -> Rhs a -> a # foldl1 :: (a -> a -> a) -> Rhs a -> a # elem :: Eq a => a -> Rhs a -> Bool # maximum :: Ord a => Rhs a -> a # | |
Traversable Rhs | |
ExactP Rhs | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Rhs SrcSpanInfo -> EP () | |
AppFixity Rhs | |
Defined in Language.Haskell.Exts.Fixity applyFixities :: Monad m => [Fixity] -> Rhs SrcSpanInfo -> m (Rhs SrcSpanInfo) # | |
Annotated Rhs | |
Eq l => Eq (Rhs l) | |
Data l => Data (Rhs l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Rhs l -> c (Rhs l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Rhs l) # dataTypeOf :: Rhs l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Rhs l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Rhs l)) # gmapT :: (forall b. Data b => b -> b) -> Rhs l -> Rhs l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rhs l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rhs l -> r # gmapQ :: (forall d. Data d => d -> u) -> Rhs l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Rhs l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Rhs l -> m (Rhs l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Rhs l -> m (Rhs l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Rhs l -> m (Rhs l) # | |
Ord l => Ord (Rhs l) | |
Show l => Show (Rhs l) | |
Generic (Rhs l) | |
Pretty (Rhs l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Rhs l -> Doc | |
Convert (Rhs ()) Body Source # | |
Defined in Language.Haskell.Convert | |
type Rep (Rhs l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Rhs l) = D1 (MetaData "Rhs" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "UnGuardedRhs" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Exp l))) :+: C1 (MetaCons "GuardedRhss" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [GuardedRhs l]))) |
data GuardedRhs l #
A guarded right hand side |
stmts =
exp, or |
stmts ->
exp
for case alternatives.
The guard is a series of statements when using pattern guards,
otherwise it will be a single qualifier expression.
GuardedRhs l [Stmt l] (Exp l) |
Instances
A type qualified with a context. An unqualified type has an empty context.
TyForall l (Maybe [TyVarBind l]) (Maybe (Context l)) (Type l) | qualified type |
TyFun l (Type l) (Type l) | function type |
TyTuple l Boxed [Type l] | tuple type, possibly boxed |
TyUnboxedSum l [Type l] | unboxed tuple type |
TyList l (Type l) | list syntax, e.g. [a], as opposed to [] a |
TyParArray l (Type l) | parallel array syntax, e.g. [:a:] |
TyApp l (Type l) (Type l) | application of a type constructor |
TyVar l (Name l) | type variable |
TyCon l (QName l) | named type or type constructor |
TyParen l (Type l) | type surrounded by parentheses |
TyInfix l (Type l) (MaybePromotedName l) (Type l) | infix type constructor |
TyKind l (Type l) (Kind l) | type with explicit kind signature |
TyPromoted l (Promoted l) |
|
TyEquals l (Type l) (Type l) | type equality predicate enabled by ConstraintKinds |
TySplice l (Splice l) | template haskell splice type |
TyBang l (BangType l) (Unpackedness l) (Type l) | Strict type marked with " |
TyWildCard l (Maybe (Name l)) | Either an anonymous of named type wildcard |
TyQuasiQuote l String String | [$name| string |] |
Instances
data MaybePromotedName l #
PromotedName l (QName l) | |
UnpromotedName l (QName l) |
Instances
Bools here are True if there was a leading quote which may be
left out. For example '[k1,k2]
means the same thing as [k1,k2]
.
PromotedInteger l Integer String | parsed value and raw string |
PromotedString l String String | parsed value and raw string |
PromotedCon l Bool (QName l) | |
PromotedList l Bool [Type l] | |
PromotedTuple l [Type l] | |
PromotedUnit l |
Instances
Flag denoting whether a tuple is boxed or unboxed.
Instances
Eq Boxed | |
Data Boxed | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxed -> c Boxed # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxed # dataTypeOf :: Boxed -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxed) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxed) # gmapT :: (forall b. Data b => b -> b) -> Boxed -> Boxed # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxed -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxed -> r # gmapQ :: (forall d. Data d => d -> u) -> Boxed -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Boxed -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Boxed -> m Boxed # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxed -> m Boxed # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxed -> m Boxed # | |
Ord Boxed | |
Show Boxed | |
Generic Boxed | |
type Rep Boxed | |
A type variable declaration, optionally with an explicit kind annotation.
KindedVar l (Name l) (Kind l) | variable binding with kind annotation |
UnkindedVar l (Name l) | ordinary variable binding |
Instances
An explicit kind annotation.
KindStar l |
|
KindFn l (Kind l) (Kind l) |
|
KindParen l (Kind l) | a parenthesised kind |
KindVar l (QName l) |
|
KindApp l (Kind l) (Kind l) | k1 k2 |
KindTuple l [Kind l] |
|
KindList l (Kind l) |
|
Instances
A functional dependency, given on the form l1 l2 ... ln -> r2 r3 .. rn
Instances
Functor FunDep | |
Foldable FunDep | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => FunDep m -> m # foldMap :: Monoid m => (a -> m) -> FunDep a -> m # foldr :: (a -> b -> b) -> b -> FunDep a -> b # foldr' :: (a -> b -> b) -> b -> FunDep a -> b # foldl :: (b -> a -> b) -> b -> FunDep a -> b # foldl' :: (b -> a -> b) -> b -> FunDep a -> b # foldr1 :: (a -> a -> a) -> FunDep a -> a # foldl1 :: (a -> a -> a) -> FunDep a -> a # elem :: Eq a => a -> FunDep a -> Bool # maximum :: Ord a => FunDep a -> a # minimum :: Ord a => FunDep a -> a # | |
Traversable FunDep | |
ExactP FunDep | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: FunDep SrcSpanInfo -> EP () | |
Annotated FunDep | |
Eq l => Eq (FunDep l) | |
Data l => Data (FunDep l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunDep l -> c (FunDep l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FunDep l) # toConstr :: FunDep l -> Constr # dataTypeOf :: FunDep l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FunDep l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FunDep l)) # gmapT :: (forall b. Data b => b -> b) -> FunDep l -> FunDep l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunDep l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunDep l -> r # gmapQ :: (forall d. Data d => d -> u) -> FunDep l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FunDep l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunDep l -> m (FunDep l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunDep l -> m (FunDep l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunDep l -> m (FunDep l) # | |
Ord l => Ord (FunDep l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (FunDep l) | |
Generic (FunDep l) | |
Pretty (FunDep l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> FunDep l -> Doc | |
type Rep (FunDep l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (FunDep l) = D1 (MetaData "FunDep" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "FunDep" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Name l]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Name l])))) |
A context is a set of assertions
Instances
Class assertions. In Haskell 98, the argument would be a tyvar, but this definition allows multiple parameters, and allows them to be types. Also extended with support for implicit parameters and equality constraints.
ClassA l (QName l) [Type l] | ordinary class assertion |
AppA l (Name l) [Type l] | constraint kind assertion, |
InfixA l (Type l) (QName l) (Type l) | class assertion where the class name is given infix |
IParam l (IPName l) (Type l) | implicit parameter assertion |
EqualP l (Type l) (Type l) | type equality constraint |
ParenA l (Asst l) | parenthesised class assertion |
WildCardA l (Maybe (Name l)) | Context Wildcard |
Instances
literal
Values of this type hold the abstract value of the literal, along with the
precise string representation used. For example, 10
, 0o12
and 0xa
have the same value representation, but each carry a different string representation.
Char l Char String | character literal |
Frac l Rational String | floating point literal |
PrimInt l Integer String | unboxed integer literal |
PrimWord l Integer String | unboxed word literal |
PrimFloat l Rational String | unboxed float literal |
PrimDouble l Rational String | unboxed double literal |
PrimChar l Char String | unboxed character literal |
PrimString l String String | unboxed string literal |
Instances
An indication whether a literal pattern has been negated or not.
Instances
Functor Sign | |
Foldable Sign | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Sign m -> m # foldMap :: Monoid m => (a -> m) -> Sign a -> m # foldr :: (a -> b -> b) -> b -> Sign a -> b # foldr' :: (a -> b -> b) -> b -> Sign a -> b # foldl :: (b -> a -> b) -> b -> Sign a -> b # foldl' :: (b -> a -> b) -> b -> Sign a -> b # foldr1 :: (a -> a -> a) -> Sign a -> a # foldl1 :: (a -> a -> a) -> Sign a -> a # elem :: Eq a => a -> Sign a -> Bool # maximum :: Ord a => Sign a -> a # | |
Traversable Sign | |
ExactP Sign | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Sign SrcSpanInfo -> EP () | |
Annotated Sign | |
Eq l => Eq (Sign l) | |
Data l => Data (Sign l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Sign l -> c (Sign l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sign l) # toConstr :: Sign l -> Constr # dataTypeOf :: Sign l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sign l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sign l)) # gmapT :: (forall b. Data b => b -> b) -> Sign l -> Sign l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sign l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sign l -> r # gmapQ :: (forall d. Data d => d -> u) -> Sign l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Sign l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sign l -> m (Sign l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sign l -> m (Sign l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sign l -> m (Sign l) # | |
Ord l => Ord (Sign l) | |
Show l => Show (Sign l) | |
Generic (Sign l) | |
type Rep (Sign l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Sign l) = D1 (MetaData "Sign" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "Signless" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "Negative" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l))) |
Haskell expressions.
Var l (QName l) | variable |
OverloadedLabel l String | Overloaded label #foo |
IPVar l (IPName l) | implicit parameter variable |
Con l (QName l) | data constructor |
Lit l (Literal l) | literal constant |
InfixApp l (Exp l) (QOp l) (Exp l) | infix application |
NegApp l (Exp l) | negation expression |
Lambda l [Pat l] (Exp l) | lambda expression |
Let l (Binds l) (Exp l) | local declarations with |
If l (Exp l) (Exp l) (Exp l) |
|
MultiIf l [GuardedRhs l] |
|
Case l (Exp l) [Alt l] |
|
Do l [Stmt l] |
|
MDo l [Stmt l] |
|
Tuple l Boxed [Exp l] | tuple expression |
UnboxedSum l Int Int (Exp l) | unboxed sum |
TupleSection l Boxed [Maybe (Exp l)] | tuple section expression, e.g. |
ParArray l [Exp l] | parallel array expression |
Paren l (Exp l) | parenthesised expression |
LeftSection l (Exp l) (QOp l) | left section |
RightSection l (QOp l) (Exp l) | right section |
RecConstr l (QName l) [FieldUpdate l] | record construction expression |
RecUpdate l (Exp l) [FieldUpdate l] | record update expression |
EnumFrom l (Exp l) | unbounded arithmetic sequence,
incrementing by 1: |
EnumFromTo l (Exp l) (Exp l) | bounded arithmetic sequence,
incrementing by 1 |
EnumFromThen l (Exp l) (Exp l) | unbounded arithmetic sequence,
with first two elements given |
EnumFromThenTo l (Exp l) (Exp l) (Exp l) | bounded arithmetic sequence,
with first two elements given |
ParArrayFromTo l (Exp l) (Exp l) | Parallel array bounded arithmetic sequence,
incrementing by 1 |
ParArrayFromThenTo l (Exp l) (Exp l) (Exp l) | bounded arithmetic sequence,
with first two elements given |
ListComp l (Exp l) [QualStmt l] | ordinary list comprehension |
ParComp l (Exp l) [[QualStmt l]] | parallel list comprehension |
ParArrayComp l (Exp l) [[QualStmt l]] | parallel array comprehension |
ExpTypeSig l (Exp l) (Type l) | expression with explicit type signature |
VarQuote l (QName l) |
|
TypQuote l (QName l) |
|
BracketExp l (Bracket l) | template haskell bracket expression |
SpliceExp l (Splice l) | template haskell splice expression |
QuasiQuote l String String | quasi-quotaion: |
TypeApp l (Type l) | Visible type application |
XTag l (XName l) [XAttr l] (Maybe (Exp l)) [Exp l] | xml element, with attributes and children |
XETag l (XName l) [XAttr l] (Maybe (Exp l)) | empty xml element, with attributes |
XPcdata l String | PCDATA child element |
XExpTag l (Exp l) | escaped haskell expression inside xml |
XChildTag l [Exp l] | children of an xml element |
CorePragma l String (Exp l) | CORE pragma |
SCCPragma l String (Exp l) | SCC pragma |
GenPragma l String (Int, Int) (Int, Int) (Exp l) | GENERATED pragma |
Proc l (Pat l) (Exp l) | arrows proc: |
LeftArrApp l (Exp l) (Exp l) | arrow application (from left): exp |
RightArrApp l (Exp l) (Exp l) | arrow application (from right): exp |
LeftArrHighApp l (Exp l) (Exp l) | higher-order arrow application (from left): exp |
RightArrHighApp l (Exp l) (Exp l) | higher-order arrow application (from right): exp |
LCase l [Alt l] |
|
Instances
The name of an xml element or attribute, possibly qualified with a namespace.
Instances
Functor XName | |
Foldable XName | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => XName m -> m # foldMap :: Monoid m => (a -> m) -> XName a -> m # foldr :: (a -> b -> b) -> b -> XName a -> b # foldr' :: (a -> b -> b) -> b -> XName a -> b # foldl :: (b -> a -> b) -> b -> XName a -> b # foldl' :: (b -> a -> b) -> b -> XName a -> b # foldr1 :: (a -> a -> a) -> XName a -> a # foldl1 :: (a -> a -> a) -> XName a -> a # elem :: Eq a => a -> XName a -> Bool # maximum :: Ord a => XName a -> a # minimum :: Ord a => XName a -> a # | |
Traversable XName | |
ExactP XName | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: XName SrcSpanInfo -> EP () | |
Annotated XName | |
Eq l => Eq (XName l) | |
Data l => Data (XName l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> XName l -> c (XName l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (XName l) # toConstr :: XName l -> Constr # dataTypeOf :: XName l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (XName l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (XName l)) # gmapT :: (forall b. Data b => b -> b) -> XName l -> XName l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> XName l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> XName l -> r # gmapQ :: (forall d. Data d => d -> u) -> XName l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> XName l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> XName l -> m (XName l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> XName l -> m (XName l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> XName l -> m (XName l) # | |
Ord l => Ord (XName l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (XName l) | |
Generic (XName l) | |
Pretty (XName l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> XName l -> Doc | |
type Rep (XName l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (XName l) = D1 (MetaData "XName" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "XName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "XDomName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) |
An xml attribute, which is a name-expression pair.
Instances
Functor XAttr | |
Foldable XAttr | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => XAttr m -> m # foldMap :: Monoid m => (a -> m) -> XAttr a -> m # foldr :: (a -> b -> b) -> b -> XAttr a -> b # foldr' :: (a -> b -> b) -> b -> XAttr a -> b # foldl :: (b -> a -> b) -> b -> XAttr a -> b # foldl' :: (b -> a -> b) -> b -> XAttr a -> b # foldr1 :: (a -> a -> a) -> XAttr a -> a # foldl1 :: (a -> a -> a) -> XAttr a -> a # elem :: Eq a => a -> XAttr a -> Bool # maximum :: Ord a => XAttr a -> a # minimum :: Ord a => XAttr a -> a # | |
Traversable XAttr | |
ExactP XAttr | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: XAttr SrcSpanInfo -> EP () | |
AppFixity XAttr | |
Defined in Language.Haskell.Exts.Fixity applyFixities :: Monad m => [Fixity] -> XAttr SrcSpanInfo -> m (XAttr SrcSpanInfo) # | |
Annotated XAttr | |
Eq l => Eq (XAttr l) | |
Data l => Data (XAttr l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> XAttr l -> c (XAttr l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (XAttr l) # toConstr :: XAttr l -> Constr # dataTypeOf :: XAttr l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (XAttr l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (XAttr l)) # gmapT :: (forall b. Data b => b -> b) -> XAttr l -> XAttr l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> XAttr l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> XAttr l -> r # gmapQ :: (forall d. Data d => d -> u) -> XAttr l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> XAttr l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> XAttr l -> m (XAttr l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> XAttr l -> m (XAttr l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> XAttr l -> m (XAttr l) # | |
Ord l => Ord (XAttr l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (XAttr l) | |
Generic (XAttr l) | |
Pretty (XAttr l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> XAttr l -> Doc | |
type Rep (XAttr l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (XAttr l) = D1 (MetaData "XAttr" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "XAttr" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (XName l)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Exp l))))) |
A template haskell bracket expression.
ExpBracket l (Exp l) | expression bracket: |
PatBracket l (Pat l) | pattern bracket: |
TypeBracket l (Type l) | type bracket: |
DeclBracket l [Decl l] | declaration bracket: |
Instances
A template haskell splice expression
IdSplice l String | variable splice: |
ParenSplice l (Exp l) | parenthesised expression splice: |
Instances
Functor Splice | |
Foldable Splice | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Splice m -> m # foldMap :: Monoid m => (a -> m) -> Splice a -> m # foldr :: (a -> b -> b) -> b -> Splice a -> b # foldr' :: (a -> b -> b) -> b -> Splice a -> b # foldl :: (b -> a -> b) -> b -> Splice a -> b # foldl' :: (b -> a -> b) -> b -> Splice a -> b # foldr1 :: (a -> a -> a) -> Splice a -> a # foldl1 :: (a -> a -> a) -> Splice a -> a # elem :: Eq a => a -> Splice a -> Bool # maximum :: Ord a => Splice a -> a # minimum :: Ord a => Splice a -> a # | |
Traversable Splice | |
ExactP Splice | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Splice SrcSpanInfo -> EP () | |
AppFixity Splice | |
Defined in Language.Haskell.Exts.Fixity applyFixities :: Monad m => [Fixity] -> Splice SrcSpanInfo -> m (Splice SrcSpanInfo) # | |
Annotated Splice | |
Eq l => Eq (Splice l) | |
Data l => Data (Splice l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Splice l -> c (Splice l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Splice l) # toConstr :: Splice l -> Constr # dataTypeOf :: Splice l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Splice l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Splice l)) # gmapT :: (forall b. Data b => b -> b) -> Splice l -> Splice l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Splice l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Splice l -> r # gmapQ :: (forall d. Data d => d -> u) -> Splice l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Splice l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Splice l -> m (Splice l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Splice l -> m (Splice l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Splice l -> m (Splice l) # | |
Ord l => Ord (Splice l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (Splice l) | |
Generic (Splice l) | |
Pretty (Splice l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Splice l -> Doc | |
type Rep (Splice l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Splice l) = D1 (MetaData "Splice" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "IdSplice" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "ParenSplice" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Exp l)))) |
The safety of a foreign function call.
Instances
Functor Safety | |
Foldable Safety | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Safety m -> m # foldMap :: Monoid m => (a -> m) -> Safety a -> m # foldr :: (a -> b -> b) -> b -> Safety a -> b # foldr' :: (a -> b -> b) -> b -> Safety a -> b # foldl :: (b -> a -> b) -> b -> Safety a -> b # foldl' :: (b -> a -> b) -> b -> Safety a -> b # foldr1 :: (a -> a -> a) -> Safety a -> a # foldl1 :: (a -> a -> a) -> Safety a -> a # elem :: Eq a => a -> Safety a -> Bool # maximum :: Ord a => Safety a -> a # minimum :: Ord a => Safety a -> a # | |
Traversable Safety | |
ExactP Safety | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Safety SrcSpanInfo -> EP () | |
Annotated Safety | |
Eq l => Eq (Safety l) | |
Data l => Data (Safety l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Safety l -> c (Safety l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Safety l) # toConstr :: Safety l -> Constr # dataTypeOf :: Safety l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Safety l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Safety l)) # gmapT :: (forall b. Data b => b -> b) -> Safety l -> Safety l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Safety l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Safety l -> r # gmapQ :: (forall d. Data d => d -> u) -> Safety l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Safety l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Safety l -> m (Safety l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety l -> m (Safety l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety l -> m (Safety l) # | |
Ord l => Ord (Safety l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (Safety l) | |
Generic (Safety l) | |
Pretty (Safety l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Safety l -> Doc | |
type Rep (Safety l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Safety l) = D1 (MetaData "Safety" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "PlayRisky" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: (C1 (MetaCons "PlaySafe" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) :+: C1 (MetaCons "PlayInterruptible" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)))) |
The calling convention of a foreign function call.
Instances
data ModulePragma l #
A top level options pragma, preceding the module header.
LanguagePragma l [Name l] | LANGUAGE pragma |
OptionsPragma l (Maybe Tool) String | OPTIONS pragma, possibly qualified with a tool, e.g. OPTIONS_GHC |
AnnModulePragma l (Annotation l) | ANN pragma with module scope |
Instances
Recognised tools for OPTIONS pragmas.
Instances
Eq Tool | |
Data Tool | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tool -> c Tool # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Tool # dataTypeOf :: Tool -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Tool) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Tool) # gmapT :: (forall b. Data b => b -> b) -> Tool -> Tool # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tool -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tool -> r # gmapQ :: (forall d. Data d => d -> u) -> Tool -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tool -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tool -> m Tool # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tool -> m Tool # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tool -> m Tool # | |
Ord Tool | |
Show Tool | |
Generic Tool | |
Pretty Tool | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Tool -> Doc | |
type Rep Tool | |
Defined in Language.Haskell.Exts.Syntax type Rep Tool = D1 (MetaData "Tool" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) ((C1 (MetaCons "GHC" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "HUGS" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NHC98" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "YHC" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "HADDOCK" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "UnknownTool" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))) |
Recognised overlaps for overlap pragmas.
NoOverlap l | NO_OVERLAP pragma |
Overlap l | OVERLAP pragma |
Overlapping l | |
Overlaps l | |
Overlappable l | |
Incoherent l | INCOHERENT pragma |
Instances
data Activation l #
Activation clause of a RULES pragma.
ActiveFrom l Int | |
ActiveUntil l Int |
Instances
The body of a RULES pragma.
Instances
Functor Rule | |
Foldable Rule | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Rule m -> m # foldMap :: Monoid m => (a -> m) -> Rule a -> m # foldr :: (a -> b -> b) -> b -> Rule a -> b # foldr' :: (a -> b -> b) -> b -> Rule a -> b # foldl :: (b -> a -> b) -> b -> Rule a -> b # foldl' :: (b -> a -> b) -> b -> Rule a -> b # foldr1 :: (a -> a -> a) -> Rule a -> a # foldl1 :: (a -> a -> a) -> Rule a -> a # elem :: Eq a => a -> Rule a -> Bool # maximum :: Ord a => Rule a -> a # | |
Traversable Rule | |
ExactP Rule | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Rule SrcSpanInfo -> EP () | |
Annotated Rule | |
Eq l => Eq (Rule l) | |
Data l => Data (Rule l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Rule l -> c (Rule l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Rule l) # toConstr :: Rule l -> Constr # dataTypeOf :: Rule l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Rule l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Rule l)) # gmapT :: (forall b. Data b => b -> b) -> Rule l -> Rule l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rule l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rule l -> r # gmapQ :: (forall d. Data d => d -> u) -> Rule l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Rule l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Rule l -> m (Rule l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Rule l -> m (Rule l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Rule l -> m (Rule l) # | |
Ord l => Ord (Rule l) | |
Show l => Show (Rule l) | |
Generic (Rule l) | |
Pretty (Rule l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Rule l -> Doc | |
type Rep (Rule l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Rule l) = D1 (MetaData "Rule" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "Rule" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Activation l))))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [RuleVar l])) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Exp l)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Exp l)))))) |
Variables used in a RULES pragma, optionally annotated with types
RuleVar l (Name l) | |
TypedRuleVar l (Name l) (Type l) |
Instances
Functor RuleVar | |
Foldable RuleVar | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => RuleVar m -> m # foldMap :: Monoid m => (a -> m) -> RuleVar a -> m # foldr :: (a -> b -> b) -> b -> RuleVar a -> b # foldr' :: (a -> b -> b) -> b -> RuleVar a -> b # foldl :: (b -> a -> b) -> b -> RuleVar a -> b # foldl' :: (b -> a -> b) -> b -> RuleVar a -> b # foldr1 :: (a -> a -> a) -> RuleVar a -> a # foldl1 :: (a -> a -> a) -> RuleVar a -> a # elem :: Eq a => a -> RuleVar a -> Bool # maximum :: Ord a => RuleVar a -> a # minimum :: Ord a => RuleVar a -> a # | |
Traversable RuleVar | |
ExactP RuleVar | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: RuleVar SrcSpanInfo -> EP () | |
Annotated RuleVar | |
Eq l => Eq (RuleVar l) | |
Data l => Data (RuleVar l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleVar l -> c (RuleVar l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RuleVar l) # toConstr :: RuleVar l -> Constr # dataTypeOf :: RuleVar l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RuleVar l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RuleVar l)) # gmapT :: (forall b. Data b => b -> b) -> RuleVar l -> RuleVar l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleVar l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleVar l -> r # gmapQ :: (forall d. Data d => d -> u) -> RuleVar l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleVar l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleVar l -> m (RuleVar l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleVar l -> m (RuleVar l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleVar l -> m (RuleVar l) # | |
Ord l => Ord (RuleVar l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (RuleVar l) | |
Generic (RuleVar l) | |
Pretty (RuleVar l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> RuleVar l -> Doc | |
type Rep (RuleVar l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (RuleVar l) = D1 (MetaData "RuleVar" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "RuleVar" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Name l))) :+: C1 (MetaCons "TypedRuleVar" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Name l)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Type l))))) |
data WarningText l #
Warning text to optionally use in the module header of e.g. a deprecated module.
Instances
A pattern, to be matched against a value.
PVar l (Name l) | variable |
PLit l (Sign l) (Literal l) | literal constant |
PNPlusK l (Name l) Integer | n+k pattern |
PInfixApp l (Pat l) (QName l) (Pat l) | pattern with an infix data constructor |
PApp l (QName l) [Pat l] | data constructor and argument patterns |
PTuple l Boxed [Pat l] | tuple pattern |
PUnboxedSum l Int Int (Pat l) | unboxed sum |
PList l [Pat l] | list pattern |
PParen l (Pat l) | parenthesized pattern |
PRec l (QName l) [PatField l] | labelled pattern, record style |
PAsPat l (Name l) (Pat l) |
|
PWildCard l | wildcard pattern: |
PIrrPat l (Pat l) | irrefutable pattern: |
PatTypeSig l (Pat l) (Type l) | pattern with type signature |
PViewPat l (Exp l) (Pat l) | view patterns of the form |
PRPat l [RPat l] | regular list pattern |
PXTag l (XName l) [PXAttr l] (Maybe (Pat l)) [Pat l] | XML element pattern |
PXETag l (XName l) [PXAttr l] (Maybe (Pat l)) | XML singleton element pattern |
PXPcdata l String | XML PCDATA pattern |
PXPatTag l (Pat l) | XML embedded pattern |
PXRPats l [RPat l] | XML regular list pattern |
PSplice l (Splice l) | template haskell splice pattern |
PQuasiQuote l String String | quasi quote pattern: |
PBangPat l (Pat l) | strict (bang) pattern: |
Instances
An XML attribute in a pattern.
Instances
Functor PXAttr | |
Foldable PXAttr | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => PXAttr m -> m # foldMap :: Monoid m => (a -> m) -> PXAttr a -> m # foldr :: (a -> b -> b) -> b -> PXAttr a -> b # foldr' :: (a -> b -> b) -> b -> PXAttr a -> b # foldl :: (b -> a -> b) -> b -> PXAttr a -> b # foldl' :: (b -> a -> b) -> b -> PXAttr a -> b # foldr1 :: (a -> a -> a) -> PXAttr a -> a # foldl1 :: (a -> a -> a) -> PXAttr a -> a # elem :: Eq a => a -> PXAttr a -> Bool # maximum :: Ord a => PXAttr a -> a # minimum :: Ord a => PXAttr a -> a # | |
Traversable PXAttr | |
ExactP PXAttr | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: PXAttr SrcSpanInfo -> EP () | |
AppFixity PXAttr | |
Defined in Language.Haskell.Exts.Fixity applyFixities :: Monad m => [Fixity] -> PXAttr SrcSpanInfo -> m (PXAttr SrcSpanInfo) # | |
Annotated PXAttr | |
Eq l => Eq (PXAttr l) | |
Data l => Data (PXAttr l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PXAttr l -> c (PXAttr l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PXAttr l) # toConstr :: PXAttr l -> Constr # dataTypeOf :: PXAttr l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (PXAttr l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (PXAttr l)) # gmapT :: (forall b. Data b => b -> b) -> PXAttr l -> PXAttr l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PXAttr l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PXAttr l -> r # gmapQ :: (forall d. Data d => d -> u) -> PXAttr l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PXAttr l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PXAttr l -> m (PXAttr l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PXAttr l -> m (PXAttr l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PXAttr l -> m (PXAttr l) # | |
Ord l => Ord (PXAttr l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (PXAttr l) | |
Generic (PXAttr l) | |
Pretty (PXAttr l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> PXAttr l -> Doc | |
type Rep (PXAttr l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (PXAttr l) = D1 (MetaData "PXAttr" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "PXAttr" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (XName l)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat l))))) |
A regular pattern operator.
RPStar l |
|
RPStarG l |
|
RPPlus l |
|
RPPlusG l |
|
RPOpt l |
|
RPOptG l |
|
Instances
Functor RPatOp | |
Foldable RPatOp | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => RPatOp m -> m # foldMap :: Monoid m => (a -> m) -> RPatOp a -> m # foldr :: (a -> b -> b) -> b -> RPatOp a -> b # foldr' :: (a -> b -> b) -> b -> RPatOp a -> b # foldl :: (b -> a -> b) -> b -> RPatOp a -> b # foldl' :: (b -> a -> b) -> b -> RPatOp a -> b # foldr1 :: (a -> a -> a) -> RPatOp a -> a # foldl1 :: (a -> a -> a) -> RPatOp a -> a # elem :: Eq a => a -> RPatOp a -> Bool # maximum :: Ord a => RPatOp a -> a # minimum :: Ord a => RPatOp a -> a # | |
Traversable RPatOp | |
ExactP RPatOp | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: RPatOp SrcSpanInfo -> EP () | |
Annotated RPatOp | |
Eq l => Eq (RPatOp l) | |
Data l => Data (RPatOp l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RPatOp l -> c (RPatOp l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RPatOp l) # toConstr :: RPatOp l -> Constr # dataTypeOf :: RPatOp l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RPatOp l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RPatOp l)) # gmapT :: (forall b. Data b => b -> b) -> RPatOp l -> RPatOp l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RPatOp l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RPatOp l -> r # gmapQ :: (forall d. Data d => d -> u) -> RPatOp l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RPatOp l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RPatOp l -> m (RPatOp l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RPatOp l -> m (RPatOp l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RPatOp l -> m (RPatOp l) # | |
Ord l => Ord (RPatOp l) | |
Defined in Language.Haskell.Exts.Syntax | |
Show l => Show (RPatOp l) | |
Generic (RPatOp l) | |
Pretty (RPatOp l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> RPatOp l -> Doc | |
type Rep (RPatOp l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (RPatOp l) = D1 (MetaData "RPatOp" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) ((C1 (MetaCons "RPStar" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: (C1 (MetaCons "RPStarG" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "RPPlus" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)))) :+: (C1 (MetaCons "RPPlusG" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: (C1 (MetaCons "RPOpt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "RPOptG" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l))))) |
An entity in a regular pattern.
RPOp l (RPat l) (RPatOp l) | operator pattern, e.g. pat* |
RPEither l (RPat l) (RPat l) | choice pattern, e.g. (1 | 2) |
RPSeq l [RPat l] | sequence pattern, e.g. (| 1, 2, 3 |) |
RPGuard l (Pat l) [Stmt l] | guarded pattern, e.g. (| p | p < 3 |) |
RPCAs l (Name l) (RPat l) | non-linear variable binding, e.g. (foo@:(1 | 2))* |
RPAs l (Name l) (RPat l) | linear variable binding, e.g. foo@(1 | 2) |
RPParen l (RPat l) | parenthesised pattern, e.g. (2*) |
RPPat l (Pat l) | an ordinary pattern |
Instances
An fpat in a labeled record pattern.
PFieldPat l (QName l) (Pat l) | ordinary label-pattern pair |
PFieldPun l (QName l) | record field pun |
PFieldWildcard l | record field wildcard |
Instances
A statement, representing both a stmt in a do
-expression,
an ordinary qual in a list comprehension, as well as a stmt
in a pattern guard.
Generator l (Pat l) (Exp l) | a generator: pat |
Qualifier l (Exp l) | an exp by itself: in a |
LetStmt l (Binds l) | local bindings |
RecStmt l [Stmt l] | a recursive binding group for arrows |
Instances
A general transqual in a list comprehension, which could potentially be a transform of the kind enabled by TransformListComp.
QualStmt l (Stmt l) | an ordinary statement |
ThenTrans l (Exp l) |
|
ThenBy l (Exp l) (Exp l) |
|
GroupBy l (Exp l) |
|
GroupUsing l (Exp l) |
|
GroupByUsing l (Exp l) (Exp l) |
|
Instances
data FieldUpdate l #
An fbind in a labeled construction or update expression.
FieldUpdate l (QName l) (Exp l) | ordinary label-expresion pair |
FieldPun l (QName l) | record field pun |
FieldWildcard l | record field wildcard |
Instances
An alt alternative in a case
expression.
Instances
Functor Alt | |
Foldable Alt | |
Defined in Language.Haskell.Exts.Syntax fold :: Monoid m => Alt m -> m # foldMap :: Monoid m => (a -> m) -> Alt a -> m # foldr :: (a -> b -> b) -> b -> Alt a -> b # foldr' :: (a -> b -> b) -> b -> Alt a -> b # foldl :: (b -> a -> b) -> b -> Alt a -> b # foldl' :: (b -> a -> b) -> b -> Alt a -> b # foldr1 :: (a -> a -> a) -> Alt a -> a # foldl1 :: (a -> a -> a) -> Alt a -> a # elem :: Eq a => a -> Alt a -> Bool # maximum :: Ord a => Alt a -> a # | |
Traversable Alt | |
ExactP Alt | |
Defined in Language.Haskell.Exts.ExactPrint exactP :: Alt SrcSpanInfo -> EP () | |
AppFixity Alt | |
Defined in Language.Haskell.Exts.Fixity applyFixities :: Monad m => [Fixity] -> Alt SrcSpanInfo -> m (Alt SrcSpanInfo) # | |
Annotated Alt | |
Eq l => Eq (Alt l) | |
Data l => Data (Alt l) | |
Defined in Language.Haskell.Exts.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Alt l -> c (Alt l) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Alt l) # dataTypeOf :: Alt l -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Alt l)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Alt l)) # gmapT :: (forall b. Data b => b -> b) -> Alt l -> Alt l # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Alt l -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Alt l -> r # gmapQ :: (forall d. Data d => d -> u) -> Alt l -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Alt l -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Alt l -> m (Alt l) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt l -> m (Alt l) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt l -> m (Alt l) # | |
Ord l => Ord (Alt l) | |
Show l => Show (Alt l) | |
Generic (Alt l) | |
Pretty (Alt l) | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> Alt l -> Doc | |
Convert (Alt ()) Match Source # | |
Defined in Language.Haskell.Convert | |
type Rep (Alt l) | |
Defined in Language.Haskell.Exts.Syntax type Rep (Alt l) = D1 (MetaData "Alt" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "Alt" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat l))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Rhs l)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Binds l)))))) |
class Functor ast => Annotated (ast :: Type -> Type) where #
AST nodes are annotated, and this class allows manipulation of the annotations.
Retrieve the annotation of an AST node.
amap :: (l -> l) -> ast l -> ast l #
Change the annotation of an AST node. Note that only the annotation of
the node itself is affected, and not the annotations of any child nodes.
if all nodes in the AST tree are to be affected, use fmap
.
Instances
(<^^>) :: SrcSpan -> SrcSpan -> SrcSpanInfo infixl 6 #
Merge two SrcSpan
s and lift them to a SrcInfoSpan
with
no positional information for entities.
(<**) :: SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo infixl 4 #
Add more positional information for entities of a span.
(<?+>) :: Maybe SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo infixl 4 #
Optionally combine the second argument with the first,
or return it unchanged if the first argument is Nothing
.
(<+?>) :: SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo infixl 4 #
Optionally combine the first argument with the second,
or return it unchanged if the second argument is Nothing
.
(<++>) :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo infixl 5 #
Short name for combSpanInfo
combSpanMaybe :: SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo #
Like '(+?)', but it also concatenates the srcInfoPoints
.
combSpanInfo :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo #
Combine two SrcSpanInfo
s into one that spans the combined source area of
the two arguments, leaving positional information blank.
infoSpan :: SrcSpan -> [SrcSpan] -> SrcSpanInfo #
Generate a SrcSpanInfo
with the supplied positional information for entities.
A bogus SrcSpanInfo
, the location is noLoc
.
`noSrcSpan = noInfoSpan (mkSrcSpan noLoc noLoc)`
noInfoSpan :: SrcSpan -> SrcSpanInfo #
Generate a SrcSpanInfo
with no positional information for entities.
isNullSpan :: SrcSpan -> Bool #
Test if a given span starts and ends at the same location.
mergeSrcSpan :: SrcSpan -> SrcSpan -> SrcSpan #
Merge two source spans into a single span from the start of the first to the end of the second. Assumes that the two spans relate to the same source file.
srcSpanEnd :: SrcSpan -> (Int, Int) #
Returns srcSpanEndLine
and srcSpanEndColumn
in a pair.
srcSpanStart :: SrcSpan -> (Int, Int) #
Returns srcSpanStartLine
and srcSpanStartColumn
in a pair.
A single position in the source.
Instances
Eq SrcLoc | |
Data SrcLoc | |
Defined in Language.Haskell.Exts.SrcLoc gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcLoc -> c SrcLoc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcLoc # toConstr :: SrcLoc -> Constr # dataTypeOf :: SrcLoc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcLoc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcLoc) # gmapT :: (forall b. Data b => b -> b) -> SrcLoc -> SrcLoc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcLoc -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcLoc -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcLoc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcLoc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc # | |
Ord SrcLoc | |
Show SrcLoc | |
Generic SrcLoc | |
Pretty SrcLoc | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> SrcLoc -> Doc | |
SrcInfo SrcLoc | |
type Rep SrcLoc | |
Defined in Language.Haskell.Exts.SrcLoc type Rep SrcLoc = D1 (MetaData "SrcLoc" "Language.Haskell.Exts.SrcLoc" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "SrcLoc" PrefixI True) (S1 (MetaSel (Just "srcFilename") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: (S1 (MetaSel (Just "srcLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "srcColumn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))) |
A portion of the source, spanning one or more lines and zero or more columns.
Instances
Eq SrcSpan | |
Data SrcSpan | |
Defined in Language.Haskell.Exts.SrcLoc gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpan -> c SrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcSpan # toConstr :: SrcSpan -> Constr # dataTypeOf :: SrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcSpan) # gmapT :: (forall b. Data b => b -> b) -> SrcSpan -> SrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # | |
Ord SrcSpan | |
Defined in Language.Haskell.Exts.SrcLoc | |
Show SrcSpan | |
Generic SrcSpan | |
Pretty SrcSpan | |
Defined in Language.Haskell.Exts.Pretty prettyPrec :: Int -> SrcSpan -> Doc | |
SrcInfo SrcSpan | |
type Rep SrcSpan | |
Defined in Language.Haskell.Exts.SrcLoc type Rep SrcSpan = D1 (MetaData "SrcSpan" "Language.Haskell.Exts.SrcLoc" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "SrcSpan" PrefixI True) ((S1 (MetaSel (Just "srcSpanFilename") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "srcSpanStartLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :*: (S1 (MetaSel (Just "srcSpanStartColumn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: (S1 (MetaSel (Just "srcSpanEndLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "srcSpanEndColumn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))) |
An entity located in the source.
Instances
Eq a => Eq (Loc a) | |
Ord a => Ord (Loc a) | |
Show a => Show (Loc a) | |
Generic (Loc a) | |
type Rep (Loc a) | |
Defined in Language.Haskell.Exts.SrcLoc type Rep (Loc a) = D1 (MetaData "Loc" "Language.Haskell.Exts.SrcLoc" "haskell-src-exts-1.20.3-2fryh11Yuz7lCtLeeIQn8" False) (C1 (MetaCons "Loc" PrefixI True) (S1 (MetaSel (Just "loc") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SrcSpan) :*: S1 (MetaSel (Just "unLoc") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) |
data SrcSpanInfo #
A portion of the source, extended with information on the position of entities within the span.
Instances
A class to work over all kinds of source location information.
toSrcInfo :: SrcLoc -> [SrcSpan] -> SrcLoc -> si #
fromSrcInfo :: SrcSpanInfo -> si #
getPointLoc :: si -> SrcLoc #
startColumn :: si -> Int #
Instances
SrcInfo SrcLoc | |
SrcInfo SrcSpan | |
SrcInfo SrcSpanInfo | |
Defined in Language.Haskell.Exts.SrcLoc toSrcInfo :: SrcLoc -> [SrcSpan] -> SrcLoc -> SrcSpanInfo # fromSrcInfo :: SrcSpanInfo -> SrcSpanInfo # getPointLoc :: SrcSpanInfo -> SrcLoc # fileName :: SrcSpanInfo -> String # startLine :: SrcSpanInfo -> Int # startColumn :: SrcSpanInfo -> Int # |
toExtensionList :: Language -> [Extension] -> [KnownExtension] #
prettyExtension :: Extension -> String #
Pretty print an extension. Disabled extensions are prefixed with 'No'.
parseExtension :: String -> Extension #
Parse an enabled or disabled extension; returns
UnknownExtension
if the parse fails.
classifyExtension :: String -> Extension #
A clever version of read that returns an UnknownExtension
if the string is not recognised.
deprecatedExtensions :: [(Extension, Maybe Extension)] #
Extensions that have been deprecated, possibly paired with another extension that replaces it.
knownExtensions :: [Extension] #
List of all known extensions, both "yes" and "no" versions.
ghcDefault :: [Extension] #
glasgowExts :: [Extension] #
The list of extensions enabled by GHC's portmanteau -fglasgow-exts flag.
impliesExts :: [KnownExtension] -> [KnownExtension] #
Certain extensions imply other extensions, and this function makes the implication explicit. This also handles deprecated extensions, which imply their replacements. The returned value is the transitive closure of implied extensions.
prettyLanguage :: Language -> String #
classifyLanguage :: String -> Language #
knownLanguages :: [Language] #
Haskell98 | The Haskell 98 language as defined by the Haskell 98 report. http://haskell.org/onlinereport/ |
Haskell2010 | The Haskell 2010 language as defined by the Haskell 2010 report. http://www.haskell.org/onlinereport/haskell2010 |
HaskellAllDisabled | The minimal language resulting from disabling all recognized extensions - including ones that are part of all known language definitions e.g. MonomorphismRestriction. |
UnknownLanguage String | An unknown language, identified by its name. |
Instances
Eq Language | |
Data Language | |
Defined in Language.Haskell.Exts.Extension gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Language -> c Language # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Language # toConstr :: Language -> Constr # dataTypeOf :: Language -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Language) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Language) # gmapT :: (forall b. Data b => b -> b) -> Language -> Language # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Language -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Language -> r # gmapQ :: (forall d. Data d => d -> u) -> Language -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Language -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Language -> m Language # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Language -> m Language # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Language -> m Language # | |
Ord Language | |
Defined in Language.Haskell.Exts.Extension | |
Read Language | |
Show Language | |
This represents language extensions beyond a base Language
definition
(such as Haskell98
) that are supported by some implementations, usually
in some special mode.
EnableExtension KnownExtension | Enable a known extension |
DisableExtension KnownExtension | Disable a known extension |
UnknownExtension String | An unknown extension, identified by the name of its |
data KnownExtension #
OverlappingInstances |
|
UndecidableInstances |
|
IncoherentInstances |
|
InstanceSigs |
|
DoRec |
|
RecursiveDo |
|
ParallelListComp |
|
MultiParamTypeClasses |
|
MonomorphismRestriction |
|
FunctionalDependencies |
|
Rank2Types |
|
RankNTypes |
|
PolymorphicComponents |
|
ExistentialQuantification |
|
ScopedTypeVariables |
|
PatternSignatures | Deprecated, use |
ImplicitParams |
|
FlexibleContexts |
|
FlexibleInstances |
|
EmptyDataDecls |
|
CPP |
|
KindSignatures |
|
BangPatterns |
|
TypeSynonymInstances |
|
TemplateHaskell |
|
ForeignFunctionInterface |
|
Arrows |
|
Generics |
|
ImplicitPrelude |
|
NamedFieldPuns |
|
PatternGuards |
|
GeneralizedNewtypeDeriving |
|
DeriveAnyClass |
|
ExtensibleRecords |
|
RestrictedTypeSynonyms |
|
HereDocuments |
|
MagicHash |
|
BinaryLiterals | Binary integer literals |
TypeFamilies |
|
StandaloneDeriving |
|
UnicodeSyntax |
|
UnliftedFFITypes |
|
LiberalTypeSynonyms |
|
TypeOperators |
|
ParallelArrays |
|
RecordWildCards |
|
RecordPuns | Deprecated, use |
DisambiguateRecordFields |
|
OverloadedStrings |
|
GADTs |
|
MonoPatBinds |
|
RelaxedPolyRec |
|
ExtendedDefaultRules |
|
UnboxedTuples |
|
DeriveDataTypeable |
|
ConstrainedClassMethods |
|
PackageImports |
import "network" Network.Socket |
LambdaCase | |
EmptyCase |
|
ImpredicativeTypes |
|
NewQualifiedOperators |
|
PostfixOperators |
|
QuasiQuotes |
|
TransformListComp |
|
ViewPatterns |
|
XmlSyntax | Allow concrete XML syntax to be used in expressions and patterns, as per the Haskell Server Pages extension language: http://www.haskell.org/haskellwiki/HSP. The ideas behind it are discussed in the paper "Haskell Server Pages through Dynamic Loading" by Niklas Broberg, from Haskell Workshop '05. |
RegularPatterns | Allow regular pattern matching over lists, as discussed in the paper "Regular Expression Patterns" by Niklas Broberg, Andreas Farre and Josef Svenningsson, from ICFP '04. |
TupleSections | Enables the use of tuple sections, e.g. |
GHCForeignImportPrim | Allows GHC primops, written in C--, to be imported into a Haskell file. |
NPlusKPatterns | Support for patterns of the form |
DoAndIfThenElse | Improve the layout rule when |
RebindableSyntax | Makes much of the Haskell sugar be desugared into calls to the function with a particular name that is in scope. |
ExplicitForAll | Make |
DatatypeContexts | Allow contexts to be put on datatypes, e.g. the |
MonoLocalBinds | Local ( |
DeriveFunctor | Enable |
DeriveGeneric |
|
DeriveTraversable | Enable |
DeriveFoldable | Enable |
NondecreasingIndentation | Enable non-decreasing indentation for 'do' blocks. |
InterruptibleFFI |
|
CApiFFI |
|
JavaScriptFFI | GHCJS FFI extension with convenient import patterns, asynchronous FFI and a JSVal FFI type |
ExplicitNamespaces |
|
DataKinds | |
PolyKinds | |
MultiWayIf |
|
SafeImports |
import safe Network.Socket |
Safe |
|
Trustworthy |
|
DefaultSignatures |
|
ConstraintKinds |
|
RoleAnnotations |
|
PatternSynonyms |
|
PartialTypeSignatures |
|
NamedWildCards |
|
TypeApplications | |
TypeFamilyDependencies | |
OverloadedLabels | |
DerivingStrategies | Allow multiple |
UnboxedSums |
Instances
Rendering mode.
PageMode | Normal rendering ( |
ZigZagMode | With zig-zag cuts. |
LeftMode | No indentation, infinitely long lines ( |
OneLineMode | All on one line, |
Instances
Eq Mode | |
Show Mode | |
Generic Mode | |
type Rep Mode | |
Defined in Text.PrettyPrint.Annotated.HughesPJ type Rep Mode = D1 (MetaData "Mode" "Text.PrettyPrint.Annotated.HughesPJ" "pretty-1.1.3.6" False) ((C1 (MetaCons "PageMode" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ZigZagMode" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "LeftMode" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "OneLineMode" PrefixI False) (U1 :: Type -> Type))) |
A rendering style. Allows us to specify constraints to choose among the many different rendering options.
Style | |
|
Instances
Eq Style | |
Show Style | |
Generic Style | |
type Rep Style | |
Defined in Text.PrettyPrint.Annotated.HughesPJ type Rep Style = D1 (MetaData "Style" "Text.PrettyPrint.Annotated.HughesPJ" "pretty-1.1.3.6" False) (C1 (MetaCons "Style" PrefixI True) (S1 (MetaSel (Just "mode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mode) :*: (S1 (MetaSel (Just "lineLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "ribbonsPerLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Float)))) |
type FullDataDecl = (ModuleName (), DataDecl) Source #
fromTyTuple :: Type l -> [Type l] Source #
fromTyParen :: Type () -> Type () Source #
fromTyParens :: Type () -> Type () Source #
isGuardFalse :: Match l -> Bool Source #
dataDeclType :: DataDecl -> Type () Source #
dataDeclFields :: DataDecl -> [String] Source #
moduleName :: Module l -> ModuleName l Source #
moduleDecls :: Module l -> [Decl l] Source #
moduleImports :: Module l -> [ImportDecl l] Source #
modulePragmas :: Module l -> [ModulePragma l] Source #
isDataDecl :: Decl () -> Bool Source #
dataDeclName :: DataDecl -> String Source #
fromIParen :: InstRule a -> InstRule a Source #
dataDeclVars :: DataDecl -> [String] Source #
dataDeclVarsStar :: DataDecl -> [String] Source #
dataDeclArity :: DataDecl -> Int Source #
dataDeclCtors :: DataDecl -> [CtorDecl] Source #
ctorDeclName :: CtorDecl -> String Source #
ctorDeclName' :: CtorDecl -> Name () Source #
ctorDeclFields :: CtorDecl -> FieldDecl Source #
ctorDeclArity :: CtorDecl -> Int Source #