clash-prelude-1.0.1: CAES Language for Synchronous Hardware - Prelude library
Copyright(C) 2018 Google Inc.
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Annotations.BitRepresentation.Internal

Description

 
Synopsis

Documentation

buildCustomReprs :: [DataRepr'] -> CustomReprs Source #

Create indices based on names of constructors and data types

getConstrRepr :: Text -> CustomReprs -> Maybe ConstrRepr' Source #

Lookup constructor representation based on name

getDataRepr :: Type' -> CustomReprs -> Maybe DataRepr' Source #

Lookup data type representation based on name

thTypeToType' :: Type -> Type' Source #

Convert template haskell type to simple representation of type

data ConstrRepr' Source #

Internal version of ConstrRepr

Instances

Instances details
Eq ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Ord ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Show ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Generic ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Associated Types

type Rep ConstrRepr' :: Type -> Type #

NFData ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Methods

rnf :: ConstrRepr' -> () #

Hashable ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

type Rep ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

data DataRepr' Source #

Internal version of DataRepr

Instances

Instances details
Eq DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Ord DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Show DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Generic DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Associated Types

type Rep DataRepr' :: Type -> Type #

NFData DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Methods

rnf :: DataRepr' -> () #

Hashable DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

type Rep DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

data Type' Source #

Simple version of template haskell type. Used internally to match on.

Constructors

AppTy' Type' Type'

Type application

ConstTy' Text

Qualified name of type

LitTy' Integer

Numeral literal (used in BitVector 10, for example)

Instances

Instances details
Eq Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Methods

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

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

Ord Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

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' #

Show Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Methods

showsPrec :: Int -> Type' -> ShowS #

show :: Type' -> String #

showList :: [Type'] -> ShowS #

Generic Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Associated Types

type Rep Type' :: Type -> Type #

Methods

from :: Type' -> Rep Type' x #

to :: Rep Type' x -> Type' #

NFData Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Methods

rnf :: Type' -> () #

Hashable Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Methods

hashWithSalt :: Int -> Type' -> Int #

hash :: Type' -> Int #

type Rep Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

type CustomReprs = (Map Type' DataRepr', Map Text ConstrRepr') Source #

Convenience type for index built by buildCustomReprs