[Git][ghc/ghc][wip/toolchain-selection] 2 commits: ROMES:WIP

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Fri May 5 17:53:18 UTC 2023



Rodrigo Mesquita pushed to branch wip/toolchain-selection at Glasgow Haskell Compiler / GHC


Commits:
7da8a61e by Rodrigo Mesquita at 2023-05-05T17:22:01+01:00
ROMES:WIP

- - - - -
3243fd3b by Rodrigo Mesquita at 2023-05-05T18:53:09+01:00
ghc-toolchain library and usage in hadrian flags

- - - - -


16 changed files:

- configure.ac
- distrib/configure.ac.in
- hadrian/bindist/config.mk.in
- hadrian/cabal.project
- hadrian/cfg/system.config.in
- hadrian/hadrian.cabal
- hadrian/src/Base.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Oracles/Flag.hs
- hadrian/src/Settings/Packages.hs
- m4/ghc_toolchain.m4
- − m4/ghc_unregisterised.m4
- utils/ghc-toolchain/src/Main.hs → utils/ghc-toolchain/Main.hs
- utils/ghc-toolchain/ghc-toolchain.cabal
- + utils/ghc-toolchain/src/GHC/Toolchain.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Monad.hs


Changes:

=====================================
configure.ac
=====================================
@@ -298,10 +298,28 @@ then
     exit 1
 fi
 
-dnl ** Do an unregisterised build?
+dnl ** Flag to override unregisterised build
 dnl --------------------------------------------------------------
 
-GHC_UNREGISTERISED
+FP_DEFAULT_CHOICE_OVERRIDE_CHECK(
+    [unregisterised],
+    [unregisterised],
+    [registerised],
+    [Unregisterised],
+    [Build a toolchain with the unregisterised ABI (disabled by default on platforms with registerised support)],
+    [NO],
+    [YES],
+    [no])
+
+dnl ** Flag to override tables next to code
+dnl --------------------------------------------------------------
+
+FP_DEFAULT_CHOICE_OVERRIDE_CHECK(
+    [tables-next-to-code],
+    [tables next to code],
+    [tables apart from code],
+    [TablesNextToCode],
+    [Build a tool chain with info tables laid out next to code (enabled by default when using the registerised ABI, on platforms that support it)])
 
 # Requires FPTOOLS_SET_PLATFORMS_VARS to be run first.
 FP_FIND_ROOT
@@ -310,7 +328,7 @@ FP_FIND_ROOT
 if test "$HostOS" = "mingw32" -a "$EnableDistroToolchain" = "NO"; then
     FP_SETUP_WINDOWS_TOOLCHAIN
 else
-    # TODO
+    # TODO ()
     AC_PATH_TOOL([CC],[gcc], [clang])
     AC_PATH_TOOL([CXX],[g++], [clang++])
     AC_PATH_TOOL([NM],[nm])
@@ -561,23 +579,12 @@ dnl --------------------------------------------------------------
 dnl ** does #! work?
 AC_SYS_INTERPRETER()
 
-dnl ** look for GCC and find out which version
-dnl     Figure out which C compiler to use.  Gcc is preferred.
-dnl     If gcc, make sure it's at least 4.7
-dnl
-FP_GCC_VERSION
-
-dnl ** See whether cc supports -no-pie
-FP_GCC_SUPPORTS_NO_PIE
-
 dnl ** Used to determine how to compile ghc-prim's atomics.c, used by
 dnl    unregisterised, Sparc, and PPC backends. Also determines whether
 dnl    linking to libatomic is required for atomic operations, e.g. on
 dnl    RISCV64 GCC.
 FP_CC_SUPPORTS__ATOMICS
 
-FP_GCC_EXTRA_FLAGS
-
 dnl ** look to see if we have a C compiler using an llvm back end.
 dnl
 FP_CC_LLVM_BACKEND


=====================================
distrib/configure.ac.in
=====================================
@@ -149,11 +149,6 @@ FIND_LLVM_PROG([OPT], [opt], [$LlvmMinVersion], [$LlvmMaxVersion])
 OptCmd="$OPT"
 AC_SUBST([OptCmd])
 
-dnl ** Check gcc version and flags we need to pass it **
-FP_GCC_VERSION
-FP_GCC_SUPPORTS_NO_PIE
-FP_GCC_EXTRA_FLAGS
-
 FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS],[IGNORE_LINKER_LD_FLAGS],[CPPFLAGS])
 FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_GCC_LINKER_OPTS_STAGE0],[CONF_LD_LINKER_OPTS_STAGE0],[CONF_CPP_OPTS_STAGE0])
 FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_GCC_LINKER_OPTS_STAGE1],[CONF_LD_LINKER_OPTS_STAGE1],[CONF_CPP_OPTS_STAGE1])


=====================================
hadrian/bindist/config.mk.in
=====================================
@@ -234,28 +234,16 @@ GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 s390x), at UseL
 # might become redundant.
 # See Note [tooldir: How GHC finds mingw on Windows]
 
-GccExtraViaCOpts = @GccExtraViaCOpts@
 LdHasFilelist = @LdHasFilelist@
 LdSupportsResponseFiles = @LdSupportsResponseFiles@
 LdHasBuildId = @LdHasBuildId@
 LdHasFilelist = @LdHasFilelist@
 LdIsGNULd = @LdIsGNULd@
 LdHasNoCompactUnwind = @LdHasNoCompactUnwind@
-ArArgs = @ArArgs@
-ArSupportsAtFile = @ArSupportsAtFile@
-ArSupportsDashL  = @ArSupportsDashL@
 HaskellHostOs = @HaskellHostOs@
 HaskellHostArch = @HaskellHostArch@
-HaskellTargetOs = @HaskellTargetOs@
-HaskellTargetArch = @HaskellTargetArch@
-TargetWordSize = @TargetWordSize@
-TargetWordBigEndian = @TargetWordBigEndian@
-TargetHasGnuNonexecStack = @TargetHasGnuNonexecStack@
-TargetHasIdentDirective = @TargetHasIdentDirective@
-TargetHasSubsectionsViaSymbols = @TargetHasSubsectionsViaSymbols@
 TargetHasRTSLinker = @TargetHasRTSLinker@
 TargetHasLibm = @TargetHasLibm@
-TablesNextToCode = @TablesNextToCode@
 
 SettingsCCompilerCommand = @SettingsCCompilerCommand@
 SettingsCxxCompilerCommand = @SettingsCxxCompilerCommand@


=====================================
hadrian/cabal.project
=====================================
@@ -1,4 +1,5 @@
 packages: ./
+          ../utils/ghc-toolchain/
 
 -- This essentially freezes the build plan for hadrian
 index-state: 2023-03-30T10:00:00Z


=====================================
hadrian/cfg/system.config.in
=====================================
@@ -39,9 +39,7 @@ python         = @PythonCmd@
 # Information about builders:
 #============================
 
-ar-supports-at-file       = @ArSupportsAtFile@
 system-ar-supports-at-file = @ArSupportsAtFile_STAGE0@
-ar-supports-dash-l        = @ArSupportsDashL@
 system-ar-supports-dash-l = @ArSupportsDashL_STAGE0@
 cc-llvm-backend           = @CcLlvmBackend@
 hs-cpp-args               = @HaskellCPPArgs@
@@ -49,11 +47,8 @@ hs-cpp-args               = @HaskellCPPArgs@
 # Build options:
 #===============
 
-ghc-unregisterised   = @Unregisterised@
-tables-next-to-code  = @TablesNextToCode@
 use-libffi-for-adjustors = @UseLibffiForAdjustors@
 ghc-source-path      = @hardtop@
-leading-underscore   = @LeadingUnderscore@
 
 # Information about build, host and target systems:
 #==================================================
@@ -136,12 +131,10 @@ conf-merge-objects-args-stage3  = @MergeObjsArgs@
 # might become redundant.
 # See Note [tooldir: How GHC finds mingw on Windows]
 
-gcc-extra-via-c-opts = @GccExtraViaCOpts@
 ld-has-no-compact-unwind = @LdHasNoCompactUnwind@
 ld-has-filelist = @LdHasFilelist@
 ld-supports-response-files = @LdSupportsResponseFiles@
 ld-is-gnu-ld = @LdIsGNULd@
-ar-args = @ArArgs@
 
 settings-c-compiler-command = @SettingsCCompilerCommand@
 settings-cxx-compiler-command = @SettingsCxxCompilerCommand@


