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/branches/primop-branch-2/src/compiler/ElabData/types/typesutil.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-2/src/compiler/ElabData/types/typesutil.sml

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

revision 1952, Thu Jul 6 03:07:18 2006 UTC revision 1953, Thu Jul 6 15:00:39 2006 UTC
# Line 523  Line 523 
523     Comments: compareTypes does pruning so there is no need to prune in     Comments: compareTypes does pruning so there is no need to prune in
524               this function or anywhere else that uses compareTypes or               this function or anywhere else that uses compareTypes or
525               matchTypes.               matchTypes.
526    
527       matchTypes is used in SigMatch for matching structures (matchStr1) only
528   *)   *)
529  fun matchTypes (specTy, actualTy) =  fun matchTypes (specTy, actualTy) =
530      (* If specTy is not an instance of actualTy, then give up. *)      (* If specTy is an instance of actualTy,
531           then match, otherwise give up. *)
532      if compareTypes(specTy, actualTy) then      if compareTypes(specTy, actualTy) then
533            (* compareTypes should have already determined that the
534               two types match. *)
535          let          let
536              val (actinst, actParamTvs) =              val (actinst, actParamTvs) = instantiatePoly actualTy
537                  instantiatePoly actual              val (specinst, specGenericTvs) = instantiatePoly specTy
             val (specinst, specGenericTvs) =  
                 instantiatePoly spec  
538          in          in
539                (* These metavariable lists may be empty if either actualTy
540                   or specTy are monomorphic *)
541              (specGenericTvs, actParamTvs)              (specGenericTvs, actParamTvs)
542          end          end
543      else ([], [])      else ([], [])

Legend:
Removed from v.1952  
changed lines
  Added in v.1953

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