type inference bug

Mark Tullsen mtullsen@cse.ogi.edu
Wed, 05 Mar 2003 17:00:13 -0800


Here's a (serious) bug in the type-inferencer of the November 2002 Hugs (tested
using hugs98-Nov2002-rh7.3-1.i386.rpm):

   data T a b = T {f1 :: a, f2 :: b}
   updateF1 x t = t{f1 = x}

   the type inferred for updateF1:
     observed behavior:
       updateF1 :: a -> T b c -> T a d
     expected behavior:
       updateF1 :: a -> T b c -> T a c

FYI, this bug didn't exist in the Dec 2001 version.

- Mark