[GHC] #15413: Poor error message when trying to import non-existent class methods
GHC
ghc-devs at haskell.org
Wed Jul 18 18:28:44 UTC 2018
#15413: Poor error message when trying to import non-existent class methods
-------------------------------------+-------------------------------------
Reporter: | Owner: (none)
quasicomputational |
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{
$ cat A.hs
module A where
class C a where
foo :: a -> Int
bar :: a -> Int
$ cat B.hs
module B where
import A (C (foo, bar, baz))
instance C Int where
foo = id
bar = id
$ ghci B.hs
GHCi, version 8.4.2: http://www.haskell.org/ghc/ :? for help
[1 of 2] Compiling A ( A.hs, interpreted )
[2 of 2] Compiling B ( B.hs, interpreted )
B.hs:3:11: error: Module ‘A’ does not export ‘C(foo, bar, baz)’
|
3 | import A (C (foo, bar, baz))
| ^^^^^^^^^^^^^^^^^
Failed, one module loaded.
}}}
If you're importing a dozen or so methods, not mentioning the specific
method that couldn't be imported gets quite annoying.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15413>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list