[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Fix behaviour of -keep-tmp-files when used in OPTIONS_GHC pragma

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Jun 9 19:50:46 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
a24b83dd by Matthew Pickering at 2023-06-09T15:19:00-04:00
Fix behaviour of -keep-tmp-files when used in OPTIONS_GHC pragma

This fixes the behaviour of -keep-tmp-files when used in an OPTIONS_GHC
pragma for files with module level scope.

Instead of simple not deleting the files, we also need to remove them
from the TmpFs so they are not deleted later on when all the other files
are deleted.

There are additional complications because you also need to remove the
directory where these files live from the TmpFs so we don't try to
delete those later either.

I added two tests.

1. Tests simply that -keep-tmp-files works at all with a single module
   and --make mode.
2. The other tests that temporary files are deleted for other modules
   which don't enable -keep-tmp-files.

Fixes #23339

- - - - -
dcf32882 by Matthew Pickering at 2023-06-09T15:19:00-04:00
withDeferredDiagnostics: When debugIsOn, write landmine into IORef to catch use-after-free.

Ticket #23305 reports an error where we were attempting to use the
logger which was created by withDeferredDiagnostics after its scope had
ended.

This problem would have been caught by this patch and a validate build:

```
+*** Exception: Use after free
+CallStack (from HasCallStack):
+  error, called at compiler/GHC/Driver/Make.hs:<line>:<column> in <package-id>:GHC.Driver.Make
```

This general issue is tracked by #20981

- - - - -
432c736c by Matthew Pickering at 2023-06-09T15:19:00-04:00
Don't return complete HscEnv from upsweep

By returning a complete HscEnv from upsweep the logger (as introduced by
withDeferredDiagnostics) was escaping the scope of
withDeferredDiagnostics and hence we were losing error messages.

This is reminiscent of #20981, which also talks about writing errors
into messages after their scope has ended.

See #23305 for details.

- - - - -
26013cdc by Alexander McKenna at 2023-06-09T15:19:41-04:00
Dump `SpecConstr` specialisations separately

Introduce a `-ddump-spec-constr` flag which debugs specialisations from
`SpecConstr`. These are no longer shown when you use `-ddump-spec`.

- - - - -
d5adbbe4 by Matthew Pickering at 2023-06-09T15:50:34-04:00
Add role annotations to SNat, SSymbol and SChar

Ticket #23454 explained it was possible to implement unsafeCoerce
because SNat was lacking a role annotation.

As these are supposed to be singleton types but backed by an efficient
representation the correct annotation is nominal to ensure these kinds
of coerces are forbidden.

These annotations were missed from https://github.com/haskell/core-libraries-committee/issues/85
which was implemented in 532de36870ed9e880d5f146a478453701e9db25d.

CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/170

Fixes #23454

- - - - -
d46dbc57 by Matthew Pickering at 2023-06-09T15:50:34-04:00
Remove non-existant bytearray-ops.txt.pp file from ghc.cabal.in

This broke the sdist generation.

Fixes #23489

- - - - -
7204d3f8 by David Binder at 2023-06-09T15:50:37-04:00
Regression test T13438 is no longer marked as "expect_broken" in the testsuite driver.

- - - - -


25 changed files:

- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Utils/TmpFs.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/debugging.rst
- libraries/base/GHC/TypeLits.hs
- libraries/base/GHC/TypeNats.hs
- libraries/base/changelog.md
- + libraries/base/tests/T23454.hs
- + libraries/base/tests/T23454.stderr
- libraries/base/tests/all.T
- testsuite/tests/driver/Makefile
- + testsuite/tests/driver/T23339.hs
- + testsuite/tests/driver/T23339.stdout
- + testsuite/tests/driver/T23339B.hs
- + testsuite/tests/driver/T23339B.stdout
- testsuite/tests/driver/all.T
- testsuite/tests/ghci/prog018/prog018.stdout
- testsuite/tests/ghci/scripts/T9181.stdout
- testsuite/tests/overloadedrecflds/ghci/T13438.script
- testsuite/tests/overloadedrecflds/ghci/T13438.stdout
- testsuite/tests/overloadedrecflds/ghci/all.T


Changes:

=====================================
compiler/GHC/Driver/Config/Core/Lint.hs
=====================================
@@ -87,7 +87,7 @@ coreDumpFlag (CoreDoDemand {})        = Just Opt_D_dump_stranal
 coreDumpFlag CoreDoCpr                = Just Opt_D_dump_cpranal
 coreDumpFlag CoreDoWorkerWrapper      = Just Opt_D_dump_worker_wrapper
 coreDumpFlag CoreDoSpecialising       = Just Opt_D_dump_spec
-coreDumpFlag CoreDoSpecConstr         = Just Opt_D_dump_spec
+coreDumpFlag CoreDoSpecConstr         = Just Opt_D_dump_spec_constr
 coreDumpFlag CoreCSE                  = Just Opt_D_dump_cse
 coreDumpFlag CoreDesugar              = Just Opt_D_dump_ds_preopt
 coreDumpFlag CoreDesugarOpt           = Just Opt_D_dump_ds


=====================================
compiler/GHC/Driver/Flags.hs
=====================================
@@ -107,6 +107,7 @@ data DumpFlag
    | Opt_D_dump_simpl
    | Opt_D_dump_simpl_iterations
    | Opt_D_dump_spec
+   | Opt_D_dump_spec_constr
    | Opt_D_dump_prep
    | Opt_D_dump_late_cc
    | Opt_D_dump_stg_from_core -- ^ Initial STG (CoreToStg output)


=====================================
compiler/GHC/Driver/Make.hs
=====================================
@@ -782,16 +782,14 @@ load' mhmi_cache how_much diag_wrapper mHscMessage mod_graph = do
     worker_limit <- liftIO $ mkWorkerLimit dflags
 
     setSession $ hscUpdateHUG (unitEnv_map pruneHomeUnitEnv) hsc_env
-    (upsweep_ok, hsc_env1) <- withDeferredDiagnostics $ do
+    (upsweep_ok, new_deps) <- withDeferredDiagnostics $ do
       hsc_env <- getSession
       liftIO $ upsweep worker_limit hsc_env mhmi_cache diag_wrapper mHscMessage (toCache pruned_cache) build_plan
-    setSession hsc_env1
+    modifySession (addDepsToHscEnv new_deps)
     case upsweep_ok of
       Failed -> loadFinish upsweep_ok
       Succeeded -> do
           liftIO $ debugTraceMsg logger 2 (text "Upsweep completely successful.")
-          -- Clean up after ourselves
-          liftIO $ cleanCurrentModuleTempFilesMaybe logger (hsc_tmpfs hsc_env1) dflags
           loadFinish upsweep_ok
 
 
@@ -1262,14 +1260,13 @@ upsweep
     -> Maybe Messager
     -> M.Map ModNodeKeyWithUid HomeModInfo
     -> [BuildPlan]
-    -> IO (SuccessFlag, HscEnv)
+    -> IO (SuccessFlag, [HomeModInfo])
 upsweep n_jobs hsc_env hmi_cache diag_wrapper mHscMessage old_hpt build_plan = do
     (cycle, pipelines, collect_result) <- interpretBuildPlan (hsc_HUG hsc_env) hmi_cache old_hpt build_plan
     runPipelines n_jobs hsc_env diag_wrapper mHscMessage pipelines
     res <- collect_result
 
     let completed = [m | Just (Just m) <- res]
-    let hsc_env' = addDepsToHscEnv completed hsc_env
 
     -- Handle any cycle in the original compilation graph and return the result
     -- of the upsweep.
@@ -1277,10 +1274,10 @@ upsweep n_jobs hsc_env hmi_cache diag_wrapper mHscMessage old_hpt build_plan = d
         Just mss -> do
           let logger = hsc_logger hsc_env
           liftIO $ fatalErrorMsg logger (cyclicModuleErr mss)
-          return (Failed, hsc_env)
+          return (Failed, [])
         Nothing  -> do
           let success_flag = successIf (all isJust res)
-          return (success_flag, hsc_env')
+          return (success_flag, completed)
 
 toCache :: [HomeModInfo] -> M.Map (ModNodeKeyWithUid) HomeModInfo
 toCache hmis = M.fromList ([(miKey $ hm_iface hmi, hmi) | hmi <- hmis])
@@ -2345,18 +2342,21 @@ withDeferredDiagnostics f = do
           let action = logMsg logger msgClass srcSpan msg
           case msgClass of
             MCDiagnostic SevWarning _reason _code
-              -> atomicModifyIORef' warnings $ \i -> (action: i, ())
+              -> atomicModifyIORef' warnings $ \(!i) -> (action: i, ())
             MCDiagnostic SevError _reason _code
-              -> atomicModifyIORef' errors   $ \i -> (action: i, ())
+              -> atomicModifyIORef' errors   $ \(!i) -> (action: i, ())
             MCFatal
-              -> atomicModifyIORef' fatals   $ \i -> (action: i, ())
+              -> atomicModifyIORef' fatals   $ \(!i) -> (action: i, ())
             _ -> action
 
         printDeferredDiagnostics = liftIO $
           forM_ [warnings, errors, fatals] $ \ref -> do
             -- This IORef can leak when the dflags leaks, so let us always
-            -- reset the content.
-            actions <- atomicModifyIORef' ref $ \i -> ([], i)
+            -- reset the content. The lazy variant is used here as we want to force
+            -- this error if the IORef is ever accessed again, rather than now.
+            -- See #20981 for an issue which discusses this general issue.
+            let landmine = if debugIsOn then panic "withDeferredDiagnostics: use after free" else []
+            actions <- atomicModifyIORef ref $ \i -> (landmine, i)
             sequence_ $ reverse actions
 
     MC.bracket
@@ -2432,8 +2432,9 @@ cyclicModuleErr mss
 
 cleanCurrentModuleTempFilesMaybe :: MonadIO m => Logger -> TmpFs -> DynFlags -> m ()
 cleanCurrentModuleTempFilesMaybe logger tmpfs dflags =
-  unless (gopt Opt_KeepTmpFiles dflags) $
-    liftIO $ cleanCurrentModuleTempFiles logger tmpfs
+  if gopt Opt_KeepTmpFiles dflags
+    then liftIO $ keepCurrentModuleTempFiles logger tmpfs
+    else liftIO $ cleanCurrentModuleTempFiles logger tmpfs
 
 
 addDepsToHscEnv ::  [HomeModInfo] -> HscEnv -> HscEnv


=====================================
compiler/GHC/Driver/Session.hs
=====================================
@@ -1425,6 +1425,8 @@ dynamic_flags_deps = [
       (setDumpFlag Opt_D_dump_simpl_iterations)
   , make_ord_flag defGhcFlag "ddump-spec"
         (setDumpFlag Opt_D_dump_spec)
+  , make_ord_flag defGhcFlag "ddump-spec-constr"
+        (setDumpFlag Opt_D_dump_spec_constr)
   , make_ord_flag defGhcFlag "ddump-prep"
         (setDumpFlag Opt_D_dump_prep)
   , make_ord_flag defGhcFlag "ddump-late-cc"


=====================================
compiler/GHC/Utils/TmpFs.hs
=====================================
@@ -13,6 +13,7 @@ module GHC.Utils.TmpFs
     , cleanTempDirs
     , cleanTempFiles
     , cleanCurrentModuleTempFiles
+    , keepCurrentModuleTempFiles
     , addFilesToClean
     , changeTempFilesLifetime
     , newTempName
@@ -172,6 +173,32 @@ cleanTempFiles logger tmpfs
                   , Set.toList cm_paths ++ Set.toList gs_paths)
       remove to_delete
 
+-- | Keep all the paths in @tmp_files_to_clean@ and @tmp_subdirs_to_clean@
+-- that have lifetime TFL_CurrentModule. This function is used when `-keep-tmp-files` is
+-- used in an OPTIONS_GHC pragma.
+-- This function removes the temporary file from the TmpFs so we no longer remove
+-- it at the env when cleanTempFiles is called.
+keepCurrentModuleTempFiles :: HasCallStack => Logger -> TmpFs -> IO ()
+keepCurrentModuleTempFiles logger tmpfs
+   = mask_
+   $ do to_keep_files <- keep  (tmp_files_to_clean tmpfs)
+        to_keep_subdirs <- keep  (tmp_subdirs_to_clean tmpfs)
+        -- Remove any folders which contain any files we want to keep from the
+        -- directories we are tracking. A new temporary directory will be created
+        -- the next time a temporary file is needed (by perhaps another module).
+        keepDirs (to_keep_files ++ to_keep_subdirs) (tmp_dirs_to_clean tmpfs)
+  where
+    keepDirs keeps ref = do
+      let keep_dirs = Set.fromList (map takeDirectory keeps)
+      atomicModifyIORef' ref  $ \m -> (Map.filter (\fp -> fp `Set.notMember` keep_dirs) m, ())
+
+    keep ref = do
+        to_keep <- atomicModifyIORef' ref $
+            \ptc at PathsToClean{ptcCurrentModule = cm_paths} ->
+                (ptc {ptcCurrentModule = Set.empty}, Set.toList cm_paths)
+        debugTraceMsg logger 2 (text "Keeping:" <+> hsep (map text to_keep))
+        return to_keep
+
 -- | Delete all paths in @tmp_files_to_clean@ and @tmp_subdirs_to_clean@
 -- That have lifetime TFL_CurrentModule.
 -- If a file must be cleaned eventually, but must survive a


=====================================
compiler/ghc.cabal.in
=====================================
@@ -25,7 +25,6 @@ Build-Type: Custom
 
 extra-source-files:
     GHC/Builtin/primops.txt.pp
-    GHC/Builtin/bytearray-ops.txt.pp
     Unique.h
     CodeGen.Platform.h
     -- Shared with rts via hard-link at configure time. This is safer


=====================================
docs/users_guide/9.8.1-notes.rst
=====================================
@@ -128,6 +128,10 @@ Compiler
 
   GHC used to accept the contradictory ``Int~Bool`` in the type signature, but reject the ``Int~Bool`` constraint that arises from typechecking the definition itself.  Now it accepts both.  More details in `GHC ticket #23413 <https://gitlab.haskell.org/ghc/ghc/-/issues/23413>`_, which gives examples of the previous inconsistency.  GHC now implements the "PermissivePlan" described in that ticket.
 
+- The `-ddump-spec` flag has been split into `-ddump-spec` and
+  `-ddump-spec-constr`, allowing only output from the typeclass specialiser or
+  `SpecConstr` to be seen if desired.
+
 GHCi
 ~~~~
 


=====================================
docs/users_guide/debugging.rst
=====================================
@@ -324,7 +324,15 @@ subexpression elimination pass.
     :shortdesc: Dump specialiser output
     :type: dynamic
 
-    Dump output of specialisation pass
+    Dump output of typeclass specialisation pass
+
+.. ghc-flag:: -ddump-spec-constr
+    :shortdesc: Dump specialiser output from SpecConstr
+    :type: dynamic
+
+    :since: 9.8.1
+
+    Dump output of the SpecConstr specialisation pass
 
 .. ghc-flag:: -ddump-rules
     :shortdesc: Dump rewrite rules


=====================================
libraries/base/GHC/TypeLits.hs
=====================================
@@ -15,6 +15,7 @@
 {-# LANGUAGE PatternSynonyms #-}
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE RoleAnnotations #-}
 
 {-|
 GHC's @DataKinds@ language extension lifts data constructors, natural
@@ -340,6 +341,7 @@ withSomeSNat n k
 --
 -- @since 4.18.0.0
 newtype SSymbol (s :: Symbol) = UnsafeSSymbol String
+type role SSymbol nominal
 
 -- | A explicitly bidirectional pattern synonym relating an 'SSymbol' to a
 -- 'KnownSymbol' constraint.
@@ -442,6 +444,7 @@ withSomeSSymbol s k = k (UnsafeSSymbol s)
 --
 -- @since 4.18.0.0
 newtype SChar (s :: Char) = UnsafeSChar Char
+type role SChar nominal
 
 -- | A explicitly bidirectional pattern synonym relating an 'SChar' to a
 -- 'KnownChar' constraint.


=====================================
libraries/base/GHC/TypeNats.hs
=====================================
@@ -16,6 +16,7 @@
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE PatternSynonyms #-}
 {-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE RoleAnnotations #-}
 
 {-| This module is an internal GHC module.  It declares the constants used
 in the implementation of type-level natural numbers.  The programmer interface
@@ -344,6 +345,7 @@ cmpNat x y = case compare (natVal x) (natVal y) of
 --
 -- @since 4.18.0.0
 newtype SNat (n :: Nat) = UnsafeSNat Natural
+type role SNat nominal
 
 -- | A explicitly bidirectional pattern synonym relating an 'SNat' to a
 -- 'KnownNat' constraint.


=====================================
libraries/base/changelog.md
=====================================
@@ -32,6 +32,7 @@
   * Make `(&)` representation polymorphic in the return type ([CLC proposal #158](https://github.com/haskell/core-libraries-committee/issues/158))
   * Implement `GHC.IORef.atomicSwapIORef` via a new dedicated primop `atomicSwapMutVar#` ([CLC proposal #139](https://github.com/haskell/core-libraries-committee/issues/139))
   * Change codebuffers to use an unboxed implementation, while providing a compatibility layer using pattern synonyms. ([CLC proposal #134](https://github.com/haskell/core-libraries-committee/issues/134))
+  * Add nominal role annotations to SNat/SSymbol/SChar ([CLC proposal #170](https://github.com/haskell/core-libraries-committee/issues/170))
 
 ## 4.18.0.0 *March 2023*
   * Shipped with GHC 9.6.1


=====================================
libraries/base/tests/T23454.hs
=====================================
@@ -0,0 +1,27 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+
+module T23454 where
+
+import Data.Coerce (coerce)
+import Data.Kind (Type)
+import Data.Type.Equality
+import GHC.TypeNats
+
+bogus :: forall a b . KnownNat a => a :~: b
+bogus = case testEquality (SNat @a) (coerce (SNat @a) :: SNat b) of
+          Just r  -> r
+          Nothing -> error "bug fixed"
+
+type G :: Nat -> Type -> Type -> Type
+type family G n s t where
+  G 0 s _ = s
+  G _ _ t = t
+
+newtype N n s t = MkN { unN :: G n s t }
+
+oops :: forall b s t . N 0 s t -> N b s t
+oops x = gcastWith (bogus @0 @b) x
+
+unsafeCoerce :: s -> t
+unsafeCoerce x = unN (oops @1 (MkN x))


=====================================
libraries/base/tests/T23454.stderr
=====================================
@@ -0,0 +1,21 @@
+
+T23454.hs:12:38: error: [GHC-25897]
+    • Couldn't match type ‘a’ with ‘b’ arising from a use of ‘coerce’
+      ‘a’ is a rigid type variable bound by
+        the type signature for:
+          bogus :: forall (a :: Nat) (b :: Nat). KnownNat a => a :~: b
+        at T23454.hs:11:1-43
+      ‘b’ is a rigid type variable bound by
+        the type signature for:
+          bogus :: forall (a :: Nat) (b :: Nat). KnownNat a => a :~: b
+        at T23454.hs:11:1-43
+    • In the second argument of ‘testEquality’, namely
+        ‘(coerce (SNat @a) :: SNat b)’
+      In the expression:
+        testEquality (SNat @a) (coerce (SNat @a) :: SNat b)
+      In the expression:
+        case testEquality (SNat @a) (coerce (SNat @a) :: SNat b) of
+          Just r -> r
+          Nothing -> error "bug fixed"
+    • Relevant bindings include
+        bogus :: a :~: b (bound at T23454.hs:12:1)


=====================================
libraries/base/tests/all.T
=====================================
@@ -300,3 +300,4 @@ test('listThreads1', normal, compile_and_run, [''])
 test('inits1tails1', normal, compile_and_run, [''])
 test('CLC149', normal, compile, [''])
 test('AtomicSwapIORef', normal, compile_and_run, [''])
+test('T23454', normal, compile_fail, [''])


=====================================
testsuite/tests/driver/Makefile
=====================================
@@ -792,4 +792,21 @@ T22669:
 	! test -f T22669.o-boot
 
 
+T23339:
+	$(RM) T23339.hi
+	$(RM) T23339$(OBJSUFFIX)
+	$(RM) -rf "$(PWD)/tmp"
+	mkdir -p tmp
+	"$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339.hs
+	find . -name "*.c" -exec cat {} \; | grep "init__ip_init"
+
+T23339B:
+	$(RM) T23339.hi
+	$(RM) T23339$(OBJSUFFIX)
+	$(RM) -rf "$(PWD)/tmp"
+	mkdir -p tmp
+	"$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map
+	# Check that the file is kept and is the right one
+	find . -name "*.c" -exec cat {} \; | grep "init__ip_init"
+
 


=====================================
testsuite/tests/driver/T23339.hs
=====================================
@@ -0,0 +1,4 @@
+{-# OPTIONS_GHC -keep-tmp-files -finfo-table-map #-}
+module T23339 where
+
+defn = id "T23339"


=====================================
testsuite/tests/driver/T23339.stdout
=====================================
@@ -0,0 +1 @@
+void T23339_init__ip_init (void)


=====================================
testsuite/tests/driver/T23339B.hs
=====================================
@@ -0,0 +1,5 @@
+module T23339B where
+
+import T23339
+
+qux = id "abc"


=====================================
testsuite/tests/driver/T23339B.stdout
=====================================
@@ -0,0 +1 @@
+void T23339_init__ip_init (void)


=====================================
testsuite/tests/driver/all.T
=====================================
@@ -320,3 +320,5 @@ test('T22044', normal, makefile_test, [])
 test('T22048', [only_ways(['normal']), grep_errmsg("_rule")], compile, ["-O -fomit-interface-pragmas -ddump-simpl"])
 test('T21722', normal, compile_fail, ['-fno-show-error-context'])
 test('T22669', js_skip, makefile_test, [])
+test('T23339', js_skip, makefile_test, [])
+test('T23339B', [extra_files(['T23339.hs']), js_skip], makefile_test, [])


=====================================
testsuite/tests/ghci/prog018/prog018.stdout
=====================================
@@ -19,4 +19,7 @@ C.hs:6:7: error: [GHC-88464]
     Variable not in scope: variableNotInScope :: ()
 Failed, two modules loaded.
 [3 of 3] Compiling C                ( C.hs, interpreted )
+
+C.hs:6:7: error: [GHC-88464]
+    Variable not in scope: variableNotInScope :: ()
 Failed, two modules loaded.


=====================================
testsuite/tests/ghci/scripts/T9181.stdout
=====================================
@@ -18,12 +18,12 @@ type GHC.TypeLits.NatToChar :: GHC.Num.Natural.Natural -> Char
 type family GHC.TypeLits.NatToChar a
 pattern GHC.TypeLits.SChar
   :: () => GHC.TypeLits.KnownChar c => GHC.TypeLits.SChar c
-type role GHC.TypeLits.SChar phantom
+type role GHC.TypeLits.SChar nominal
 type GHC.TypeLits.SChar :: Char -> *
 newtype GHC.TypeLits.SChar s = GHC.TypeLits.UnsafeSChar Char
 pattern GHC.TypeLits.SSymbol
   :: () => GHC.TypeLits.KnownSymbol s => GHC.TypeLits.SSymbol s
-type role GHC.TypeLits.SSymbol phantom
+type role GHC.TypeLits.SSymbol nominal
 type GHC.TypeLits.SSymbol :: GHC.Types.Symbol -> *
 newtype GHC.TypeLits.SSymbol s = GHC.TypeLits.UnsafeSSymbol String
 type GHC.TypeLits.SomeChar :: *
@@ -166,7 +166,7 @@ data Data.Type.Ord.OrderingI a b where
                        Data.Type.Ord.OrderingI a b
 pattern GHC.TypeNats.SNat
   :: () => GHC.TypeNats.KnownNat n => GHC.TypeNats.SNat n
-type role GHC.TypeNats.SNat phantom
+type role GHC.TypeNats.SNat nominal
 type GHC.TypeNats.SNat :: GHC.TypeNats.Nat -> *
 newtype GHC.TypeNats.SNat n
   = GHC.TypeNats.UnsafeSNat GHC.Num.Natural.Natural


=====================================
testsuite/tests/overloadedrecflds/ghci/T13438.script
=====================================
@@ -1,5 +1,3 @@
 :l T13438.hs
 :browse! T13438
 :browse T13438
-:ctags
-:!cat tags


=====================================
testsuite/tests/overloadedrecflds/ghci/T13438.stdout
=====================================
@@ -5,6 +5,3 @@ MkT :: Int -> T
 foo :: T -> Int
 type T :: *
 data T = MkT {foo :: Int}
-foo	T13438.hs	3;"	v	file:
-MkT	T13438.hs	3;"	d
-T	T13438.hs	3;"	t


=====================================
testsuite/tests/overloadedrecflds/ghci/all.T
=====================================
@@ -1,6 +1,6 @@
 test('duplicaterecfldsghci01', combined_output, ghci_script, ['duplicaterecfldsghci01.script'])
 test('overloadedlabelsghci01', combined_output, ghci_script, ['overloadedlabelsghci01.script'])
-test('T13438', [expect_broken(13438), combined_output], ghci_script, ['T13438.script'])
+test('T13438', combined_output, ghci_script, ['T13438.script'])
 test('GHCiDRF', [extra_files(['GHCiDRF.hs']), combined_output], ghci_script, ['GHCiDRF.script'])
 test('T19322', combined_output, ghci_script, ['T19322.script'])
 test('T19314', combined_output, ghci_script, ['T19314.script'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e5dd14da021928830d0861907bf6369016f02795...7204d3f8c305e4569df9e3421fa2bff1ec8805b1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e5dd14da021928830d0861907bf6369016f02795...7204d3f8c305e4569df9e3421fa2bff1ec8805b1
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/20230609/9442e6c3/attachment-0001.html>


More information about the ghc-commits mailing list