packages feed

ghc-lib-parser-ex 8.10.0.23 → 8.10.0.24

raw patch · 11 files changed

+165/−63 lines, 11 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Language.Haskell.GhclibParserEx.GHC.Hs.Types: fromTyParen :: LHsType GhcPs -> LHsType GhcPs
- Language.Haskell.GhclibParserEx.GHC.Hs.Types: isTyQuasiQuote :: LHsType GhcPs -> Bool
- Language.Haskell.GhclibParserEx.GHC.Hs.Types: isUnboxedTuple :: HsTupleSort -> Bool
+ Language.Haskell.GhclibParserEx.GHC.Hs.Expr: isOverLabel :: LHsExpr GhcPs -> Bool
+ Language.Haskell.GhclibParserEx.GHC.Hs.Expr: isQuasiQuoteExpr :: LHsExpr GhcPs -> Bool
+ Language.Haskell.GhclibParserEx.GHC.Hs.Expr: isQuasiQuoteSplice :: HsSplice GhcPs -> Bool
+ Language.Haskell.GhclibParserEx.GHC.Hs.Pat: isSplicePat :: LPat GhcPs -> Bool
+ Language.Haskell.GhclibParserEx.GHC.Hs.Type: fromTyParen :: LHsType GhcPs -> LHsType GhcPs
+ Language.Haskell.GhclibParserEx.GHC.Hs.Type: isKindTyApp :: LHsType GhcPs -> Bool
+ Language.Haskell.GhclibParserEx.GHC.Hs.Type: isTyQuasiQuote :: LHsType GhcPs -> Bool
+ Language.Haskell.GhclibParserEx.GHC.Hs.Type: isUnboxedTuple :: HsTupleSort -> Bool

Files

