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

error when running ghc with the plugin directly: Unknown type constructor Nat, tests/pos/GCD.hs #2264

Closed
jwaldmann opened this issue Jan 30, 2024 · 1 comment

Comments

@jwaldmann
Copy link

$ /opt/ghc/ghc-9.8.1/bin/ghc -fforce-recomp -package base -fplugin=LiquidHaskell   tests/pos/GCD.hs 
Loaded package environment from /home/waldmann/.ghc/x86_64-linux-9.8.1/environments/default
[1 of 1] Compiling GCD              ( tests/pos/GCD.hs, tests/pos/GCD.o )

tests/pos/GCD.hs:5:14: error:
    Unknown type constructor `Nat`
    matchTyCon: Nat
  |
5 | {-@ mod :: a:Nat -> b:{v:Nat| ((v < a) && (v > 0))} -> {v:Nat | v < b} @-}
  |              ^^^

@jwaldmann
Copy link
Author

works via stack:

$ PATH=/opt/ghc/ghc-9.8.1/bin:$PATH stack exec -- ghc -fforce-recomp -fplugin=LiquidHaskell tests/pos/GCD.hs

Warning: Stack has not been tested with GHC versions 9.8 and above, and using 9.8.1, this may fail.
[1 of 1] Compiling GCD              ( tests/pos/GCD.hs, tests/pos/GCD.o )

**** LIQUID: SAFE (32 constraints checked) *************************************

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

1 participant