clash-lib-1.8.1: Clash: a functional hardware description language - As a library

Copyright | (C) 2012-2016 University of Twente 2016 Myrtle Software Ltd 2017 Google Inc. 2021 QBayLogic B.V.
License | BSD2 (see the file LICENSE)
Maintainer | QBayLogic B.V. <devops@qbaylogic.com>
Safe Haskell | Safe-Inferred
Language | Haskell2010

Clash.Core.Literal

Description

Term Literal

Synopsis

- data Literal
  - = IntegerLiteral !Integer
  - | IntLiteral !Integer
  - | WordLiteral !Integer
  - | Int64Literal !Integer
  - | Word64Literal !Integer
  - | Int8Literal !Integer
  - | Int16Literal !Integer
  - | Int32Literal !Integer
  - | Word8Literal !Integer
  - | Word16Literal !Integer
  - | Word32Literal !Integer
  - | StringLiteral !String
  - | FloatLiteral !Word32
  - | DoubleLiteral !Word64
  - | CharLiteral !Char
  - | NaturalLiteral !Integer
  - | ByteArrayLiteral !ByteArray

# Documentation

data Literal Source #

Term Literal

Constructors

IntegerLiteral !Integer |
IntLiteral !Integer |
WordLiteral !Integer |
Int64Literal !Integer |
Word64Literal !Integer |
Int8Literal !Integer |
Int16Literal !Integer |
Int32Literal !Integer |
Word8Literal !Integer |
Word16Literal !Integer |
Word32Literal !Integer |
StringLiteral !String |
FloatLiteral !Word32 |
DoubleLiteral !Word64 |
CharLiteral !Char |
NaturalLiteral !Integer |
ByteArrayLiteral !ByteArray |

#### Instances

Instances details

Generic Literal Source # |
Instance details Defined in Clash.Core.Literal Associated Types type Rep Literal :: Type -> Type Source # Methods from :: Literal -> Rep Literal x Source # to :: Rep Literal x -> Literal Source #
Show Literal Source # |
Instance details Defined in Clash.Core.Literal Methods showsPrec :: Int -> Literal -> ShowS Source # show :: Literal -> String Source # showList :: [Literal] -> ShowS Source #
Binary Literal Source # |
Instance details Defined in Clash.Core.Literal Methods put :: Literal -> Put Source # get :: Get Literal Source # putList :: [Literal] -> Put Source #
HasType Literal Source # |
Instance details Defined in Clash.Core.HasType Methods coreTypeOf :: Literal -> Type Source #
PrettyPrec Literal Source # |
Instance details Defined in Clash.Core.Pretty Methods pprPrec :: Monad m => Rational -> Literal -> m ClashDoc Source # pprPrec' :: Monad m => PrettyOptions -> Rational -> Literal -> m ClashDoc Source #
NFData Literal Source # |
Instance details Defined in Clash.Core.Literal Methods rnf :: Literal -> () Source #
Eq Literal Source # |
Instance details Defined in Clash.Core.Literal Methods (==) :: Literal -> Literal -> Bool Source # (/=) :: Literal -> Literal -> Bool Source #
Ord Literal Source # |
Instance details Defined in Clash.Core.Literal Methods compare :: Literal -> Literal -> Ordering Source # (<) :: Literal -> Literal -> Bool Source # (<=) :: Literal -> Literal -> Bool Source # (>) :: Literal -> Literal -> Bool Source # (>=) :: Literal -> Literal -> Bool Source # max :: Literal -> Literal -> Literal Source # min :: Literal -> Literal -> Literal Source #
Hashable Literal Source # |
Instance details Defined in Clash.Core.Literal Methods hashWithSalt :: Int -> Literal -> Int Source # hash :: Literal -> Int Source #
type Rep Literal Source # |

Instance details

Defined in Clash.Core.Literal

type Rep Literal = D1 ('MetaData "Literal" "Clash.Core.Literal" "clash-lib-1.8.1-2YrsOtauO5B4MB9KvGiYOL" 'False) ((((C1 ('MetaCons "IntegerLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "IntLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))) :+: (C1 ('MetaCons "WordLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "Int64Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)))) :+: ((C1 ('MetaCons "Word64Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "Int8Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))) :+: (C1 ('MetaCons "Int16Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "Int32Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))))) :+: (((C1 ('MetaCons "Word8Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "Word16Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))) :+: (C1 ('MetaCons "Word32Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "StringLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))) :+: ((C1 ('MetaCons "FloatLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :+: C1 ('MetaCons "DoubleLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :+: (C1 ('MetaCons "CharLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: (C1 ('MetaCons "NaturalLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "ByteArrayLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteArray)))))))