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

SCM Repository

[diderot] View of /branches/charisee/src/compiler/ein/type-ein.sml
ViewVC logotype

View of /branches/charisee/src/compiler/ein/type-ein.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2521 - (download) (annotate)
Thu Jan 9 02:17:07 2014 UTC (5 years, 8 months ago) by cchiw
File size: 611 byte(s)
Added type Checker
structure TypeEin = struct


structure E = Ein
structure P = Printer


datatype greek_type=epsTy|deltaTy

datatype ein_type   = realTy
    | ten of E.mu list
    | fld of E.mu list

fun printIndex([])=""
    | printIndex(E.C x::ix)=  String.concat[Int.toString(x),printIndex(ix)]
    | printIndex(E.V v::ix)= String.concat[Int.toString(v),printIndex(ix)]

fun printTy ty= (case ty
    of realTy=>  "realTy"
    | ten ix=> String.concat["TEN-" ,printIndex(ix)]
    | fld  []=>  "Scalar FLD"
    | fld  ix=>String.concat["FLD" ,printIndex(ix)]
    (*end case*))

end; (* local *)

end (* local *)

ViewVC Help
Powered by ViewVC 1.0.0