#1525: :browse shouldn't print single-constructor data definitions twice
------------------------------+---------------------------------------------
  Reporter:  sorear           |          Owner:         
      Type:  feature request  |         Status:  new    
  Priority:  normal           |      Milestone:         
 Component:  Compiler         |        Version:  6.7    
  Severity:  minor            |       Keywords:         
Difficulty:  Easy (1 hr)      |             Os:  Unknown
  Testcase:                   |   Architecture:  Unknown
------------------------------+---------------------------------------------
{{{
 [EMAIL PROTECTED]:~/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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1525>
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

Reply via email to