clash-lib-0.99.1: CAES Language for Synchronous Hardware - As a Library

Copyright(C) 2012-2016 University of Twente
2016 Myrtle Software Ltd
2017 Google Inc.
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Core.Literal

Description

Term Literal

Synopsis

Documentation

data Literal Source #

Term Literal

Instances
Eq Literal Source # 
Instance details

Methods

(==) :: Literal -> Literal -> Bool #

(/=) :: Literal -> Literal -> Bool #

Ord Literal Source # 
Instance details
Show Literal Source # 
Instance details
Generic Literal Source # 
Instance details

Associated Types

type Rep Literal :: * -> * #

Methods

from :: Literal -> Rep Literal x #

to :: Rep Literal x -> Literal #

NFData Literal Source # 
Instance details

Methods

rnf :: Literal -> () #

Hashable Literal Source # 
Instance details

Methods

hashWithSalt :: Int -> Literal -> Int

hash :: Literal -> Int

Alpha Literal Source # 
Instance details

Methods

aeq' :: AlphaCtx -> Literal -> Literal -> Bool

fvAny' :: (Contravariant f, Applicative f) => AlphaCtx -> (AnyName -> f AnyName) -> Literal -> f Literal

close :: AlphaCtx -> NamePatFind -> Literal -> Literal

open :: AlphaCtx -> NthPatFind -> Literal -> Literal

isPat :: Literal -> DisjointSet AnyName

isTerm :: Literal -> All

isEmbed :: Literal -> Bool

nthPatFind :: Literal -> NthPatFind

namePatFind :: Literal -> NamePatFind

swaps' :: AlphaCtx -> Perm AnyName -> Literal -> Literal

lfreshen' :: LFresh m => AlphaCtx -> Literal -> (Literal -> Perm AnyName -> m b) -> m b

freshen' :: Fresh m => AlphaCtx -> Literal -> m (Literal, Perm AnyName)

acompare' :: AlphaCtx -> Literal -> Literal -> Ordering

Pretty Literal Source # 
Instance details

Methods

ppr :: LFresh m => Literal -> m Doc Source #

pprPrec :: LFresh m => Rational -> Literal -> m Doc Source #

Subst a Literal Source # 
Instance details

Methods

isvar :: Literal -> Maybe (SubstName Literal a)

isCoerceVar :: Literal -> Maybe (SubstCoerce Literal a)

subst :: Name a -> a -> Literal -> Literal

substs :: [(Name a, a)] -> Literal -> Literal

type Rep Literal Source # 
Instance details
type Rep Literal = D1 (MetaData "Literal" "Clash.Core.Literal" "clash-lib-0.99.1-inplace" 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 "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 Rational))) :+: (C1 (MetaCons "DoubleLiteral" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Rational)) :+: (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))))))

literalType :: Literal -> Type Source #

Determines the Type of a Literal