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

SCM Repository

[diderot] View of /branches/vis15/src/compiler/typechecker/const-expr.sml
ViewVC logotype

View of /branches/vis15/src/compiler/typechecker/const-expr.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3385 - (download) (annotate)
Mon Nov 9 21:13:24 2015 UTC (4 years, 8 months ago) by jhr
File size: 1111 byte(s)
working on merge
(* const-expr.sml
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2015 The University of Chicago
 * All rights reserved.
 *)

structure ConstExpr : sig

  (* compile-time constant values *)
    datatype const_value
      = String of string
      | Bool of bool
      | Int of IntLit.t
      | Real of RealLit.t
      | Expr of AST.expr	(* for more complicated tensor-valued expressions *)

  (* environment mapping constant variables to their values *)
    type const_env = const_value Var.Map.map

    val eval : (Error.err_stream * Error.span * const_env * AST.expr) -> const_value

  end = struct

  (* compile-time constant values *)
    datatype const_value
      = String of string
      | Bool of bool
      | Int of IntLit.t
      | Real of RealLit.t
      | Seq of const_value list
      | Expr of AST.expr	(* for more complicated tensor-valued expressions *)

  (* environment mapping constant variables to their values *)
    type const_env = const_value Var.Map.map

    fun eval (errStrm, span, env, constExp) = raise Fail "TODO"

  end

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