confusing language in error message
Late last night I was finding myself very confused by the following (in retrospect obvious error message)
src/Numerical/OpenBLAS/BLAS.hs:41:44:
A pattern match on a GADT requires GADTs or TypeFamilies
In the pattern: SRow
In the pattern: DenseMatrix SRow _ _ _ _
In an equation for ‛encodeNiceOrderHelper’:
encodeNiceOrderHelper (DenseMatrix SRow _ _ _ _)
= encodeOrder BLASRowMajor
the error is correct per se, but reading (at least late at night) made me think "wait, how is my type not a GADT or TypeFamily?!!?!"
I'm thinking (perhaps ) that
``` A pattern match on a GADT requires GADTs or TypeFamilies `` `
could perhaps be more clearly communicated as
A pattern match on a GADT requires that GADTs or TypeFamilies Language extensions be enabled in the use site module (or something similar)
relatedly: whats the current reasoning for why GADT related matching logic isn't enabled in client modules that use GADTs? (i'm not questioning it, just wondering why)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.8.1-rc1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |