CVS: sml/src/smlnj-lib/Doc/ML-Doc/HashCons hash-cons.mldoc,NONE,1.1

John Reppy <[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml/src/smlnj-lib/Doc/ML-Doc/HashCons
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31709/Doc/ML-Doc/HashCons

Added Files:
	hash-cons.mldoc 
Log Message:
  New file.


--- NEW FILE: hash-cons.mldoc ---
<!-- hash-cons.mldoc -->

<!DOCTYPE ML-DOC SYSTEM>

<COPYRIGHT OWNER="John Reppy" YEAR=2005>
<VERSION VERID="1.0" YEAR=2005 MONTH=5 DAY=10>
<TITLE>The HashCons structure</TITLE>

<INTERFACE>
<HEAD>The <CD>HASH_CONS</CD> signature</HEAD>
  <SEEALSO>
    <STRREF TOPID>HashConsAtom</STRREF>
    <STRREF TOPID>HashConsMap</STRREF>
    <STRREF TOPID>HashConsString</STRREF>
    <STRREF TOPID>HashConsSet</STRREF>
    <FCTREF TOPID>HashConsGroundFn</FCTREF>
  </SEEALSO>

<PP>
Atoms are uniquely represented strings that support fast equality/inequality
tests, as well as hashing and ordered comparisons.

<STRUCTURE STRID="HashCons">
  <SIGBODY SIGID="HASH_CONS" FILE=HASH-CONS>
    <SPEC>
      <TYPE><TYPARAM>'a<ID>tbl
    <SPEC>
      <VAL>new<TY>{eq : 'a * 'a -> bool} -> 'a tbl
    <SPEC>
      <VAL>clear<TY>'a tbl -> unit
    <SPEC>
      <TYPE><TYPARAM>'a<ID>obj<TY>{nd : 'a, tag : word, hash : word}
    <SPEC>
      <VAL>node<TY>'a obj -> 'a
    <SPEC>
      <VAL>tag<TY>'a obj -> word
    <SPEC>
      <VAL>same<TY>('a obj * 'a obj) -> bool
    <SPEC>
      <VAL>compare<TY>('a obj * 'a obj) -> order
    <SPEC>
      <VAL>cons0<TY>'a tbl -> (word * 'a) -> 'a obj
      <VAL>cons1<TY>'a tbl -> (word * ('b obj -> 'a))
	  -> 'b obj -> 'a obj
      <VAL>cons2<TY>'a tbl -> (word * ('b obj * 'c obj -> 'a))
	  -> 'b obj * 'c obj -> 'a obj
      <VAL>cons3<TY>'a tbl -> (word * ('b obj * 'c obj * 'd obj -> 'a))
	  -> 'b obj * 'c obj * 'd obj -> 'a obj
      <VAL>cons4<TY>'a tbl -> (word * ('b obj * 'c obj * 'd obj * 'e obj -> 'a))
	  -> 'b obj * 'c obj * 'd obj * 'e obj -> 'a obj
      <VAL>cons5<TY>'a tbl -> (word * ('b obj * 'c obj * 'd obj * 'e obj * 'f obj -> 'a))
	  -> 'b obj * 'c obj * 'd obj * 'e obj * 'f obj -> 'a obj
    <SPEC>
      <VAL>consList<TY>'a tbl -> (word * ('b obj list -> 'a)) -> 'b obj list -> 'a obj
    <SPEC>
      <VAL>consR1<TY>'a tbl -> (word * ('b obj -> 'a) * ('r -> 'b obj))
	  -> 'r -> 'a obj
      <VAL>consR2<TY>'a tbl
	  -> (word * ('b obj * 'c obj -> 'a) * ('r -> 'b obj * 'c obj))
	    -> 'r -> 'a obj
      <VAL>consR3<TY>'a tbl
	  -> (word * ('b obj * 'c obj * 'd obj -> 'a)
	    * ('r -> 'b obj * 'c obj * 'd obj))
	    -> 'r -> 'a obj
      <VAL>consR4<TY>'a tbl
	  -> (word * ('b obj * 'c obj * 'd obj * 'e obj -> 'a)
	    * ('r -> 'b obj * 'c obj * 'd obj * 'e obj))
	    -> 'r -> 'a obj
      <VAL>consR5<TY>'a tbl
	  -> (word * ('b obj * 'c obj * 'd obj * 'e obj * 'f obj -> 'a)
	    * ('r -> 'b obj * 'c obj * 'd obj * 'e obj * 'f obj))
	    -> 'r -> 'a obj
  </SIGBODY>
</STRUCTURE>

</INTERFACE>



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.