symbol-utils

  1. symbol-utils
  2. Documentation
    1. Argument Conventions
    2. symbol-value-utils
      1. Usage
      2. unbound-value?
      3. unbound?
      4. symbol-value
      5. unspecified-value
      6. unspecified-value?
      7. unspecified?
    3. symbol-name-utils
      1. Usage
      2. ->symbol
      3. ->uninterned-symbol
      4. keyword->symbol
      5. keyword->uninterned-symbol
      6. symbol->keyword
      7. symbol-printname-details
      8. symbol-printname=?
      9. symbol-printname<?
      10. symbol-printname-length
      11. max-symbol-printname-length
      12. module-printname
      13. module-printnames
    4. symbol-lolevel-utils
      1. Usage
      2. interned-symbol?
    5. (symbol-utils gen)
      1. Usage
      2. make-gensym
  3. Usage
  4. Requirements
  5. Author
  6. Repository
  7. Version history
  8. License

Documentation

Argument Conventions

SYM is a symbol

OBJ is an arbitrary Scheme object

A printname is the string form of a symbol.

symbol-value-utils

Usage

(import symbol-value-utils)

unbound-value?

[syntax] (unbound-value? OBJ) -> boolean

Compiled code only!

unbound?

[syntax] (unbound? SYM) -> boolean

Compiled code only!

symbol-value

[syntax] (symbol-value SYM [DEF]) -> *

Returns SYM binding or DEF when unbound.

Compiled code only!

unspecified-value

[procedure] (unspecified-value) -> #<unspecified>

unspecified-value?

[syntax] (unspecified-value? OBJ) -> boolean

unspecified?

[syntax] (unspecified? OBJ) -> boolean

symbol-name-utils

Usage

(import symbol-name-utils)

->symbol

[procedure] (->symbol OBJ) -> symbol

->uninterned-symbol

[procedure] (->uninterned-symbol OBJ) -> symbol

keyword->symbol

[procedure] (keyword->symbol KEY) -> symbol

keyword->uninterned-symbol

[procedure] (keyword->uninterned-symbol KEY) -> symbol

symbol->keyword

[procedure] (symbol->keyword SYM) -> keyword

symbol-printname-details

[procedure] (symbol-printname-details SYM) -> (string string)

Returns 2 values: the string, and any qualification prefix string, for SYM

Keyword printname markings, #: or :, are ignored.

symbol-printname=?

[procedure] (symbol-printname=? X Y) -> boolean

X & Y are {(or keyword symbol)}.

Keyword printname markings, #: or :, are ignored for comparison.

symbol-printname<?

[procedure] (symbol-printname<? X Y) -> boolean

X & Y are {(or keyword symbol)}.

Keyword printname markings, #: or :, are ignored for comparison.

symbol-printname-length

[procedure] (symbol-printname-length SYM [SEXP?]) -> integer
SYM
(or keyword symbol)
SEXP?
boolean ; ~S or ~A, the default.

Keyword printname marking is included in the length and is dependent on SEXP?.

max-symbol-printname-length

[procedure] (max-symbol-printname-length SYMS [SEXP?]) -> integer
SYMS
(list-of (or keyword symbol)) ;
SEXP?
boolean ; ~S or ~A, the default.

Keyword printname marking is included in the length and is dependent on SEXP?.

module-printname

[procedure] (module-printname NAM) -> (or #f string)

Returns the string for a valid CHICKEN module name, or #f.

NAM
(or string symbolic-module-name)

module-printnames

[procedure] (module-printnames NAMS) -> (or #f (list-of string))

Returns the list of strings for a list of valid CHICKEN module names, or #f.

NAMS
(list-of (or string symbolic-module-name))

symbol-lolevel-utils

Usage

(import symbol-lolevel-utils)

interned-symbol?

[procedure] (interned-symbol? SYM) -> boolean

(symbol-utils gen)

Usage

(import (symbol-utils gen))

make-gensym

[procedure] make-gensym PREFIX) -> GENSYM

Returns a gensym procedure.

PREFIX
(or symbol string) ; prefix for generated uninterned symbols.
GENSYM
([PREFIX] -> uninterned-symbol) ; gensym procedure.

Usage

(import symbol-utils)

Requirements

utf8

test test-utils

Author

Kon Lovett

Repository

This egg is hosted on the CHICKEN Subversion repository:

https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/symbol-utils

If you want to check out the source code repository of this egg and you are not familiar with Subversion, see this page.

Version history

2.6.0
Add module-name & module-names. Fix printname-length of keyword.
2.5.1
.
2.5.0
Removed unbound-value.
2.4.0
Added (symbol-utils gen) module.
2.3.0
2.2.0
2.1.0
Added ->symbol & ->uninterned-symbol.
2.0.1
Removed symbol-qualified-utils.
2.0.0
CHICKEN 5 release.
1.2.0
Add keyword->uninterned-symbol & keyword->symbol.
1.1.0
Add symbol-name-utils, symbol-value-utils, symbol-qualified-utils, symbol-lolevel-utils modules.
1.0.3
Add types & better type checking.
1.0.2
Fix for ticket #630.
1.0.1
.
1.0.0
Hello.

License

Copyright (C) 2010-2024 Kon Lovett. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.