aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/HaskellCodeExplorer/AST/TypecheckedSource.hs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/HaskellCodeExplorer/AST/TypecheckedSource.hs b/src/HaskellCodeExplorer/AST/TypecheckedSource.hs
index d7cabd7..0aa4191 100644
--- a/src/HaskellCodeExplorer/AST/TypecheckedSource.hs
+++ b/src/HaskellCodeExplorer/AST/TypecheckedSource.hs
@@ -63,6 +63,7 @@ import GHC.Hs
, HsExpr(..)
, HsLocalBindsLR(..)
, HsOverLit(..)
+ , HsPragE(..)
, HsRecField'(..)
, HsRecFields(..)
, HsTupArg(..)
@@ -604,7 +605,6 @@ foldTypecheckedSource = foldLHsBindsLR
-- Patterns of type ‘LHsExpr GhcTc’ not matched:
-- L (GHC.Parser.Annotation.SrcSpanAnn _ _) (HsGetField _ _ _)
-- L (GHC.Parser.Annotation.SrcSpanAnn _ _) (HsProjection _ _)
--- L (GHC.Parser.Annotation.SrcSpanAnn _ _) (HsPragE _ _ _)
foldLHsExpr :: LHsExpr GhcTc -> State ASTState (Maybe Type)
foldLHsExpr (L _span (XExpr _)) = return Nothing
foldLHsExpr lhe@(L _ (HsVar _ (L _ identifier))) =
@@ -802,14 +802,10 @@ foldLHsExpr lhe@(L _ e@(ArithSeq postTcExpr _mbSyntaxExpr seqInfo)) = do
foldLHsExpr expr1 >> foldLHsExpr expr2 >> foldLHsExpr expr3
addExprInfo (getLocA lhe) typ "ArithSeq" (exprSort e)
return typ
--- #if MIN_VERSION_GLASGOW_HASKELL(8,6,1,0)
--- foldLHsExpr lhe@(L _ e@(HsSCC _ _sourceText _fastString expr)) = do
--- #else
--- foldLHsExpr lhe@(L _ e@(HsSCC _sourceText _fastString expr)) = do
--- #endif
--- typ <- foldLHsExpr expr
--- addExprInfo (getLocA lhe) typ "HsSCC" (exprSort e)
--- return typ
+foldLHsExpr lhe@(L _ e@(HsPragE _ (HsPragSCC {}) expr)) = do
+ typ <- foldLHsExpr expr
+ addExprInfo (getLocA lhe) typ "HsSCC" (exprSort e)
+ return typ
-- #if MIN_VERSION_GLASGOW_HASKELL(8,6,1,0)
-- foldLHsExpr lhe@(L _ e@(HsCoreAnn _ _sourceText _fastString expr)) = do
-- #else