[GHC] #12374: Type holes show incorrect type in GHCi
GHC
ghc-devs at haskell.org
Fri Jul 8 02:17:13 UTC 2016
#12374: Type holes show incorrect type in GHCi
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets: 9479, 9091
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
In a fresh GHCi:
{{{
> show _
<interactive>:7:6: error:
• Found hole: _h :: ()
Or perhaps ‘_h’ is mis-spelled, or not in scope
• In the first argument of ‘show’, namely ‘_h’
In the expression: show _h
In an equation for ‘it’: it = show _h
• Relevant bindings include
it :: String (bound at <interactive>:7:1)
}}}
This seems wrong: the type of the hole is `_h :: Show a0 => a0`, not `_h
:: ()`.
On a related note, should this be reporting two errors (one for the hole,
one for the constraint) as in #9479?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12374>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list