From 461667b4686352305cb7ca317eb8ec0318a6427a Mon Sep 17 00:00:00 2001 From: Ivan Lazar Miljenovic Date: Mon, 9 Nov 2015 13:09:45 +1100 Subject: [PATCH] Accept non-Haskell QuasiQuotes Rather than throwing an error (thus making it impossible to use shm in a function that has a QQ somewhere in it), instead just gracefully fail. Ideally, the contents of the QuasiQuote would be one context contained within the overall QQ, but I couldn't figure out how to do that. Closes #116. --- src/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main.hs b/src/Main.hs index e73c687..6ce0745 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -184,7 +184,7 @@ post mode x = Just (QuasiQuote (base :: SrcSpanInfo) qname content) -> case parseExpWithMode mode content of ParseOk ex -> genHSE mode (fmap (redelta qname base) ex) - ParseFailed _ e -> error e + ParseFailed _ _ -> [] _ -> [] -- | Apply a delta to the positions in the given span from the base.