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

SCM Repository

[smlnj] Diff of /sml/trunk/src/ml-nlffigen/pp.sml
ViewVC logotype

Diff of /sml/trunk/src/ml-nlffigen/pp.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 836, Fri May 25 19:28:51 2001 UTC revision 837, Fri Jun 1 17:27:54 2001 UTC
# Line 29  Line 29 
29                         [CON (k as ("schar" | "uchar" | "sint" | "uint" |                         [CON (k as ("schar" | "uchar" | "sint" | "uint" |
30                                     "sshort" | "ushort" | "slong" | "ulong" |                                     "sshort" | "ushort" | "slong" | "ulong" |
31                                     "float" | "double" | "voidptr"), []),                                     "float" | "double" | "voidptr"), []),
32                          TUPLE [], c])) =                          c])) =
33          CON (concat [k, "_", obj], [simplify c])          CON (concat [k, "_", obj], [simplify c])
34        | simplify (CON (obj as ("obj" | "obj'"),        | simplify (CON (obj as ("obj" | "obj'"),
35                         [CON ("fptr", [f]), _, c])) =                         [CON ("fptr", [f]), c])) =
36          CON ("fptr_" ^ obj, [simplify f, simplify c])          CON ("fptr_" ^ obj, [simplify f, simplify c])
37        | simplify (CON (obj as ("obj" | "obj'"),        | simplify (CON (obj as ("obj" | "obj'"),
38                         [CON ("su", [s]), TUPLE [], c])) =                         [CON ("su", [s]), c])) =
39          CON ("su_" ^ obj, [simplify s, simplify c])          CON ("su_" ^ obj, [simplify s, simplify c])
40        | simplify (CON ("Dim.dim", [n, CON (("Dim.nonzero" | "nonzero"), [])])) =        | simplify (CON ("Dim.dim", [n, CON (("Dim.nonzero" | "nonzero"), [])])) =
41          CON ("dim", [simplify n])          CON ("dim", [simplify n])
# Line 44  Line 44 
44                               "Dim.dg4" | "Dim.dg5" | "Dim.dg6" | "Dim.dg7" |                               "Dim.dg4" | "Dim.dg5" | "Dim.dg6" | "Dim.dg7" |
45                               "Dim.dg8" | "Dim.dg9"), [n])) =                               "Dim.dg8" | "Dim.dg9"), [n])) =
46          CON (String.extract (k, 4, NONE), [simplify n])          CON (String.extract (k, 4, NONE), [simplify n])
       | simplify (CON ("T.typ",  
                        [CON (k as ("schar" | "uchar" | "sint" | "uint" |  
                                    "sshort" | "ushort" | "slong" | "ulong" |  
                                    "float" | "double" | "voidptr"), []),  
                         _])) =  
         CON (concat ["T.", k, "_typ"], [])  
       | simplify (CON ("T.typ", [CON ("fptr", [f]), _])) =  
         CON ("T.fptr_typ", [simplify f])  
       | simplify (CON ("T.typ", [CON ("su", [s]), _])) =  
         CON ("T.su_typ", [simplify s])  
47        | simplify (ARROW (t1, t2)) = ARROW (simplify t1, simplify t2)        | simplify (ARROW (t1, t2)) = ARROW (simplify t1, simplify t2)
48        | simplify (TUPLE tl) = TUPLE (map simplify tl)        | simplify (TUPLE tl) = TUPLE (map simplify tl)
49        | simplify (CON (k, tl)) = CON (k, map simplify tl)        | simplify (CON (k, tl)) = CON (k, map simplify tl)

Legend:
Removed from v.836  
changed lines
  Added in v.837

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