Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LH does not like data types that are named TT #2446

Open
kleinreact opened this issue Nov 22, 2024 · 1 comment
Open

LH does not like data types that are named TT #2446

kleinreact opened this issue Nov 22, 2024 · 1 comment

Comments

@kleinreact
Copy link

kleinreact commented Nov 22, 2024

Declaring

{-@ LIQUID "" @-}
{-# OPTIONS_GHC -fplugin=LiquidHaskell #-}

module T2446 where

{-@ data TT = T @-}
data TT = T

gives

    Uh oh.
    CallStack (from HasCallStack):
  panic, called at src/Language/Haskell/Liquid/Bare/Resolve.hs:971:37 in liquidhaskell-boot-0.9.10.1-8f8f1436ec2870b2df728d040612993680973ed77351b2f8f4e1696a72c230b3:Language.Haskell.Liquid.Bare.Resolve
    lookupTyThing: cannot resolve a LHRLogic name "TT"
  |
3 | {-@ data TT = T @-}
  |

while names different than TT seem to work fine (at least for all names that I tested 😉).

Tested with 8c550df.

@facundominguez
Copy link
Collaborator

There is a type alias TT defined in src/GHC/Types_LHAssumptions.hs.

Removing the type alias fixes the error. This ticket seems to be about a bad error message then. I would expect LH to check that there are no collisions between data types and type aliases, though then we still will have the problem that we have no simple way to stop importing the type alias TT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants