Ticket #82 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Shape crusher isn't preserving effect and closure terms

Reported by: benl Owned by: benl
Priority: blocker Milestone: 0.1.3
Component: Source Type Inferencer Version: 0.1.2
Keywords: Cc:


class Copy2 a where
  copy2 :: forall b. a -(!e1)> b
	:- !e1 = !ReadT a
	,  Shape2 a b

copyIntFun2 xx
 = case xx of 
	FInt i	-> FInt (i + 0)
	FFun f	-> FFun f

instance Copy2 IntFun where
  copy2	= copyIntFun2

f2   = FFun ((+) 1)
f2'  = copy2 f2

Inferred type of f2 is

foreign import f2
        :: IntFun %rTS13 %rTS14 %rTS15 %rTS16 !e0 $c0
        :- !e0        = !{Base.!Read %rTC15; Base.!Read %rTS15}
        ,  $c0        = x : %rTC15

But inferred type of f2'

foreign import f2'
        :: IntFun %rTS29 %rTS28 %rTS27 %rTS26 !_ $_

The Shape crusher will have failed to link the effect and closure terms, and the tracer returns !_ because the class doesn't exist. Both of these are bugs.

Change History

Changed 4 years ago by benl

  • owner set to benl
  • status changed from new to assigned

Changed 4 years ago by benl

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.