Re: [GHC] #1316: add warning for local type signatures that use the same type variable names as outer type signatures
#1316: add warning for local type signatures that use the same type variable names as outer type signatures -+-- Reporter: Isaac Dupree |Owner: simonpj Type: feature request | Status: new Priority: normal|Milestone: _|_ Component: Compiler | Version: 6.6.1 Keywords:| Difficulty: Unknown Os: Unknown/Multiple | Testcase: Architecture: Unknown/Multiple | Failure: None/Unknown -+-- Changes (by igloo): * failure: = None/Unknown Comment: See also #3691. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1316#comment:8 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] #1316: add warning for local type signatures that use the same type variable names as outer type signatures
#1316: add warning for local type signatures that use the same type variable names as outer type signatures -+-- Reporter: Isaac Dupree |Owner: simonpj Type: feature request | Status: new Priority: normal|Milestone: _|_ Component: Compiler | Version: 6.6.1 Severity: normal| Resolution: Keywords:| Difficulty: Unknown Testcase:| Os: Unknown/Multiple Architecture: Unknown/Multiple | -+-- Changes (by igloo): * milestone: 6.10 branch = _|_ -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1316#comment:7 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] #1316: add warning for local type signatures that use the same type variable names as outer type signatures
#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
[GHC] #1316: add warning for local type signatures that use the same type variable names as outer type signatures
#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: Component: Compiler |Version: 6.6.1 Severity: normal | Keywords: Difficulty: Unknown | Os: Unknown Testcase: | Architecture: Unknown --+- for a (poor) example, {{{ f :: a - a f x = x where g :: a --this is (forall x. x) not the 'a' from f's type signature -- So, warn about this signature. g = undefined }}} Because it is likely to be confusing, as well as interfering with any possibility of the type variables being considered scoped by default. In fact, this may be a helpful/explanatory message in cases where there will also be a type error due to the type variables not actually being scoped. (although, detecting those cases particularly and giving a recommended solution for how to give such a type signature, would be a more difficult endeavor (what to recommend?)) -- 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