Ticket #56 (closed defect: duplicate)

Opened 8 years ago

Last modified 8 years ago

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:


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

Changed 8 years ago by benl

  • status changed from new to closed
  • resolution set to duplicate

dup of #2

Note: See TracTickets for help on using tickets.