[GHC] #14798: Error message suggests applying (non-existant) function to more arguments
GHC
ghc-devs at haskell.org
Mon Feb 12 17:09:28 UTC 2018
#14798: Error message suggests applying (non-existant) function to more arguments
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.5
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Poor/confusing
Unknown/Multiple | error message
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Applying a constraint that doesn't hold fails, this is expected
{{{
$ ~/code/qc-ghc/inplace/bin/ghc-stage2 --interactive -ignore-dot-ghci
GHCi, version 8.5.20180128: http://www.haskell.org/ghc/ :? for help
Prelude> :set -XGADTs -XConstraintKinds -XTypeApplications
Prelude> data Dict c where Dict :: c => Dict c
Prelude> data A
Prelude> :t Dict @(Eq A)
<interactive>:1:1: error:
No instance for (Eq A) arising from a use of ‘Dict’
}}}
but for `(Eq (Int -> Int))` GHC additionally suggests maybe applying a
function (what function?) to more arguments
{{{
Prelude> :t Dict @(Eq (Int -> Int))
<interactive>:1:1: error:
No instance for (Eq (Int -> Int)) arising from a use of ‘Dict’
(maybe you haven't applied a function to enough arguments?)
Prelude>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14798>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list