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

SCM Repository

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

Diff of /trunk/src/compiler/basis/basis-vars.sml

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

revision 1640, Wed Nov 16 02:19:51 2011 UTC revision 1910, Tue Jun 5 12:02:36 2012 UTC
# Line 263  Line 263 
263    (* functions *)    (* functions *)
264      val fn_atan2 = monoVar (N.fn_atan2, [Ty.realTy, Ty.realTy] --> Ty.realTy)      val fn_atan2 = monoVar (N.fn_atan2, [Ty.realTy, Ty.realTy] --> Ty.realTy)
265    
 (* the following is depreciated in favor of the infix operator *)  
     val fn_convolve = polyVar (N.fn_convolve, all([DK, NK, SK],  
             fn [Ty.DIFF k, Ty.DIM d, Ty.SHAPE dd] => let  
                 val k = Ty.DiffVar(k, 0)  
                 val d = Ty.DimVar d  
                 val dd = Ty.ShapeVar dd  
                 in  
                   [Ty.T_Kernel k, Ty.T_Image{dim=d, shape=dd}]  
                     --> field(k, d, dd)  
                 end))  
   
266      val fn_cos = monoVar (N.fn_cos, [Ty.realTy] --> Ty.realTy)      val fn_cos = monoVar (N.fn_cos, [Ty.realTy] --> Ty.realTy)
267    
268      local      local
# Line 284  Line 273 
273              end              end
274      in      in
275      val op_cross = monoVar (N.op_cross, crossTy)      val op_cross = monoVar (N.op_cross, crossTy)
     val fn_cross = monoVar (N.fn_cross, crossTy)  
276      end      end
277    
   (* the depriciated 'dot' function *)  
     val fn_dot = polyVar (N.fn_dot, allNK(fn tv => let  
           val t = tensor[Ty.DimVar tv]  
           in  
             [t, t] --> Ty.realTy  
           end))  
   
278    (* the inner product operator (including dot product) is treated as a special case in the    (* the inner product operator (including dot product) is treated as a special case in the
279     * typechecker.  It is not included in the basis environment, but we define its type scheme     * typechecker.  It is not included in the basis environment, but we define its type scheme
280     * here.  There is an implicit constraint on its type to have the following scheme:     * here.  There is an implicit constraint on its type to have the following scheme:
# Line 323  Line 304 
304                    [Ty.T_String] --> Ty.T_Image{dim=d, shape=dd}                    [Ty.T_String] --> Ty.T_Image{dim=d, shape=dd}
305                  end))                  end))
306    
307        val fn_fmod = monoVar (N.fn_fmod, [Ty.realTy, Ty.realTy] --> Ty.realTy)
308    
309        val fn_log10 = monoVar (N.fn_log10, [Ty.realTy] --> Ty.realTy)
310        val fn_ln = monoVar (N.fn_ln, [Ty.realTy] --> Ty.realTy)
311    
312      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)
313      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)
314    
# Line 350  Line 336 
336                [vt1, vt2] --> mt                [vt1, vt2] --> mt
337              end              end
338      in      in
     val fn_outer = polyVar (N.fn_outer, all([NK, NK], mkOuter))  
339      val op_outer = polyVar (N.op_outer, all([NK, NK], mkOuter))      val op_outer = polyVar (N.op_outer, all([NK, NK], mkOuter))
340      end      end
341    
     val fn_pow = monoVar (N.fn_pow, [Ty.realTy, Ty.realTy] --> Ty.realTy)  
   
342      val fn_principleEvec = polyVar (N.fn_principleEvec, all([NK],      val fn_principleEvec = polyVar (N.fn_principleEvec, all([NK],
343              fn [Ty.DIM d] => let              fn [Ty.DIM d] => let
344                  val d = Ty.DimVar d                  val d = Ty.DimVar d

Legend:
Removed from v.1640  
changed lines
  Added in v.1910

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