ChangeLog.md view
@@ -1,5 +1,46 @@ # Changelog for ghc-lib-parser-ex +## 8.10.0.24 released+- Update to `ghc-lib-parser-8.10.7.20220219`++## 0.20220201 released+- Update to `ghc-lib-parser-0.20220201`++## 0.20220103 released+- New function `isOverLabel`+- Update to `ghc-lib-parser-0.20220103`++## 9.0.0.6 released 2021-12-26+- Add back `isQuasiQuote` for backwards compatibility++## 9.0.0.5 released 2021-12-25+- Bugfix to `isFieldPunUpdate`+- New module `Language.Haskell.GHC.Hs.Type.hs` to replace `Language.Haskell.GHC.Hs.Types.hs` (which remains for now but deprecated and will be removed in a future release)+  - New function `isKindTyApp`+- Rename `isQuasiQuote` to `isQuasiQuoteExpr`+- Add new function `isQuasiQuoteSplice`+- Update to `ghc-lib-parser-9.0.2.20211226`++## 9.2.0.1 released 2021-11-01+- Update to `ghc-lib-parser-9.2.1.20211101`++## 0.20211101 released 2021-11-01+- Update to `ghc-lib-parser-0.20211101`++## 9.2.0.0 released 2021-10-30+- Update to `ghc-lib-parser-9.2.1.20211030`++## 0.20211001 released 2021-10-01+- Add `isSplicePat` to `Language.Haskell.GhclibParserEx.GHC.Hs.Pat`+- Use `genericPlatform` on `GHCLIB_API_HEAD` in `GhclibParserEx.GHC.Settings.Config.hs`+- Update to `ghc-lib-parser-0.20211001`++## 0.20210901 released 2021-09-01+- Update to `ghc-lib-parser-0.20210901`++## 8.10.0.23 released 2021-08-28+- Update to `ghc-lib-parser-8.10.7.20210828`+ ## 8.10.0.22 released 2021-08-14 - Update to `ghc-lib-parser-0.20210814` - Added to `GhclibParserEx.GHC.Hs.Expr`:
README.md view
@@ -27,7 +27,7 @@ ``` Run `stack runhaskell --package extra --package optparse-applicative CI.hs -- --help` for more options. -To run [`hlint`](https://github.com/ndmitchell/hlint) on this repository, `hlint --cpp-include cbits --cpp-define GHCLIB_API_XXX .` (where `XXX` at this time is one of `808`, `810` or `900`).+To run [`hlint`](https://github.com/ndmitchell/hlint) on this repository, `hlint --cpp-include cbits --cpp-define GHCLIB_API_XXX .` (where `XXX` at this time is one of `808`, `810`, `900`, `902` or `HEAD`).  ## Releasing `ghc-lib-parser-ex` (notes for maintainers) 
ghc-lib-parser-ex.cabal view
@@ -1,12 +1,12 @@ cabal-version:  1.18 name:           ghc-lib-parser-ex-version:        8.10.0.23+version:        8.10.0.24 description:    Please see the README on GitHub at <https://github.com/shayne-fletcher/ghc-lib-parser-ex#readme> homepage:       https://github.com/shayne-fletcher/ghc-lib-parser-ex#readme bug-reports:    https://github.com/shayne-fletcher/ghc-lib-parser-ex/issues author:         Shayne Fletcher maintainer:     shayne@shaynefletcher.org-copyright:      Copyright © 2020-2021 Shayne Fletcher. All rights reserved.+copyright:      Copyright © 2020-2022 Shayne Fletcher. All rights reserved. license:        BSD3 license-file:   LICENSE category:       Development@@ -41,6 +41,7 @@       Language.Haskell.GhclibParserEx.GHC.Hs       Language.Haskell.GhclibParserEx.GHC.Hs.Expr       Language.Haskell.GhclibParserEx.GHC.Hs.Pat+      Language.Haskell.GhclibParserEx.GHC.Hs.Type       Language.Haskell.GhclibParserEx.GHC.Hs.Types       Language.Haskell.GhclibParserEx.GHC.Hs.Decls       Language.Haskell.GhclibParserEx.GHC.Hs.Binds
src/Language/Haskell/GhclibParserEx/GHC/Hs/Expr.hs view
@@ -7,7 +7,7 @@ #include "ghclib_api.h" module Language.Haskell.GhclibParserEx.GHC.Hs.Expr(   isTag, isDol, isDot, isReturn, isSection, isRecConstr, isRecUpdate,-  isVar, isPar, isApp, isOpApp, isAnyApp, isLexeme, isLambda, isQuasiQuote,+  isVar, isPar, isApp, isOpApp, isAnyApp, isLexeme, isLambda, isQuasiQuote, isQuasiQuoteExpr, isQuasiQuoteSplice,  isOverLabel,   isDotApp, isTypeApp, isWHNF, isLCase,   isFieldPun, isFieldPunUpdate, isRecStmt, isParComp, isMDo, isListComp, isMonadComp, isTupleSection, isString, isPrimLiteral,   isSpliceDecl, isFieldWildcard, isUnboxed, isWholeFrac, isStrictMatch, isMultiIf, isProc, isTransStmt,@@ -45,8 +45,8 @@ isTag tag = \case (L _ (HsVar _ (L _ s))) -> occNameString (rdrNameOcc s) == tag; _ -> False  isDot, isDol, isReturn, isSection, isRecConstr, isRecUpdate,-  isVar, isPar, isApp, isOpApp, isAnyApp, isLexeme, isQuasiQuote,-  isLambda, isDotApp, isTypeApp, isWHNF, isLCase :: LHsExpr GhcPs -> Bool+  isVar, isPar, isApp, isOpApp, isAnyApp, isLexeme, isQuasiQuote, isQuasiQuoteExpr,+  isLambda, isDotApp, isTypeApp, isWHNF, isLCase, isOverLabel :: LHsExpr GhcPs -> Bool isDol = isTag "$" isDot = isTag "." isReturn x = isTag "return" x || isTag "pure" x -- Allow both 'pure' and 'return' as they have the same semantics.@@ -60,7 +60,8 @@ isAnyApp x = isApp x || isOpApp x isLexeme = \case (L _ HsVar{}) -> True; (L _ HsOverLit{}) -> True; (L _ HsLit{}) -> True; _ -> False isLambda = \case (L _ HsLam{}) -> True; _ -> False-isQuasiQuote = \case (L _ (HsSpliceE _ HsQuasiQuote{})) -> True; _ -> False+isQuasiQuoteExpr = \case (L _ (HsSpliceE _ HsQuasiQuote{})) -> True; _ -> False+isQuasiQuote = isQuasiQuoteExpr -- Backwards compat. isDotApp = \case (L _ (OpApp _ _ op _)) -> isDot op; _ -> False isTypeApp = \case (L _ HsAppType{}) -> True; _ -> False isWHNF = \case@@ -81,7 +82,11 @@     | occNameString (rdrNameOcc x) `elem` ["Just", "Left", "Right"] -> True   _ -> False isLCase = \case (L _ HsLamCase{}) -> True; _ -> False+isOverLabel = \case (L _ HsOverLabel{}) -> True; _ -> False +isQuasiQuoteSplice :: HsSplice GhcPs -> Bool+isQuasiQuoteSplice = \case HsQuasiQuote{} -> True; _ -> False+ #if defined (GHCLIB_API_HEAD) || defined(GHCLIB_API_902) || defined (GHCLIB_API_901) isStrictMatch :: HsMatchContext GhcPs -> Bool #else@@ -100,7 +105,7 @@ -- Field puns in updates have a different type to field puns in -- constructions. #if defined (GHCLIB_API_HEAD)-isFieldPunUpdate :: HsFieldBind (FieldOcc GhcPs) (LHsExpr GhcPs) -> Bool+isFieldPunUpdate :: HsFieldBind (LAmbiguousFieldOcc GhcPs) (LHsExpr GhcPs) -> Bool isFieldPunUpdate = \case HsFieldBind {hfbPun=True} -> True; _ -> False #else isFieldPunUpdate :: HsRecField' (AmbiguousFieldOcc GhcPs) (LHsExpr GhcPs) -> Bool@@ -118,7 +123,14 @@ isParComp = \case ParStmt{} -> True; _ -> False  -- TODO: Seems `HsStmtContext (HsDoRn p)` on master right now.-#if defined (GHCLIB_API_HEAD) || defined(GHCLIB_API_902) || defined (GHCLIB_API_900)+#if defined (GHCLIB_API_HEAD)+isMDo :: HsDoFlavour -> Bool+isMDo = \case MDoExpr _ -> True; _ -> False+isMonadComp :: HsDoFlavour -> Bool+isMonadComp = \case MonadComp -> True; _ -> False+isListComp :: HsDoFlavour -> Bool+isListComp = \case ListComp -> True; _ -> False+#elif defined(GHCLIB_API_902) || defined (GHCLIB_API_900) isMDo :: HsStmtContext GhcRn -> Bool isMDo = \case MDoExpr _ -> True; _ -> False isMonadComp :: HsStmtContext GhcRn -> Bool@@ -192,7 +204,11 @@ isUnboxed = \case Unboxed -> True; _ -> False  isWholeFrac :: HsExpr GhcPs -> Bool-#if defined (GHCLIB_API_HEAD) || defined(GHCLIB_API_902)++#if defined (GHCLIB_API_HEAD)+isWholeFrac (HsLit _ (HsRat _ fl@FL{} _)) = denominator (rationalFromFractionalLit fl) == 1+isWholeFrac (HsOverLit _ (OverLit _ (HsFractional fl@FL {}) )) = denominator (rationalFromFractionalLit fl) == 1+#elif defined(GHCLIB_API_902) isWholeFrac (HsLit _ (HsRat _ fl@FL{} _)) = denominator (rationalFromFractionalLit fl) == 1 isWholeFrac (HsOverLit _ (OverLit _ (HsFractional fl@FL {}) _)) = denominator (rationalFromFractionalLit fl) == 1 #else
src/Language/Haskell/GhclibParserEx/GHC/Hs/ExtendInstances.hs view
@@ -20,9 +20,6 @@  #if defined (GHCLIB_API_HEAD) || defined(GHCLIB_API_902) || defined (GHCLIB_API_900) import GHC.Utils.Outputable-#  if !defined(GHCLIB_API_HEAD) && !defined(GHCLIB_API_900)-import GHC.Driver.Ppr-#  endif #else import Outputable #endif
src/Language/Haskell/GhclibParserEx/GHC/Hs/Pat.hs view
@@ -9,6 +9,7 @@   , fromPChar   , hasPFieldsDotDot   , isPFieldWildcard, isPWildcard, isPFieldPun, isPatTypeSig, isPBangPat, isPViewPat+  , isSplicePat  ) where  #if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902) || defined (GHCLIB_API_900) || defined (GHCLIB_API_810)@@ -167,4 +168,11 @@ isPatTypeSig (dL -> L _ SigPat{}) = True; isPatTypeSig _ = False isPBangPat (dL -> L _ BangPat{}) = True; isPBangPat _ = False isPViewPat (dL -> L _ ViewPat{}) = True; isPViewPat _ = False+#endif++isSplicePat :: LPat GhcPs -> Bool+#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902) || defined (GHCLIB_API_900) || defined (GHCLIB_API_810)+isSplicePat (L _ SplicePat{}) = True; isSplicePat _ = False+#else+isSplicePat (dL -> L _ SplicePat{}) = True; isSplicePat _ = False #endif
+ src/Language/Haskell/GhclibParserEx/GHC/Hs/Type.hs view
@@ -0,0 +1,36 @@+-- Copyright (c) 2021, Shayne Fletcher. All rights reserved.+-- SPDX-License-Identifier: BSD-3-Clause.++{-# LANGUAGE CPP #-}+{-# LANGUAGE LambdaCase #-}+#include "ghclib_api.h"+module Language.Haskell.GhclibParserEx.GHC.Hs.Type (+    fromTyParen+  , isTyQuasiQuote, isUnboxedTuple, isKindTyApp+) where++#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902) || defined (GHCLIB_API_900) || defined (GHCLIB_API_810)+import GHC.Hs+#else+import HsSyn+#endif+#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902) || defined (GHCLIB_API_900)+import GHC.Types.SrcLoc+#else+import SrcLoc+#endif++isKindTyApp :: LHsType GhcPs -> Bool+isKindTyApp = \case (L _ HsAppKindTy{}) -> True; _ -> False++fromTyParen :: LHsType GhcPs -> LHsType GhcPs+fromTyParen (L _ (HsParTy _ x)) = x+fromTyParen x = x++isTyQuasiQuote :: LHsType GhcPs -> Bool+isTyQuasiQuote (L _ (HsSpliceTy _ HsQuasiQuote{})) = True+isTyQuasiQuote _ = False++isUnboxedTuple :: HsTupleSort -> Bool+isUnboxedTuple HsUnboxedTuple = True+isUnboxedTuple _ = False
src/Language/Haskell/GhclibParserEx/GHC/Hs/Types.hs view
@@ -1,32 +1,9 @@ -- Copyright (c) 2020, Shayne Fletcher. All rights reserved. -- SPDX-License-Identifier: BSD-3-Clause. -{-# LANGUAGE CPP #-}-#include "ghclib_api.h"-module Language.Haskell.GhclibParserEx.GHC.Hs.Types(-    fromTyParen-  , isTyQuasiQuote, isUnboxedTuple+module Language.Haskell.GhclibParserEx.GHC.Hs.Types+  {-# DEPRECATED "Use Language.Haskell.GhclibParserEx.GHC.Hs.Type instead" #-} (+  module Language.Haskell.GhclibParserEx.GHC.Hs.Type   ) where -#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902) || defined (GHCLIB_API_900) || defined (GHCLIB_API_810)-import GHC.Hs-#else-import HsSyn-#endif-#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902) || defined (GHCLIB_API_900)-import GHC.Types.SrcLoc-#else-import SrcLoc-#endif--fromTyParen :: LHsType GhcPs -> LHsType GhcPs-fromTyParen (L _ (HsParTy _ x)) = x-fromTyParen x = x--isTyQuasiQuote :: LHsType GhcPs -> Bool-isTyQuasiQuote (L _ (HsSpliceTy _ HsQuasiQuote{})) = True-isTyQuasiQuote _ = False--isUnboxedTuple :: HsTupleSort -> Bool-isUnboxedTuple HsUnboxedTuple = True-isUnboxedTuple _ = False+import Language.Haskell.GhclibParserEx.GHC.Hs.Type
src/Language/Haskell/GhclibParserEx/GHC/Settings/Config.hs view
@@ -37,7 +37,7 @@   , sFileSettings=fileSettings   , sTargetPlatform=platform   , sPlatformMisc=platformMisc-#  if !defined(GHCLIB_API_HEAD)+#  if !defined(GHCLIB_API_HEAD) && !defined(GHCLIB_API_902)   , sPlatformConstants=platformConstants #  endif   , sToolSettings=toolSettings@@ -63,8 +63,11 @@                     } #endif     platform =+#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902)+      genericPlatform+#else       Platform{-#if defined (GHCLIB_API_HEAD) || defined(GHCLIB_API_902) || defined (GHCLIB_API_900)+#if defined (GHCLIB_API_900)     -- It doesn't matter what values we write here as these fields are     -- not referenced for our purposes. However the fields are strict     -- so we must say something.@@ -75,15 +78,12 @@       , platformIsCrossCompiling=False       , platformLeadingUnderscore=False       , platformTablesNextToCode=False-#if defined (GHCLIB_API_HEAD)-      , platform_constants = Nothing-#endif-#if !defined(GHCLIB_API_HEAD) && !defined (GHCLIB_API_900)+#if !defined (GHCLIB_API_900)       , platformConstants=platformConstants #endif       , #endif-#if defined (GHCLIB_API_HEAD) || defined(GHCLIB_API_902)+#if defined(GHCLIB_API_902)         platformWordSize=PW8       , platformArchOS=ArchOS {archOS_arch=ArchUnknown, archOS_OS=OSUnknown} #elif defined (GHCLIB_API_810) || defined (GHCLIB_API_900)@@ -95,7 +95,8 @@ #endif       , platformUnregisterised=True       }-#if !defined(GHCLIB_API_HEAD)+#endif+#if !defined(GHCLIB_API_HEAD) && !defined(GHCLIB_API_902)     platformConstants =       PlatformConstants{pc_DYNAMIC_BY_DEFAULT=False,pc_WORD_SIZE=8} #endif
src/Language/Haskell/GhclibParserEx/GHC/Utils/Outputable.hs view
@@ -10,9 +10,6 @@  #if defined (GHCLIB_API_HEAD) || defined(GHCLIB_API_902) || defined (GHCLIB_API_900) import GHC.Utils.Outputable-#if !defined(GHCLIB_API_HEAD) && !defined (GHCLIB_API_900)-import GHC.Driver.Ppr-#endif #else import Outputable #endif
test/Test.hs view
@@ -20,8 +20,7 @@ #if defined (GHCLIB_API_HEAD) import GHC.Data.Bag import GHC.Driver.Errors.Types-import GHC.Types.Error hiding (getMessages)-import qualified GHC.Types.Error (getMessages)+import GHC.Types.Error #endif  import Language.Haskell.GhclibParserEx.Dump@@ -32,6 +31,7 @@ import Language.Haskell.GhclibParserEx.GHC.Hs.ExtendInstances import Language.Haskell.GhclibParserEx.GHC.Hs.Expr import Language.Haskell.GhclibParserEx.GHC.Hs.Pat+import Language.Haskell.GhclibParserEx.GHC.Hs.Type -- We only test 'isImportQualifiedPost' at this time which requires >= -- 8.10; avoid unused import warning. #if defined (MIN_VERSION_ghc_lib_parser)@@ -54,7 +54,7 @@ import GHC.Types.SrcLoc import GHC.Driver.Session import GHC.Parser.Lexer-# if !(defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902))+# if !defined (GHCLIB_API_HEAD) import GHC.Utils.Outputable #endif #  if !defined (GHCLIB_API_900)@@ -92,6 +92,7 @@   , fixityTests   , extendInstancesTests   , expressionPredicateTests+  , typePredicateTests   , patternPredicateTests   , dynFlagsTests   , nameTests@@ -110,7 +111,9 @@ #endif chkParseResult report flags = \case     POk s _ -> do-#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_902)+#if defined (GHCLIB_API_HEAD)+      let (wrns, errs) = getPsMessages s+#elif defined (GHCLIB_API_902)       let (wrns, errs) = getMessages s #else       let (wrns, errs) = getMessages s flags@@ -118,8 +121,8 @@       when (not (null errs) || not (null wrns)) $ #if defined (GHCLIB_API_HEAD)         assertFailure (-          report flags (GHC.Types.Error.getMessages (GhcPsMessage <$> wrns)) ++-          report flags (GHC.Types.Error.getMessages (GhcPsMessage <$> errs))+          report flags (getMessages (GhcPsMessage <$> wrns)) +++          report flags (getMessages (GhcPsMessage <$> errs))         )  #elif defined (GHCLIB_API_902)@@ -128,7 +131,7 @@         assertFailure (report flags wrns ++ report flags errs) #endif #if defined (GHCLIB_API_HEAD)-    PFailed s -> assertFailure (report flags $ GHC.Types.Error.getMessages (GhcPsMessage <$> snd (getMessages s)))+    PFailed s -> assertFailure (report flags $ getMessages (GhcPsMessage <$> snd (getPsMessages s))) #elif defined (GHCLIB_API_902)     PFailed s -> assertFailure (report flags $ fmap pprError (snd (getMessages s))) #elif defined (GHCLIB_API_900) || defined (GHCLIB_API_810)@@ -223,6 +226,12 @@         POk _ e -> test e         _ -> assertFailure "parse error" +typeTest :: String -> DynFlags -> (LHsType GhcPs -> IO ()) -> IO ()+typeTest s flags test =+      case parseType s flags of+        POk _ e -> test e+        _ -> assertFailure "parse error"+ patTest :: String -> DynFlags -> (LPat GhcPs -> IO ()) -> IO () patTest s flags test =       case parsePattern s flags of@@ -283,6 +292,16 @@   where     flags = defaultDynFlags fakeSettings fakeLlvmConfig +typePredicateTests :: TestTree+typePredicateTests = testGroup "Type predicate tests"+  [ testCase "isKindTyApp" $ test_with_exts [TypeApplications] "K @T" $ assert' . isKindTyApp+  , testCase "isKindTyApp" $ test_with_exts [TypeApplications] "K T" $ assert' . not . isKindTyApp+  ]+  where+    assert' = assertBool ""+    test_with_exts exts s = typeTest s (flags exts)+    flags = foldl' xopt_set (defaultDynFlags fakeSettings fakeLlvmConfig)+ expressionPredicateTests :: TestTree expressionPredicateTests = testGroup "Expression predicate tests"   [ testCase "isTag" $ test "foo" $ assert' . isTag "foo"@@ -349,8 +368,8 @@   , testCase "isSpliceDecl" $ test "$x" $ assert' . isSpliceDecl . unLoc   , testCase "isSpliceDecl" $ test "f$x" $ assert' . not . isSpliceDecl . unLoc   , testCase "isSpliceDecl" $ test "$(a + b)" $ assert' . isSpliceDecl . unLoc-  , testCase "isQuasiQuote" $ test "[expr|1 + 2|]" $ assert' . isQuasiQuote-  , testCase "isQuasiQuote" $ test "[expr(1 + 2)]" $ assert' . not . isQuasiQuote+  , testCase "isQuasiQuoteExpr" $ test "[expr|1 + 2|]" $ assert' . isQuasiQuoteExpr+  , testCase "isQuasiQuoteExpr" $ test "[expr(1 + 2)]" $ assert' . not . isQuasiQuoteExpr   , testCase "isWholeFrac" $ test "3.2e1" $ assert' . isWholeFrac . unLoc   , testCase "isWholeFrac" $ test "3.22e1" $ assert' . not . isWholeFrac . unLoc   , testCase "isMDo" $ test_with_exts [ RecursiveDo ] "mdo { pure () }" $ assert' . any isMDo . universeBi@@ -389,12 +408,21 @@   , testCase "strToPat" $ assert' . (== "[]") . patToStr . strToPat $ "[]"   , testCase "fromPChar" $ test "'a'" $ assert' . (== Just 'a') . fromPChar   , testCase "fromPChar" $ test "\"a\"" $ assert' . isNothing . fromPChar+  , testCase "isSplicePat" $ test "$(varP pylonExPtrVarName)" $ assert' . isSplicePat   ]   where     assert' = assertBool ""-    test s = patTest s flags-    flags = foldl' xopt_set (defaultDynFlags fakeSettings fakeLlvmConfig)-              [ TemplateHaskell, QuasiQuotes, TypeApplications, LambdaCase ]+    test = test_with_exts []+    test_with_exts exts s = patTest s (flags exts)+    flags exts = foldl' xopt_set (defaultDynFlags fakeSettings fakeLlvmConfig)+              (exts +++                 [ TemplateHaskell+                 , TemplateHaskellQuotes+                 , QuasiQuotes+                 , TypeApplications+                 , LambdaCase+                 ]+              )  dynFlagsTests :: TestTree dynFlagsTests = testGroup "DynFlags tests"