=====================================
hadrian/hadrian.cabal
=====================================
@@ -163,6 +163,7 @@ executable hadrian
                        , transformers         >= 0.4     && < 0.7
                        , unordered-containers >= 0.2.1   && < 0.3
                        , text                 >= 1.2     && < 3
+                       , ghc-toolchain
     ghc-options:       -Wall
                        -Wincomplete-record-updates
                        -Wredundant-constraints


=====================================
hadrian/src/Base.hs
=====================================
@@ -31,6 +31,7 @@ module Base (
     -- * Paths
     hadrianPath, configPath, configFile, sourcePath, shakeFilesDir,
     stageBinPath, stageLibPath, templateHscPath,
+    hostTargetFile, targetTargetFile,
     ghcBinDeps, ghcLibDeps, haddockDeps,
     relativePackageDbPath, packageDbPath, packageDbStamp, mingwStamp,
     systemCxxStdLibConf, systemCxxStdLibConfPath
@@ -79,6 +80,16 @@ configPath = hadrianPath -/- "cfg"
 configFile :: FilePath
 configFile = configPath -/- "system.config"
 
+-- | The target configuration file generated by ghc-toolchain for the
+-- compilation host
+hostTargetFile :: FilePath
+hostTargetFile = "default.target" -- ROMES:TODO: Not hardcode this value?
+
+-- | The target configuration file generated by ghc-toolchain for the
+-- compilation target
+targetTargetFile :: FilePath
+targetTargetFile = "default.target" -- ROMES:TODO: Not hardcode this value, depends on target
+
 -- | Path to source files of the build system, e.g. this file is located at
 -- @sourcePath -/- "Base.hs"@. We use this to track some of the source files.
 sourcePath :: FilePath


=====================================
hadrian/src/Hadrian/Oracles/TextFile.hs
=====================================
@@ -12,7 +12,8 @@
 -----------------------------------------------------------------------------
 module Hadrian.Oracles.TextFile (
     lookupValue, lookupValueOrEmpty, lookupValueOrError, lookupSystemConfig, lookupValues,
-    lookupValuesOrEmpty, lookupValuesOrError, lookupDependencies, textFileOracle
+    lookupValuesOrEmpty, lookupValuesOrError, lookupDependencies, textFileOracle,
+    getHostTargetConfig, getTargetTargetConfig
     ) where
 
 import Control.Monad
@@ -24,6 +25,8 @@ import Development.Shake.Classes
 import Development.Shake.Config
 import Base
 
+import qualified GHC.Toolchain.Target as Toolchain
+
 -- | Lookup a value in a text file, tracking the result. Each line of the file
 -- is expected to have @key = value@ format.
 lookupValue :: FilePath -> String -> Action (Maybe String)
@@ -79,6 +82,21 @@ lookupDependencies depFile file = do
         Just [] -> error $ "No source file found for file " ++ quote file
         Just (source : files) -> return (source, files)
 
+-- | Parse a target from a text file, tracking the result. The file is expected
+-- to contain a parseable Toolchain.Target value generated by ghc-toolchain.
+getTargetConfig :: FilePath -> Action Toolchain.Target
+getTargetConfig file = askOracle $ TargetFile file
+
+-- | Get the host's target configuration through 'getTarget'
+getHostTargetConfig :: Action Toolchain.Target
+getHostTargetConfig = getTargetConfig hostTargetFile
+  -- where
+  --   msg = "The host's target configuration file " ++ quote hostTargetFile ++ " does not exist! ghc-toolchain might have failed to generate it."
+
+-- | Get the target's target configuration through 'getTarget'
+getTargetTargetConfig :: Action Toolchain.Target
+getTargetTargetConfig = getTargetConfig targetTargetFile
+
 newtype KeyValue = KeyValue (FilePath, String)
     deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
 type instance RuleResult KeyValue = Maybe String
@@ -87,6 +105,10 @@ newtype KeyValues = KeyValues (FilePath, String)
     deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
 type instance RuleResult KeyValues = Maybe [String]
 
+newtype TargetFile = TargetFile FilePath
+    deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+type instance RuleResult TargetFile = Toolchain.Target
+
 -- | These oracle rules are used to cache and track answers to the following
 -- queries, which are implemented by parsing text files:
 --
@@ -97,6 +119,10 @@ type instance RuleResult KeyValues = Maybe [String]
 --
 -- 2) Parsing Makefile dependency files generated by commands like @gcc -MM@:
 --    see 'lookupDependencies'.
