futhark-0.20.2: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.FreshNames

Description

This module provides facilities for generating unique names.

Synopsis

Documentation

data VNameSource Source #

A name source is conceptually an infinite sequence of names with no repeating entries. In practice, when asked for a name, the name source will return the name along with a new name source, which should then be used in place of the original.

The Ord instance is based on how many names have been extracted from the name source.

Instances

Instances details
Eq VNameSource Source # 
Instance details

Defined in Futhark.FreshNames

Ord VNameSource Source # 
Instance details

Defined in Futhark.FreshNames

Semigroup VNameSource Source # 
Instance details

Defined in Futhark.FreshNames

Monoid VNameSource Source # 
Instance details

Defined in Futhark.FreshNames

Lift VNameSource Source # 
Instance details

Defined in Futhark.FreshNames

(Applicative im, Monad im) => MonadFreshNames (StateT VNameSource im) Source # 
Instance details

Defined in Futhark.MonadFreshNames

(Applicative im, Monad im) => MonadFreshNames (StateT VNameSource im) Source # 
Instance details

Defined in Futhark.MonadFreshNames

MonadState (VNameSource, Bool, Certs) (SimpleM rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

get :: SimpleM rep (VNameSource, Bool, Certs) #

put :: (VNameSource, Bool, Certs) -> SimpleM rep () #

state :: ((VNameSource, Bool, Certs) -> (a, (VNameSource, Bool, Certs))) -> SimpleM rep a #

(Applicative im, Monad im, Monoid w) => MonadFreshNames (RWST r w VNameSource im) Source # 
Instance details

Defined in Futhark.MonadFreshNames

(Applicative im, Monad im, Monoid w) => MonadFreshNames (RWST r w VNameSource im) Source # 
Instance details

Defined in Futhark.MonadFreshNames

blankNameSource :: VNameSource Source #

A blank name source.

newNameSource :: Int -> VNameSource Source #

A new name source that starts counting from the given number.

newName :: VNameSource -> VName -> (VName, VNameSource) Source #

Produce a fresh name, using the given name as a template.