Skip to content

Commit

Permalink
Don't inline pack
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Mar 22, 2012
1 parent b1126f9 commit 704532b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shakespeare/Text/Shakespeare.hs
Expand Up @@ -208,6 +208,9 @@ preFilter ShakespeareSettings {..} s =
parseChar' comments ignores =
many1 (noneOf ([varChar, urlChar, intChar] ++ comments ++ ignores))

pack' :: String -> TS.Text
pack' = TS.pack
{-# NOINLINE pack' #-}

contentsToShakespeare :: ShakespeareSettings -> [Content] -> Q Exp
contentsToShakespeare rs a = do
Expand All @@ -225,7 +228,7 @@ contentsToShakespeare rs a = do
where
contentToBuilder :: Name -> Content -> Q Exp
contentToBuilder _ (ContentRaw s') = do
ts <- [|fromText . TS.pack|]
ts <- [|fromText . pack'|]
return $ wrap rs `AppE` (ts `AppE` LitE (StringL s'))
contentToBuilder _ (ContentVar d) =
return $ wrap rs `AppE` (toBuilder rs `AppE` derefToExp [] d)
Expand Down

0 comments on commit 704532b

Please sign in to comment.