packages feed

happy-meta 0.2 → 0.2.0.1

raw patch · 2 files changed

+6/−5 lines, 2 filesdep ~template-haskell

Dependency ranges changed: template-haskell

Files

happy-meta.cabal view
@@ -1,5 +1,5 @@ Name:                happy-meta
-Version:             0.2
+Version:             0.2.0.1
 Synopsis:            Quasi-quoter for Happy parsers
 -- Description:         
 License:             BSD3
@@ -20,7 +20,7 @@     Text.Happy.Quote
 
   Build-depends:
-      template-haskell >=2.4&&<2.5
+      template-haskell >=2.4&&<2.6
     , haskell-src-meta >=0.3&&<1.0
     , base >= 4.2 && < 5
     , array, containers
src/Text/Happy/Quote.hs view
@@ -1,3 +1,4 @@+{-#OPTIONS_GHC -fno-warn-missing-fields#-}
 module Text.Happy.Quote (
     parseHappy
   , parseHappyInfo
@@ -30,7 +31,7 @@ compileHappy = return . either error id . parseDecs
 
 happy :: QuasiQuoter
-happy = QuasiQuoter (happyToExp . parseHappyInfo) (error "happy: pattern quoting is not supported") 
+happy = QuasiQuoter {quoteExp = happyToExp . parseHappyInfo} -- (error "happy: pattern quoting is not supported") 
 
 
 parseHappy :: String -> Happy
@@ -51,8 +52,8 @@           (file)       = loc_filename loc
       runIO $ hPutStrLn stderr $ file ++ ":"++show row++":"++show col++":"
       runIO $ hPutStrLn stderr $ "    " ++ msg
-  when (sr i > 0) $ warnMsg $ show (sr i) ++ "Warning: shift/reduce conflicts"
-  when (rr i > 0) $ warnMsg $ show (rr i) ++ "Warning: reduce/reduce conflicts"
+  when (sr i > 0) $ warnMsg $ "Warning: "++show (sr i)++"shift/reduce conflicts"
+  when (rr i > 0) $ warnMsg $ "Warning: "++show (rr i)++ "reduce/reduce conflicts"
 
 
 happyToExp (code,info) = happyWarn info >> litE (StringL code)