+--
+-- 3) Parsing target files as generated by ghc-toolchain. See functions
+--    'lookupTarget' and lookupTargetConfig'
+--
 textFileOracle :: Rules ()
 textFileOracle = do
     kv <- newCache $ \file -> do
@@ -111,3 +137,27 @@ textFileOracle = do
         contents <- map words <$> readFileLines file
         return $ Map.fromList [ (key, values) | (key:values) <- contents ]
     void $ addOracleCache $ \(KeyValues (file, key)) -> Map.lookup key <$> kvs file
+
+    tf <- newCache $ \file -> do
+        need [file]
+        putVerbose $ "| TargetFile oracle: reading " ++ quote file ++ "..."
+        target <- read <$> readFile' file
+        return (target :: Toolchain.Target)
+    void $ addOracle $ \(TargetFile file) -> tf file
+
+-- ROMES:TODO: get back to this!!!!!!
+instance Eq Toolchain.Target where
+  (==) _ _ = True
+
+instance Ord Toolchain.Target where
+  (<=) _ _ = False
+instance Hashable Toolchain.Target where
+  hashWithSalt _ _ = 0
+instance Binary Toolchain.Target where
+  put _ = undefined
+  get   = undefined
+
+instance NFData Toolchain.Target where
+  rnf _ = ()
+
+


=====================================
hadrian/src/Oracles/Flag.hs
=====================================
@@ -17,6 +17,9 @@ import Hadrian.Expression
 import Base
 import Oracles.Setting
 
+import GHC.Toolchain.Target (Target(..))
+import qualified GHC.Toolchain as Toolchain
+
 data Flag = ArSupportsAtFile
           | ArSupportsDashL
           | SystemArSupportsAtFile
@@ -44,38 +47,50 @@ data Flag = ArSupportsAtFile
           | UseLibpthread
           | NeedLibatomic
 
+data FlagKey = SystemConfigKey String
+              | HostTargetKey (Toolchain.Target -> Bool)
+              | TargetTargetKey (Toolchain.Target -> Bool)
+
 -- Note, if a flag is set to empty string we treat it as set to NO. This seems
 -- fragile, but some flags do behave like this.
 flag :: Flag -> Action Bool
 flag f = do
-    let key = case f of
-            ArSupportsAtFile     -> "ar-supports-at-file"
-            ArSupportsDashL      -> "ar-supports-dash-l"
-            SystemArSupportsAtFile-> "system-ar-supports-at-file"
-            SystemArSupportsDashL-> "system-ar-supports-dash-l"
-            CrossCompiling       -> "cross-compiling"
-            CcLlvmBackend        -> "cc-llvm-backend"
-            GhcUnregisterised    -> "ghc-unregisterised"
-            TablesNextToCode     -> "tables-next-to-code"
-            GmpInTree            -> "intree-gmp"
-            GmpFrameworkPref     -> "gmp-framework-preferred"
-            LeadingUnderscore    -> "leading-underscore"
-            UseSystemFfi         -> "use-system-ffi"
-            BootstrapThreadedRts -> "bootstrap-threaded-rts"
-            BootstrapEventLoggingRts -> "bootstrap-event-logging-rts"
-            UseLibffiForAdjustors -> "use-libffi-for-adjustors"
-            UseLibdw             -> "use-lib-dw"
-            UseLibnuma           -> "use-lib-numa"
-            UseLibm              -> "use-lib-m"
-            UseLibrt             -> "use-lib-rt"
-            UseLibdl             -> "use-lib-dl"
-            UseLibbfd            -> "use-lib-bfd"
-            UseLibpthread        -> "use-lib-pthread"
-            NeedLibatomic        -> "need-libatomic"
-    value <- lookupSystemConfig key
-    when (value `notElem` ["YES", "NO", ""]) . error $ "Configuration flag "
-        ++ quote (key ++ " = " ++ value) ++ " cannot be parsed."
-    return $ value == "YES"
+    let flagkey :: FlagKey = case f of
+            ArSupportsAtFile     -> TargetTargetKey (Toolchain.arSupportsAtFile . tgtAr)
+            ArSupportsDashL      -> TargetTargetKey (Toolchain.arSupportsDashL  . tgtAr)
+            SystemArSupportsAtFile-> HostTargetKey  (Toolchain.arSupportsAtFile . tgtAr)
+            SystemArSupportsDashL-> HostTargetKey   (Toolchain.arSupportsDashL  . tgtAr)
+            CrossCompiling       -> SystemConfigKey "cross-compiling"
+            CcLlvmBackend        -> SystemConfigKey "cc-llvm-backend"
+            GhcUnregisterised    -> TargetTargetKey tgtUnregisterised
+            TablesNextToCode     -> TargetTargetKey tgtTablesNextToCode
+            GmpInTree            -> SystemConfigKey "intree-gmp"
+            GmpFrameworkPref     -> SystemConfigKey "gmp-framework-preferred"
+            LeadingUnderscore    -> TargetTargetKey tgtSymbolsHaveLeadingUnderscore
+            UseSystemFfi         -> SystemConfigKey "use-system-ffi"
+            BootstrapThreadedRts -> SystemConfigKey "bootstrap-threaded-rts"
+            BootstrapEventLoggingRts -> SystemConfigKey "bootstrap-event-logging-rts"
+            UseLibffiForAdjustors -> SystemConfigKey "use-libffi-for-adjustors"
+            UseLibdw             -> SystemConfigKey "use-lib-dw"
+            UseLibnuma           -> SystemConfigKey "use-lib-numa"
+            UseLibm              -> SystemConfigKey "use-lib-m"
+            UseLibrt             -> SystemConfigKey "use-lib-rt"
+            UseLibdl             -> SystemConfigKey "use-lib-dl"
+            UseLibbfd            -> SystemConfigKey "use-lib-bfd"
+            UseLibpthread        -> SystemConfigKey "use-lib-pthread"
+            NeedLibatomic        -> SystemConfigKey "need-libatomic"
+    case flagkey of
+      SystemConfigKey key -> do
+        value <- lookupSystemConfig key
+        when (value `notElem` ["YES", "NO", ""]) . error $ "Configuration flag "
+            ++ quote (key ++ " = " ++ value) ++ " cannot be parsed."
+        return $ value == "YES"
+      HostTargetKey key -> do
+        value <- key <$> getHostTargetConfig
+        return value
+      TargetTargetKey key -> do
+        value <- key <$> getTargetTargetConfig
+        return value
 
 -- | Get a configuration setting.
 getFlag :: Flag -> Expr c b Bool


=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -276,7 +276,7 @@ rtsPackageArgs = package rts ? do
     way            <- getWay
     path           <- getBuildPath
     top            <- expr topDirectory
-    useSystemFfi   <- expr $ flag UseSystemFfi
+    useSystemFfi   <- getFlag UseSystemFfi
     ffiIncludeDir  <- getSetting FfiIncludeDir
     ffiLibraryDir  <- getSetting FfiLibDir
     libdwIncludeDir   <- getSetting LibdwIncludeDir


=====================================
m4/ghc_toolchain.m4
=====================================
@@ -20,7 +20,9 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN],
     echo "--triple=$target" >> acargs
     echo "--cc=$CC" >> acargs
     ADD_GHC_TOOLCHAIN_ARG([cc-opt], [$CONF_CC_OPTS_STAGE1])
-    # TODO
+    # TODO (previously we had in configure script use of --traditional??)
+    # First thing disable the comment:
+    # Also, differentiatiate between hscpp and cpp?
     #echo "--cpp=$CPP" >> acargs
     ADD_GHC_TOOLCHAIN_ARG([cpp-opt], [$CONF_CPP_OPTS_STAGE1])
     echo "--cc-link=$CC" >> acargs
@@ -42,7 +44,11 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN],
         echo "--disable-unregisterised" >> acargs
     fi
 
-    # TODO: TNTC
+    if test "$TablesNextToCode" = "YES"; then
+        echo "--enable-tables-next-to-code" >> acargs
+    else
+        echo "--disable-tables-next-to-code" >> acargs
+    fi
 
     (
         set --
@@ -50,7 +56,7 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN],
             set -- "[$]@" "$arg"
         done
         ./acghc-toolchain "[$]@" || exit 1
