Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/staging/src/compiler/ast/var.sml
ViewVC logotype

View of /branches/staging/src/compiler/ast/var.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 110 - (download) (annotate)
Wed Jun 23 19:28:48 2010 UTC (9 years, 1 month ago) by jhr
Original Path: trunk/src/compiler/ast/var.sml
File size: 620 byte(s)
  Moving compiler sources into src/compiler
(* var.sml
 *
 * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)
 * All rights reserved.
 *)

structure Var =
  struct

    datatype var = datatype AST.var

    datatype var_kind = datatype AST.var_kind

    fun nameOf (V{name, ...}) = name
    fun typeOf (V{ty, ...}) = ty
    fun kindOf (V{kind, ...}) = kind

    fun new (name, kind, ty) = let
	  val id = Stamp.new()
	  in
	    V{name=Atom.toString name, id=id, kind=kind, ty=([], ty)}
	  end

    fun newPoly (name, kind, scheme) = let
	  val id = Stamp.new()
	  in
	    V{name=Atom.toString name, id=id, kind=kind, ty=scheme}
	  end

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0