Copyright | (C) 2018 Google Inc. 2022 LUMI GUIDE FIETSDETECTIE B.V. |
---|---|
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'
- uncheckedGetConstrRepr :: HasCallStack => Text -> CustomReprs -> ConstrRepr'
- getDataRepr :: Type' -> CustomReprs -> Maybe DataRepr'
- thTypeToType' :: Type -> Type'
- data ConstrRepr' = ConstrRepr' {
- crName :: Text
- crPosition :: Int
- crMask :: BitMask
- crValue :: Value
- crFieldAnns :: [FieldAnn]
- data DataRepr' = DataRepr' {}
- 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
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
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 # | |
type Rep DataRepr' Source # | |
Defined in Clash.Annotations.BitRepresentation.Internal type Rep DataRepr' = D1 ('MetaData "DataRepr'" "Clash.Annotations.BitRepresentation.Internal" "clash-prelude-1.8.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'])))) |
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) |
SymLitTy' Text | Symbol literal (used in for example (Signal System Int)) |
Instances
type CustomReprs = (Map Type' DataRepr', Map Text ConstrRepr') Source #
Convenience type for index built by buildCustomReprs