SCM Repository
View of /trunk/src/compiler/high-il/high-il-types.sml
Parent Directory
|
Revision Log
Revision 393 -
(download)
(annotate)
Thu Oct 14 15:45:01 2010 UTC (11 years, 8 months ago) by jhr
File size: 705 byte(s)
Thu Oct 14 15:45:01 2010 UTC (11 years, 8 months ago) by jhr
File size: 705 byte(s)
new files
(* high-il-types.sml * * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu) * All rights reserved. *) structure HighILTypes = struct datatype ty = BoolTy | StringTy | IntTy | TensorTy of int list fun same (ty1 : ty, ty2) = (ty1 = ty2) fun hash BoolTy = 0w1 | hash StringTy = 0w2 | hash IntTy = 0w3 | hash (TensorTy dd) = List.foldl (fn (d, s) => Word.fromInt d + s) 0w4 dd fun toString BoolTy = "bool" | toString StringTy = "string" | toString IntTy = "int" | toString (TensorTy[]) = "real" | toString (TensorTy dd) = String.concat[ "tensor[", String.concatWith "," (List.map Int.toString dd), "]" ] end
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |