<div dir="ltr"><div><div>I see ‘#’ for unlifted and ‘?’ for open kinds in compiler/parser/Parser.y:
<pre style="margin-left:40px"><code>akind   :: { IfaceKind }
        : '*'              { ifaceLiftedTypeKind }      
        | '#'              { ifaceUnliftedTypeKind }
        | '?'              { ifaceOpenTypeKind }
        | '(' kind ')'     { $2 }

kind    :: { IfaceKind }
        : akind            { $1 }
        | akind '->' kind  { ifaceArrow $1 $3 }</code></pre>
<p>However, I don’t know how to get GHC to accept ‘#’ or ‘?’ in a kind 
annotation. Are these kinds really available to source programs.</p>
<p>I see that undefined has an open-kinded type:</p>
<pre style="margin-left:40px"><code>*Main> :i undefined
undefined :: forall (a :: OpenKind). a      -- Defined in ‘GHC.Err’</code></pre>
<p>Looking in the GHC.Err source, I just see the following:</p>
<pre style="margin-left:40px"><code>undefined :: a
undefined =  error "Prelude.undefined"</code></pre>
<p>However, if I try similarly,</p>
<pre style="margin-left:40px"><code>q :: a
q = error "q"</code></pre>
<p>I don’t see a similar type:</p>
<pre style="margin-left:40px"><code>*X> :i q
q :: forall a. a        -- Defined at ../test/X.hs:12:1</code></pre><br></div>I don't know what kind 'a' has here, nor how to find out.<br><br></div>-- Conal<br></div>