Ticket #5820 (closed bug: fixed)
defining instance in GHCi leads to duplicated instances
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 7.6.1 |
| Component: | GHCi | Version: | 7.4.1-rc1 |
| Keywords: | Cc: | claudiusmaximus@…, castor@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | ghci/scripts/T5820 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
Bizarre:
claude@jazzyjeff:~$ cat Foo.hs module Foo where data Foo = Foo instance Num Foo where claude@jazzyjeff:~$ ~/opt/ghc-7.4/bin/ghci -w Foo.hs GHCi, version 7.4.0.20120119: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Foo ( Foo.hs, interpreted ) Ok, modules loaded: Foo. *Foo> :info Foo data Foo = Foo -- Defined at Foo.hs:2:6 instance Num Foo -- Defined at Foo.hs:3:10 *Foo> instance Fractional Foo where *Foo> :info Foo data Foo = Foo -- Defined at Foo.hs:2:6 instance Fractional Foo -- Defined at <interactive>:3:10 instance Num Foo -- Defined at Foo.hs:3:10 instance Num Foo -- Defined at Foo.hs:3:10
I get an extra Num instance (where from? same source location??), which causes overlapping problems.
Change History
Note: See
TracTickets for help on using
tickets.
