title: How we can use type level string in template haskell?
body: <p>I played around with <code>symbolVal</code> and template haskell as follows on ghci.</p>
  
  <pre><code>&gt;&gt;&gt; :set -XTemplateHaskell -XQuasiQuotes -XDataKinds
  &gt;&gt;&gt; import Language.Haskell.TH
  &gt;&gt;&gt; import Data.Proxy
  &gt;&gt;&gt; import GHC.TypeLits
  &gt;&gt;&gt; $([| symbolVal (Proxy :: Proxy "foo") |]) -- Code (1)
  "foo"
  
  &gt;&gt;&gt; runQ [| symbolVal (Proxy :: Proxy "foo") |]
  AppE (VarE GHC.TypeLits.symbolVal) (SigE (ConE Data.Proxy.Proxy) (AppT (ConT Data.Proxy.Proxy) (LitT (StrTyLit "foo"))))
  
  &gt;&gt;&gt; $(appE (varE 'symbolVal) (sigE (conE ''Proxy) (appT (conT ''Proxy) (litT (strTyLit "foo")))))
  
  &lt;interactive&gt;:9:3: error:
      • Type constructor ‘Proxy’ used where a value identifier was expected
      • In the first argument of ‘symbolVal’, namely
          ‘Proxy :: Proxy "foo"’
        In the expression: (symbolVal (Proxy :: Proxy "foo"))
        In an equation for ‘it’: it = (symbolVal (Proxy :: Proxy "foo"))
  </code></pre>
  
  <p>Why this error occurs though <code>Code (1)</code> works well?
  How we can use type level string in template haskell?</p>