Convert a type argument into a Template Haskell Type.
Use with TypeApplications.
Example:
>>> :set -XTypeApplications
>>> liftType @Bool
ConT GHC.Types.Bool
>>> liftType @[Char]
AppT (ConT GHC.Types.[]) (ConT GHC.Types.Char)
This works with data kinds, too.
>>> :set -XDataKinds
>>> liftType @3
LitT (NumTyLit 3)
>>> liftType @"hello"
LitT (StrTyLit "hello")
>>> liftType @'[Int, Char]
AppT (AppT (PromotedT GHC.Types.:) (ConT GHC.Types.Int)) (AppT (AppT (PromotedT GHC.Types.:) (ConT GHC.Types.Char)) (PromotedT GHC.Types.[]))
>>> liftType @'(Int, Char)
AppT (AppT (PromotedT GHC.Tuple.(,)) (ConT GHC.Types.Int)) (ConT GHC.Types.Char)