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/ltybasic.sml
ViewVC logotype

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

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

revision 52, Mon Mar 23 03:59:51 1998 UTC revision 53, Mon Mar 23 04:02:58 1998 UTC
# Line 267  Line 267 
267    
268  fun tkInsert (kenv, ks) = ks::kenv  fun tkInsert (kenv, ks) = ks::kenv
269    
270    (* strip any unused type variables out of a kenv, given a list of
271     * [encoded] free type variables.  the result is a "parallel list" of
272     * the kinds of those free type variables in the environment.
273     * --CALeague
274     *)
275    fun tkLookupFreeVars (kenv, ftvs) =
276        let
277            fun g (kenv, d, []) = []
278              | g (kenv, d, ftv::ftvs) =
279                let val (d', i') = LtyKernel.tvDecode ftv
280                    val kenv' = List.drop (kenv, d'-d)
281                        handle _ => raise tkUnbound
282                    val k = List.nth (hd kenv', i')
283                        handle _ => raise tkUnbound
284                    val rest = g (kenv', d', ftvs)
285                in
286                    k :: rest
287                end
288        in
289            g (kenv, 1, ftvs)
290        end
291    
292  (***************************************************************************  (***************************************************************************
293   *            UTILITY FUNCTIONS ON TYC ENVIRONMENT                         *   *            UTILITY FUNCTIONS ON TYC ENVIRONMENT                         *
294   ***************************************************************************)   ***************************************************************************)

Legend:
Removed from v.52  
changed lines
  Added in v.53

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