Is there a way to obtain (import from base modules or write expression) a value of type Language.Haskell.TH.Name
that represents '[]
without enabling -XTemplateHaskell
?
A good reason to do so is that tools like hlint do not play well with TH and being able to avoid it therefore has a benefit. Then I could put a definition
nilName :: Name
nilName = '[]
in a separate file and import it, but this only makes sense if there is no standard name by which it can be imported or called. Furthermore, nilName
cannot be used in pattern matches. Is there such a thing?