comparison src/especialize.sml @ 1383:0af6bd2dd149

Expand valueish again
author Adam Chlipala <adam@chlipala.net>
date Thu, 06 Jan 2011 12:31:13 -0500
parents 5cb95fb7d4d5
children 0577be31a435
comparison
equal deleted inserted replaced
1382:5cb95fb7d4d5 1383:0af6bd2dd149
335 | EAbs _ => true 335 | EAbs _ => true
336 | ECAbs _ => true 336 | ECAbs _ => true
337 | EKAbs _ => true 337 | EKAbs _ => true
338 | ECApp (e, _) => valueish e 338 | ECApp (e, _) => valueish e
339 | EKApp (e, _) => valueish e 339 | EKApp (e, _) => valueish e
340 | EApp _ => 340 | EApp (e1, e2) => valueish e1 andalso valueish e2
341 let
342 fun valueishf (e, _) =
343 case e of
344 ENamed _ => true
345 | EFfi _ => true
346 | ECApp (e, _) => valueishf e
347 | EApp (e, (ERel _, _)) => valueishf e
348 | EApp (e, (ENamed _, _)) => valueishf e
349 | _ => false
350 in
351 valueishf all
352 end
353 | ERecord xes => List.all (valueish o #2) xes 341 | ERecord xes => List.all (valueish o #2) xes
342 | EField (e, _, _) => valueish e
354 | _ => false 343 | _ => false
355 344
356 val vts = map (fn n => #2 (List.nth (env, n))) (IS.listItems fvs) 345 val vts = map (fn n => #2 (List.nth (env, n))) (IS.listItems fvs)
357 val fxs' = map (squish (IS.listItems fvs)) fxs 346 val fxs' = map (squish (IS.listItems fvs)) fxs
358 347