[GHC] #14265: kinded holes
GHC
ghc-devs at haskell.org
Thu Sep 21 12:48:50 UTC 2017
#14265: kinded holes
-------------------------------------+-------------------------------------
Reporter: lspitzner | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.2.1
checker) | Keywords:
Resolution: | PartialTypeSignatures
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* keywords: => PartialTypeSignatures
* component: Compiler => Compiler (Type checker)
Comment:
You didn't give a concrete example of what you'd like to see, so I'm
forced to guess. My shot-in-the-dark attempt is this program:
{{{#!hs
{-# LANGUAGE PolyKinds #-}
f :: proxy _ -> ()
f _ = ()
}}}
{{{
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Main ( Bug.hs, interpreted )
Bug.hs:3:12: error:
• Found type wildcard ‘_’ standing for ‘w’
Where: ‘w’ is a rigid type variable bound by
the inferred type of f :: proxy w -> () at Bug.hs:4:1-8
‘k’ is a rigid type variable bound by
the inferred type of f :: proxy w -> () at Bug.hs:4:1-8
To use the inferred type, enable PartialTypeSignatures
• In the type signature: f :: proxy _ -> ()
|
3 | f :: proxy _ -> ()
| ^
}}}
This output is indeed pretty skeevy-looking¸ since it points out a kind
variable `k` in a `Where:` clause, but `k` isn't used anywhere else!
Perhaps you wanted to see something like this instead?
{{{
• Found type wildcard ‘_’ standing for ‘w’ (of kind ‘k’)
Where: ...
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14265#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list