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

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/basis/basis-vars.sml
ViewVC logotype

Diff of /branches/lamont/src/compiler/basis/basis-vars.sml

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

revision 1921, Fri Jun 8 13:22:03 2012 UTC revision 1922, Sat Jun 23 11:25:39 2012 UTC
# Line 245  Line 245 
245    
246    (***** non-overloaded operators, etc. *****)    (***** non-overloaded operators, etc. *****)
247    
248      (* C math functions *)
249        val mathFns : (MathFuns.name * Var.var) list = let
250              fun ty n = List.tabulate(MathFuns.arity n, fn _ => Ty.realTy) --> Ty.realTy
251              in
252                List.map (fn n => (n, monoVar(MathFuns.toAtom n, ty n))) MathFuns.allFuns
253              end
254    
255    (* pseudo-operator for probing a field *)    (* pseudo-operator for probing a field *)
256      val op_probe = polyVar (N.op_at, all([DK, NK, SK],      val op_probe = polyVar (N.op_at, all([DK, NK, SK],
257            fn [Ty.DIFF k, Ty.DIM d, Ty.SHAPE dd] => let            fn [Ty.DIFF k, Ty.DIM d, Ty.SHAPE dd] => let
# Line 284  Line 291 
291      val op_not = monoVar (N.op_not, [Ty.T_Bool] --> Ty.T_Bool)      val op_not = monoVar (N.op_not, [Ty.T_Bool] --> Ty.T_Bool)
292    
293    (* functions *)    (* functions *)
     val fn_atan2 = monoVar (N.fn_atan2, [Ty.realTy, Ty.realTy] --> Ty.realTy)  
   
     val fn_cos = monoVar (N.fn_cos, [Ty.realTy] --> Ty.realTy)  
   
294      local      local
295        val crossTy = let        val crossTy = let
296              val t = tensor[N3]              val t = tensor[N3]
# Line 327  Line 330 
330                    [Ty.T_String] --> Ty.T_Image{dim=d, shape=dd}                    [Ty.T_String] --> Ty.T_Image{dim=d, shape=dd}
331                  end))                  end))
332    
     val fn_fmod = monoVar (N.fn_fmod, [Ty.realTy, Ty.realTy] --> Ty.realTy)  
   
     val fn_log10 = monoVar (N.fn_log10, [Ty.realTy] --> Ty.realTy)  
     val fn_ln = monoVar (N.fn_ln, [Ty.realTy] --> Ty.realTy)  
   
333      val fn_max = monoVar (N.fn_max, [Ty.realTy, Ty.realTy] --> Ty.realTy)      val fn_max = monoVar (N.fn_max, [Ty.realTy, Ty.realTy] --> Ty.realTy)
334      val fn_min = monoVar (N.fn_min, [Ty.realTy, Ty.realTy] --> Ty.realTy)      val fn_min = monoVar (N.fn_min, [Ty.realTy, Ty.realTy] --> Ty.realTy)
335    
# Line 369  Line 367 
367                    [matrix d] --> tensor[d]                    [matrix d] --> tensor[d]
368                  end))                  end))
369    
     val fn_sin = monoVar (N.fn_sin, [Ty.realTy] --> Ty.realTy)  
   
     val fn_sqrt = monoVar (N.fn_sqrt, [Ty.realTy] --> Ty.realTy)  
   
     val fn_tan = monoVar (N.fn_tan, [Ty.realTy] --> Ty.realTy)  
   
370      val fn_trace = polyVar (N.fn_trace, all([NK],      val fn_trace = polyVar (N.fn_trace, all([NK],
371              fn [Ty.DIM d] => [matrix(Ty.DimVar d)] --> Ty.realTy))              fn [Ty.DIM d] => [matrix(Ty.DimVar d)] --> Ty.realTy))
372    

Legend:
Removed from v.1921  
changed lines
  Added in v.1922

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