Zubin pushed to branch wip/27532 at Glasgow Haskell Compiler / GHC
Commits:
-
6857d283
by Zubin Duggal at 2026-07-23T10:46:26+05:30
28 changed files:
- + changelog.d/27532
- compiler/GHC/Types/Unique/DFM.hs
- testsuite/tests/ghci/T16793/T16793.stdout
- testsuite/tests/ghci/T18060/T18060.stdout
- + testsuite/tests/ghci/T27532/Makefile
- + testsuite/tests/ghci/T27532/T27532.stdout
- + testsuite/tests/ghci/T27532/T27532j4.stdout
- + testsuite/tests/ghci/T27532/a.script
- + testsuite/tests/ghci/T27532/all.T
- + testsuite/tests/ghci/T27532/b.script
- + testsuite/tests/ghci/T27532/genT27532Modules
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T4175.stdout
- testsuite/tests/ghci/scripts/T8469.stdout
- testsuite/tests/ghci/scripts/T8535.stdout
- testsuite/tests/ghci/scripts/T9881.stdout
- testsuite/tests/ghci/scripts/ghci020.stdout
- testsuite/tests/ghci/scripts/ghci064.stdout
- testsuite/tests/ghci/should_run/T10145.stdout
- testsuite/tests/ghci/should_run/T18594.stdout
- testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
- testsuite/tests/roles/should_compile/Roles14.stderr
- testsuite/tests/roles/should_compile/Roles3.stderr
- testsuite/tests/roles/should_compile/Roles4.stderr
- testsuite/tests/roles/should_compile/T8958.stderr
- testsuite/tests/typecheck/should_compile/T18406b.stderr
- testsuite/tests/typecheck/should_compile/T18529.stderr
- testsuite/tests/typecheck/should_fail/T5300.stderr
Changes:
| 1 | +section: compiler
|
|
| 2 | +synopsis: Make instance ordering in :info output stable
|
|
| 3 | +description:
|
|
| 4 | + Updating an existing key in a UniqDFM no longer moves it to the end of the
|
|
| 5 | + iteration order. Previously the order of instances printed by :info depended
|
|
| 6 | + on the order in which interfaces were loaded, so it could change after
|
|
| 7 | + unrelated imports and differ between compiler builds.
|
|
| 8 | +mrs: !16385
|
|
| 9 | +issues: #27532 |
| ... | ... | @@ -91,6 +91,11 @@ import qualified GHC.Data.Word64Set as W |
| 91 | 91 | -- If the client of the map performs operations on the map in deterministic
|
| 92 | 92 | -- order then `udfmToList` returns them in deterministic order.
|
| 93 | 93 | --
|
| 94 | +-- The order does not depend on how existing entries were
|
|
| 95 | +-- updated. Updating an existing entry keeps it original position in the order
|
|
| 96 | +-- This means `alterUDFM` consistent with `addToUDFM` and `adjustUDFM`,
|
|
| 97 | +-- so that for example `alterUDFM id k = id` and `alterUDFM (fmap f) k = adjustUDFM f k`
|
|
| 98 | +--
|
|
| 94 | 99 | -- There is an implementation cost: each element is given a serial number
|
| 95 | 100 | -- as it is added, and `udfmToList` sorts its result by this serial
|
| 96 | 101 | -- number. So you should only use `UniqDFM` if you need the deterministic
|
| ... | ... | @@ -110,6 +115,14 @@ import qualified GHC.Data.Word64Set as W |
| 110 | 115 | -- every value with the insertion time that can later be used to sort the
|
| 111 | 116 | -- values when asked to convert to a list.
|
| 112 | 117 | --
|
| 118 | +-- Updating an existing key keeps the old tag. This keeps the order stable for
|
|
| 119 | +-- maps whose entries are updated many times. The instance environments are
|
|
| 120 | +-- the main example: inserting an instance updates the entry of its class in a
|
|
| 121 | +-- DNameEnv, and when updates moved keys to the end the order of instances shown
|
|
| 122 | +-- by :info depended on the order in which interfaces happened to be loaded
|
|
| 123 | +-- (#27532). Now a class keeps its place once its first instance is added, so
|
|
| 124 | +-- loading further interfaces cannot change the order.
|
|
| 125 | +--
|
|
| 113 | 126 | -- An alternative would be to have
|
| 114 | 127 | --
|
| 115 | 128 | -- data UniqDFM ele = UDFM (M.IntMap ele) [ele]
|
| ... | ... | @@ -169,11 +182,13 @@ emptyUDFM = UDFM M.empty 0 |
| 169 | 182 | unitUDFM :: Uniquable key => key -> elt -> UniqDFM key elt
|
| 170 | 183 | unitUDFM k v = UDFM (M.singleton (getKey $ getUnique k) (TaggedVal v 0)) 1
|
| 171 | 184 | |
| 172 | --- The new binding always goes to the right of existing ones
|
|
| 185 | +-- A new key goes to the right of existing ones
|
|
| 186 | +-- Overwriting an existing key keeps its position in the iteration order
|
|
| 173 | 187 | addToUDFM :: Uniquable key => UniqDFM key elt -> key -> elt -> UniqDFM key elt
|
| 174 | 188 | addToUDFM m k v = addToUDFM_Directly m (getUnique k) v
|
| 175 | 189 | |
| 176 | --- The new binding always goes to the right of existing ones
|
|
| 190 | +-- A new key goes to the right of existing ones
|
|
| 191 | +-- Overwriting an existing key keeps its position in the iteration order
|
|
| 177 | 192 | addToUDFM_Directly :: UniqDFM key elt -> Unique -> elt -> UniqDFM key elt
|
| 178 | 193 | addToUDFM_Directly (UDFM m i) u v
|
| 179 | 194 | = UDFM (MS.insertWith tf (getKey u) (TaggedVal v i) m) (i + 1)
|
| ... | ... | @@ -435,7 +450,8 @@ adjustUDFM_Directly f (UDFM m i) k = UDFM (M.adjust (fmap f) (getKey k) m) i |
| 435 | 450 | -- | The expression (@'alterUDFM' f map k@) alters value x at k, or absence
|
| 436 | 451 | -- thereof. 'alterUDFM' can be used to insert, delete, or update a value in
|
| 437 | 452 | -- UniqDFM. Use addToUDFM, delFromUDFM or adjustUDFM when possible, they are
|
| 438 | --- more efficient.
|
|
| 453 | +-- more efficient. Updating an existing key keeps its position in the
|
|
| 454 | +-- deterministic iteration order.
|
|
| 439 | 455 | --
|
| 440 | 456 | -- 'alterUDFM' is non-strict in @k@.
|
| 441 | 457 | alterUDFM
|
| ... | ... | @@ -447,16 +463,16 @@ alterUDFM |
| 447 | 463 | alterUDFM f (UDFM m i) k =
|
| 448 | 464 | UDFM (M.alter alterf (getKey $ getUnique k) m) (i + 1)
|
| 449 | 465 | where
|
| 450 | - alterf Nothing = inject $ f Nothing
|
|
| 451 | - alterf (Just (TaggedVal v _)) = inject $ f (Just v)
|
|
| 452 | - inject Nothing = Nothing
|
|
| 453 | - inject (Just v) = Just $ TaggedVal v i
|
|
| 466 | + alterf Nothing = inject i $ f Nothing
|
|
| 467 | + alterf (Just (TaggedVal v old_i)) = inject old_i $ f (Just v)
|
|
| 468 | + inject _ Nothing = Nothing
|
|
| 469 | + inject tag (Just v) = Just $ TaggedVal v tag
|
|
| 454 | 470 | |
| 455 | 471 | -- | The expression (@'upsertUDFM' f map k@) updates the value at @k@ or inserts
|
| 456 | 472 | -- a new value if @k@ is absent.
|
| 457 | 473 | --
|
| 458 | --- Like 'alterUDFM', updating an existing entry assigns it the current tag, so it
|
|
| 459 | --- becomes the newest element in deterministic iteration order.
|
|
| 474 | +-- Updating an existing entry keeps its original tag, so its position in
|
|
| 475 | +-- deterministic iteration order is unchanged and does not depend on update order.
|
|
| 460 | 476 | upsertUDFM
|
| 461 | 477 | :: Uniquable key
|
| 462 | 478 | => (Maybe elt -> elt) -- ^ How to adjust the element
|
| ... | ... | @@ -467,13 +483,14 @@ upsertUDFM f (UDFM m i) k = |
| 467 | 483 | UDFM (MS.upsert upsertf (getKey $ getUnique k) m) (i + 1)
|
| 468 | 484 | where
|
| 469 | 485 | upsertf Nothing = TaggedVal (f Nothing) i
|
| 470 | - upsertf (Just (TaggedVal v _)) = TaggedVal (f (Just v)) i
|
|
| 486 | + upsertf (Just (TaggedVal v old_i)) = TaggedVal (f (Just v)) old_i
|
|
| 471 | 487 | |
| 472 | 488 | -- | The expression (@'alterUDFM_L' f map k@) alters value @x@ at @k@, or absence
|
| 473 | 489 | -- thereof and returns the new element at @k@ if there is any.
|
| 474 | 490 | -- 'alterUDFM_L' can be used to insert, delete, or update a value in
|
| 475 | 491 | -- UniqDFM. Use addToUDFM, delFromUDFM or adjustUDFM when possible, they are
|
| 476 | --- more efficient.
|
|
| 492 | +-- more efficient. Updating an existing key keeps its position in the
|
|
| 493 | +-- deterministic iteration order.
|
|
| 477 | 494 | --
|
| 478 | 495 | -- Note, 'alterUDFM_L' is strict in @k@.
|
| 479 | 496 | alterUDFM_L
|
| ... | ... | @@ -489,10 +506,10 @@ alterUDFM_L f (UDFM m i) k = |
| 489 | 506 | (fmap taggedFst mElt, UDFM udfm (i + 1))
|
| 490 | 507 | where
|
| 491 | 508 | alterf :: Maybe (TaggedVal elt) -> (Maybe (TaggedVal elt))
|
| 492 | - alterf Nothing = inject $ f Nothing
|
|
| 493 | - alterf (Just (TaggedVal v _)) = inject $ f (Just v)
|
|
| 494 | - inject Nothing = Nothing
|
|
| 495 | - inject (Just v) = Just $ TaggedVal v i
|
|
| 509 | + alterf Nothing = inject i $ f Nothing
|
|
| 510 | + alterf (Just (TaggedVal v old_i)) = inject old_i $ f (Just v)
|
|
| 511 | + inject _ Nothing = Nothing
|
|
| 512 | + inject tag (Just v) = Just $ TaggedVal v tag
|
|
| 496 | 513 | |
| 497 | 514 | -- | Map a function over every value in a UniqDFM
|
| 498 | 515 | mapUDFM :: (elt1 -> elt2) -> UniqDFM key elt1 -> UniqDFM key elt2
|
| 1 | -instance Bounded Int -- Defined in ‘GHC.Internal.Enum’
|
|
| 1 | +instance Eq Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 2 | +instance Ord Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 2 | 3 | instance Read Int -- Defined in ‘GHC.Internal.Read’
|
| 4 | +instance Bounded Int -- Defined in ‘GHC.Internal.Enum’
|
|
| 3 | 5 | instance Enum Int -- Defined in ‘GHC.Internal.Enum’
|
| 4 | -instance Eq Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 5 | -instance Integral Int -- Defined in ‘GHC.Internal.Real’
|
|
| 6 | 6 | instance Num Int -- Defined in ‘GHC.Internal.Num’
|
| 7 | -instance Ord Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 8 | 7 | instance Real Int -- Defined in ‘GHC.Internal.Real’
|
| 9 | 8 | instance Show Int -- Defined in ‘GHC.Internal.Show’
|
| 9 | +instance Integral Int -- Defined in ‘GHC.Internal.Real’ |
| ... | ... | @@ -2,13 +2,13 @@ type (->) :: * -> * -> * |
| 2 | 2 | type (->) = FUN Many
|
| 3 | 3 | -- Defined in ‘GHC.Internal.Types’
|
| 4 | 4 | infixr -1 ->
|
| 5 | +instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 6 | +instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 7 | +instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 5 | 8 | instance Monoid b => Monoid (a -> b)
|
| 6 | 9 | -- Defined in ‘GHC.Internal.Base’
|
| 7 | 10 | instance Semigroup b => Semigroup (a -> b)
|
| 8 | 11 | -- Defined in ‘GHC.Internal.Base’
|
| 9 | -instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 10 | -instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 11 | -instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 12 | 12 | type (~) :: forall k. k -> k -> Constraint
|
| 13 | 13 | class (a ~ b) => (~) a b
|
| 14 | 14 | -- Defined in ‘GHC.Internal.Types’
|
| 1 | +TOP=../../..
|
|
| 2 | +include $(TOP)/mk/boilerplate.mk
|
|
| 3 | +include $(TOP)/mk/test.mk
|
|
| 4 | + |
|
| 5 | +.PHONY: T27532
|
|
| 6 | +T27532:
|
|
| 7 | + '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 < a.script 2>/dev/null | grep '^instance' > direct.txt
|
|
| 8 | + '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 < b.script 2>/dev/null | grep '^instance' > afterimport.txt
|
|
| 9 | + diff direct.txt afterimport.txt || true
|
|
| 10 | + |
|
| 11 | +.PHONY: T27532j4
|
|
| 12 | +T27532j4:
|
|
| 13 | + printf ':info ()\n' | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 -j4 -w M*.hs 2>/dev/null | grep '^instance' > j4_1.txt
|
|
| 14 | + printf ':info ()\n' | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 -j4 -w M*.hs 2>/dev/null | grep '^instance' > j4_2.txt
|
|
| 15 | + printf ':info ()\n' | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 -j4 -w M*.hs 2>/dev/null | grep '^instance' > j4_3.txt
|
|
| 16 | + printf ':info ()\n' | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 -j4 -w M*.hs 2>/dev/null | grep '^instance' > j4_4.txt
|
|
| 17 | + printf ':info ()\n' | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 -j4 -w M*.hs 2>/dev/null | grep '^instance' > j4_5.txt
|
|
| 18 | + printf ':info ()\n' | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -ignore-dot-ghci -v0 -j4 -w M*.hs 2>/dev/null | grep '^instance' > j4_6.txt
|
|
| 19 | + diff j4_1.txt j4_2.txt || true
|
|
| 20 | + diff j4_1.txt j4_3.txt || true
|
|
| 21 | + diff j4_1.txt j4_4.txt || true
|
|
| 22 | + diff j4_1.txt j4_5.txt || true
|
|
| 23 | + diff j4_1.txt j4_6.txt || true |
| 1 | +:info () |
| 1 | +test('T27532',
|
|
| 2 | + [extra_files(['a.script', 'b.script'])],
|
|
| 3 | + makefile_test, ['T27532'])
|
|
| 4 | + |
|
| 5 | +test('T27532j4',
|
|
| 6 | + [pre_cmd('./genT27532Modules'),
|
|
| 7 | + extra_files(['genT27532Modules']),
|
|
| 8 | + req_ghc_smp],
|
|
| 9 | + makefile_test, ['T27532j4']) |
| 1 | +import Data.Ratio
|
|
| 2 | +_ <- return $! compare (1 % 2 :: Rational) (2 % 3)
|
|
| 3 | +:info () |
| 1 | +#!/usr/bin/env bash
|
|
| 2 | +# Generate modules that each import and use a distinct instance-heavy module,
|
|
| 3 | +# so a parallel :load races many interface loads against each other.
|
|
| 4 | +gen() { f=$1; shift; printf '%s\n' "module ${f%.hs} where" "$@" > "$f"; }
|
|
| 5 | +gen M01.hs "import Data.Ratio" "v :: Rational" "v = 1 % 2" "s = show v"
|
|
| 6 | +gen M02.hs "import Data.Complex" "v :: Complex Double" "v = 1" "s = show v"
|
|
| 7 | +gen M03.hs "import Data.Fixed" "v :: Fixed E2" "v = 1" "s = show v"
|
|
| 8 | +gen M04.hs "import Foreign.C.Types" "v :: CInt" "v = 1" "s = show v" "b :: CInt" "b = maxBound"
|
|
| 9 | +gen M05.hs "import System.Posix.Types" "v :: CPid" "v = 1" "s = show v"
|
|
| 10 | +gen M06.hs "import Data.Version" "s = showVersion (makeVersion [1,2])"
|
|
| 11 | +gen M07.hs "import Control.Exception" "s = show DivideByZero" "t = show StackOverflow"
|
|
| 12 | +gen M08.hs "import Data.Dynamic" "s = show (toDyn ())"
|
|
| 13 | +gen M09.hs "import Type.Reflection" "s = show (typeRep :: TypeRep Bool)"
|
|
| 14 | +gen M10.hs "import Data.List.NonEmpty (NonEmpty(..))" "s = show (1 :| ([2,3] :: [Int]))"
|
|
| 15 | +gen M11.hs "import Data.Ord" "s = show (Down (3 :: Int))" "c = compare (Down 1) (Down (2 :: Int))"
|
|
| 16 | +gen M12.hs "import Data.Functor.Identity" "s = show (Identity (1 :: Int))"
|
|
| 17 | +gen M13.hs "import Data.Functor.Const" "s = show (Const (1 :: Int) :: Const Int Bool)"
|
|
| 18 | +gen M14.hs "import Data.Functor.Compose" "s = show (Compose (Just (Just (1 :: Int))))"
|
|
| 19 | +gen M15.hs "import Data.Functor.Product" "s = show (Pair (Just (1 :: Int)) (Just (2 :: Int)))"
|
|
| 20 | +gen M16.hs "import Data.Functor.Sum" "s = show (InL (Just (1 :: Int)) :: Sum Maybe Maybe Int)"
|
|
| 21 | +gen M17.hs "import Data.Monoid" "s = show (Sum (1 :: Int) <> Sum 2)" "a = show (All True)"
|
|
| 22 | +gen M18.hs "import Data.Semigroup" "s = show (Min (1 :: Int) <> Min 2)"
|
|
| 23 | +gen M19.hs "import Text.Printf" "s = printf \"%d\" (1 :: Int) :: String"
|
|
| 24 | +gen M20.hs "import Numeric.Natural" "s = show (5 :: Natural)" "v :: Natural" "v = 2 + 3"
|
|
| 25 | +gen M21.hs "import Foreign.Ptr" "s = show nullPtr"
|
|
| 26 | +gen M22.hs "import System.IO" "s = show stdout" "e = show stderr"
|
|
| 27 | +gen M23.hs "import Data.IORef" "v :: IO (IORef Int)" "v = newIORef 1"
|
|
| 28 | +gen M24.hs "import Data.Bits" "v = xor (1 :: Int) 2" "s = show v"
|
|
| 29 | +for f in M??.hs; do
|
|
| 30 | + n=${f#M}; n=${n%.hs}
|
|
| 31 | + m=$(printf 'M%02d' $((10#$n + 24)))
|
|
| 32 | + sed "s/module M$n/module $m/" "$f" > "$m.hs"
|
|
| 33 | +done |
| 1 | 1 | type Unit :: *
|
| 2 | 2 | data Unit = ()
|
| 3 | 3 | -- Defined in ‘GHC.Internal.Tuple’
|
| 4 | +instance Eq Unit -- Defined in ‘GHC.Internal.Classes’
|
|
| 4 | 5 | instance Monoid Unit -- Defined in ‘GHC.Internal.Base’
|
| 6 | +instance Ord Unit -- Defined in ‘GHC.Internal.Classes’
|
|
| 5 | 7 | instance Semigroup Unit -- Defined in ‘GHC.Internal.Base’
|
| 6 | -instance Bounded Unit -- Defined in ‘GHC.Internal.Enum’
|
|
| 7 | 8 | instance Read Unit -- Defined in ‘GHC.Internal.Read’
|
| 9 | +instance Bounded Unit -- Defined in ‘GHC.Internal.Enum’
|
|
| 8 | 10 | instance Enum Unit -- Defined in ‘GHC.Internal.Enum’
|
| 9 | -instance Eq Unit -- Defined in ‘GHC.Internal.Classes’
|
|
| 10 | -instance Ord Unit -- Defined in ‘GHC.Internal.Classes’
|
|
| 11 | 11 | instance Show Unit -- Defined in ‘GHC.Internal.Show’
|
| 12 | 12 | type Unit# :: GHC.Internal.Types.ZeroBitType
|
| 13 | 13 | data Unit# = (##)
|
| ... | ... | @@ -15,23 +15,23 @@ data Unit# = (##) |
| 15 | 15 | type Solo :: * -> *
|
| 16 | 16 | data Solo a = MkSolo a
|
| 17 | 17 | -- Defined in ‘GHC.Internal.Tuple’
|
| 18 | -instance Traversable Solo
|
|
| 19 | - -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 20 | 18 | instance Applicative Solo -- Defined in ‘GHC.Internal.Base’
|
| 21 | -instance Foldable Solo -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 19 | +instance Eq a => Eq (Solo a) -- Defined in ‘GHC.Internal.Classes’
|
|
| 22 | 20 | instance Functor Solo -- Defined in ‘GHC.Internal.Base’
|
| 23 | 21 | instance Monad Solo -- Defined in ‘GHC.Internal.Base’
|
| 22 | +instance Monoid a => Monoid (Solo a)
|
|
| 23 | + -- Defined in ‘GHC.Internal.Base’
|
|
| 24 | +instance Ord a => Ord (Solo a) -- Defined in ‘GHC.Internal.Classes’
|
|
| 25 | +instance Semigroup a => Semigroup (Solo a)
|
|
| 26 | + -- Defined in ‘GHC.Internal.Base’
|
|
| 24 | 27 | instance Read a => Read (Solo a) -- Defined in ‘GHC.Internal.Read’
|
| 25 | 28 | instance Bounded a => Bounded (Solo a)
|
| 26 | 29 | -- Defined in ‘GHC.Internal.Enum’
|
| 27 | 30 | instance Enum a => Enum (Solo a) -- Defined in ‘GHC.Internal.Enum’
|
| 28 | -instance Ord a => Ord (Solo a) -- Defined in ‘GHC.Internal.Classes’
|
|
| 29 | 31 | instance Show a => Show (Solo a) -- Defined in ‘GHC.Internal.Show’
|
| 30 | -instance Eq a => Eq (Solo a) -- Defined in ‘GHC.Internal.Classes’
|
|
| 31 | -instance Monoid a => Monoid (Solo a)
|
|
| 32 | - -- Defined in ‘GHC.Internal.Base’
|
|
| 33 | -instance Semigroup a => Semigroup (Solo a)
|
|
| 34 | - -- Defined in ‘GHC.Internal.Base’
|
|
| 32 | +instance Foldable Solo -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 33 | +instance Traversable Solo
|
|
| 34 | + -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 35 | 35 | () :: Unit
|
| 36 | 36 | (##) :: Unit#
|
| 37 | 37 | ( ) :: Unit
|
| ... | ... | @@ -39,29 +39,29 @@ instance Semigroup a => Semigroup (Solo a) |
| 39 | 39 | type Tuple2 :: * -> * -> *
|
| 40 | 40 | data Tuple2 a b = (,) a b
|
| 41 | 41 | -- Defined in ‘GHC.Internal.Tuple’
|
| 42 | -instance Traversable (Tuple2 a)
|
|
| 43 | - -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 44 | 42 | instance Monoid a => Applicative (Tuple2 a)
|
| 45 | 43 | -- Defined in ‘GHC.Internal.Base’
|
| 46 | -instance Foldable (Tuple2 a)
|
|
| 47 | - -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 44 | +instance (Eq a, Eq b) => Eq (Tuple2 a b)
|
|
| 45 | + -- Defined in ‘GHC.Internal.Classes’
|
|
| 48 | 46 | instance Functor (Tuple2 a) -- Defined in ‘GHC.Internal.Base’
|
| 49 | 47 | instance Monoid a => Monad (Tuple2 a)
|
| 50 | 48 | -- Defined in ‘GHC.Internal.Base’
|
| 51 | 49 | instance (Monoid a, Monoid b) => Monoid (Tuple2 a b)
|
| 52 | 50 | -- Defined in ‘GHC.Internal.Base’
|
| 53 | -instance (Semigroup a, Semigroup b) => Semigroup (Tuple2 a b)
|
|
| 54 | - -- Defined in ‘GHC.Internal.Base’
|
|
| 55 | -instance (Bounded a, Bounded b) => Bounded (Tuple2 a b)
|
|
| 56 | - -- Defined in ‘GHC.Internal.Enum’
|
|
| 57 | 51 | instance (Ord a, Ord b) => Ord (Tuple2 a b)
|
| 58 | 52 | -- Defined in ‘GHC.Internal.Classes’
|
| 53 | +instance (Semigroup a, Semigroup b) => Semigroup (Tuple2 a b)
|
|
| 54 | + -- Defined in ‘GHC.Internal.Base’
|
|
| 59 | 55 | instance (Read a, Read b) => Read (Tuple2 a b)
|
| 60 | 56 | -- Defined in ‘GHC.Internal.Read’
|
| 57 | +instance (Bounded a, Bounded b) => Bounded (Tuple2 a b)
|
|
| 58 | + -- Defined in ‘GHC.Internal.Enum’
|
|
| 61 | 59 | instance (Show a, Show b) => Show (Tuple2 a b)
|
| 62 | 60 | -- Defined in ‘GHC.Internal.Show’
|
| 63 | -instance (Eq a, Eq b) => Eq (Tuple2 a b)
|
|
| 64 | - -- Defined in ‘GHC.Internal.Classes’
|
|
| 61 | +instance Foldable (Tuple2 a)
|
|
| 62 | + -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 63 | +instance Traversable (Tuple2 a)
|
|
| 64 | + -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 65 | 65 | type Tuple2# :: *
|
| 66 | 66 | -> *
|
| 67 | 67 | -> TYPE
|
| ... | ... | @@ -26,52 +26,52 @@ type Unit :: * |
| 26 | 26 | data Unit = ()
|
| 27 | 27 | -- Defined in ‘GHC.Internal.Tuple’
|
| 28 | 28 | instance [safe] C () -- Defined at T4175.hs:22:10
|
| 29 | +instance Eq () -- Defined in ‘GHC.Internal.Classes’
|
|
| 29 | 30 | instance Monoid () -- Defined in ‘GHC.Internal.Base’
|
| 31 | +instance Ord () -- Defined in ‘GHC.Internal.Classes’
|
|
| 30 | 32 | instance Semigroup () -- Defined in ‘GHC.Internal.Base’
|
| 33 | +instance Read () -- Defined in ‘GHC.Internal.Read’
|
|
| 31 | 34 | instance Bounded () -- Defined in ‘GHC.Internal.Enum’
|
| 32 | 35 | instance Enum () -- Defined in ‘GHC.Internal.Enum’
|
| 33 | -instance Ord () -- Defined in ‘GHC.Internal.Classes’
|
|
| 34 | -instance Read () -- Defined in ‘GHC.Internal.Read’
|
|
| 35 | 36 | instance Show () -- Defined in ‘GHC.Internal.Show’
|
| 36 | -instance Eq () -- Defined in ‘GHC.Internal.Classes’
|
|
| 37 | 37 | data instance B () = MkB -- Defined at T4175.hs:14:15
|
| 38 | 38 | type instance D Int () = String -- Defined at T4175.hs:20:10
|
| 39 | 39 | type instance D () () = Bool -- Defined at T4175.hs:23:10
|
| 40 | 40 | type Maybe :: * -> *
|
| 41 | 41 | data Maybe a = Nothing | Just a
|
| 42 | 42 | -- Defined in ‘GHC.Internal.Maybe’
|
| 43 | -instance Traversable Maybe
|
|
| 44 | - -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 45 | -instance MonadFail Maybe
|
|
| 46 | - -- Defined in ‘GHC.Internal.Control.Monad.Fail’
|
|
| 47 | 43 | instance Applicative Maybe -- Defined in ‘GHC.Internal.Base’
|
| 48 | -instance Foldable Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 44 | +instance [safe] Eq a => Eq (Maybe a)
|
|
| 45 | + -- Defined in ‘GHC.Internal.Maybe’
|
|
| 49 | 46 | instance Functor Maybe -- Defined in ‘GHC.Internal.Base’
|
| 50 | 47 | instance Monad Maybe -- Defined in ‘GHC.Internal.Base’
|
| 51 | 48 | instance Semigroup a => Monoid (Maybe a)
|
| 52 | 49 | -- Defined in ‘GHC.Internal.Base’
|
| 53 | -instance Semigroup a => Semigroup (Maybe a)
|
|
| 54 | - -- Defined in ‘GHC.Internal.Base’
|
|
| 55 | 50 | instance [safe] Ord a => Ord (Maybe a)
|
| 56 | 51 | -- Defined in ‘GHC.Internal.Maybe’
|
| 52 | +instance Semigroup a => Semigroup (Maybe a)
|
|
| 53 | + -- Defined in ‘GHC.Internal.Base’
|
|
| 57 | 54 | instance Read a => Read (Maybe a) -- Defined in ‘GHC.Internal.Read’
|
| 58 | 55 | instance Show a => Show (Maybe a) -- Defined in ‘GHC.Internal.Show’
|
| 59 | -instance [safe] Eq a => Eq (Maybe a)
|
|
| 60 | - -- Defined in ‘GHC.Internal.Maybe’
|
|
| 56 | +instance MonadFail Maybe
|
|
| 57 | + -- Defined in ‘GHC.Internal.Control.Monad.Fail’
|
|
| 58 | +instance Foldable Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 59 | +instance Traversable Maybe
|
|
| 60 | + -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 61 | 61 | type instance A (Maybe a) a = a -- Defined at T4175.hs:10:15
|
| 62 | 62 | type Int :: *
|
| 63 | 63 | data Int = GHC.Internal.Types.I# GHC.Internal.Prim.Int#
|
| 64 | 64 | -- Defined in ‘GHC.Internal.Types’
|
| 65 | 65 | instance [safe] C Int -- Defined at T4175.hs:19:10
|
| 66 | +instance Eq Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 67 | +instance Ord Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 68 | +instance Read Int -- Defined in ‘GHC.Internal.Read’
|
|
| 66 | 69 | instance Bounded Int -- Defined in ‘GHC.Internal.Enum’
|
| 67 | 70 | instance Enum Int -- Defined in ‘GHC.Internal.Enum’
|
| 68 | -instance Integral Int -- Defined in ‘GHC.Internal.Real’
|
|
| 69 | 71 | instance Num Int -- Defined in ‘GHC.Internal.Num’
|
| 70 | -instance Ord Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 71 | -instance Read Int -- Defined in ‘GHC.Internal.Read’
|
|
| 72 | 72 | instance Real Int -- Defined in ‘GHC.Internal.Real’
|
| 73 | 73 | instance Show Int -- Defined in ‘GHC.Internal.Show’
|
| 74 | -instance Eq Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 74 | +instance Integral Int -- Defined in ‘GHC.Internal.Real’
|
|
| 75 | 75 | type instance A Int Int = () -- Defined at T4175.hs:9:15
|
| 76 | 76 | type instance D Int () = String -- Defined at T4175.hs:20:10
|
| 77 | 77 | type Z :: * -> Constraint
|
| 1 | 1 | type Int :: *
|
| 2 | 2 | data Int = GHC.Internal.Types.I# GHC.Internal.Prim.Int#
|
| 3 | 3 | -- Defined in ‘GHC.Internal.Types’
|
| 4 | -instance Bounded Int -- Defined in ‘GHC.Internal.Enum’
|
|
| 4 | +instance Eq Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 5 | +instance Ord Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 5 | 6 | instance Read Int -- Defined in ‘GHC.Internal.Read’
|
| 7 | +instance Bounded Int -- Defined in ‘GHC.Internal.Enum’
|
|
| 6 | 8 | instance Enum Int -- Defined in ‘GHC.Internal.Enum’
|
| 7 | -instance Eq Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 8 | -instance Integral Int -- Defined in ‘GHC.Internal.Real’
|
|
| 9 | 9 | instance Num Int -- Defined in ‘GHC.Internal.Num’
|
| 10 | -instance Ord Int -- Defined in ‘GHC.Internal.Classes’
|
|
| 11 | 10 | instance Real Int -- Defined in ‘GHC.Internal.Real’
|
| 12 | 11 | instance Show Int -- Defined in ‘GHC.Internal.Show’
|
| 12 | +instance Integral Int -- Defined in ‘GHC.Internal.Real’ |
| ... | ... | @@ -2,10 +2,10 @@ type (->) :: * -> * -> * |
| 2 | 2 | type (->) = FUN Many
|
| 3 | 3 | -- Defined in ‘GHC.Internal.Types’
|
| 4 | 4 | infixr -1 ->
|
| 5 | +instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 6 | +instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 7 | +instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 5 | 8 | instance Monoid b => Monoid (a -> b)
|
| 6 | 9 | -- Defined in ‘GHC.Internal.Base’
|
| 7 | 10 | instance Semigroup b => Semigroup (a -> b)
|
| 8 | 11 | -- Defined in ‘GHC.Internal.Base’ |
| 9 | -instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 10 | -instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 11 | -instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’ |
| ... | ... | @@ -4,16 +4,16 @@ data Data.ByteString.Lazy.ByteString |
| 4 | 4 | | Data.ByteString.Lazy.Internal.Chunk {-# UNPACK #-} !StrictByteString
|
| 5 | 5 | Data.ByteString.Lazy.ByteString
|
| 6 | 6 | -- Defined in ‘Data.ByteString.Lazy.Internal’
|
| 7 | +instance Eq Data.ByteString.Lazy.ByteString
|
|
| 8 | + -- Defined in ‘Data.ByteString.Lazy.Internal’
|
|
| 7 | 9 | instance Monoid Data.ByteString.Lazy.ByteString
|
| 8 | 10 | -- Defined in ‘Data.ByteString.Lazy.Internal’
|
| 11 | +instance Ord Data.ByteString.Lazy.ByteString
|
|
| 12 | + -- Defined in ‘Data.ByteString.Lazy.Internal’
|
|
| 9 | 13 | instance Semigroup Data.ByteString.Lazy.ByteString
|
| 10 | 14 | -- Defined in ‘Data.ByteString.Lazy.Internal’
|
| 11 | 15 | instance Read Data.ByteString.Lazy.ByteString
|
| 12 | 16 | -- Defined in ‘Data.ByteString.Lazy.Internal’
|
| 13 | -instance Eq Data.ByteString.Lazy.ByteString
|
|
| 14 | - -- Defined in ‘Data.ByteString.Lazy.Internal’
|
|
| 15 | -instance Ord Data.ByteString.Lazy.ByteString
|
|
| 16 | - -- Defined in ‘Data.ByteString.Lazy.Internal’
|
|
| 17 | 17 | instance Show Data.ByteString.Lazy.ByteString
|
| 18 | 18 | -- Defined in ‘Data.ByteString.Lazy.Internal’
|
| 19 | 19 | |
| ... | ... | @@ -23,15 +23,15 @@ data Data.ByteString.ByteString |
| 23 | 23 | GHC.Internal.Word.Word8)
|
| 24 | 24 | {-# UNPACK #-} !Int
|
| 25 | 25 | -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
| 26 | +instance Eq Data.ByteString.ByteString
|
|
| 27 | + -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
|
| 26 | 28 | instance Monoid Data.ByteString.ByteString
|
| 27 | 29 | -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
| 30 | +instance Ord Data.ByteString.ByteString
|
|
| 31 | + -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
|
| 28 | 32 | instance Semigroup Data.ByteString.ByteString
|
| 29 | 33 | -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
| 30 | 34 | instance Read Data.ByteString.ByteString
|
| 31 | 35 | -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
| 32 | -instance Eq Data.ByteString.ByteString
|
|
| 33 | - -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
|
| 34 | -instance Ord Data.ByteString.ByteString
|
|
| 35 | - -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’
|
|
| 36 | 36 | instance Show Data.ByteString.ByteString
|
| 37 | 37 | -- Defined in ‘bytestring-0.12.2.0:Data.ByteString.Internal.Type’ |
| ... | ... | @@ -2,10 +2,10 @@ type (->) :: * -> * -> * |
| 2 | 2 | type (->) = FUN Many
|
| 3 | 3 | -- Defined in ‘GHC.Internal.Types’
|
| 4 | 4 | infixr -1 ->
|
| 5 | +instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 6 | +instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 7 | +instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 5 | 8 | instance Monoid b => Monoid (a -> b)
|
| 6 | 9 | -- Defined in ‘GHC.Internal.Base’
|
| 7 | 10 | instance Semigroup b => Semigroup (a -> b)
|
| 8 | 11 | -- Defined in ‘GHC.Internal.Base’ |
| 9 | -instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 10 | -instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 11 | -instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’ |
| 1 | -instance Foldable Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 2 | -instance Traversable Maybe
|
|
| 3 | - -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 4 | 1 | instance GHC.Internal.Base.Alternative Maybe
|
| 5 | 2 | -- Defined in ‘GHC.Internal.Base’
|
| 6 | 3 | instance Applicative Maybe -- Defined in ‘GHC.Internal.Base’
|
| 7 | 4 | instance Functor Maybe -- Defined in ‘GHC.Internal.Base’
|
| 8 | -instance MonadFail Maybe
|
|
| 9 | - -- Defined in ‘GHC.Internal.Control.Monad.Fail’
|
|
| 5 | +instance Monad Maybe -- Defined in ‘GHC.Internal.Base’
|
|
| 10 | 6 | instance GHC.Internal.Base.MonadPlus Maybe
|
| 11 | 7 | -- Defined in ‘GHC.Internal.Base’
|
| 12 | -instance Monad Maybe -- Defined in ‘GHC.Internal.Base’
|
|
| 8 | +instance MonadFail Maybe
|
|
| 9 | + -- Defined in ‘GHC.Internal.Control.Monad.Fail’
|
|
| 10 | +instance Foldable Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
|
|
| 11 | +instance Traversable Maybe
|
|
| 12 | + -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 13 | +instance [safe] Eq w => Eq (Maybe w)
|
|
| 14 | + -- Defined in ‘GHC.Internal.Maybe’
|
|
| 13 | 15 | instance Semigroup w => Monoid (Maybe w)
|
| 14 | 16 | -- Defined in ‘GHC.Internal.Base’
|
| 15 | -instance Read w => Read (Maybe w) -- Defined in ‘GHC.Internal.Read’
|
|
| 16 | -instance Semigroup w => Semigroup (Maybe w)
|
|
| 17 | - -- Defined in ‘GHC.Internal.Base’
|
|
| 18 | 17 | instance [safe] Ord w => Ord (Maybe w)
|
| 19 | 18 | -- Defined in ‘GHC.Internal.Maybe’
|
| 19 | +instance Semigroup w => Semigroup (Maybe w)
|
|
| 20 | + -- Defined in ‘GHC.Internal.Base’
|
|
| 21 | +instance Read w => Read (Maybe w) -- Defined in ‘GHC.Internal.Read’
|
|
| 20 | 22 | instance Show w => Show (Maybe w) -- Defined in ‘GHC.Internal.Show’
|
| 21 | -instance [safe] Eq w => Eq (Maybe w)
|
|
| 22 | - -- Defined in ‘GHC.Internal.Maybe’
|
|
| 23 | -instance Read w => Read [w] -- Defined in ‘GHC.Internal.Read’
|
|
| 24 | -instance Ord w => Ord [w] -- Defined in ‘GHC.Internal.Classes’
|
|
| 25 | -instance Show w => Show [w] -- Defined in ‘GHC.Internal.Show’
|
|
| 26 | 23 | instance Eq w => Eq [w] -- Defined in ‘GHC.Internal.Classes’
|
| 27 | 24 | instance Monoid [w] -- Defined in ‘GHC.Internal.Base’
|
| 25 | +instance Ord w => Ord [w] -- Defined in ‘GHC.Internal.Classes’
|
|
| 28 | 26 | instance Semigroup [w] -- Defined in ‘GHC.Internal.Base’
|
| 27 | +instance Read w => Read [w] -- Defined in ‘GHC.Internal.Read’
|
|
| 28 | +instance Show w => Show [w] -- Defined in ‘GHC.Internal.Show’
|
|
| 29 | 29 | instance [safe] MyShow w => MyShow [w]
|
| 30 | 30 | -- Defined at ghci064.hs:8:10
|
| 31 | 31 | instance Monoid [T] -- Defined in ‘GHC.Internal.Base’
|
| 32 | 32 | instance Semigroup [T] -- Defined in ‘GHC.Internal.Base’
|
| 33 | 33 | instance [safe] MyShow [T] -- Defined at ghci064.hs:16:10
|
| 34 | 34 | instance [safe] MyShow [T] -- Defined at ghci064.hs:8:10
|
| 35 | -instance GHC.Internal.Foreign.Storable.Storable Bool
|
|
| 36 | - -- Defined in ‘GHC.Internal.Foreign.Storable’
|
|
| 37 | -instance GHC.Internal.Bits.Bits Bool
|
|
| 38 | - -- Defined in ‘GHC.Internal.Bits’
|
|
| 35 | +instance Eq Bool -- Defined in ‘GHC.Internal.Classes’
|
|
| 36 | +instance Ord Bool -- Defined in ‘GHC.Internal.Classes’
|
|
| 37 | +instance Read Bool -- Defined in ‘GHC.Internal.Read’
|
|
| 39 | 38 | instance Bounded Bool -- Defined in ‘GHC.Internal.Enum’
|
| 40 | 39 | instance Enum Bool -- Defined in ‘GHC.Internal.Enum’
|
| 40 | +instance Show Bool -- Defined in ‘GHC.Internal.Show’
|
|
| 41 | +instance GHC.Internal.Ix.Ix Bool -- Defined in ‘GHC.Internal.Ix’
|
|
| 42 | +instance GHC.Internal.Bits.Bits Bool
|
|
| 43 | + -- Defined in ‘GHC.Internal.Bits’
|
|
| 41 | 44 | instance GHC.Internal.Bits.FiniteBits Bool
|
| 42 | 45 | -- Defined in ‘GHC.Internal.Bits’
|
| 43 | -instance GHC.Internal.Ix.Ix Bool -- Defined in ‘GHC.Internal.Ix’
|
|
| 44 | -instance Ord Bool -- Defined in ‘GHC.Internal.Classes’
|
|
| 45 | -instance Read Bool -- Defined in ‘GHC.Internal.Read’
|
|
| 46 | -instance Show Bool -- Defined in ‘GHC.Internal.Show’
|
|
| 47 | -instance Eq Bool -- Defined in ‘GHC.Internal.Classes’
|
|
| 48 | -instance Traversable ((,) Int)
|
|
| 49 | - -- Defined in ‘GHC.Internal.Data.Traversable’
|
|
| 46 | +instance GHC.Internal.Foreign.Storable.Storable Bool
|
|
| 47 | + -- Defined in ‘GHC.Internal.Foreign.Storable’
|
|
| 48 | +instance Functor ((,) Int) -- Defined in ‘GHC.Internal.Base’
|
|
| 50 | 49 | instance Foldable ((,) Int)
|
| 51 | 50 | -- Defined in ‘GHC.Internal.Data.Foldable’
|
| 52 | -instance Functor ((,) Int) -- Defined in ‘GHC.Internal.Base’ |
|
| 51 | +instance Traversable ((,) Int)
|
|
| 52 | + -- Defined in ‘GHC.Internal.Data.Traversable’ |
| ... | ... | @@ -2,10 +2,10 @@ type (->) :: * -> * -> * |
| 2 | 2 | type (->) = FUN Many
|
| 3 | 3 | -- Defined in ‘GHC.Internal.Types’
|
| 4 | 4 | infixr -1 ->
|
| 5 | +instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 6 | +instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 7 | +instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 5 | 8 | instance Monoid b => Monoid (a -> b)
|
| 6 | 9 | -- Defined in ‘GHC.Internal.Base’
|
| 7 | 10 | instance Semigroup b => Semigroup (a -> b)
|
| 8 | 11 | -- Defined in ‘GHC.Internal.Base’ |
| 9 | -instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 10 | -instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 11 | -instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’ |
| ... | ... | @@ -2,13 +2,13 @@ type (->) :: * -> * -> * |
| 2 | 2 | type (->) = FUN Many
|
| 3 | 3 | -- Defined in ‘GHC.Internal.Types’
|
| 4 | 4 | infixr -1 ->
|
| 5 | +instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 6 | +instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 7 | +instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 5 | 8 | instance Monoid b => Monoid (a -> b)
|
| 6 | 9 | -- Defined in ‘GHC.Internal.Base’
|
| 7 | 10 | instance Semigroup b => Semigroup (a -> b)
|
| 8 | 11 | -- Defined in ‘GHC.Internal.Base’
|
| 9 | -instance Applicative ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 10 | -instance Functor ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 11 | -instance Monad ((->) r) -- Defined in ‘GHC.Internal.Base’
|
|
| 12 | 12 | type Constraint :: *
|
| 13 | 13 | type Constraint = CONSTRAINT LiftedRep
|
| 14 | 14 | -- Defined in ‘GHC.Internal.Types’
|
| ... | ... | @@ -21,7 +21,7 @@ TYPE SIGNATURES |
| 21 | 21 | (>>) :: forall {m :: * -> *} {a} {b}. Monad m => m a -> m b -> m b
|
| 22 | 22 | (>>=) ::
|
| 23 | 23 | forall {m :: * -> *} {a} {b}. Monad m => m a -> (a -> m b) -> m b
|
| 24 | - (^) :: forall {b} {a}. (Integral b, Num a) => a -> b -> a
|
|
| 24 | + (^) :: forall {a} {b}. (Num a, Integral b) => a -> b -> a
|
|
| 25 | 25 | (^^) :: forall {a} {b}. (Fractional a, Integral b) => a -> b -> a
|
| 26 | 26 | abs :: forall {a}. Num a => a -> a
|
| 27 | 27 | acos :: forall {a}. Floating a => a -> a
|
| ... | ... | @@ -236,4 +236,4 @@ TYPE SIGNATURES |
| 236 | 236 | (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
|
| 237 | 237 | (||) :: Bool -> Bool -> Bool
|
| 238 | 238 | Dependent modules: []
|
| 239 | -Dependent packages: [(normal, base-4.21.0.0)] |
|
| 239 | +Dependent packages: [(normal, base-4.23.0.0)] |
| ... | ... | @@ -4,7 +4,7 @@ TYPE CONSTRUCTORS |
| 4 | 4 | class C2{1} :: * -> Constraint
|
| 5 | 5 | roles representational
|
| 6 | 6 | Dependent modules: []
|
| 7 | -Dependent packages: [(normal, base-4.22.0.0)]
|
|
| 7 | +Dependent packages: [(normal, base-4.23.0.0)]
|
|
| 8 | 8 | |
| 9 | 9 | ==================== Typechecker ====================
|
| 10 | 10 | Roles12.$tcC2 [InlPrag=[~]]
|
| ... | ... | @@ -15,14 +15,14 @@ Roles12.$tc'C:C2 [InlPrag=[~]] |
| 15 | 15 | = GHC.Internal.Types.TyCon
|
| 16 | 16 | 7087988437584478859#Word64 11477953550142401435#Word64
|
| 17 | 17 | Roles12.$trModule (GHC.Internal.Types.TrNameS "'C:C2"#) 1# $krep
|
| 18 | -$krep [InlPrag=[~]]
|
|
| 19 | - = GHC.Internal.Types.KindRepTyConApp Roles12.$tcC2 ((:) $krep [])
|
|
| 20 | 18 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 0
|
| 21 | 19 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| 22 | 20 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| 23 | 21 | $krep [InlPrag=[~]]
|
| 24 | 22 | = GHC.Internal.Types.KindRepFun
|
| 25 | 23 | GHC.Internal.Types.krep$* GHC.Internal.Types.krep$Constraint
|
| 24 | +$krep [InlPrag=[~]]
|
|
| 25 | + = GHC.Internal.Types.KindRepTyConApp Roles12.$tcC2 ((:) $krep [])
|
|
| 26 | 26 | Roles12.$trModule [InlPrag=[~]]
|
| 27 | 27 | = GHC.Internal.Types.Module
|
| 28 | 28 | (GHC.Internal.Types.TrNameS "main"#)
|
| ... | ... | @@ -16,7 +16,7 @@ TYPE CONSTRUCTORS |
| 16 | 16 | roles nominal
|
| 17 | 17 | type synonym Syn2{1} :: * -> *
|
| 18 | 18 | Dependent modules: []
|
| 19 | -Dependent packages: [(normal, base-4.22.0.0)]
|
|
| 19 | +Dependent packages: [(normal, base-4.23.0.0)]
|
|
| 20 | 20 | |
| 21 | 21 | ==================== Typechecker ====================
|
| 22 | 22 | Roles3.$tcC4 [InlPrag=[~]]
|
| ... | ... | @@ -43,15 +43,6 @@ Roles3.$tc'C:C1 [InlPrag=[~]] |
| 43 | 43 | = GHC.Internal.Types.TyCon
|
| 44 | 44 | 4508088879886988796#Word64 13962145553903222779#Word64
|
| 45 | 45 | Roles3.$trModule (GHC.Internal.Types.TrNameS "'C:C1"#) 1# $krep
|
| 46 | -$krep [InlPrag=[~]]
|
|
| 47 | - = GHC.Internal.Types.KindRepTyConApp
|
|
| 48 | - GHC.Internal.Types.$tc~
|
|
| 49 | - ((:) GHC.Internal.Types.krep$* ((:) $krep ((:) $krep [])))
|
|
| 50 | -$krep [InlPrag=[~]]
|
|
| 51 | - = GHC.Internal.Types.KindRepTyConApp
|
|
| 52 | - Roles3.$tcC2 ((:) $krep ((:) $krep []))
|
|
| 53 | -$krep [InlPrag=[~]]
|
|
| 54 | - = GHC.Internal.Types.KindRepTyConApp Roles3.$tcC1 ((:) $krep [])
|
|
| 55 | 46 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 0
|
| 56 | 47 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 1
|
| 57 | 48 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| ... | ... | @@ -64,6 +55,15 @@ $krep [InlPrag=[~]] |
| 64 | 55 | = GHC.Internal.Types.KindRepFun
|
| 65 | 56 | GHC.Internal.Types.krep$* GHC.Internal.Types.krep$Constraint
|
| 66 | 57 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| 58 | +$krep [InlPrag=[~]]
|
|
| 59 | + = GHC.Internal.Types.KindRepTyConApp
|
|
| 60 | + GHC.Internal.Types.$tc~
|
|
| 61 | + ((:) GHC.Internal.Types.krep$* ((:) $krep ((:) $krep [])))
|
|
| 62 | +$krep [InlPrag=[~]]
|
|
| 63 | + = GHC.Internal.Types.KindRepTyConApp
|
|
| 64 | + Roles3.$tcC2 ((:) $krep ((:) $krep []))
|
|
| 65 | +$krep [InlPrag=[~]]
|
|
| 66 | + = GHC.Internal.Types.KindRepTyConApp Roles3.$tcC1 ((:) $krep [])
|
|
| 67 | 67 | Roles3.$trModule [InlPrag=[~]]
|
| 68 | 68 | = GHC.Internal.Types.Module
|
| 69 | 69 | (GHC.Internal.Types.TrNameS "main"#)
|
| ... | ... | @@ -6,7 +6,7 @@ TYPE CONSTRUCTORS |
| 6 | 6 | class C3{1} :: * -> Constraint
|
| 7 | 7 | type synonym Syn1{1} :: * -> *
|
| 8 | 8 | Dependent modules: []
|
| 9 | -Dependent packages: [(normal, base-4.22.0.0)]
|
|
| 9 | +Dependent packages: [(normal, base-4.23.0.0)]
|
|
| 10 | 10 | |
| 11 | 11 | ==================== Typechecker ====================
|
| 12 | 12 | Roles4.$tcC3 [InlPrag=[~]]
|
| ... | ... | @@ -25,10 +25,6 @@ Roles4.$tc'C:C1 [InlPrag=[~]] |
| 25 | 25 | = GHC.Internal.Types.TyCon
|
| 26 | 26 | 3870707671502302648#Word64 10631907186261837450#Word64
|
| 27 | 27 | Roles4.$trModule (GHC.Internal.Types.TrNameS "'C:C1"#) 1# $krep
|
| 28 | -$krep [InlPrag=[~]]
|
|
| 29 | - = GHC.Internal.Types.KindRepTyConApp Roles4.$tcC3 ((:) $krep [])
|
|
| 30 | -$krep [InlPrag=[~]]
|
|
| 31 | - = GHC.Internal.Types.KindRepTyConApp Roles4.$tcC1 ((:) $krep [])
|
|
| 32 | 28 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 0
|
| 33 | 29 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| 34 | 30 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| ... | ... | @@ -40,6 +36,10 @@ $krep [InlPrag=[~]] |
| 40 | 36 | $krep [InlPrag=[~]]
|
| 41 | 37 | = GHC.Internal.Types.KindRepTyConApp
|
| 42 | 38 | GHC.Internal.Types.$tcList ((:) $krep [])
|
| 39 | +$krep [InlPrag=[~]]
|
|
| 40 | + = GHC.Internal.Types.KindRepTyConApp Roles4.$tcC3 ((:) $krep [])
|
|
| 41 | +$krep [InlPrag=[~]]
|
|
| 42 | + = GHC.Internal.Types.KindRepTyConApp Roles4.$tcC1 ((:) $krep [])
|
|
| 43 | 43 | Roles4.$trModule [InlPrag=[~]]
|
| 44 | 44 | = GHC.Internal.Types.Module
|
| 45 | 45 | (GHC.Internal.Types.TrNameS "main"#)
|
| ... | ... | @@ -18,7 +18,7 @@ CLASS INSTANCES |
| 18 | 18 | instance [incoherent] Representational a
|
| 19 | 19 | -- Defined at T8958.hs:11:10
|
| 20 | 20 | Dependent modules: []
|
| 21 | -Dependent packages: [(normal, base-4.22.0.0)]
|
|
| 21 | +Dependent packages: [(normal, base-4.23.0.0)]
|
|
| 22 | 22 | |
| 23 | 23 | ==================== Typechecker ====================
|
| 24 | 24 | T8958.$tcMap [InlPrag=[~]]
|
| ... | ... | @@ -50,10 +50,10 @@ T8958.$tc'C:Nominal [InlPrag=[~]] |
| 50 | 50 | T8958.$trModule (GHC.Internal.Types.TrNameS "'C:Nominal"#) 1# $krep
|
| 51 | 51 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 0
|
| 52 | 52 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 1
|
| 53 | -$krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
|
| 54 | 53 | $krep [InlPrag=[~]]
|
| 55 | 54 | = GHC.Internal.Types.KindRepFun
|
| 56 | 55 | GHC.Internal.Types.krep$* GHC.Internal.Types.krep$Constraint
|
| 56 | +$krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
|
| 57 | 57 | $krep [InlPrag=[~]]
|
| 58 | 58 | = GHC.Internal.Types.KindRepTyConApp
|
| 59 | 59 | GHC.Internal.Tuple.$tcTuple2
|
| ... | ... | @@ -4,7 +4,7 @@ TYPE SIGNATURES |
| 4 | 4 | TYPE CONSTRUCTORS
|
| 5 | 5 | class C{2} :: * -> * -> Constraint
|
| 6 | 6 | Dependent modules: []
|
| 7 | -Dependent packages: [(normal, base-4.22.0.0)]
|
|
| 7 | +Dependent packages: [(normal, base-4.23.0.0)]
|
|
| 8 | 8 | |
| 9 | 9 | ==================== Typechecker ====================
|
| 10 | 10 | Bug.$tcC [InlPrag=[~]]
|
| ... | ... | @@ -15,13 +15,6 @@ Bug.$tc'C:C [InlPrag=[~]] |
| 15 | 15 | = GHC.Internal.Types.TyCon
|
| 16 | 16 | 302756782745842909#Word64 14248103394115774781#Word64 Bug.$trModule
|
| 17 | 17 | (GHC.Internal.Types.TrNameS "'C:C"#) 2# $krep
|
| 18 | -$krep [InlPrag=[~]]
|
|
| 19 | - = GHC.Internal.Types.KindRepTyConApp
|
|
| 20 | - Bug.$tcC
|
|
| 21 | - ((:) @GHC.Internal.Types.KindRep
|
|
| 22 | - $krep
|
|
| 23 | - ((:) @GHC.Internal.Types.KindRep
|
|
| 24 | - $krep [] @GHC.Internal.Types.KindRep))
|
|
| 25 | 18 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 0
|
| 26 | 19 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 1
|
| 27 | 20 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| ... | ... | @@ -31,6 +24,13 @@ $krep [InlPrag=[~]] |
| 31 | 24 | $krep [InlPrag=[~]]
|
| 32 | 25 | = GHC.Internal.Types.KindRepFun
|
| 33 | 26 | GHC.Internal.Types.krep$* GHC.Internal.Types.krep$Constraint
|
| 27 | +$krep [InlPrag=[~]]
|
|
| 28 | + = GHC.Internal.Types.KindRepTyConApp
|
|
| 29 | + Bug.$tcC
|
|
| 30 | + ((:) @GHC.Internal.Types.KindRep
|
|
| 31 | + $krep
|
|
| 32 | + ((:) @GHC.Internal.Types.KindRep
|
|
| 33 | + $krep [] @GHC.Internal.Types.KindRep))
|
|
| 34 | 34 | Bug.$trModule [InlPrag=[~]]
|
| 35 | 35 | = GHC.Internal.Types.Module
|
| 36 | 36 | (GHC.Internal.Types.TrNameS "main"#)
|
| ... | ... | @@ -4,7 +4,7 @@ TYPE SIGNATURES |
| 4 | 4 | TYPE CONSTRUCTORS
|
| 5 | 5 | class C{2} :: * -> * -> Constraint
|
| 6 | 6 | Dependent modules: []
|
| 7 | -Dependent packages: [(normal, base-4.22.0.0)]
|
|
| 7 | +Dependent packages: [(normal, base-4.23.0.0)]
|
|
| 8 | 8 | |
| 9 | 9 | ==================== Typechecker ====================
|
| 10 | 10 | Bug.$tcC [InlPrag=[~]]
|
| ... | ... | @@ -15,13 +15,6 @@ Bug.$tc'C:C [InlPrag=[~]] |
| 15 | 15 | = GHC.Internal.Types.TyCon
|
| 16 | 16 | 302756782745842909#Word64 14248103394115774781#Word64 Bug.$trModule
|
| 17 | 17 | (GHC.Internal.Types.TrNameS "'C:C"#) 2# $krep
|
| 18 | -$krep [InlPrag=[~]]
|
|
| 19 | - = GHC.Internal.Types.KindRepTyConApp
|
|
| 20 | - Bug.$tcC
|
|
| 21 | - ((:) @GHC.Internal.Types.KindRep
|
|
| 22 | - $krep
|
|
| 23 | - ((:) @GHC.Internal.Types.KindRep
|
|
| 24 | - $krep [] @GHC.Internal.Types.KindRep))
|
|
| 25 | 18 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 0
|
| 26 | 19 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepVar 1
|
| 27 | 20 | $krep [InlPrag=[~]] = GHC.Internal.Types.KindRepFun $krep $krep
|
| ... | ... | @@ -35,6 +28,13 @@ $krep [InlPrag=[~]] |
| 35 | 28 | $krep [InlPrag=[~]]
|
| 36 | 29 | = GHC.Internal.Types.KindRepTyConApp
|
| 37 | 30 | GHC.Internal.Tuple.$tcUnit [] @GHC.Internal.Types.KindRep
|
| 31 | +$krep [InlPrag=[~]]
|
|
| 32 | + = GHC.Internal.Types.KindRepTyConApp
|
|
| 33 | + Bug.$tcC
|
|
| 34 | + ((:) @GHC.Internal.Types.KindRep
|
|
| 35 | + $krep
|
|
| 36 | + ((:) @GHC.Internal.Types.KindRep
|
|
| 37 | + $krep [] @GHC.Internal.Types.KindRep))
|
|
| 38 | 38 | Bug.$trModule [InlPrag=[~]]
|
| 39 | 39 | = GHC.Internal.Types.Module
|
| 40 | 40 | (GHC.Internal.Types.TrNameS "main"#)
|
| 1 | - |
|
| 2 | 1 | T5300.hs:12:7: error: [GHC-39999]
|
| 3 | 2 | • Could not deduce ‘C1 a b c0’
|
| 4 | 3 | from the context: (Monad m, C1 a b c)
|
| ... | ... | @@ -14,16 +13,17 @@ T5300.hs:12:7: error: [GHC-39999] |
| 14 | 13 | f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
|
| 15 | 14 | |
| 16 | 15 | T5300.hs:15:7: error: [GHC-39999]
|
| 17 | - • Could not deduce ‘C1 a1 b1 c10’
|
|
| 16 | + • Could not deduce ‘C2 a2 b2 c20’
|
|
| 18 | 17 | from the context: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2)
|
| 19 | 18 | bound by the type signature for:
|
| 20 | 19 | f2 :: forall (m :: * -> *) a1 b1 c1 a2 b2 c2.
|
| 21 | 20 | (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
|
| 22 | 21 | a1 -> StateT (T b2) m a2
|
| 23 | 22 | at T5300.hs:15:7-69
|
| 24 | - The type variable ‘c10’ is ambiguous
|
|
| 23 | + The type variable ‘c20’ is ambiguous
|
|
| 25 | 24 | • In the ambiguity check for ‘f2’
|
| 26 | 25 | To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
|
| 27 | 26 | In the type signature:
|
| 28 | 27 | f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
|
| 29 | 28 | a1 -> StateT (T b2) m a2
|
| 29 | + |