clash-lib-1.8.4: Clash: a functional hardware description language - As a library
Copyright(C) 2012-2016 University of Twente
2017 Google Inc.
2021 QBayLogic B.V.
LicenseBSD2 (see the file LICENSE)
MaintainerQBayLogic B.V. <devops@qbaylogic.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Core.DataCon

Description

Data Constructors in CoreHW

Synopsis

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
Binary DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

Methods

put :: DataCon -> Put

get :: Get DataCon

putList :: [DataCon] -> Put

HasType DataCon Source # 
Instance details

Defined in Clash.Core.HasType

PrettyPrec DataCon Source # 
Instance details

Defined in Clash.Core.Pretty

Uniquable DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

NFData DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

Methods

rnf :: DataCon -> ()

Generic DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

Associated Types

type Rep DataCon 
Instance details

Defined in Clash.Core.DataCon

type Rep DataCon = D1 ('MetaData "DataCon" "Clash.Core.DataCon" "clash-lib-1.8.4-LRerWkkgeHOGhsvLM5mWaX" '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]))))))

Methods

from :: DataCon -> Rep DataCon x

to :: Rep DataCon x -> DataCon

Show DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

Eq DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

Methods

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

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

Ord DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

type Rep DataCon Source # 
Instance details

Defined in Clash.Core.DataCon

type Rep DataCon = D1 ('MetaData "DataCon" "Clash.Core.DataCon" "clash-lib-1.8.4-LRerWkkgeHOGhsvLM5mWaX" '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
Binary DcStrictness Source # 
Instance details

Defined in Clash.Core.DataCon

Methods

put :: DcStrictness -> Put

get :: Get DcStrictness

putList :: [DcStrictness] -> Put

NFData DcStrictness Source # 
Instance details

Defined in Clash.Core.DataCon

Methods

rnf :: DcStrictness -> ()

Generic DcStrictness Source # 
Instance details

Defined in Clash.Core.DataCon

Associated Types

type Rep DcStrictness 
Instance details

Defined in Clash.Core.DataCon

type Rep DcStrictness = D1 ('MetaData "DcStrictness" "Clash.Core.DataCon" "clash-lib-1.8.4-LRerWkkgeHOGhsvLM5mWaX" 'False) (C1 ('MetaCons "Strict" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lazy" 'PrefixI 'False) (U1 :: Type -> Type))
Eq DcStrictness Source # 
Instance details

Defined in Clash.Core.DataCon

Hashable DcStrictness Source # 
Instance details

Defined in Clash.Core.DataCon

type Rep DcStrictness Source # 
Instance details

Defined in Clash.Core.DataCon

type Rep DcStrictness = D1 ('MetaData "DcStrictness" "Clash.Core.DataCon" "clash-lib-1.8.4-LRerWkkgeHOGhsvLM5mWaX" 'False) (C1 ('MetaCons "Strict" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lazy" 'PrefixI 'False) (U1 :: Type -> Type))