ucsd-progsys / liquidhaskell

Liquid Types For Haskell
BSD 3-Clause "New" or "Revised" License
1.19k stars 136 forks source link

DuplicateRecordFields breaks LH #2377

Open gergoerdi opened 3 hours ago

gergoerdi commented 3 hours ago

The following is a valid, well-typed Haskell program:

{-# LANGUAGE DuplicateRecordFields #-}
module DuplicateRecordFields where

data Foo = MkFoo{ fd :: Int }
data Bar = MkBar{ fd :: Int }

But LH as of cce470dec80b93729c0c92189613531e79a25c1e rejects it with:

**** LIQUID: ERROR *************************************************************
<no location info>: error:
    :1:1-1:1: Error
  Multiple sorts for DuplicateRecordFields.fd
      [func(0 , [DuplicateRecordFields.Bar; int]) : [],
       func(0 , [DuplicateRecordFields.Foo; int]) : []]
ranjitjhala commented 2 hours ago

Yikes -- @facundominguez -- a fresh issue to consider with DuplicateRecordFields (I think we'd have to qualify the field names with the type...)