How do I lookup type operator name? This does not work:
IssueTH.hs:
{-# LANGUAGE TemplateHaskell #-}
module IssueTH where
import Language.Haskell.TH
f :: Q [Dec]
f = do
Just n <- lookupTypeName "GHC.TypeLits.*"
return []
Issue.hs:
{-# LANGUAGE TemplateHaskell #-}
module Issue where
import IssueTH
$f
ghc Issue.hs
fails with message:
Pattern match failure in do expression at IssueTH.hs
Replacing "GHC.TypeLits.*"
with "GHC.TypeLits.(*)"
or "*"
doesn't work either.