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/compiler/FLINT/kernel/ltyextern.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/kernel/ltyextern.sml

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

revision 215, Wed Feb 17 14:17:40 1999 UTC revision 216, Fri Feb 26 12:55:26 1999 UTC
# Line 919  Line 919 
919      lt_nvar_cvt      lt_nvar_cvt
920  end (* lt_nvar_cvt_gen *)  end (* lt_nvar_cvt_gen *)
921    
922    (* make a type abstraction from nvar to lty *)
923    fun lt_nvpoly(tvks, lt) =
924        let
925            fun frob ((tv,k)::tvks, n, ks, tvoffs) =
926                frob (tvks, n+1, k::ks, (tv,n)::tvoffs)
927              | frob ([], _, ks, tvoffs) =
928                (rev ks, rev tvoffs)
929    
930            val (ks, tvoffs) = frob (tvks, 0, [], [])
931            fun cmp ((tvar1,_), (tvar2,_)) = tvar1 > tvar2
932            val tvoffs = Sort.sort cmp tvoffs
933    
934            (* temporarily gen() *)
935            val ltSubst = lt_nvar_cvt_gen() tvoffs (DI.next DI.top)
936        in ltc_poly(ks, map ltSubst lt)
937        end
938    
939  end (* top-level local *)  end (* top-level local *)
940  end (* structure LtyExtern *)  end (* structure LtyExtern *)

Legend:
Removed from v.215  
changed lines
  Added in v.216

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