-
Notifications
You must be signed in to change notification settings - Fork 24
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
Tests for type errors #322
Comments
It's tricky.
but
We reach optics/optics-core/src/Optics/Internal/Optic/Subtyping.hs Lines 34 to 40 in a47f004
We need a support in GHC to scrutinize on empty dictionary, compare In other words, We should be able to write something like foo :: (Int ~ Char) => Void
foo () or bar :: TypeError ('Text "err") => Void
bar () where syntax is Agda-inspired. We probably need something of |
For future reference: https://gitlab.haskell.org/ghc/ghc/-/issues/18310 is the GHC issue this ticket inspired. |
It occurred to me that the test suite could do with a more thorough set of tests for the type errors that are generated by invalid code, to prevent error message regressions. We could either do this with doctests, or use
-fdefer-type-errors
and catch and inspect type errors at runtime.The text was updated successfully, but these errors were encountered: