clash-lib-0.99.2: CAES Language for Synchronous Hardware - As a Library

Copyright(C) 2012-2016 University of Twente
2017 Google Inc.
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Core.DataCon

Description

Data Constructors in CoreHW

Synopsis

Documentation

data DataCon #

Data Constructor

Constructors

MkData 

Fields

  • dcName :: !DcName

    Name of the DataCon

  • dcTag :: !ConTag

    Syntactical position in the type definition

  • dcType :: !Type

    Type of the 'DataCon

  • dcUnivTyVars :: [TyName]

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

  • dcExtTyVars :: [TyName]

    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

Instances
Eq DataCon # 
Instance details

Defined in Clash.Core.DataCon

Methods

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

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

Ord DataCon # 
Instance details

Defined in Clash.Core.DataCon

Show DataCon # 
Instance details

Defined in Clash.Core.DataCon

Generic DataCon # 
Instance details

Defined in Clash.Core.DataCon

Associated Types

type Rep DataCon :: * -> * #

Methods

from :: DataCon -> Rep DataCon x #

to :: Rep DataCon x -> DataCon #

Hashable DataCon # 
Instance details

Defined in Clash.Core.DataCon

Methods

hashWithSalt :: Int -> DataCon -> Int #

hash :: DataCon -> Int #

NFData DataCon # 
Instance details

Defined in Clash.Core.DataCon

Methods

rnf :: DataCon -> () #

Alpha DataCon # 
Instance details

Defined in Clash.Core.DataCon

Pretty DataCon # 
Instance details

Defined in Clash.Core.Pretty

Methods

ppr :: LFresh m => DataCon -> m Doc #

pprPrec :: LFresh m => Rational -> DataCon -> m Doc #

Subst a DataCon # 
Instance details

Defined in Clash.Core.DataCon

type Rep DataCon # 
Instance details

Defined in Clash.Core.DataCon

type DcName = Name DataCon #

DataCon reference

type ConTag = Int #

Syntactical position of the DataCon in the type definition

dataConInstArgTys :: DataCon -> [Type] -> Maybe [Type] #

Given a DataCon and a list of types, the type variables of the DataCon type are substituted for the list of types. The argument types are returned.

The list of types should be equal to the number of type variables, otherwise Nothing is returned.