giml-syntax-0.1.0.0: Syntax for Giml - A purely functional programming language with emphasis on structural typing
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Giml.Syntax.Types

Description

Type definitions

Synopsis

Documentation

data Kind Source #

A data type representing kinds.

Constructors

Type 
KindFun Kind Kind 

Instances

Instances details
Data Kind Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Kind -> c Kind #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Kind #

toConstr :: Kind -> Constr #

dataTypeOf :: Kind -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Kind) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Kind) #

gmapT :: (forall b. Data b => b -> b) -> Kind -> Kind #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Kind -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Kind -> r #

gmapQ :: (forall d. Data d => d -> u) -> Kind -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Kind -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Kind -> m Kind #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Kind -> m Kind #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Kind -> m Kind #

Show Kind Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

showsPrec :: Int -> Kind -> ShowS #

show :: Kind -> String #

showList :: [Kind] -> ShowS #

Eq Kind Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

(==) :: Kind -> Kind -> Bool #

(/=) :: Kind -> Kind -> Bool #

Ord Kind Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

compare :: Kind -> Kind -> Ordering #

(<) :: Kind -> Kind -> Bool #

(<=) :: Kind -> Kind -> Bool #

(>) :: Kind -> Kind -> Bool #

(>=) :: Kind -> Kind -> Bool #

max :: Kind -> Kind -> Kind #

min :: Kind -> Kind -> Kind #

data Type Source #

A data type representing types.

Constructors

TypeVar TypeVar

type variables, like a

TypeCon TypeCon

type constructors, like List and Int

TypeApp Type Type

type application, like List a

TypeRec [(Label, Type)]

the type of a record, like { x : Int, y : String }

TypeRecExt [(Label, Type)] TypeVar

a record with an extension, such as { x : Int, y : String | r }, means "this record has at least { x : Int, y : String }, but can have more fields"

TypeVariant [(Constr, Type)]

the type of a closed variant, such as [ Some : Int | Nil : {} ], the value can be one of the constructors.

TypePolyVariantLB [(Constr, Type)] TypeVar

the type of a lower bounded polymorphic variant, such as [a> Some : Int | Nil : {} ], the value can be at least one of the constructors or potentially more.

TypePolyVariantUB TypeVar [(Constr, Type)]

the type of a upper bounded polymorphic variant, such as [a< Some : Int | Nil : {} ], the value can be at most one of the constructors or potentially less.

The type variable here is special and is used to track the information of which variants we already know of during the type inference process.

TypeScheme [TypeVar] Type

A generalized type which closes over all of its type variables, such as forall a b. a -> b -> a

Instances

Instances details
Data Type Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type #

toConstr :: Type -> Constr #

dataTypeOf :: Type -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) #

gmapT :: (forall b. Data b => b -> b) -> Type -> Type #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r #

gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type #

Show Type Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Eq Type Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Ord Type Source # 
Instance details

Defined in Language.Giml.Syntax.Types

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

(>=) :: Type -> Type -> Bool #

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

overTypes :: Monad m => (Type -> m Type) -> Type -> m Type Source #