Opened 11 years ago

Closed 9 years ago

Last modified 8 years ago

#82 closed defect (fixed)

Shape crusher isn't preserving effect and closure terms

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

comment:1 Changed 10 years ago by benl

  • Owner set to benl
  • Status changed from new to assigned

comment:2 Changed 9 years ago by benl

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:3 Changed 8 years ago by benl

  • Milestone 0.1.3 deleted

Milestone 0.1.3 deleted

Note: See TracTickets for help on using tickets.