diff options
author | Yuchen Pei <hi@ypei.me> | 2022-06-08 18:52:13 +1000 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-06-08 18:52:13 +1000 |
commit | 383b82f79dca6294545315c8daf0357bc4d6f97c (patch) | |
tree | d1b60cbc93d67e8d30301a9c1413c17f555ff09c /src | |
parent | 014057f68716515a50ab79ba8c17af3a4dc2bea4 (diff) |
fixing HsPragE hole in typecheckedsource
Diffstat (limited to 'src')
-rw-r--r-- | src/HaskellCodeExplorer/AST/TypecheckedSource.hs | 14 |
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 |