[GHC] #8576: Improve deriving error messages
GHC
ghc-devs at haskell.org
Mon Dec 2 09:08:45 UTC 2013
#8576: Improve deriving error messages
--------------------------------------------+------------------------------
Reporter: nomeata | Owner: nomeata
Type: feature request | Status: new
Priority: low | Milestone:
Component: Compiler (Type checker) | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by nomeata):
Theoretically possible, but would require a decent amount of code
reshuffling: The `CtOrigin` is currently created in `derivTyData` (and
others), and passed down to `mkEqnHelp` to `mkDataTypeEqn` to
`mk_data_eqn`, where the `inferred_constraints`, which are obtained from
`inferConstraints` as a list, put together with the `CtOrigin` and put
into one `EarlyDerivSpec`, which does not support different `CtOrigin`s
for different constraints.
I do like fancy error messages, but the code (passing around plain
`[Type]` for the constraint) has some elegance. Is this feature worth
uprooting that?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8576#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list