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

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.AST.Types

Description

Representation of Haskell types

Synopsis

Documentation

data TyVar dom stage Source #

Type variable declaration

Constructors

TyVarDecl 

Fields

Instances

type Rep (TyVar dom stage) Source # 
type Rep (TyVar dom stage) = D1 (MetaData "TyVar" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) (C1 (MetaCons "TyVarDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tyVarName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_tyVarKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint dom stage)))))

data Type dom stage Source #

Haskell types

Constructors

TyForall

Forall types ( forall x y . type )

Fields

TyCtx

Type with a context ( forall x y . type )

Fields

TyFun

Function types ( a -> b )

Fields

TyTuple

Tuple types ( (a,b) )

Fields

TyUnbTuple

Unboxed tuple types ( () )

Fields

TyList

List type with special syntax ( [a] )

Fields

TyParArray

Parallel array type ( [:a:] )

Fields

TyApp

Type application ( F a )

Fields

TyVar

type variable or constructor ( a )

Fields

TyParen

type surrounded by parentheses ( (T a) )

Fields

TyInfix

Infix type constructor ( (a <: b) )

Fields

TyKinded

Type with explicit kind signature ( _a :: * )

Fields

TyPromoted 

Fields

TySplice

a Template Haskell splice type ( $(genType) ).

Fields

TyQuasiQuote

a Template Haskell quasi-quote type ( [quoter| ... ] ).

Fields

TyBang

Strict type marked with !.

Fields

TyLazy

Lazy type marked with ~. (Should only be used if Strict or StrictData language extension is used)

Fields

TyUnpack

Strict type marked with UNPACK pragma. (Usually contains the bang mark.)

Fields

TyNoUnpack

Strict type marked with NOUNPACK pragma. (Usually contains the bang mark.)

Fields

TyWildcard

A wildcard type ( _ ) with -XPartialTypeSignatures

TyNamedWildc

A named wildcard type ( _t ) with -XPartialTypeSignatures

Fields

Instances

type Rep (Type dom stage) Source # 
type Rep (Type dom stage) = D1 (MetaData "Type" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TyForall" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeBounded") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList TyVar dom stage))) (S1 (MetaSel (Just Symbol "_typeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))) (C1 (MetaCons "TyCtx" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Context dom stage))) (S1 (MetaSel (Just Symbol "_typeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))) ((:+:) (C1 (MetaCons "TyFun" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeParam") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) (S1 (MetaSel (Just Symbol "_typeResult") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))) ((:+:) (C1 (MetaCons "TyTuple" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type dom stage)))) (C1 (MetaCons "TyUnbTuple" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type dom stage))))))) ((:+:) ((:+:) (C1 (MetaCons "TyList" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElement") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))) (C1 (MetaCons "TyParArray" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElement") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))) ((:+:) (C1 (MetaCons "TyApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeCon") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) (S1 (MetaSel (Just Symbol "_typeArg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))))) ((:+:) (C1 (MetaCons "TyVar" PrefixI True) (S1 (MetaSel (Just Symbol "_typeName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage)))) (C1 (MetaCons "TyParen" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TyInfix" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeLeft") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_typeOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator dom stage))) (S1 (MetaSel (Just Symbol "_typeRight") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))) (C1 (MetaCons "TyKinded" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) (S1 (MetaSel (Just Symbol "_typeKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Kind dom stage)))))) ((:+:) (C1 (MetaCons "TyPromoted" PrefixI True) (S1 (MetaSel (Just Symbol "_tpPromoted") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann (Promoted Type) dom stage)))) ((:+:) (C1 (MetaCons "TySplice" PrefixI True) (S1 (MetaSel (Just Symbol "_tsSplice") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Splice dom stage)))) (C1 (MetaCons "TyQuasiQuote" PrefixI True) (S1 (MetaSel (Just Symbol "_typeQQ") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (QuasiQuote dom stage))))))) ((:+:) ((:+:) (C1 (MetaCons "TyBang" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))) ((:+:) (C1 (MetaCons "TyLazy" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))) (C1 (MetaCons "TyUnpack" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))) ((:+:) (C1 (MetaCons "TyNoUnpack" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))) ((:+:) (C1 (MetaCons "TyWildcard" PrefixI False) U1) (C1 (MetaCons "TyNamedWildc" PrefixI True) (S1 (MetaSel (Just Symbol "_typeWildcardName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage)))))))))

data Context dom stage Source #

Constructors

ContextOne

One assertion ( C a => ... )

Fields

ContextMulti

A set of assertions ( (C1 a, C2 b) => ... , but can be one: (C a) => ... )

Fields

Instances

type Rep (Context dom stage) Source # 
type Rep (Context dom stage) = D1 (MetaData "Context" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "ContextOne" PrefixI True) (S1 (MetaSel (Just Symbol "_contextAssertion") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Assertion dom stage)))) (C1 (MetaCons "ContextMulti" PrefixI True) (S1 (MetaSel (Just Symbol "_contextAssertions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Assertion dom stage)))))

data Assertion dom stage Source #

A single assertion in the context

Constructors

ClassAssert

Class assertion (Cls x)

Fields

InfixAssert

Infix class assertion, also contains type equations ( a ~ X y )

Fields

ImplicitAssert

Assertion for implicit parameter binding ( ?cmp :: a -> a -> Bool )

Fields

Instances

type Rep (Assertion dom stage) Source # 
type Rep (Assertion dom stage) = D1 (MetaData "Assertion" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.2.0.0-5y5XIph7fmGIUhHQZ35OfD" False) ((:+:) (C1 (MetaCons "ClassAssert" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_assertClsName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_assertTypes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type dom stage))))) ((:+:) (C1 (MetaCons "InfixAssert" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_assertLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage))) ((:*:) (S1 (MetaSel (Just Symbol "_assertOp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator dom stage))) (S1 (MetaSel (Just Symbol "_assertRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))) (C1 (MetaCons "ImplicitAssert" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_assertImplVar") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name dom stage))) (S1 (MetaSel (Just Symbol "_assertImplType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type dom stage)))))))