clash-lib
Copyright(C) 2012-2016 University of Twente
2017-2018 Google Inc.
2021 QBayLogic B.V.
LicenseBSD2 (see the file LICENSE)
MaintainerQBayLogic B.V. <devops@qbaylogic.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Clash.Core.Var

Description

Variables in CoreHW

Synopsis

Documentation

data Var a Source #

Variables in CoreHW

Constructors

TyVar

Constructor for type variables

Fields

Id

Constructor for term variables

Fields

Instances

Instances details
Generic (Var a) Source # 
Instance details

Defined in Clash.Core.Var

Associated Types

type Rep (Var a) :: Type -> Type #

Methods

from :: Var a -> Rep (Var a) x #

to :: Rep (Var a) x -> Var a #

Show (Var a) Source # 
Instance details

Defined in Clash.Core.Var

Methods

showsPrec :: Int -> Var a -> ShowS #

show :: Var a -> String #

showList :: [Var a] -> ShowS #

Binary (Var a) Source # 
Instance details

Defined in Clash.Core.Var

Methods

put :: Var a -> Put #

get :: Get (Var a) #

putList :: [Var a] -> Put #

HasType (Var a) Source # 
Instance details

Defined in Clash.Core.HasType

Methods

coreTypeOf :: Var a -> Type Source #

PrettyPrec (Var a) Source # 
Instance details

Defined in Clash.Core.Pretty

ClashPretty (Var a) Source # 
Instance details

Defined in Clash.Core.Pretty

Methods

clashPretty :: Var a -> Doc () Source #

Uniquable (Var a) Source # 
Instance details

Defined in Clash.Core.Var

Methods

getUnique :: Var a -> Unique Source #

setUnique :: Var a -> Unique -> Var a Source #

NFData (Var a) Source # 
Instance details

Defined in Clash.Core.Var

Methods

rnf :: Var a -> () #

Eq (Var a) Source #

N.B.: Equality checking assumes two variables are compared in the same scope, similar to aeqType and friends. If you want structural equality, use Subst's eqVar.

Instance details

Defined in Clash.Core.Var

Methods

(==) :: Var a -> Var a -> Bool #

(/=) :: Var a -> Var a -> Bool #

Ord (Var a) Source #

N.B.: Equality checking assumes two variables are compared in the same scope, similar to acmpType and friends. If you want structural equality, use Subst's ordVar.

Instance details

Defined in Clash.Core.Var

Methods

compare :: Var a -> Var a -> Ordering #

(<) :: Var a -> Var a -> Bool #

(<=) :: Var a -> Var a -> Bool #

(>) :: Var a -> Var a -> Bool #

(>=) :: Var a -> Var a -> Bool #

max :: Var a -> Var a -> Var a #

min :: Var a -> Var a -> Var a #

Hashable (Var a) Source # 
Instance details

Defined in Clash.Core.Var

Methods

hashWithSalt :: Int -> Var a -> Int #

hash :: Var a -> Int #

PrettyPrec (Id, Term) Source # 
Instance details

Defined in Clash.Core.Pretty

type Rep (Var a) Source # 
Instance details

Defined in Clash.Core.Var

data IdScope Source #

Constructors

GlobalId 
LocalId 

Instances

Instances details
Generic IdScope Source # 
Instance details

Defined in Clash.Core.Var

Associated Types

type Rep IdScope :: Type -> Type #

Methods

from :: IdScope -> Rep IdScope x #

to :: Rep IdScope x -> IdScope #

Show IdScope Source # 
Instance details

Defined in Clash.Core.Var

Binary IdScope Source # 
Instance details

Defined in Clash.Core.Var

Methods

put :: IdScope -> Put #

get :: Get IdScope #

putList :: [IdScope] -> Put #

NFData IdScope Source # 
Instance details

Defined in Clash.Core.Var

Methods

rnf :: IdScope -> () #

Eq IdScope Source # 
Instance details

Defined in Clash.Core.Var

Methods

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

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

Ord IdScope Source # 
Instance details

Defined in Clash.Core.Var

Hashable IdScope Source # 
Instance details

Defined in Clash.Core.Var

Methods

hashWithSalt :: Int -> IdScope -> Int #

hash :: IdScope -> Int #

type Rep IdScope Source # 
Instance details

Defined in Clash.Core.Var

type Rep IdScope = D1 ('MetaData "IdScope" "Clash.Core.Var" "clash-lib-1.11.0-inplace" 'False) (C1 ('MetaCons "GlobalId" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LocalId" 'PrefixI 'False) (U1 :: Type -> Type))

type Id = Var Term Source #

Term variable

type TyVar = Var Type Source #

Type variable

varKey :: Var a -> (Unique, Maybe IdScope) Source #

Gets a _key_ in the DBMS sense: a value that uniquely identifies a Var. In case of a Var that is its unique and (if applicable) scope

mkId :: Type -> IdScope -> TmName -> Id Source #

Make a term variable

mkTyVar :: Kind -> TyName -> TyVar Source #

Make a type variable

modifyVarName :: (Name a -> Name a) -> Var a -> Var a Source #

Change the name of a variable