Safe Haskell | Safe-Inferred
Language | Haskell2010

TypeFamilies

Description

Doc for: module TypeFamilies

Synopsis

- data X
  - = X
  - | XX
  - | XXX
- data Y
- data Z
  - = ZA
  - | ZB
- class Test a
- type family Foo a :: k
- data family Bat (a :: k) :: *
- class Assoc a where
  - data AssocD a :: *
  - type AssocT a :: *
- type family Bar b where ...
- type family (a :: k) <> (b :: k) :: k
- class (a :: k) >< (b :: k)

# Documentation

data X #

Doc for: data X

Constructors

X | Doc for: X
XX | Doc for: XX
XXX | Doc for: XXX

#### Instances

Instances details

Assoc X # | Doc for: instance Assoc X
Instance details Defined in TypeFamilies Associated Types data AssocD X # type AssocT X #
Test X # | Doc for: instance Test X
Instance details Defined in TypeFamilies
'XX >< 'XXX # |
Instance details Defined in TypeFamilies
type Foo X # | External instance
Instance details Defined in TypeFamilies type Foo X = Y
data AssocD X # |
Instance details Defined in TypeFamilies data AssocD X = AssocX
type AssocT X # |
Instance details Defined in TypeFamilies type AssocT X = Foo X :: Type
data Bat X # | Doc for: data instance Bat X
Instance details Defined in TypeFamilies data Bat X = BatX X | BatXX { aaa :: X bbb :: Y }
type Foo X # | Doc for: type instance Foo X = Y
Instance details Defined in TypeFamilies type Foo X = Y
type 'XXX <> 'XX # |
Instance details Defined in TypeFamilies type 'XXX <> 'XX = 'X
type X <> (a :: Type) # |
Instance details Defined in TypeFamilies type X <> (a :: Type) = X

data Y #

Doc for: data Y

#### Instances

Instances details

Assoc Y # | Doc for: instance Assoc Y
Instance details Defined in TypeFamilies Associated Types data AssocD Y # type AssocT Y #
Test Y # | Doc for: instance Test Y
Instance details Defined in TypeFamilies
data Bar Y # |
Instance details Defined in TypeFamilies data Bar Y
data AssocD Y # |
Instance details Defined in TypeFamilies data AssocD Y = AssocY
type AssocT Y # |
Instance details Defined in TypeFamilies type AssocT Y = Bat Y
data Bat Y # | Doc for: data instance Bat Y
Instance details Defined in TypeFamilies data Bat Y = BatY Y
type Foo Y # | Doc for: type instance Foo Y = X
Instance details Defined in TypeFamilies type Foo Y = X
type Y <> (a :: Type) # |
Instance details Defined in TypeFamilies type Y <> (a :: Type) = a

data Z #

Doc for: data Z

Constructors

ZA |
ZB |

#### Instances

Instances details

data Bat (z :: Z) # | Doc for: data instance Bat Z
Instance details Defined in TypeFamilies data Bat (z :: Z) where BatZ1 :: Z -> Bat 'ZA BatZ2 :: {..} -> Bat 'ZB

class Test a #

Doc for: class Test a

#### Instances

Instances details

Test X # | Doc for: instance Test X
Instance details Defined in TypeFamilies
Test Y # | Doc for: instance Test Y
Instance details Defined in TypeFamilies

type family Foo a :: k #

Doc for: type family Foo a

#### Instances

Instances details

type Foo X # | Doc for: type instance Foo X = Y
Instance details Defined in TypeFamilies type Foo X = Y
type Foo Y # | Doc for: type instance Foo Y = X
Instance details Defined in TypeFamilies type Foo Y = X

data family Bat (a :: k) :: * #

Doc for: data family Bat a

#### Instances

Instances details

data Bat (z :: Z) # | Doc for: data instance Bat Z
Instance details Defined in TypeFamilies data Bat (z :: Z) where BatZ1 :: Z -> Bat 'ZA BatZ2 :: {..} -> Bat 'ZB
data Bat X # | Doc for: data instance Bat X
Instance details Defined in TypeFamilies data Bat X = BatX X | BatXX { aaa :: X bbb :: Y }
data Bat Y # | Doc for: data instance Bat Y
Instance details Defined in TypeFamilies data Bat Y = BatY Y

class Assoc a #

Doc for: class Assoc a

Associated Types

data AssocD a :: * #

Doc for: data AssocD a

type AssocT a :: * #

Doc for: type AssocT a

#### Instances

Instances details

Assoc X # | Doc for: instance Assoc X
Instance details Defined in TypeFamilies Associated Types data AssocD X # type AssocT X #
Assoc Y # | Doc for: instance Assoc Y
Instance details Defined in TypeFamilies Associated Types data AssocD Y # type AssocT Y #

type family Bar b where ... #

Doc for: type family Bar b

Equations

Bar X = X |
Bar y = Y |

type family (a :: k) <> (b :: k) :: k #

#### Instances

Instances details

type 'XXX <> 'XX # |
Instance details Defined in TypeFamilies type 'XXX <> 'XX = 'X
type X <> (a :: Type) # |
Instance details Defined in TypeFamilies type X <> (a :: Type) = X
type Y <> (a :: Type) # |
Instance details Defined in TypeFamilies type Y <> (a :: Type) = a

class (a :: k) >< (b :: k) #

#### Instances

Instances details

'XX >< 'XXX # |
Instance details Defined in TypeFamilies