Opened 11 years ago

Closed 10 years ago

Last modified 8 years ago

#56 closed defect (duplicate)

Bad core produced from lambda abstraction

Reported by: benl Owned by:
Priority: blocker Milestone:
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 (2)

comment:1 Changed 10 years ago by benl

  • Resolution set to duplicate
  • Status changed from new to closed

dup of #2

comment:2 Changed 8 years ago by benl

  • Milestone 0.1.3 deleted

Milestone 0.1.3 deleted

Note: See TracTickets for help on using tickets.