Language.C.Data.Name

language-c-0.4.5: Analysis and generation of C code

Copyright | (c) 2008 Benedikt Huber
License | BSD-style
Maintainer | benedikt.huber@gmail.com
Stability | experimental
Portability | ghc
Safe Haskell | None
Language | Haskell98

Language.C.Data.Name

Description

Unique Names with fast equality (newtype `Int`)

Synopsis

- newtype Name = Name {
  - nameId :: Int
  }
- newNameSupply :: [Name]
- namesStartingFrom :: Int -> [Name]

# Documentation

newtype Name

Name is a unique identifier

Constructors

Name |
Fields nameId :: Int

Instances

Enum Name |
Eq Name |
Data Name |
Ord Name |
Read Name |
Show Name |
Ix Name |
Typeable * Name |

newNameSupply :: [Name]

return an infinite stream of `Name`s starting with `nameId` 0

namesStartingFrom :: Int -> [Name]

get the infinite stream of unique names starting from the given integer