haskell-mafia / projector

A typed, total templating language
BSD 3-Clause "New" or "Revised" License
7 stars 7 forks source link

Fix concat rewrite rule #217

Closed thumphries closed 7 years ago

thumphries commented 7 years ago

This rule wasn't firing because I'm rewriting bottom-up instead of top-down, so the name "concat" was being qualified before the app was inspected. Here's the qualified version of the rule instead.

This rule is important for simplifying constant strings before they hit GHC. It removes a bunch of redundant concat ["foo"].

! @charleso /jury approved @charleso

thumphries commented 7 years ago

Reinstating this rule shrinks the output a bit, which helps us dodge the random GHC panics for a little longer. Seems to be a GHC bug in 7.10.2 rather than something we're doing wrong.

charleso commented 7 years ago

💯