Copyright | (C) 2018 Google Inc. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- buildCustomReprs :: [DataRepr'] -> CustomReprs
- dataReprAnnToDataRepr' :: DataReprAnn -> DataRepr'
- constrReprToConstrRepr' :: Int -> ConstrRepr -> ConstrRepr'
- getConstrRepr :: Text -> CustomReprs -> Maybe ConstrRepr'
- getDataRepr :: Type' -> CustomReprs -> Maybe DataRepr'
- thTypeToType' :: Type -> Type'
- data ConstrRepr' = ConstrRepr' Text Int BitMask Value [FieldAnn]
- data DataRepr' = DataRepr' Type' Size [ConstrRepr']
- data Type'
- type CustomReprs = (Map Type' DataRepr', Map Text ConstrRepr')
Documentation
buildCustomReprs :: [DataRepr'] -> CustomReprs Source #
Create indices based on names of constructors and data types
constrReprToConstrRepr' :: Int -> ConstrRepr -> ConstrRepr' Source #
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
Internal version of DataRepr
Instances
Eq DataRepr' Source # | |
Ord DataRepr' Source # | |
Defined in Clash.Annotations.BitRepresentation.Internal | |
Show DataRepr' Source # | |
Generic DataRepr' Source # | |
NFData DataRepr' Source # | |
Defined in Clash.Annotations.BitRepresentation.Internal | |
Hashable DataRepr' Source # | |
Defined in Clash.Annotations.BitRepresentation.Internal | |
type Rep DataRepr' Source # | |
Defined in Clash.Annotations.BitRepresentation.Internal type Rep DataRepr' = D1 ('MetaData "DataRepr'" "Clash.Annotations.BitRepresentation.Internal" "clash-prelude-1.0.0-inplace" 'False) (C1 ('MetaCons "DataRepr'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type') :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Size) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ConstrRepr'])))) |
Simple version of template haskell type. Used internally to match on.
AppTy' Type' Type' | Type application |
ConstTy' Text | Qualified name of type |
LitTy' Integer | Numeral literal (used in BitVector 10, for example) |
Instances
type CustomReprs = (Map Type' DataRepr', Map Text ConstrRepr') Source #
Convenience type for index built by buildCustomReprs