haskell-tools-ast-0.2.0.0: Haskell AST for efficient tooling

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.AST.Decls

Description

Representation of Haskell AST definitions. These include definition of data types, classes, instances and so on. The definition of value bindings are in the Binds module.

Synopsis

Documentation

data Decl dom stage Source #

Haskell declaration

Constructors

TypeDecl

A type synonym ( type String = [Char] )

Fields

TypeFamilyDecl 

Fields

ClosedTypeFamilyDecl

A closed type family declaration

Fields

DataDecl

A data or newtype declaration. Empty data type declarations without where keyword are always belong to DataDecl.

Fields

GDataDecl

A data or newtype declaration.

TypeInstDecl

Type instance declaration ( type instance Fam T = AssignedT )

Fields

DataInstDecl

Data instance declaration ( data instance Fam T = Con1 | Con2 )

GDataInstDecl

Gadt style data instance declaration ( data instance Fam T where ... )

ClassDecl

Type class declaration ( class X a [where f = ...] )

Fields

InstDecl

Instance declaration ( instance X T [where f = ...] )

PatternSynonymDecl

Pattern synonyms ( pattern Arrow t1 t2 = App "->" [t1, t2] )

Fields

DerivDecl

Standalone deriving declaration ( deriving instance X T )

FixityDecl

Fixity declaration ( infixl 5 +, - )

Fields

DefaultDecl

Default types ( default (T1, T2) )

Fields

TypeSigDecl

Type signature declaration ( _f :: Int -> Int )

Fields

PatTypeSigDecl

Type signature declaration ( _f :: Int -> Int )

ValueBinding

Function binding ( f x = 12 )

Fields

ForeignImport

Foreign import ( foreign import _foo :: Int -> IO Int )

Fields

ForeignExport

foreign export ( foreign export ccall _foo :: Int -> IO Int )

Fields

PragmaDecl

top level pragmas

Fields

RoleDecl

role annotations ( type role Ptr representational )

Fields

SpliceDecl

A Template Haskell splice declaration ( $(generateDecls) )

Fields

Instances

BindingElem Decl Source # 

Methods

sigBind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r (MU *) (MU *) (Decl dom stage) (Decl dom stage) (Ann TypeSignature dom stage) (Ann TypeSignature dom stage) Source #

valBind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r (MU *) (MU *) (Decl dom stage) (Decl dom stage) (Ann ValueBind dom stage) (Ann ValueBind dom stage) Source #

createTypeSig :: Ann TypeSignature dom stage -> Decl dom stage Source #

createBinding :: Ann ValueBind dom stage -> Decl dom stage Source #

isTypeSig :: Decl dom stage -> Bool Source #

isBinding :: Decl dom stage -> Bool Source #

type Rep (Decl dom stage) Source # 
type Rep (Decl dom stage) = D1 (MetaData "Decl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TypeDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))) (S1 (MetaSel (Just Symbol "_declType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))) (C1 (MetaCons "TypeFamilyDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declTypeFamily") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeFamily dom stage))))) ((:+:) (C1 (MetaCons "ClosedTypeFamilyDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_declKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint dom stage))) (S1 (MetaSel (Just Symbol "_declDecl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList TypeEqn dom stage)))))) ((:+:) (C1 (MetaCons "DataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword dom stage))) (S1 (MetaSel (Just Symbol "_declCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context dom stage)))) ((:*:) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_declCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ConDecl dom stage))) (S1 (MetaSel (Just Symbol "_declDeriving") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving dom stage))))))) (C1 (MetaCons "GDataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_declCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context dom stage))) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))))) ((:*:) (S1 (MetaSel (Just Symbol "_declKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_declGadt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GadtConDecl dom stage))) (S1 (MetaSel (Just Symbol "_declDeriving") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving dom stage)))))))))) ((:+:) ((:+:) (C1 (MetaCons "TypeInstDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declInstance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage))) (S1 (MetaSel (Just Symbol "_declAssignedType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))) ((:+:) (C1 (MetaCons "DataInstDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword dom stage))) (S1 (MetaSel (Just Symbol "_declInstance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage)))) ((:*:) (S1 (MetaSel (Just Symbol "_declCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ConDecl dom stage))) (S1 (MetaSel (Just Symbol "_declDeriving") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving dom stage)))))) (C1 (MetaCons "GDataInstDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword dom stage))) (S1 (MetaSel (Just Symbol "_declInstance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage)))) ((:*:) (S1 (MetaSel (Just Symbol "_declKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint dom stage))) (S1 (MetaSel (Just Symbol "_declGadt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GadtConDecl dom stage)))))))) ((:+:) (C1 (MetaCons "ClassDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context dom stage))) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage)))) ((:*:) (S1 (MetaSel (Just Symbol "_declFunDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe FunDeps dom stage))) (S1 (MetaSel (Just Symbol "_declBody") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe ClassBody dom stage)))))) ((:+:) (C1 (MetaCons "InstDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declOverlap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe OverlapPragma dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_declInstRule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage))) (S1 (MetaSel (Just Symbol "_declInstDecl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe InstBody dom stage)))))) (C1 (MetaCons "PatternSynonymDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declPatSyn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternSynonym dom stage)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "DerivDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declOverlap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe OverlapPragma dom stage))) (S1 (MetaSel (Just Symbol "_declInstRule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage))))) (C1 (MetaCons "FixityDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declFixity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann FixitySignature dom stage))))) ((:+:) (C1 (MetaCons "DefaultDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declTypes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type dom stage)))) ((:+:) (C1 (MetaCons "TypeSigDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeSignature dom stage)))) (C1 (MetaCons "PatTypeSigDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declPatTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternTypeSignature dom stage))))))) ((:+:) ((:+:) (C1 (MetaCons "ValueBinding" PrefixI True) (S1 (MetaSel (Just Symbol "_declValBind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ValueBind dom stage)))) ((:+:) (C1 (MetaCons "ForeignImport" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declCallConv") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann CallConv dom stage))) (S1 (MetaSel (Just Symbol "_declSafety") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Safety dom stage)))) ((:*:) (S1 (MetaSel (Just Symbol "_declName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_declType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))) (C1 (MetaCons "ForeignExport" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declCallConv") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann CallConv dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_declName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_declType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))))) ((:+:) (C1 (MetaCons "PragmaDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declPragma") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TopLevelPragma dom stage)))) ((:+:) (C1 (MetaCons "RoleDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declRoleType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann QualifiedName dom stage))) (S1 (MetaSel (Just Symbol "_declRoles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Role dom stage))))) (C1 (MetaCons "SpliceDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declSplice") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Splice dom stage)))))))))

data TypeFamily dom stage Source #

Open type and data families

Constructors

TypeFamily

A type family declaration ( type family A _a :: * -> * )

Fields

DataFamily

Data family declaration

Fields

Instances

type Rep (TypeFamily dom stage) Source # 
type Rep (TypeFamily dom stage) = D1 (MetaData "TypeFamily" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "TypeFamily" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tfHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))) (S1 (MetaSel (Just Symbol "_tfSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe TypeFamilySpec dom stage))))) (C1 (MetaCons "DataFamily" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tfHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))) (S1 (MetaSel (Just Symbol "_tfKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint dom stage))))))

data TypeFamilySpec dom stage Source #

Type family specification with kinds specification and injectivity.

Instances

type Rep (TypeFamilySpec dom stage) Source # 
type Rep (TypeFamilySpec dom stage) = D1 (MetaData "TypeFamilySpec" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "TypeFamilyKind" PrefixI True) (S1 (MetaSel (Just Symbol "_tfSpecKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann KindConstraint dom stage)))) (C1 (MetaCons "TypeFamilyInjectivity" PrefixI True) (S1 (MetaSel (Just Symbol "_tfInjectivity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InjectivityAnn dom stage)))))

data InjectivityAnn dom stage Source #

Injectivity annotation for type families ( = r | r -> a )

Constructors

InjectivityAnn 

Fields

Instances

type Rep (InjectivityAnn dom stage) Source # 
type Rep (InjectivityAnn dom stage) = D1 (MetaData "InjectivityAnn" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "InjectivityAnn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_injAnnRes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_injAnnDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name dom stage)))))

data ClassBody dom stage Source #

The list of declarations that can appear in a typeclass

Constructors

ClassBody 

Fields

Instances

type Rep (ClassBody dom stage) Source # 
type Rep (ClassBody dom stage) = D1 (MetaData "ClassBody" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "ClassBody" PrefixI True) (S1 (MetaSel (Just Symbol "_cbElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ClassElement dom stage))))

data ClassElement dom stage Source #

Members of a class declaration

Constructors

ClsSig

Signature: _f :: A -> B

Fields

ClsDef

Default binding: f x = "aaa"

Fields

ClsTypeFam

Declaration of an associated type synonym: type T _x :: *

Fields

ClsTypeDef

Default choice for type synonym: type T x = TE or type instance T x = TE

Fields

ClsDefSig

Default signature (by using DefaultSignatures): default _enum :: (Generic a, GEnum (Rep a)) => [a]

Fields

ClsMinimal

Minimal pragma: {--}

Fields

ClsPatSig

Pattern signature in a class declaration (by using PatternSynonyms)

Fields

Instances

type Rep (ClassElement dom stage) Source # 
type Rep (ClassElement dom stage) = D1 (MetaData "ClassElement" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) ((:+:) (C1 (MetaCons "ClsSig" PrefixI True) (S1 (MetaSel (Just Symbol "_ceTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeSignature dom stage)))) ((:+:) (C1 (MetaCons "ClsDef" PrefixI True) (S1 (MetaSel (Just Symbol "_ceBind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ValueBind dom stage)))) (C1 (MetaCons "ClsTypeFam" PrefixI True) (S1 (MetaSel (Just Symbol "_ceTypeFam") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeFamily dom stage)))))) ((:+:) ((:+:) (C1 (MetaCons "ClsTypeDef" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ceHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))) (S1 (MetaSel (Just Symbol "_ceKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))) (C1 (MetaCons "ClsDefSig" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ceName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_ceType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))) ((:+:) (C1 (MetaCons "ClsMinimal" PrefixI True) (S1 (MetaSel (Just Symbol "_pragmaFormula") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann MinimalFormula dom stage)))) (C1 (MetaCons "ClsPatSig" PrefixI True) (S1 (MetaSel (Just Symbol "_cePatSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternTypeSignature dom stage)))))))

data DeclHead dom stage Source #

Constructors

DeclHead

Type or class name

Fields

DHParen

Parenthesized type

Fields

DHApp

Type application

Fields

DHInfix

Infix application of the type/class name to the left operand

Fields

Instances

type Rep (DeclHead dom stage) Source # 
type Rep (DeclHead dom stage) = D1 (MetaData "DeclHead" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) ((:+:) (C1 (MetaCons "DeclHead" PrefixI True) (S1 (MetaSel (Just Symbol "_dhName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage)))) (C1 (MetaCons "DHParen" PrefixI True) (S1 (MetaSel (Just Symbol "_dhBody") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))))) ((:+:) (C1 (MetaCons "DHApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_dhAppFun") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead dom stage))) (S1 (MetaSel (Just Symbol "_dhAppOperand") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TyVar dom stage))))) (C1 (MetaCons "DHInfix" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_dhLeft") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TyVar dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_dhOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator dom stage))) (S1 (MetaSel (Just Symbol "_dhRight") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TyVar dom stage))))))))

data InstBody dom stage Source #

Instance body is the implementation of the class functions ( where a x = 1; b x = 2 )

Constructors

InstBody 

Fields

Instances

type Rep (InstBody dom stage) Source # 
type Rep (InstBody dom stage) = D1 (MetaData "InstBody" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "InstBody" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyDecls") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList InstBodyDecl dom stage))))

data InstBodyDecl dom stage Source #

Declarations inside an instance declaration.

Constructors

InstBodyNormalDecl

A normal declaration ( f x = 12 )

Fields

InstBodyTypeSig

Type signature in instance definition with InstanceSigs

Fields

InstBodyTypeDecl

An associated type definition ( type A X = B )

Fields

InstBodyDataDecl

An associated data type implementation ( data A X = C1 | C2 )

InstBodyGadtDataDecl

An associated data type implemented using GADT style

SpecializeInstance

Specialize instance pragma (no phase selection is allowed) not supported yet

Fields

InstBodyPatSyn

A pattern synonym in a class instance

Fields

Instances

type Rep (InstBodyDecl dom stage) Source # 
type Rep (InstBodyDecl dom stage) = D1 (MetaData "InstBodyDecl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) ((:+:) (C1 (MetaCons "InstBodyNormalDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyDeclFunbind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ValueBind dom stage)))) ((:+:) (C1 (MetaCons "InstBodyTypeSig" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeSignature dom stage)))) (C1 (MetaCons "InstBodyTypeDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyTypeEqn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeEqn dom stage)))))) ((:+:) ((:+:) (C1 (MetaCons "InstBodyDataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataNew") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword dom stage))) (S1 (MetaSel (Just Symbol "_instBodyLhsType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage)))) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ConDecl dom stage))) (S1 (MetaSel (Just Symbol "_instBodyDerivings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving dom stage)))))) (C1 (MetaCons "InstBodyGadtDataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataNew") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword dom stage))) (S1 (MetaSel (Just Symbol "_instBodyLhsType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage)))) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyGadtCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GadtConDecl dom stage))) (S1 (MetaSel (Just Symbol "_instBodyDerivings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving dom stage)))))))) ((:+:) (C1 (MetaCons "SpecializeInstance" PrefixI True) (S1 (MetaSel (Just Symbol "_specializeInstanceType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))) (C1 (MetaCons "InstBodyPatSyn" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyPatSyn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternSynonym dom stage)))))))

