Ticket #149 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

PANIC in Type.Crush.Unify

Reported by: erikd Owned by: benl
Priority: blocker Milestone: 0.1.3
Component: Core Type Checker Version: 0.1.2
Keywords: Cc:

Description

This function is a variant of the solution to the Man or Boy Test.

a :: Int -> a -> a -> a -> a -> a -> Int
a k x1 x2 x3 x4 x5
 = do   b () = do { k := k - 1 ; nk = k ; a nk b x1 x2 x3 x4 }
        if k <= 0 then x4 () + x5 () else b ()

When trying to compile it, I get:

ddc: PANIC in Type.Crush.Unify
    errorConflict: Couldn't identify the error in class 202
       type: 
            Nothing
        
       queue: 
            [Base.Int32 %3, Base.Int32 %3 :- Base.Mutable %3]
        
       nodes:
            (tTC694_nk, TSV (SVInst ./Test.ds:5:44 nk))
            (Base.Int32 %3, TSV (SVInst ./Test.ds:5:44 nk))
            (@TFetter Class.Num.Num *174, TSV (SVInst ./Test.ds:5:27 (-)))
            (tTS2, TSV (SVInst ./Test.ds:5:27 (-)))
            (nk, TSU SU ./Test.ds:5:33)
            (tTC685_k, TSU SU ./Test.ds:5:33)
            (tTC683_k, TSV (SVInst ./Test.ds:5:25 k))
            (@TFetter Base.MutableT *156, TSV (SVInst ./Test.ds:5:20 (:=)))
            (@TFetter Class.Update.Updatable *156, TSV (SVInst ./Test.ds:5:20 (:=)))
            (tTS0, TSV (SVInst ./Test.ds:5:20 (:=)))
            (tTC679_k, TSV (SVInst ./Test.ds:5:20 k))
            (Base.Int32 %3, TSV SV ./Test.ds:2:2)
            (k, TSV SV ./Test.ds:3:0)

Change History

Changed 5 years ago by erikd

Test is in test/Broken-skip/T149-PanicTypeCrushUnify/

Changed 5 years ago by benl

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

Changed 5 years ago by benl

  • milestone set to 0.1.3

Changed 5 years ago by benl

  • status changed from assigned to closed
  • resolution set to fixed

Fixed by refactoring of type expressions.

Note: See TracTickets for help on using tickets.