-        python -c 'import sys; print(sys.argv)' "[$]@"
+        python3 -c 'import sys; print(sys.argv)' "[$]@"
     ) <acargs || exit 1
 
     #rm -Rf acargs acghc-toolchain actmp-ghc-toolchain


=====================================
m4/ghc_unregisterised.m4 deleted
=====================================
@@ -1,15 +0,0 @@
-# GHC_UNREGISTERISED
-# --------------------------------
-#  Do an unregisterised build?
-AC_DEFUN([GHC_UNREGISTERISED],
-[
-  FP_DEFAULT_CHOICE_OVERRIDE_CHECK(
-    [unregisterised],
-    [unregisterised],
-    [registerised],
-    [Unregisterised],
-    [Build a toolchain with the unregisterised ABI (disabled by default on platforms with registerised support)],
-    [NO],
-    [YES],
-    [no])
-])


=====================================
utils/ghc-toolchain/src/Main.hs → utils/ghc-toolchain/Main.hs
=====================================


=====================================
utils/ghc-toolchain/ghc-toolchain.cabal
=====================================
@@ -8,9 +8,9 @@ author:             Ben Gamari
 maintainer:         ben at well-typed.com
 copyright:          (c) The GHC Developers
 
-executable ghc-toolchain
-    main-is:          Main.hs
-    other-modules:    
+library
+    exposed-modules:
+                      GHC.Toolchain,
                       GHC.Toolchain.Lens,
                       GHC.Toolchain.Monad,
                       GHC.Toolchain.PlatformDetails,
@@ -40,3 +40,17 @@ executable ghc-toolchain
                       ghc-boot
     hs-source-dirs:   src
     default-language: Haskell2010
+
+executable ghc-toolchain
+    main-is:          Main.hs
+    ghc-options:      -Wall
+    default-extensions: NoImplicitPrelude
+    build-depends:    base,
+                      directory,
+                      exceptions,
+                      filepath,
+                      process,
+                      transformers,
+                      ghc-boot,
+                      ghc-toolchain
+    default-language: Haskell2010


=====================================
utils/ghc-toolchain/src/GHC/Toolchain.hs
=====================================
@@ -0,0 +1,23 @@
+module GHC.Toolchain
+  ( module GHC.Toolchain.Target
+  , module GHC.Toolchain.Tools.Ar
+  , module GHC.Toolchain.Tools.Cc
+  , module GHC.Toolchain.Tools.Cpp
+  , module GHC.Toolchain.Tools.Cxx
+  , module GHC.Toolchain.Tools.Link
+  , module GHC.Toolchain.Tools.MergeObjs
+  , module GHC.Toolchain.Tools.Nm
+  , module GHC.Toolchain.Tools.Ranlib
+  ) where
+
+import GHC.Toolchain.Target
+
+import GHC.Toolchain.Tools.Ar
+import GHC.Toolchain.Tools.Cc
+import GHC.Toolchain.Tools.Cpp
+import GHC.Toolchain.Tools.Cxx
+import GHC.Toolchain.Tools.Link
+import GHC.Toolchain.Tools.MergeObjs
+import GHC.Toolchain.Tools.Nm
+import GHC.Toolchain.Tools.Ranlib
+


=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Monad.hs
=====================================
@@ -41,7 +41,7 @@ data Env = Env { verbosity    :: Int
 
 newtype M a = M (Except.ExceptT [Error] (Reader.ReaderT Env IO) a)
     deriving (Functor, Applicative, Monad, MonadIO, Alternative,
-              -- TODO: Eliminate these instances
+              -- TODO: Eliminate these instances (ROMES: why?)
               MC.MonadThrow, MC.MonadCatch, MC.MonadMask)
 
 runM :: Env -> M a -> IO (Either [Error] a)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f02181995fcccea4e456431db8698dfd7a1309d6...3243fd3b5275a445d703c5e122ab1573ba097152

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f02181995fcccea4e456431db8698dfd7a1309d6...3243fd3b5275a445d703c5e122ab1573ba097152
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/20230505/6f72bd21/attachment-0001.html>


More information about the ghc-commits mailing list