data GadtConDecl dom stage Source #

GADT constructor declaration ( _D1 :: { _val :: Int } -> T String )

Constructors

GadtConDecl 

Fields

Instances

type Rep (GadtConDecl dom stage) Source # 
type Rep (GadtConDecl dom stage) = D1 (MetaData "GadtConDecl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "GadtConDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gadtConNames") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name dom stage))) (S1 (MetaSel (Just Symbol "_gadtConType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann GadtConType dom stage)))))

data GadtConType dom stage Source #

Type of GADT constructors (can be record types: { _val :: Int })

Constructors

GadtNormalType 

Fields

GadtRecordType 

Instances

type Rep (GadtConType dom stage) Source # 
type Rep (GadtConType dom stage) = D1 (MetaData "GadtConType" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "GadtNormalType" PrefixI True) (S1 (MetaSel (Just Symbol "_gadtConNormalType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))) (C1 (MetaCons "GadtRecordType" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gadtConRecordFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FieldDecl dom stage))) (S1 (MetaSel (Just Symbol "_gadtConResultType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))))

data FunDeps dom stage Source #

A list of functional dependencies: | a -> b, c -> d separated by commas

Constructors

FunDeps 

Fields

Instances

type Rep (FunDeps dom stage) Source # 
type Rep (FunDeps dom stage) = D1 (MetaData "FunDeps" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "FunDeps" PrefixI True) (S1 (MetaSel (Just Symbol "_funDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FunDep dom stage))))

data FunDep dom stage Source #

A functional dependency, given on the form l1 ... ln -> r1 ... rn

Constructors

FunDep 

Fields

Instances

type Rep (FunDep dom stage) Source # 
type Rep (FunDep dom stage) = D1 (MetaData "FunDep" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "FunDep" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_funDepLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name dom stage))) (S1 (MetaSel (Just Symbol "_funDepRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name dom stage)))))

data ConDecl dom stage Source #

A constructor declaration for a datatype

Constructors

ConDecl

ordinary data constructor ( C t1 t2 )

Fields

RecordDecl

record data constructor ( C { _n1 :: t1, _n2 :: t2 } )

Fields

InfixConDecl

infix data constructor ( t1 :+: t2 )

Fields

Instances

type Rep (ConDecl dom stage) Source # 
type Rep (ConDecl dom stage) = D1 (MetaData "ConDecl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "ConDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_conDeclName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_conDeclArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type dom stage))))) ((:+:) (C1 (MetaCons "RecordDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_conDeclName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_conDeclFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FieldDecl dom stage))))) (C1 (MetaCons "InfixConDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_conDeclLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_conDeclOp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator dom stage))) (S1 (MetaSel (Just Symbol "_conDeclRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))))))

data FieldDecl dom stage Source #

Field declaration ( _fld :: Int )

Constructors

FieldDecl 

Fields

Instances

type Rep (FieldDecl dom stage) Source # 
type Rep (FieldDecl dom stage) = D1 (MetaData "FieldDecl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "FieldDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_fieldNames") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name dom stage))) (S1 (MetaSel (Just Symbol "_fieldType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))

data Deriving dom stage Source #

A deriving clause following a data type declaration. ( deriving Show or deriving (Show, Eq) )

Constructors

DerivingOne 

Fields

Derivings 

Fields

Instances

type Rep (Deriving dom stage) Source # 
type Rep (Deriving dom stage) = D1 (MetaData "Deriving" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "DerivingOne" PrefixI True) (S1 (MetaSel (Just Symbol "_oneDerived") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead dom stage)))) (C1 (MetaCons "Derivings" PrefixI True) (S1 (MetaSel (Just Symbol "_allDerived") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList InstanceHead dom stage)))))

data InstanceRule dom stage Source #

The instance declaration rule, which is, roughly, the part of the instance declaration before the where keyword.

Constructors

InstanceRule 

Fields

InstanceParen 

Fields

Instances

