clash-prelude-1.2.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

uncheckedGetConstrRepr :: HasCallStack => Text -> CustomReprs -> ConstrRepr' Source #

Unchecked version of getConstrRepr

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

Constructors

ConstrRepr' 

Fields

Instances
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

Constructors

DataRepr' 

Fields

Instances
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

type Rep DataRepr' = D1 (MetaData "DataRepr'" "Clash.Annotations.BitRepresentation.Internal" "clash-prelude-1.2.1-inplace" False) (C1 (MetaCons "DataRepr'" PrefixI True) (S1 (MetaSel (Just "drType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Type') :*: (S1 (MetaSel (Just "drSize") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Size) :*: S1 (MetaSel (Just "drConstrs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ConstrRepr']))))

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

TextShow Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

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