[GHC] #7862: Could not deduce (A) from the context (A, ...)
GHC
ghc-devs at haskell.org
Sun Nov 9 15:15:36 UTC 2014
#7862: Could not deduce (A) from the context (A, ...)
-------------------------------------+-------------------------------------
Reporter: alang9 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
(Type checker) | Keywords:
Resolution: | Architecture: x86_64 (amd64)
Operating System: Linux | Difficulty: Unknown
Type of failure: GHC | Blocked By:
rejects valid program | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
The problem in comment:5 is unrelated to the original bug report -- it is
a !PolyKinds issue. If you turn on `-fprint-explicit-kinds`, you get
{{{
Could not deduce (Category k2 (Morphisms (k -> k -> *) k2 * c))
arising from a use of ‘Control.Category.id’
from the context (Category k c,
Category k1 (Morphisms (k -> k -> *) k1 * c))
bound by the instance declaration at Scratch.hs:30:10-64
or from (Objects (k -> k -> *) k2 c a)
bound by the type signature for
id :: (Objects (k -> k -> *) k2 c a) =>
Morphisms (k -> k -> *) k2 * c a a
at Scratch.hs:33:5-6
In the expression: Control.Category.id
In an equation for ‘id’: id = Control.Category.id
In the instance declaration for ‘SmallCategory (k -> k -> *) c’
}}}
and you can see a more sensible error message.
What would be nice here is a note suggesting to turn on `-fprint-explicit-
kinds`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7862#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list