Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix a GHC panic with GHC 7.6.1 (close #41)

  • Loading branch information...
commit 7b0136a2269104c4d89c4b70ff67ec6c1214718a 1 parent 04dca43
@sol authored
View
3  CHANGES
@@ -1,3 +1,6 @@
+next
+ - Fix a GHC panic with GHC 7.6.1 (#41)
+
Changes in 0.9.4
- Respect HASKELL_PACKAGE_SANDBOX (#39)
- Print path to ghc on --version
View
3  src/Extract.hs
@@ -191,6 +191,9 @@ extractDocStrings = everythingBut (++) (([], False) `mkQ` fromLHsDecl
#if __GLASGOW_HASKELL__ >= 706
-- hswb_kvs and hswb_tvs may be error thunks
`extQ` (ignore :: Selector (HsWithBndrs [LHsType RdrName]))
+ `extQ` (ignore :: Selector (HsWithBndrs [LHsType Name]))
+ `extQ` (ignore :: Selector (HsWithBndrs (LHsType RdrName)))
+ `extQ` (ignore :: Selector (HsWithBndrs (LHsType Name)))
#endif
)
where
View
5 test/ExtractSpec.hs
@@ -70,9 +70,12 @@ spec = do
it "works with foreign imports" $ do
("regression", "ForeignImport.hs") `shouldGive` [Module "ForeignImport" Nothing []]
- it "works with rewrite rules" $ do
+ it "works for rewrite rules" $ do
("regression", "RewriteRules.hs") `shouldGive` [Module "RewriteRules" Nothing [" doc for foo"]]
+ it "works for rewrite rules with type signatures" $ do
+ ("regression", "RewriteRulesWithSigs.hs") `shouldGive` [Module "RewriteRulesWithSigs" Nothing [" doc for foo"]]
+
it "strips CR from dos line endings" $ do
("dos-line-endings", "Foo.hs") `shouldGive` [Module "Foo" Nothing ["\n foo\n bar\n baz"]]
View
7 test/extract/regression/RewriteRulesWithSigs.hs
@@ -0,0 +1,7 @@
+module RewriteRulesWithSigs (foo) where
+
+{-# RULES "map/append" forall f (xs :: [Int]) ys. map f (xs ++ ys) = map f xs ++ map f ys #-}
+
+-- | doc for foo
+foo :: Int
+foo = 23
Please sign in to comment.
Something went wrong with that request. Please try again.