Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/smlnj-lib/HashCons/hash-cons-ground-fn.sml
ViewVC logotype

View of /sml/trunk/src/smlnj-lib/HashCons/hash-cons-ground-fn.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 967 - (download) (annotate)
Fri Oct 19 20:19:39 2001 UTC (19 years, 11 months ago) by jhr
File size: 533 byte(s)
  Synchronizing with master copy of library.
(* hash-cons-ground-fn.sml
 * COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies
 * Functor for defining hashed-cons representation of ground terms.

functor HashConsGroundFn (T : HASH_KEY) : sig

    type hash_key = T.hash_key
    type obj = hash_key HashCons.obj

    val mk : hash_key -> obj

  end = struct

    structure HC = HashCons

    type hash_key = T.hash_key
    type obj = hash_key HC.obj

    val tbl = HC.new {eq = T.sameKey}

    val cons = HC.cons0 tbl

    fun mk term = cons(T.hashVal term, term)


ViewVC Help
Powered by ViewVC 1.0.0