type Rep (InstanceRule dom stage) Source # 
type Rep (InstanceRule dom stage) = D1 (MetaData "InstanceRule" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "InstanceRule" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_irVars") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe (AnnList TyVar) dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_irCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context dom stage))) (S1 (MetaSel (Just Symbol "_irHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead dom stage)))))) (C1 (MetaCons "InstanceParen" PrefixI True) (S1 (MetaSel (Just Symbol "_irRule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule dom stage)))))

data InstanceHead dom stage Source #

The specification of the class instance declaration

Constructors

InstanceHeadCon

Type or class name

Fields

InstanceHeadInfix

Infix application of the type/class name to the left operand

Fields

InstanceHeadParen

Parenthesized instance head

Fields

InstanceHeadApp

Application to one more type

Fields

Instances

type Rep (InstanceHead dom stage) Source # 
type Rep (InstanceHead dom stage) = D1 (MetaData "InstanceHead" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) ((:+:) (C1 (MetaCons "InstanceHeadCon" PrefixI True) (S1 (MetaSel (Just Symbol "_ihConName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage)))) (C1 (MetaCons "InstanceHeadInfix" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ihLeftOp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) (S1 (MetaSel (Just Symbol "_ihOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage)))))) ((:+:) (C1 (MetaCons "InstanceHeadParen" PrefixI True) (S1 (MetaSel (Just Symbol "_ihHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead dom stage)))) (C1 (MetaCons "InstanceHeadApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ihFun") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead dom stage))) (S1 (MetaSel (Just Symbol "_ihType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))))

data TypeEqn dom stage Source #

Type equations as found in closed type families ( T A = S )

Constructors

TypeEqn 

Fields

Instances

type Rep (TypeEqn dom stage) Source # 
type Rep (TypeEqn dom stage) = D1 (MetaData "TypeEqn" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "TypeEqn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_teLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) (S1 (MetaSel (Just Symbol "_teRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))

data PatternTypeSignature dom stage Source #

A pattern type signature ( pattern p :: Int -> T )

Constructors

PatternTypeSignature 

Fields

Instances

type Rep (PatternTypeSignature dom stage) Source # 
type Rep (PatternTypeSignature dom stage) = D1 (MetaData "PatternTypeSignature" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "PatternTypeSignature" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patSigName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_patSigType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))

data PatternSynonym dom stage Source #

Pattern synonyms: pattern Arrow t1 t2 = App "->" [t1, t2]

Constructors

PatternSynonym 

Fields

Instances

type Rep (PatternSynonym dom stage) Source # 
type Rep (PatternSynonym dom stage) = D1 (MetaData "PatternSynonym" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "PatternSynonym" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatSynLhs dom stage))) (S1 (MetaSel (Just Symbol "_patRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatSynRhs dom stage)))))

data PatSynLhs dom stage Source #

Left hand side of a pattern synonym

Constructors

NormalPatSyn 

Fields

InfixPatSyn 

Fields

RecordPatSyn 

Fields

Instances

type Rep (PatSynLhs dom stage) Source # 
type Rep (PatSynLhs dom stage) = D1 (MetaData "PatSynLhs" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "NormalPatSyn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_patArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name dom stage))))) ((:+:) (C1 (MetaCons "InfixPatSyn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patSynLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_patSynOp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator dom stage))) (S1 (MetaSel (Just Symbol "_patSynRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage)))))) (C1 (MetaCons "RecordPatSyn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_patArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name dom stage)))))))

data PatSynRhs dom stage Source #

Right-hand side of pattern synonym

Constructors

BidirectionalPatSyn

pattern Int = App Int [] or pattern Int <- App Int [] where Int = App Int []

Fields

OneDirectionalPatSyn
 pattern Int <- App Int []

Fields

Instances

type Rep (PatSynRhs dom stage) Source # 
type Rep (PatSynRhs dom stage) = D1 (MetaData "PatSynRhs" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "BidirectionalPatSyn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patRhsPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern dom stage))) (S1 (MetaSel (Just Symbol "_patRhsOpposite") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe PatSynWhere dom stage))))) (C1 (MetaCons "OneDirectionalPatSyn" PrefixI True) (S1 (MetaSel (Just Symbol "_patRhsPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern dom stage)))))

data PatSynWhere dom stage Source #

Where clause of pattern synonym (explicit expression direction)

Constructors

PatSynWhere 

Fields

Instances

type Rep (PatSynWhere dom stage) Source # 
type Rep (PatSynWhere dom stage) = D1 (MetaData "PatSynWhere" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "PatSynWhere" PrefixI True) (S1 (MetaSel (Just Symbol "_patOpposite") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Match dom stage))))