Ticket #1525 (closed feature request: fixed)
:browse shouldn't print single-constructor data definitions twice
| Reported by: | sorear | Owned by: | simonpj |
|---|---|---|---|
| Priority: | high | Milestone: | 6.8.1 |
| Component: | Compiler | Version: | 6.7 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Easy (less than 1 hour) | |
| Test Case: | ghci011 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
stefan@stefans:~/qhc/qhc-desugar/Qhc/TypeCheck$ ghci Type.hs Loading package base ... linking ... done. [1 of 2] Compiling FreshName ( FreshName.hs, interpreted ) [2 of 2] Compiling Type ( Type.hs, interpreted ) Ok, modules loaded: Type, FreshName. ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.7.20070612, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. *Type> :bro Type unQlType :: QlType -> FreshName.Uniq ([Constraint], Type_) data Constraint = Type_ :~ Type_ data Constraint = Type_ :~ Type_ data QlType = QlType [Constraint] Type_ data QlType = QlType [Constraint] Type_ data Type_ = Con Id | Type_ :@ Type_ | Var FreshName.UName | Binding Id data Type_ = ... | Binding Id data Type_ = ... | Var FreshName.UName | ... data Type_ = ... | Type_ :@ Type_ | ... data Type_ = Con Id | ... type Id = String *Type>
Note the multiple definitions of Constraint and QlType?. My conjecture is that the data and type constructors, both in-scope, are both being browsed to the data definition; which suggests the (admittedly a little hacky) improvement of not displaying only-child data constructors if the corresponding type constructor is in the same scope.
Change History
Note: See
TracTickets for help on using
tickets.
