Opened 10 years ago

Closed 7 years ago

#81 closed defect (fixed)

Bug in core type checker

Reported by: benl Owned by:
Priority: normal Milestone:
Component: Build System Version: 0.1.2
Keywords: Cc:

Description (last modified by benl)

With this program

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

instance Copy2 Int where
  copy2 x = x

main ()
 = do	i :: Int %r1 :- Const %r1
	i	= 5
	i'	= copy2 i
        i' := 27
	()

Have this in dump-core-dict

i' = /\ (+xC9             :: Mutable %rTS21) ->
     [** (Base.Int32 %rTS21) ]
     do {
        instance_Copy2_Int32_copy2 %r1 (i +wCB4);
     };

return type of copy2 is (Int32 %r1), not (Int %rTS21)

This problem originally originally arises because the instance for copy2 didn't copy the int like it should have.

Is really 2 bugs: core type checker, and and not checking instances against class defs

Change History (3)

comment:1 Changed 10 years ago by benl

  • Description modified (diff)

comment:2 Changed 7 years ago by benl

  • Milestone 0.1.3 deleted
  • Priority changed from blocker to normal

comment:3 Changed 7 years ago by benl

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

Fixed in the new core language

Note: See TracTickets for help on using tickets.