#4136: Automatically derived Read of operator is not inverse of automatically
derived Show
----------------------------------------+-----------------------------------
Reporter: dsf | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.13
Resolution: fixed | Keywords:
Difficulty: | Os: Unknown/Multiple
Testcase: deriving/should_run/T4136 | Architecture: Unknown/Multiple
Failure: Runtime crash |
----------------------------------------+-----------------------------------
Changes (by simonpj):
* status: new => closed
* testcase: => deriving/should_run/T4136
* resolution: => fixed
Comment:
Good point. Fixed by
{{{
Wed Jul 7 06:59:45 PDT 2010 [email protected]
* Fix Trac #T4136: take care with nullary symbol constructors
When a nullary constructor is a symbol eg (:=:) we need
to take care. Annoying.
M ./compiler/typecheck/TcGenDeriv.lhs -5 +14
}}}
and
{{{
Wed Jul 7 06:57:25 PDT 2010 [email protected]
* Partial fix for Trac #4136
In 'choose' (which is a library function designed specifically
to support derived instances of Read), we must match Symbol
as well as Ident, for nullary constructors that (wierdly) are
symbols.
M ./GHC/Read.lhs -2 +7
}}}
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4136#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs