ghc-exactprint 0.5.0.0 → 0.5.0.1
raw patch · 7 files changed
+31/−10 lines, 7 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog +3/−0
- ghc-exactprint.cabal +1/−1
- src/Language/Haskell/GHC/ExactPrint/Utils.hs +2/−1
- tests/Test.hs +5/−3
- tests/Test/Common.hs +0/−4
- tests/examples/ghc710/NegLit.hs +0/−1
- tests/examples/ghc710/QuasiQuote2.hs +20/−0
ChangeLog view
@@ -1,3 +1,6 @@+2015-12-13 v0.5.0.1+ * Fix a bug (#34) where quasiquote values would not roundtrip.+ 2015-11-21 v0.5 * Add new options to enable "rigid" layout rules. This makes the annotations more rigid in the sense that if you move AST fragments around
ghc-exactprint.cabal view
@@ -1,5 +1,5 @@ name: ghc-exactprint-version: 0.5.0.0+version: 0.5.0.1 synopsis: ExactPrint for GHC description: Using the API Annotations available from GHC 7.10.2, this library provides a means to round trip any code that can
src/Language/Haskell/GHC/ExactPrint/Utils.hs view
@@ -206,7 +206,8 @@ -- --------------------------------------------------------------------- -- | Checks whether a SrcSpan has zero length. isPointSrcSpan :: GHC.SrcSpan -> Bool-isPointSrcSpan = (== 0 ) . spanLength+isPointSrcSpan ss = spanLength ss == 0+ && srcSpanStartLine ss == srcSpanEndLine ss -- ---------------------------------------------------------------------
tests/Test.hs view
@@ -96,6 +96,7 @@ -- Tests requiring future GHC modifications , mkTestModBad "UnicodeSyntax.hs" , mkTestModBad "InfixOperator.hs"+ ] @@ -142,11 +143,12 @@ -- , mkTestModChange changeLetIn1 "LetIn1.hs" -- , mkTestModChange changeWhereIn4 "WhereIn4.hs" -- , mkTestModChange changeAddDecl "AddDecl.hs"- mkTestModChange changeLocalDecls "LocalDecls.hs"+ -- mkTestModChange changeLocalDecls "LocalDecls.hs" -- , mkTestModChange changeLocalDecls2 "LocalDecls2.hs" -- , mkTestModChange changeWhereIn3a "WhereIn3a.hs"- , mkTestModChange changeRenameCase1 "RenameCase1.hs"- , mkTestModChange changeRenameCase2 "RenameCase2.hs"+ -- , mkTestModChange changeRenameCase1 "RenameCase1.hs"+ -- , mkTestModChange changeRenameCase2 "RenameCase2.hs"+ mkTestModBad "QuasiQuote2.hs" ] testsTT :: Test
tests/Test/Common.hs view
@@ -27,16 +27,13 @@ import Language.Haskell.GHC.ExactPrint.Parsers (parseModuleApiAnnsWithCpp) import Language.Haskell.GHC.ExactPrint.Preprocess -import GHC.Paths (libdir) import qualified ApiAnnotation as GHC import qualified DynFlags as GHC import qualified FastString as GHC import qualified GHC as GHC hiding (parseModule)-import qualified HeaderInfo as GHC import qualified Lexer as GHC import qualified MonadUtils as GHC-import qualified Outputable as GHC import qualified Parser as GHC import qualified SrcLoc as GHC import qualified StringBuffer as GHC@@ -45,7 +42,6 @@ import Data.List hiding (find) -import Control.Monad import System.Directory import Test.Consistency
− tests/examples/ghc710/NegLit.hs
@@ -1,1 +0,0 @@-a = -b/c
+ tests/examples/ghc710/QuasiQuote2.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE QuasiQuotes #-}+module Test where++a = bar+ where+ bar = [q|+ |]++b = bar+ where+ bar = [q|+ |]++c = bar+ where+ bar = [q|+ |]++d = [q|+ |]