Re: [GHC] #7402: Warn about possible missing -XScopedTypeVariables on errors.

2013-01-08 Thread GHC
#7402: Warn about possible missing -XScopedTypeVariables on errors.
---+
  Reporter:  Aninhumer |  Owner:  
  Type:  feature request   | Status:  closed  
  Priority:  normal|  Milestone:  
 Component:  Compiler  |Version:  7.6.1   
Resolution:  fixed |   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  | Difficulty:  Unknown 
  Testcase:|  Blockedby:  
  Blocking:|Related:  
---+
Changes (by simonpj):

  * status:  new = closed
  * difficulty:  = Unknown
  * resolution:  = fixed


Comment:

 Good point.  I've tightened up the ambiguity check for instance
 declarations.  Now you'll get an ambiguous declaration error from the
 above.

 Simon

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


Re: [GHC] #7402: Warn about possible missing -XScopedTypeVariables on errors.

2013-01-08 Thread GHC
#7402: Warn about possible missing -XScopedTypeVariables on errors.
---+
  Reporter:  Aninhumer |  Owner:  
  Type:  feature request   | Status:  closed  
  Priority:  normal|  Milestone:  
 Component:  Compiler  |Version:  7.6.1   
Resolution:  fixed |   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  | Difficulty:  Unknown 
  Testcase:|  Blockedby:  
  Blocking:|Related:  
---+

Comment(by simonpj):

 Actually I was mixed up. The ambiguity fix would reject this instance, but
 the original question was about scoped type variables.  The trouble is
 that this is a perfectly legal program ''without'' scoped type variables,
 with the 'n' meaning forall n. n.  I'm not sure how to improve this.

 Simon

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


[GHC] #7402: Warn about possible missing -XScopedTypeVariables on errors.

2012-11-10 Thread GHC
#7402: Warn about possible missing -XScopedTypeVariables on errors.
-+--
Reporter:  Aninhumer |  Owner:  
Type:  feature request   | Status:  new 
Priority:  normal|  Component:  Compiler
 Version:  7.6.1 |   Keywords:  
  Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown  |  Blockedby:  
Blocking:|Related:  
-+--
 Suggest that the user they may wish to add -XScopedTypeVariables, if an
 error results from a free type variable which would be bound in its scope
 with the flag enabled. (i.e. if its name exists as a variable in the type
 declaration).

 I ran into this problem on code similar to this:
 {{{
 instance (Sized a n, Nat n) = Rep a where
 emptyRep = replicate (toInt (undefined :: n)) 0
 }}}
 and it took me some time to solve, and only by having vague knowledge that
 such a flag existed.

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