#1316: add warning for local type signatures that use the same type variable 
names
as outer type signatures
--------------------------------+-------------------------------------------
    Reporter:  Isaac Dupree     |        Owner:         
        Type:  feature request  |       Status:  new    
    Priority:  normal           |    Milestone:  6.8    
   Component:  Compiler         |      Version:  6.6.1  
    Severity:  normal           |   Resolution:         
    Keywords:                   |   Difficulty:  Unknown
          Os:  Unknown          |     Testcase:         
Architecture:  Unknown          |  
--------------------------------+-------------------------------------------
Comment (by Isaac Dupree):

 Indeed.  How to interact with local recursive bindings such as `let`?  I
 think it had better not warn about type variable names being shared
 between those, as I'm sure that is natural common practice.

 More generally, scoped type variables are a little limited; personally, I
 like the `(type X)` / `let type X` approach (I wonder if there would be a
 particularly great difficulty implementing that in Haskell systems weaker
 than GHC's? GHC and JHC have strong enough internal type systems,
 Yhc/nhc98 have untyped internal representations, GHC doesn't even use its
 internal representation for typechecking...)

 So I think it can be specified by: would the program be affected by using
 explicit GHC-style foralls at the beginning of all the type-signatures
 that have implicit universal quantification?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1316>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to