[GHC] #11098: TH mishandles type variables that begin with an underscore
GHC
ghc-devs at haskell.org
Tue Nov 17 10:31:19 UTC 2015
#11098: TH mishandles type variables that begin with an underscore
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: jstolarek
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by darchon):
Indeed, I was just about to comment that it is not just TH. When I compile
{{{
{-# LANGUAGE PartialTypeSignatures, NamedWildCards, ExplicitForAll #-}
module Bar where
foo :: _a -> _a
foo x = x
bar :: forall _a . _a -> _a
bar x = x
}}}
I get:
{{{
$ ghc -fforce-recomp Bar.hs
[1 of 1] Compiling Bar ( Bar.hs, Bar.o )
Bar.hs:4:8: warning:
Found type wildcard '_a' standing for 't'
Where: 't' is a rigid type variable bound by
the inferred type of foo :: t -> t at Bar.hs:5:1
In the type signature for:
foo :: _a -> _a
Bar.hs:7:20: warning:
Found type wildcard '_a' standing for 't0'
Where: 't0' is an ambiguous type variable
In the type signature for:
bar :: forall _a. _a -> _a
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11098#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list