uni-util-2.3.0.1: Utilities for the uniform workbench

Safe HaskellNone

Util.UniqueString

Description

This module generates short non-empty unique printable strings (IE without funny characters). Quotes and backslashes are not included, so printing should not be too hard. Periods are also not included, for the benefit of NewNames.hs.

Synopsis

Documentation

readUniqueStringSource :: UniqueStringSource -> IO [Int]Source

readUniqueStringSource is used by types/CodedValue.hs to export values.

createUniqueStringSource :: [Int] -> IO UniqueStringSourceSource

createUniqueStringSource is the inverse of readUniqueStringSource.

newNonUnique :: String -> StringSource

Create non-conflicting string which cannot be produced by newUniqueString. This is useful for exceptional cases. We add this by adding a character with integer value 0 at the end.