Ticket #56 (closed defect: duplicate)
Bad core produced from lambda abstraction
| Reported by: | benl | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 0.1.3 |
| Component: | Source to Core Translation | Version: | 0.1.2 |
| Keywords: | Cc: |
Description
This produces bad core. Effect args passed to foldl don't include read of intermediate Ordering value returned by (cmp x y).
The Ordering value is local to max, but the region is passed in to maximumBy.
maximumBy cmp (a:as)
= foldl max a as
where max = (\x y -> case cmp x y of { GT -> x; _ -> y})
minT2F :: [(a, Float)] -> (a, Float) minT2F list = minimumBy (\x y -> compare (snd x) (snd y)) list
These were both used in demo/Rover
Change History
Note: See
TracTickets for help on using
tickets.
