[Git][ghc/ghc][wip/expansions-appdo] enable the expansion flow

Apoorv Ingle (@ani) gitlab at gitlab.haskell.org
Tue Feb 13 01:12:00 UTC 2024



Apoorv Ingle pushed to branch wip/expansions-appdo at Glasgow Haskell Compiler / GHC


Commits:
a3d2d09c by Apoorv Ingle at 2024-02-12T19:11:48-06:00
enable the expansion flow

- - - - -


2 changed files:

- compiler/GHC/Tc/Gen/Match.hs
- + compiler/ghc-llvm-version.h


Changes:

=====================================
compiler/GHC/Tc/Gen/Match.hs
=====================================
@@ -353,15 +353,9 @@ tcDoStmts ListComp (L l stmts) res_ty
                             (mkCheckExpType elt_ty)
         ; return $ mkHsWrapCo co (HsDo list_ty ListComp (L l stmts')) }
 
-tcDoStmts doExpr@(DoExpr _) ss@(L l stmts) res_ty
-  = do  { isApplicativeDo <- xoptM LangExt.ApplicativeDo
-        ; if isApplicativeDo
-          then do { stmts' <- tcStmts (HsDoStmt doExpr) tcDoStmt stmts res_ty
-                  ; res_ty <- readExpType res_ty
-                  ; return (HsDo res_ty doExpr (L l stmts')) }
-          else do { expanded_expr <- expandDoStmts doExpr stmts
-                                               -- Do expansion on the fly
-                  ; mkExpandedExprTc (HsDo noExtField doExpr ss) <$> tcExpr (unLoc expanded_expr) res_ty }
+tcDoStmts doExpr@(DoExpr _) ss@(L _ stmts) res_ty
+  = do  { expanded_expr <- expandDoStmts doExpr stmts -- Do expansion on the fly
+        ; mkExpandedExprTc (HsDo noExtField doExpr ss) <$> tcExpr (unLoc expanded_expr) res_ty
         }
 
 tcDoStmts mDoExpr@(MDoExpr _) ss@(L _ stmts) res_ty


=====================================
compiler/ghc-llvm-version.h
=====================================
@@ -0,0 +1,11 @@
+/* compiler/ghc-llvm-version.h.  Generated from ghc-llvm-version.h.in by configure.  */
+#if !defined(__GHC_LLVM_VERSION_H__)
+#define __GHC_LLVM_VERSION_H__
+
+/* The maximum supported LLVM version number */
+#define sUPPORTED_LLVM_VERSION_MAX (16)
+
+/* The minimum supported LLVM version number */
+#define sUPPORTED_LLVM_VERSION_MIN (13)
+
+#endif /* __GHC_LLVM_VERSION_H__ */



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3d2d09c057d555a7f456940961aa8f4d99b82de

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3d2d09c057d555a7f456940961aa8f4d99b82de
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240212/4dfb172e/attachment-0001.html>


More information about the ghc-commits mailing list