web-routes-th 0.22.4 → 0.22.5
raw patch · 2 files changed
+12/−3 lines, 2 filesdep ~template-haskell
Dependency ranges changed: template-haskell
Files
- Web/Routes/TH.hs +9/−0
- web-routes-th.cabal +3/−3
Web/Routes/TH.hs view
@@ -92,8 +92,13 @@ parseInfo name = do info <- reify name case info of+#if MIN_VERSION_template_haskell(2,11,0)+ TyConI (DataD cx _ keys _ cs _) -> return $ Tagged (map conInfo cs) cx $ map conv keys+ TyConI (NewtypeD cx _ keys _ con _)-> return $ Tagged [conInfo con] cx $ map conv keys+#else TyConI (DataD cx _ keys cs _) -> return $ Tagged (map conInfo cs) cx $ map conv keys TyConI (NewtypeD cx _ keys con _)-> return $ Tagged [conInfo con] cx $ map conv keys+#endif _ -> error $ "derivePathInfo - invalid input: " ++ pprint info where conInfo (NormalC n args) = (n, length args) conInfo (RecC n args) = (n, length args)@@ -138,7 +143,11 @@ parseMethods con = do info <- reify con case info of+#if MIN_VERSION_template_haskell(2,11,0)+ (DataConI _ ty _) ->+#else (DataConI _ ty _ _) ->+#endif do runIO $ print ty runIO $ print $ lastTerm ty return $ extractMethods (lastTerm ty)
web-routes-th.cabal view
@@ -1,5 +1,5 @@ Name: web-routes-th-Version: 0.22.4+Version: 0.22.5 License: BSD3 License-File: LICENSE Author: jeremy@seereason.com@@ -12,7 +12,7 @@ Template Haskell. Cabal-Version: >= 1.8 Build-type: Simple-tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3+tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1 test-suite Test type : exitcode-stdio-1.0@@ -28,7 +28,7 @@ Library Build-Depends: base >= 4 && < 5, parsec >= 2 && < 4,- template-haskell,+ template-haskell < 2.12, text, split, web-routes >= 0.26