-
Simon Peyton Jones authored
When you have a (\s::String -> ....[| s |]....), the string 's' is lifted. We used to get a chain of single-character Cons nodes, correct but lots and lots of code. This patch arranges to optimise that to a string literal. It does so in two places: a) In TcExpr, if we know that s::String, we generate liftString directly b) In DsMeta, if we find a list of character literals, we convert to a string. This catches a few cases that (a) does not There an accompanying patch in the template-haskell package, adding Language.Haskell.TH.Syntax.liftString
97a8fe87