clash-lib-1.8.1: Clash: a functional hardware description language - As a library

Copyright | (C) 2012-2016 University of Twente 2017 Google Inc. 2021 QBayLogic B.V.
License | BSD2 (see the file LICENSE)
Maintainer | QBayLogic B.V. <devops@qbaylogic.com>
Safe Haskell | Safe-Inferred
Language | Haskell2010

Clash.Core.DataCon

Description

Data Constructors in CoreHW

Synopsis

- data DataCon = MkData {
  - dcName :: !DcName
  - dcUniq :: !Unique
  - dcTag :: !ConTag
  - dcType :: !Type
  - dcUnivTyVars :: [TyVar]
  - dcExtTyVars :: [TyVar]
  - dcArgTys :: [Type]
  - dcArgStrict :: [DcStrictness]
  - dcFieldLabels :: [Text]
  }
- type DcName = Name DataCon
- type ConTag = Int
- data DcStrictness
  - = Strict
  - | Lazy

# Documentation

data DataCon Source #

Data Constructor

Constructors

MkData |

Fields

- dcName :: !DcName

  Name of the DataCon

- dcUniq :: !Unique

  Invariant: forall x . dcUniq x ~ nameUniq (dcName x)

- dcTag :: !ConTag

  Syntactical position in the type definition

- dcType :: !Type

  Type of the 'DataCon

- dcUnivTyVars :: [TyVar]

  Universally quantified type-variables, these type variables are also part of the result type of the DataCon

- dcExtTyVars :: [TyVar]

  Existentially quantified type-variables, these type variables are not part of the result of the DataCon, but only of the arguments.

- dcArgTys :: [Type]

  Argument types

- dcArgStrict :: [DcStrictness]

  Argument strictness

- dcFieldLabels :: [Text]

  Names of fields. Used when data constructor is referring to a record type.

#### Instances

Instances details

Generic DataCon Source # |
Instance details Defined in Clash.Core.DataCon Associated Types type Rep DataCon :: Type -> Type Source # Methods from :: DataCon -> Rep DataCon x Source # to :: Rep DataCon x -> DataCon Source #
Show DataCon Source # |
Instance details Defined in Clash.Core.DataCon Methods showsPrec :: Int -> DataCon -> ShowS Source # show :: DataCon -> String Source # showList :: [DataCon] -> ShowS Source #
Binary DataCon Source # |
Instance details Defined in Clash.Core.DataCon Methods put :: DataCon -> Put Source # get :: Get DataCon Source # putList :: [DataCon] -> Put Source #
HasType DataCon Source # |
Instance details Defined in Clash.Core.HasType Methods coreTypeOf :: DataCon -> Type Source #
PrettyPrec DataCon Source # |
Instance details Defined in Clash.Core.Pretty Methods pprPrec :: Monad m => Rational -> DataCon -> m ClashDoc Source # pprPrec' :: Monad m => PrettyOptions -> Rational -> DataCon -> m ClashDoc Source #
Uniquable DataCon Source # |
Instance details Defined in Clash.Core.DataCon Methods getUnique :: DataCon -> Unique Source # setUnique :: DataCon -> Unique -> DataCon Source #
NFData DataCon Source # |
Instance details Defined in Clash.Core.DataCon Methods rnf :: DataCon -> () Source #
Eq DataCon Source # |
Instance details Defined in Clash.Core.DataCon Methods (==) :: DataCon -> DataCon -> Bool Source # (/=) :: DataCon -> DataCon -> Bool Source #
Ord DataCon Source # |
Instance details Defined in Clash.Core.DataCon Methods compare :: DataCon -> DataCon -> Ordering Source # (<) :: DataCon -> DataCon -> Bool Source # (<=) :: DataCon -> DataCon -> Bool Source # (>) :: DataCon -> DataCon -> Bool Source # (>=) :: DataCon -> DataCon -> Bool Source # max :: DataCon -> DataCon -> DataCon Source # min :: DataCon -> DataCon -> DataCon Source #
type Rep DataCon Source # |

Instance details

Defined in Clash.Core.DataCon

type Rep DataCon = D1 ('MetaData "DataCon" "Clash.Core.DataCon" "clash-lib-1.8.1-9u9U7p5PpHf8vtRevUOpPF" 'False) (C1 ('MetaCons "MkData" 'PrefixI 'True) (((S1 ('MetaSel ('Just "dcName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DcName) :*: S1 ('MetaSel ('Just "dcUniq") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Unique)) :*: (S1 ('MetaSel ('Just "dcTag") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConTag) :*: S1 ('MetaSel ('Just "dcType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))) :*: ((S1 ('MetaSel ('Just "dcUnivTyVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyVar]) :*: S1 ('MetaSel ('Just "dcExtTyVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyVar])) :*: (S1 ('MetaSel ('Just "dcArgTys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type]) :*: (S1 ('MetaSel ('Just "dcArgStrict") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DcStrictness]) :*: S1 ('MetaSel ('Just "dcFieldLabels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text]))))))

type DcName = Name DataCon Source #

DataCon reference

type ConTag = Int Source #

Syntactical position of the DataCon in the type definition

data DcStrictness Source #

Constructors

Strict |
Lazy |

#### Instances

Instances details

Generic DcStrictness Source # |
Instance details Defined in Clash.Core.DataCon Associated Types type Rep DcStrictness :: Type -> Type Source # Methods from :: DcStrictness -> Rep DcStrictness x Source # to :: Rep DcStrictness x -> DcStrictness Source #
Binary DcStrictness Source # |
Instance details Defined in Clash.Core.DataCon Methods put :: DcStrictness -> Put Source # get :: Get DcStrictness Source # putList :: [DcStrictness] -> Put Source #
NFData DcStrictness Source # |
Instance details Defined in Clash.Core.DataCon Methods rnf :: DcStrictness -> () Source #
Eq DcStrictness Source # |
Instance details Defined in Clash.Core.DataCon Methods (==) :: DcStrictness -> DcStrictness -> Bool Source # (/=) :: DcStrictness -> DcStrictness -> Bool Source #
Hashable DcStrictness Source # |
Instance details Defined in Clash.Core.DataCon Methods hashWithSalt :: Int -> DcStrictness -> Int Source # hash :: DcStrictness -> Int Source #
type Rep DcStrictness Source # |
Instance details Defined in Clash.Core.DataCon type Rep DcStrictness = D1 ('MetaData "DcStrictness" "Clash.Core.DataCon" "clash-lib-1.8.1-9u9U7p5PpHf8vtRevUOpPF" 'False) (C1 ('MetaCons "Strict" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lazy" 'PrefixI 'False) (U1 :: Type -> Type))