packages feed

haskell-tools-debug 1.0.1.1 → 1.1.0.0

raw patch · 6 files changed

+262/−241 lines, 6 filesdep ~basedep ~ghcdep ~haskell-tools-ast

Dependency ranges changed: base, ghc, haskell-tools-ast, haskell-tools-backend-ghc, haskell-tools-builtin-refactorings, haskell-tools-prettyprint, haskell-tools-refactor, template-haskell

Files

Language/Haskell/Tools/Debug.hs view
@@ -1,4 +1,7 @@- {-# LANGUAGE DeriveGeneric, LambdaCase, ScopedTypeVariables, StandaloneDeriving #-}+ {-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving #-} 
 module Language.Haskell.Tools.Debug where
 
@@ -28,6 +31,7 @@ import Bag
 import RdrName
 import Exception
+import Avail
 
 import Language.Haskell.Tools.AST (NodeInfo(..))
 import Language.Haskell.Tools.BackendGHC
@@ -46,13 +50,13 @@     initGhcFlags
     _ <- useFlags args
     useDirs [workingDir]
-    
+
     liftIO $ putStrLn "=========== parsed source:"
     ms <- loadModule workingDir moduleName
-    
+
     dfs <- getSessionDynFlags
     -- setSessionDynFlags (dfs `dopt_set` Opt_D_dump_rn_trace `dopt_set` Opt_D_dump_tc_trace)
-    
+
     p <- parseModule ms
     let annots = pm_annotations $ p
     liftIO $ putStrLn $ show (pm_parsed_source p)
@@ -61,38 +65,38 @@     liftIO $ putStrLn "=========== comments:"
     liftIO $ putStrLn $ show (snd annots)
     liftIO $ putStrLn "=========== renamed source:"
-    
+
     (rnSrc, tcSrc) <- ((\t -> (tm_renamed_source t, typecheckedSource t)) <$> typecheckModule p)
                          `gcatch` \(e :: SomeException) -> forcedTypecheck ms p
     liftIO $ putStrLn $ show rnSrc
-    
+
     -- liftIO $ putStrLn $ show (fromJust $ tm_renamed_source t)
     liftIO $ putStrLn "=========== typechecked source:"
     liftIO $ putStrLn $ show tcSrc
-    
+
     let hasCPP = Cpp `xopt` ms_hspp_opts ms
-    
+
     liftIO $ putStrLn "=========== parsed:"
     --transformed <- runTrf (fst annots) (getPragmaComments $ snd annots) $ trfModule (pm_parsed_source p)
     parseTrf <- runTrf (fst annots) (getPragmaComments $ snd annots) $ trfModule ms (pm_parsed_source p)
     liftIO $ putStrLn $ srcInfoDebug parseTrf
-    
+
     liftIO $ putStrLn "=========== typed:"
     transformed <- addTypeInfos tcSrc =<< (runTrf (fst annots) (getPragmaComments $ snd annots) $ trfModuleRename ms parseTrf (fromJust $ rnSrc) (pm_parsed_source p))
     liftIO $ putStrLn $ srcInfoDebug transformed
-    
+
     liftIO $ putStrLn "=========== ranges fixed:"
     sourceOrigin <- if hasCPP then liftIO $ hGetStringBuffer (workingDir </> map (\case '.' -> pathSeparator; c -> c) moduleName <.> "hs")
                               else return (fromJust $ ms_hspp_buf $ pm_mod_summary p)
     let commented = fixRanges $ placeComments (fst annots) (getNormalComments $ snd annots) $ fixMainRange sourceOrigin transformed
     liftIO $ putStrLn $ srcInfoDebug commented
-    
+
     liftIO $ putStrLn "=========== cut up:"
     let cutUp = cutUpRanges commented
     liftIO $ putStrLn $ srcInfoDebug cutUp
     liftIO $ putStrLn $ show $ getLocIndices cutUp
     liftIO $ putStrLn $ show $ mapLocIndices sourceOrigin (getLocIndices cutUp)
-    
+
     liftIO $ putStrLn "=========== sourced:"
     let sourced = (if hasCPP then extractStayingElems else id) $ rangeToSource sourceOrigin cutUp
     liftIO $ putStrLn $ srcInfoDebug sourced
@@ -127,13 +131,14 @@ 
 deriving instance Generic SrcSpan
 deriving instance Generic (NodeInfo sema src)
+instance Show AvailInfo where show = showSDocUnsafe . ppr
 
 forcedTypecheck :: ModSummary -> ParsedModule -> Ghc (Maybe RenamedSource, TypecheckedSource)
 forcedTypecheck ms p = do
   env <- getSession
   store <- liftIO $ newIORef (error "not found")
   let hpm = HsParsedModule (pm_parsed_source p) (pm_extra_src_files p) (pm_annotations p)
-  (msgs, Just (gblEnv, lclEnv)) <- liftIO $ runTcInteractive env $ (,) <$> getGblEnv <*> getLclEnv 
+  (msgs, Just (gblEnv, lclEnv)) <- liftIO $ runTcInteractive env $ (,) <$> getGblEnv <*> getLclEnv
   let finalizeModule = do gbl <- getGblEnv
                           liftIO $ writeIORef store ( (,,,) <$> tcg_rn_decls gbl
                                                             <*> return (tcg_rn_imports gbl)
Language/Haskell/Tools/Debug/DebugGhcAST.hs view
@@ -1,4 +1,7 @@-{-# LANGUAGE FlexibleContexts, FlexibleInstances, StandaloneDeriving, UndecidableInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE StandaloneDeriving #-}
+{-# LANGUAGE UndecidableInstances #-}
 
 -- | A module for showing GHC's syntax tree representation.
 module Language.Haskell.Tools.Debug.DebugGhcAST where
@@ -22,245 +25,249 @@ import TcEvidence
 import UniqFM (UniqFM(..))
 import UniqSet (UniqSet(..))
+import HsExtension
 
 instance Show a => Show (Located a) where
   show (L l a) = "L(" ++ shortShowSpan l ++ ") (" ++ show a ++ ")"
 
-deriving instance Show (ABExport RdrName)
-deriving instance Show (AmbiguousFieldOcc RdrName)
-deriving instance Show (AnnDecl RdrName)
+deriving instance Show (ABExport GhcPs)
+deriving instance Show (AmbiguousFieldOcc GhcPs)
+deriving instance Show (AnnDecl GhcPs)
 deriving instance Show (AnnProvenance RdrName)
-deriving instance Show (ApplicativeArg RdrName RdrName)
-deriving instance Show (ArithSeqInfo RdrName)
+deriving instance Show (ApplicativeArg GhcPs GhcPs)
+deriving instance Show (ArithSeqInfo GhcPs)
 deriving instance Show (BooleanFormula (Located RdrName))
-deriving instance Show (ClsInstDecl RdrName)
-deriving instance Show (ConDecl RdrName)
-deriving instance Show (ConDeclField RdrName)
-deriving instance Show (DataFamInstDecl RdrName)
-deriving instance Show (DefaultDecl RdrName)
-deriving instance Show (DerivDecl RdrName)
-deriving instance Show (FamilyDecl RdrName)
-deriving instance Show (FamilyInfo RdrName)
-deriving instance Show (FamilyResultSig RdrName)
+deriving instance Show (ClsInstDecl GhcPs)
+deriving instance Show (ConDecl GhcPs)
+deriving instance Show (ConDeclField GhcPs)
+deriving instance Show (DataFamInstDecl GhcPs)
+deriving instance Show (DefaultDecl GhcPs)
+deriving instance Show (DerivDecl GhcPs)
+deriving instance Show (FamilyDecl GhcPs)
+deriving instance Show (FamilyInfo GhcPs)
+deriving instance Show (FamilyResultSig GhcPs)
 deriving instance Show (FieldLbl RdrName)
-deriving instance Show (FieldOcc RdrName)
-deriving instance Show (FixitySig RdrName)
-deriving instance Show (ForeignDecl RdrName)
-deriving instance Show a => Show (GRHS RdrName a)
-deriving instance Show a => Show (GRHSs RdrName a)
-deriving instance Show (InjectivityAnn RdrName)
-deriving instance Show (HsAppType RdrName)
-deriving instance Show (HsBindLR RdrName RdrName)
-deriving instance Show (HsBracket RdrName)
-deriving instance Show (HsCmd RdrName)
-deriving instance Show (HsCmdTop RdrName)
-deriving instance Show (HsConDeclDetails RdrName)
-deriving instance Show (HsConPatDetails RdrName)
-deriving instance Show (HsDataDefn RdrName)
-deriving instance Show (HsDerivingClause RdrName)
-deriving instance Show (HsDecl RdrName)
-deriving instance Show (HsExpr RdrName)
-deriving instance Show (HsGroup RdrName)
-deriving instance Show (HsLocalBindsLR RdrName RdrName)
-deriving instance Show (HsModule RdrName)
-deriving instance Show (HsOverLit RdrName)
+deriving instance Show (FieldOcc GhcPs)
+deriving instance Show (FixitySig GhcPs)
+deriving instance Show (ForeignDecl GhcPs)
+deriving instance Show a => Show (GRHS GhcPs a)
+deriving instance Show a => Show (GRHSs GhcPs a)
+deriving instance Show (InjectivityAnn GhcPs)
+deriving instance Show (HsAppType GhcPs)
+deriving instance Show (HsBindLR GhcPs GhcPs)
+deriving instance Show (HsBracket GhcPs)
+deriving instance Show (HsCmd GhcPs)
+deriving instance Show (HsCmdTop GhcPs)
+deriving instance Show (HsConDeclDetails GhcPs)
+deriving instance Show (HsConPatDetails GhcPs)
+deriving instance Show (HsDataDefn GhcPs)
+deriving instance Show (HsDerivingClause GhcPs)
+deriving instance Show (HsDecl GhcPs)
+deriving instance Show (HsExpr GhcPs)
+deriving instance Show (HsGroup GhcPs)
+deriving instance Show (HsLit GhcPs)
+deriving instance Show (HsLocalBindsLR GhcPs GhcPs)
+deriving instance Show (HsModule GhcPs)
+deriving instance Show (HsOverLit GhcPs)
 deriving instance Show (HsPatSynDetails (Located RdrName))
-deriving instance Show (HsPatSynDir RdrName)
-deriving instance Show (HsRecFields RdrName (LPat RdrName))
-deriving instance Show (HsRecordBinds RdrName)
-deriving instance Show (HsSplice RdrName)
-deriving instance Show (HsSplicedThing RdrName)
+deriving instance Show (HsPatSynDir GhcPs)
+deriving instance Show (HsRecFields GhcPs (LPat GhcPs))
+deriving instance Show (HsRecordBinds GhcPs)
+deriving instance Show (HsSplice GhcPs)
+deriving instance Show (HsSplicedThing GhcPs)
 deriving instance Show (HsStmtContext RdrName)
-deriving instance Show (HsTupArg RdrName)
-deriving instance Show (HsTyVarBndr RdrName)
-deriving instance Show (HsType RdrName)
-deriving instance Show (HsValBindsLR RdrName RdrName)
-deriving instance Show (HsWildCardInfo RdrName)
-deriving instance Show (IE RdrName)
+deriving instance Show (HsTupArg GhcPs)
+deriving instance Show (HsTyVarBndr GhcPs)
+deriving instance Show (HsType GhcPs)
+deriving instance Show (HsValBindsLR GhcPs GhcPs)
+deriving instance Show (HsWildCardInfo GhcPs)
+deriving instance Show (IE GhcPs)
 deriving instance Show (IEWrappedName RdrName)
-deriving instance Show (ImportDecl RdrName)
-deriving instance Show (InstDecl RdrName)
-deriving instance Show (LHsQTyVars RdrName)
-deriving instance Show a => Show (Match RdrName a)
+deriving instance Show (ImportDecl GhcPs)
+deriving instance Show (InstDecl GhcPs)
+deriving instance Show (LHsQTyVars GhcPs)
+deriving instance Show a => Show (Match GhcPs a)
 deriving instance Show (HsMatchContext RdrName)
-deriving instance Show a => Show (MatchGroup RdrName a)
-deriving instance Show (ParStmtBlock RdrName RdrName)
-deriving instance Show (Pat RdrName)
-deriving instance Show (PatSynBind RdrName RdrName)
+deriving instance Show a => Show (MatchGroup GhcPs a)
+deriving instance Show (ParStmtBlock GhcPs GhcPs)
+deriving instance Show (Pat GhcPs)
+deriving instance Show (PatSynBind GhcPs GhcPs)
 deriving instance Show (RecordPatSynField (Located RdrName))
-deriving instance Show (RoleAnnotDecl RdrName)
-deriving instance Show (RuleBndr RdrName)
-deriving instance Show (RuleDecl RdrName)
-deriving instance Show (RuleDecls RdrName)
-deriving instance Show (Sig RdrName)
-deriving instance Show (SpliceDecl RdrName)
-deriving instance Show (SyntaxExpr RdrName)
-deriving instance Show a => Show (StmtLR RdrName RdrName a)
-deriving instance Show (TyClDecl RdrName)
-deriving instance Show (TyClGroup RdrName)
-deriving instance Show a => Show (TyFamEqn RdrName a)
-deriving instance Show (TyFamInstDecl RdrName)
-deriving instance Show (VectDecl RdrName)
-deriving instance Show (WarnDecl RdrName)
-deriving instance Show (WarnDecls RdrName)
+deriving instance Show (RoleAnnotDecl GhcPs)
+deriving instance Show (RuleBndr GhcPs)
+deriving instance Show (RuleDecl GhcPs)
+deriving instance Show (RuleDecls GhcPs)
+deriving instance Show (Sig GhcPs)
+deriving instance Show (SpliceDecl GhcPs)
+deriving instance Show (SyntaxExpr GhcPs)
+deriving instance Show a => Show (StmtLR GhcPs GhcPs a)
+deriving instance Show (TyClDecl GhcPs)
+deriving instance Show (TyClGroup GhcPs)
+deriving instance (Show a, Show b) => Show (FamEqn GhcPs a b)
+deriving instance Show (TyFamInstDecl GhcPs)
+deriving instance Show (VectDecl GhcPs)
+deriving instance Show (WarnDecl GhcPs)
+deriving instance Show (WarnDecls GhcPs)
 
 
-deriving instance Show (ABExport Name)
-deriving instance Show (AmbiguousFieldOcc Name)
-deriving instance Show (AnnDecl Name)
+deriving instance Show (ABExport GhcRn)
+deriving instance Show (AmbiguousFieldOcc GhcRn)
+deriving instance Show (AnnDecl GhcRn)
 deriving instance Show (AnnProvenance Name)
-deriving instance Show (ApplicativeArg Name Name)
-deriving instance Show (ArithSeqInfo Name)
+deriving instance Show (ApplicativeArg GhcRn GhcRn)
+deriving instance Show (ArithSeqInfo GhcRn)
 deriving instance Show (BooleanFormula (Located Name))
-deriving instance Show (ClsInstDecl Name)
-deriving instance Show (ConDecl Name)
-deriving instance Show (ConDeclField Name)
-deriving instance Show (DataFamInstDecl Name)
-deriving instance Show (DefaultDecl Name)
-deriving instance Show (DerivDecl Name)
-deriving instance Show (FamilyDecl Name)
-deriving instance Show (FamilyInfo Name)
-deriving instance Show (FamilyResultSig Name)
+deriving instance Show (ClsInstDecl GhcRn)
+deriving instance Show (ConDecl GhcRn)
+deriving instance Show (ConDeclField GhcRn)
+deriving instance Show (DataFamInstDecl GhcRn)
+deriving instance Show (DefaultDecl GhcRn)
+deriving instance Show (DerivDecl GhcRn)
+deriving instance Show (FamilyDecl GhcRn)
+deriving instance Show (FamilyInfo GhcRn)
+deriving instance Show (FamilyResultSig GhcRn)
 deriving instance Show (FieldLbl Name)
-deriving instance Show (FieldOcc Name)
-deriving instance Show (FixitySig Name)
-deriving instance Show (ForeignDecl Name)
-deriving instance Show a => Show (GRHS Name a)
-deriving instance Show a => Show (GRHSs Name a)
-deriving instance Show (InjectivityAnn Name)
-deriving instance Show (HsAppType Name)
-deriving instance Show (HsBindLR Name Name)
-deriving instance Show (HsBracket Name)
-deriving instance Show (HsCmd Name)
-deriving instance Show (HsCmdTop Name)
-deriving instance Show (HsConDeclDetails Name)
-deriving instance Show (HsConPatDetails Name)
-deriving instance Show (HsDataDefn Name)
-deriving instance Show (HsDerivingClause Name)
-deriving instance Show (HsDecl Name)
-deriving instance Show (HsExpr Name)
-deriving instance Show (HsGroup Name)
-deriving instance Show (HsLocalBindsLR Name Name)
+deriving instance Show (FieldOcc GhcRn)
+deriving instance Show (FixitySig GhcRn)
+deriving instance Show (ForeignDecl GhcRn)
+deriving instance Show a => Show (GRHS GhcRn a)
+deriving instance Show a => Show (GRHSs GhcRn a)
+deriving instance Show (InjectivityAnn GhcRn)
+deriving instance Show (HsAppType GhcRn)
+deriving instance Show (HsBindLR GhcRn GhcRn)
+deriving instance Show (HsBracket GhcRn)
+deriving instance Show (HsCmd GhcRn)
+deriving instance Show (HsCmdTop GhcRn)
+deriving instance Show (HsConDeclDetails GhcRn)
+deriving instance Show (HsConPatDetails GhcRn)
+deriving instance Show (HsDataDefn GhcRn)
+deriving instance Show (HsDerivingClause GhcRn)
+deriving instance Show (HsDecl GhcRn)
+deriving instance Show (HsExpr GhcRn)
+deriving instance Show (HsGroup GhcRn)
+deriving instance Show (HsLit GhcRn)
+deriving instance Show (HsLocalBindsLR GhcRn GhcRn)
 deriving instance Show (HsMatchContext Name)
-deriving instance Show (HsModule Name)
-deriving instance Show (HsOverLit Name)
+deriving instance Show (HsModule GhcRn)
+deriving instance Show (HsOverLit GhcRn)
 deriving instance Show (HsPatSynDetails (Located Name))
-deriving instance Show (HsPatSynDir Name)
-deriving instance Show (HsRecFields Name (LPat Name))
-deriving instance Show (HsRecordBinds Name)
-deriving instance Show (HsSplice Name)
-deriving instance Show (HsSplicedThing Name)
+deriving instance Show (HsPatSynDir GhcRn)
+deriving instance Show (HsRecFields GhcRn (LPat GhcRn))
+deriving instance Show (HsRecordBinds GhcRn)
+deriving instance Show (HsSplice GhcRn)
+deriving instance Show (HsSplicedThing GhcRn)
 deriving instance Show (HsStmtContext Name)
-deriving instance Show (HsTupArg Name)
-deriving instance Show (HsTyVarBndr Name)
-deriving instance Show (HsType Name)
-deriving instance Show (HsValBindsLR Name Name)
-deriving instance Show (HsWildCardInfo Name)
-deriving instance Show (IE Name)
+deriving instance Show (HsTupArg GhcRn)
+deriving instance Show (HsTyVarBndr GhcRn)
+deriving instance Show (HsType GhcRn)
+deriving instance Show (HsValBindsLR GhcRn GhcRn)
+deriving instance Show (HsWildCardInfo GhcRn)
+deriving instance Show (IE GhcRn)
 deriving instance Show (IEWrappedName Name)
-deriving instance Show (ImportDecl Name)
-deriving instance Show (InstDecl Name)
-deriving instance Show (LHsQTyVars Name)
-deriving instance Show a => Show (Match Name a)
-deriving instance Show a => Show (MatchGroup Name a)
-deriving instance Show (ParStmtBlock Name Name)
-deriving instance Show (Pat Name)
-deriving instance Show (PatSynBind Name Name)
+deriving instance Show (ImportDecl GhcRn)
+deriving instance Show (InstDecl GhcRn)
+deriving instance Show (LHsQTyVars GhcRn)
+deriving instance Show a => Show (Match GhcRn a)
+deriving instance Show a => Show (MatchGroup GhcRn a)
+deriving instance Show (ParStmtBlock GhcRn GhcRn)
+deriving instance Show (Pat GhcRn)
+deriving instance Show (PatSynBind GhcRn GhcRn)
 deriving instance Show (RecordPatSynField (Located Name))
-deriving instance Show (RoleAnnotDecl Name)
-deriving instance Show (RuleBndr Name)
-deriving instance Show (RuleDecl Name)
-deriving instance Show (RuleDecls Name)
-deriving instance Show (Sig Name)
-deriving instance Show (SpliceDecl Name)
-deriving instance Show (SyntaxExpr Name)
-deriving instance Show a => Show (StmtLR Name Name a)
-deriving instance Show (TyClDecl Name)
-deriving instance Show (TyClGroup Name)
-deriving instance Show a => Show (TyFamEqn Name a)
-deriving instance Show (TyFamInstDecl Name)
-deriving instance Show (VectDecl Name)
-deriving instance Show (WarnDecl Name)
-deriving instance Show (WarnDecls Name)
+deriving instance Show (RoleAnnotDecl GhcRn)
+deriving instance Show (RuleBndr GhcRn)
+deriving instance Show (RuleDecl GhcRn)
+deriving instance Show (RuleDecls GhcRn)
+deriving instance Show (Sig GhcRn)
+deriving instance Show (SpliceDecl GhcRn)
+deriving instance Show (SyntaxExpr GhcRn)
+deriving instance Show a => Show (StmtLR GhcRn GhcRn a)
+deriving instance Show (TyClDecl GhcRn)
+deriving instance Show (TyClGroup GhcRn)
+deriving instance (Show a, Show b) => Show (FamEqn GhcRn a b)
+deriving instance Show (TyFamInstDecl GhcRn)
+deriving instance Show (VectDecl GhcRn)
+deriving instance Show (WarnDecl GhcRn)
+deriving instance Show (WarnDecls GhcRn)
 
 
-deriving instance Show (ABExport Id)
-deriving instance Show (AmbiguousFieldOcc Id)
-deriving instance Show (AnnDecl Id)
+deriving instance Show (ABExport GhcTc)
+deriving instance Show (AmbiguousFieldOcc GhcTc)
+deriving instance Show (AnnDecl GhcTc)
 deriving instance Show (AnnProvenance Id)
-deriving instance Show (ApplicativeArg Id Id)
-deriving instance Show (ArithSeqInfo Id)
+deriving instance Show (ApplicativeArg GhcTc GhcTc)
+deriving instance Show (ArithSeqInfo GhcTc)
 deriving instance Show (BooleanFormula (Located Id))
-deriving instance Show (ClsInstDecl Id)
-deriving instance Show (ConDecl Id)
-deriving instance Show (ConDeclField Id)
-deriving instance Show (DataFamInstDecl Id)
-deriving instance Show (DefaultDecl Id)
-deriving instance Show (DerivDecl Id)
-deriving instance Show (FamilyDecl Id)
-deriving instance Show (FamilyInfo Id)
-deriving instance Show (FamilyResultSig Id)
+deriving instance Show (ClsInstDecl GhcTc)
+deriving instance Show (ConDecl GhcTc)
+deriving instance Show (ConDeclField GhcTc)
+deriving instance Show (DataFamInstDecl GhcTc)
+deriving instance Show (DefaultDecl GhcTc)
+deriving instance Show (DerivDecl GhcTc)
+deriving instance Show (FamilyDecl GhcTc)
+deriving instance Show (FamilyInfo GhcTc)
+deriving instance Show (FamilyResultSig GhcTc)
 deriving instance Show (FieldLbl Id)
-deriving instance Show (FieldOcc Id)
-deriving instance Show (FixitySig Id)
-deriving instance Show (ForeignDecl Id)
-deriving instance Show a => Show (GRHS Id a)
-deriving instance Show a => Show (GRHSs Id a)
-deriving instance Show (InjectivityAnn Id)
-deriving instance Show (HsAppType Id)
-deriving instance Show (HsBindLR Id Id)
-deriving instance Show (HsBracket Id)
-deriving instance Show (HsCmd Id)
-deriving instance Show (HsCmdTop Id)
-deriving instance Show (HsConDeclDetails Id)
-deriving instance Show (HsConPatDetails Id)
-deriving instance Show (HsDataDefn Id)
-deriving instance Show (HsDerivingClause Id)
-deriving instance Show (HsDecl Id)
-deriving instance Show (HsExpr Id)
-deriving instance Show (HsGroup Id)
-deriving instance Show (HsLocalBindsLR Id Id)
+deriving instance Show (FieldOcc GhcTc)
+deriving instance Show (FixitySig GhcTc)
+deriving instance Show (ForeignDecl GhcTc)
+deriving instance Show a => Show (GRHS GhcTc a)
+deriving instance Show a => Show (GRHSs GhcTc a)
+deriving instance Show (InjectivityAnn GhcTc)
+deriving instance Show (HsAppType GhcTc)
+deriving instance Show (HsBindLR GhcTc GhcTc)
+deriving instance Show (HsBracket GhcTc)
+deriving instance Show (HsCmd GhcTc)
+deriving instance Show (HsCmdTop GhcTc)
+deriving instance Show (HsConDeclDetails GhcTc)
+deriving instance Show (HsConPatDetails GhcTc)
+deriving instance Show (HsDataDefn GhcTc)
+deriving instance Show (HsDerivingClause GhcTc)
+deriving instance Show (HsDecl GhcTc)
+deriving instance Show (HsExpr GhcTc)
+deriving instance Show (HsGroup GhcTc)
+deriving instance Show (HsLit GhcTc)
+deriving instance Show (HsLocalBindsLR GhcTc GhcTc)
 deriving instance Show (HsMatchContext Id)
-deriving instance Show (HsModule Id)
-deriving instance Show (HsOverLit Id)
+deriving instance Show (HsModule GhcTc)
+deriving instance Show (HsOverLit GhcTc)
 deriving instance Show (HsPatSynDetails (Located Id))
-deriving instance Show (HsPatSynDir Id)
-deriving instance Show (HsRecFields Id (LPat Id))
-deriving instance Show (HsRecordBinds Id)
-deriving instance Show (HsSplice Id)
-deriving instance Show (HsSplicedThing Id)
+deriving instance Show (HsPatSynDir GhcTc)
+deriving instance Show (HsRecFields GhcTc (LPat GhcTc))
+deriving instance Show (HsRecordBinds GhcTc)
+deriving instance Show (HsSplice GhcTc)
+deriving instance Show (HsSplicedThing GhcTc)
 deriving instance Show (HsStmtContext Id)
-deriving instance Show (HsTupArg Id)
-deriving instance Show (HsTyVarBndr Id)
-deriving instance Show (HsType Id)
-deriving instance Show (HsValBindsLR Id Id)
-deriving instance Show (HsWildCardInfo Id)
-deriving instance Show (IE Id)
+deriving instance Show (HsTupArg GhcTc)
+deriving instance Show (HsTyVarBndr GhcTc)
+deriving instance Show (HsType GhcTc)
+deriving instance Show (HsValBindsLR GhcTc GhcTc)
+deriving instance Show (HsWildCardInfo GhcTc)
+deriving instance Show (IE GhcTc)
 deriving instance Show (IEWrappedName Id)
-deriving instance Show (ImportDecl Id)
-deriving instance Show (InstDecl Id)
-deriving instance Show (LHsQTyVars Id)
-deriving instance Show a => Show (Match Id a)
-deriving instance Show a => Show (MatchGroup Id a)
-deriving instance Show (ParStmtBlock Id Id)
-deriving instance Show (Pat Id)
-deriving instance Show (PatSynBind Id Id)
+deriving instance Show (ImportDecl GhcTc)
+deriving instance Show (InstDecl GhcTc)
+deriving instance Show (LHsQTyVars GhcTc)
+deriving instance Show a => Show (Match GhcTc a)
+deriving instance Show a => Show (MatchGroup GhcTc a)
+deriving instance Show (ParStmtBlock GhcTc GhcTc)
+deriving instance Show (Pat GhcTc)
+deriving instance Show (PatSynBind GhcTc GhcTc)
 deriving instance Show (RecordPatSynField (Located Id))
-deriving instance Show (RoleAnnotDecl Id)
-deriving instance Show (RuleBndr Id)
-deriving instance Show (RuleDecl Id)
-deriving instance Show (RuleDecls Id)
-deriving instance Show (Sig Id)
-deriving instance Show (SpliceDecl Id)
-deriving instance Show (SyntaxExpr Id)
-deriving instance Show a => Show (StmtLR Id Id a)
-deriving instance Show (TyClDecl Id)
-deriving instance Show (TyClGroup Id)
-deriving instance Show a => Show (TyFamEqn Id a)
-deriving instance Show (TyFamInstDecl Id)
-deriving instance Show (VectDecl Id)
-deriving instance Show (WarnDecl Id)
-deriving instance Show (WarnDecls Id)
+deriving instance Show (RoleAnnotDecl GhcTc)
+deriving instance Show (RuleBndr GhcTc)
+deriving instance Show (RuleDecl GhcTc)
+deriving instance Show (RuleDecls GhcTc)
+deriving instance Show (Sig GhcTc)
+deriving instance Show (SpliceDecl GhcTc)
+deriving instance Show (SyntaxExpr GhcTc)
+deriving instance Show a => Show (StmtLR GhcTc GhcTc a)
+deriving instance Show (TyClDecl GhcTc)
+deriving instance Show (TyClGroup GhcTc)
+deriving instance (Show a, Show b) => Show (FamEqn GhcTc a b)
+deriving instance Show (TyFamInstDecl GhcTc)
+deriving instance Show (VectDecl GhcTc)
+deriving instance Show (WarnDecl GhcTc)
+deriving instance Show (WarnDecls GhcTc)
 
 deriving instance Show Activation
 deriving instance Show HsArrAppType
@@ -278,7 +285,6 @@ deriving instance Show ForeignExport
 deriving instance Show Header
 deriving instance Show HsIPName
-deriving instance Show HsLit
 deriving instance Show HsTupleSort
 deriving instance Show HsSrcBang
 deriving instance Show InlinePragma
@@ -324,12 +330,12 @@ deriving instance Show SrcStrictness
 deriving instance Show IEWildcard
 
-deriving instance Show t => Show (HsImplicitBndrs RdrName t)
-deriving instance Show t => Show (HsImplicitBndrs Name t)
-deriving instance Show t => Show (HsImplicitBndrs Id t)
-deriving instance Show t => Show (HsWildCardBndrs RdrName t)
-deriving instance Show t => Show (HsWildCardBndrs Name t)
-deriving instance Show t => Show (HsWildCardBndrs Id t)
+deriving instance (Show t) => Show (HsImplicitBndrs GhcPs t)
+deriving instance (Show t) => Show (HsImplicitBndrs GhcRn t)
+deriving instance (Show t) => Show (HsImplicitBndrs GhcTc t)
+deriving instance (Show t) => Show (HsWildCardBndrs GhcPs t)
+deriving instance (Show t) => Show (HsWildCardBndrs GhcRn t)
+deriving instance (Show t) => Show (HsWildCardBndrs GhcTc t)
 deriving instance (Show a, Show b) => Show (HsRecField' a b)
 
 instance Show Name where
@@ -358,7 +364,7 @@   show = showSDocUnsafe . ppr
 instance Outputable a => Show (Tickish a) where
   show = showSDocUnsafe . ppr
-instance OutputableBndrId a => Show (HsIPBinds a) where
+instance (OutputableBndrId a, SourceTextX a) => Show (HsIPBinds a) where
   show = showSDocUnsafe . ppr
 instance Show LexicalFixity where
   show = showSDocUnsafe . ppr
Language/Haskell/Tools/Debug/RangeDebug.hs view
@@ -1,4 +1,10 @@-{-# LANGUAGE ConstraintKinds, DefaultSignatures, FlexibleContexts, FlexibleInstances, GADTs, MultiParamTypeClasses, TypeOperators #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE DefaultSignatures #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE TypeOperators #-}
 
 -- | A module for displaying debug info about the source annotations of the syntax tree in different phases.
 module Language.Haskell.Tools.Debug.RangeDebug where
Language/Haskell/Tools/Debug/RangeDebugInstances.hs view
@@ -1,4 +1,8 @@-{-# LANGUAGE FlexibleContexts, FlexibleInstances, GADTs, MultiParamTypeClasses, UndecidableInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE UndecidableInstances #-}
 
 module Language.Haskell.Tools.Debug.RangeDebugInstances where
 
Language/Haskell/Tools/Debug/Show.hs view
@@ -1,5 +1,5 @@ -- | Show instance for Haskell AST representation ignoring source and semantic information
-{-# LANGUAGE FlexibleContexts, StandaloneDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 
 module Language.Haskell.Tools.Debug.Show () where
 
haskell-tools-debug.cabal view
@@ -1,5 +1,5 @@ name:                haskell-tools-debug
-version:             1.0.1.1
+version:             1.1.0.0
 synopsis:            Debugging Tools for Haskell-tools
 description:         Debugging Tools for Haskell-tools
 homepage:            https://github.com/haskell-tools/haskell-tools
@@ -17,18 +17,18 @@                      , Language.Haskell.Tools.Debug.Show
                      , Language.Haskell.Tools.Debug.RangeDebug
                      , Language.Haskell.Tools.Debug.RangeDebugInstances
-  build-depends:       base                      >= 4.10 && < 4.11
+  build-depends:       base                      >= 4.11 && < 4.12
                      , filepath                  >= 1.4 && < 1.5
-                     , template-haskell          >= 2.12 && < 2.13
+                     , template-haskell          >= 2.13 && < 2.14
                      , references                >= 0.3 && < 0.4
                      , split                     >= 0.2 && < 0.3
-                     , ghc                       >= 8.2 && < 8.3
+                     , ghc                       >= 8.4 && < 8.5
                      , ghc-paths                 >= 0.1 && < 0.2
-                     , haskell-tools-ast         >= 1.0 && < 1.1
-                     , haskell-tools-backend-ghc >= 1.0 && < 1.1
-                     , haskell-tools-refactor    >= 1.0 && < 1.1
-                     , haskell-tools-prettyprint >= 1.0 && < 1.1
-                     , haskell-tools-builtin-refactorings >= 1.0 && < 1.1
+                     , haskell-tools-ast         >= 1.1 && < 1.2
+                     , haskell-tools-backend-ghc >= 1.1 && < 1.2
+                     , haskell-tools-refactor    >= 1.1 && < 1.2
+                     , haskell-tools-prettyprint >= 1.1 && < 1.2
+                     , haskell-tools-builtin-refactorings >= 1.1 && < 1.2
                      , uniplate                  >= 1.6 && < 1.7
                      , classyplate               >= 0.3 && < 0.4
                      , criterion                 >= 1.1 && < 1.5