[Git][ghc/ghc][wip/jeltsch/textual-bytecode-output] 2 commits: Correct the `emsdk` test output name suffix
by Wolfgang Jeltsch (@jeltsch) 07 Aug '26
by Wolfgang Jeltsch (@jeltsch) 07 Aug '26
07 Aug '26
Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC
Commits:
7eb4a415 by Wolfgang Jeltsch at 2026-08-07T12:48:06+03:00
Correct the `emsdk` test output name suffix
- - - - -
d922982b by Wolfgang Jeltsch at 2026-08-07T13:02:45+03:00
Disable HPC test for `emsdk`
- - - - -
4 changed files:
- testsuite/tests/show-bytecode/all.T
- testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-wasi → testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-javascript-unknown-ghcjs
- − testsuite/tests/show-bytecode/show-bytecode-hpc.stdout-wasi
- testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-wasi → testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-javascript-unknown-ghcjs
Changes:
=====================================
testsuite/tests/show-bytecode/all.T
=====================================
@@ -12,7 +12,7 @@ test(
)
test(
'show-bytecode-hpc',
- extra_files(['Example.hs', 'normalize']),
+ [js_skip, extra_files(['Example.hs', 'normalize'])],
makefile_test,
[]
)
=====================================
testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-wasi → testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-javascript-unknown-ghcjs
=====================================
=====================================
testsuite/tests/show-bytecode/show-bytecode-hpc.stdout-wasi deleted
=====================================
@@ -1,662 +0,0 @@
-[1 of 1] Compiling Example ( Example.hs, Example.gbc )
-module: Example
-hash: @hash@
-objects:
- object ‘primesPtr’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- used items:
- named item ‘static_ptr1’
- named item ‘$dTypeable2_@name_suffix@’
- named item ‘$fIsStaticStaticPtr’
- static-construction object ‘static_ptr1’:
- data constructor: StaticPtr
- lifted: yes
- literals:
- word @large_word@
- used items:
- named item ‘static_ptr1_sat_@name_suffix@’
- static-construction object ‘static_ptr1_sat_@name_suffix@’:
- data constructor: StaticPtrInfo
- lifted: yes
- literals: <none>
- used items:
- named item ‘static_ptr1_sat_@name_suffix@’
- object ‘static_ptr1_sat_@name_suffix@’:
- arity: 0
- literals: top-level string "main"
- used items:
- object ‘static_ptr1_sat_@name_suffix@’:
- arity: 0
- literals: <none>
- used items: named item ‘unpackCString#’
- object ‘static_ptr1_sat_@name_suffix@’:
- arity: 0
- literals: top-level string "Example"
- used items:
- object ‘static_ptr1_sat_@name_suffix@’:
- arity: 0
- literals: <none>
- used items: named item ‘unpackCString#’
- static-construction object ‘static_ptr1_sat_@name_suffix@’:
- data constructor: (,)
- lifted: yes
- literals: <none>
- used items:
- named item ‘static_ptr1_sat_@name_suffix@’
- static-construction object ‘static_ptr1_sat_@name_suffix@’:
- data constructor: I#
- lifted: yes
- literals: word @large_word@
- used items: <none>
- static-construction object ‘static_ptr1_sat_@name_suffix@’:
- data constructor: I#
- lifted: yes
- literals: word @large_word@
- used items: <none>
- object ‘static_ptr1_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: named item ‘primes’
- object ‘primes2_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘primes2_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘primes2_sat_@name_suffix@’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- word 3
- info table of ‘IS’
- used items:
- named item ‘$fNumNatural’
- named item ‘fromInteger’
- named item ‘$fEnumNatural’
- named item ‘enumFrom’
- object ‘primes2_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: named item ‘isPrime_@name_suffix@’
- named item ‘filter’
- object ‘isPrime_@name_suffix@’:
- arity: 1
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘isPrime_sat_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘isPrime_sat_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘isPrime_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: named item ‘primes’
- object ‘isPrime_sat_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘isPrime_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘v_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- named item ‘$fIntegralInteger’
- named item ‘$fNumNatural’
- named item ‘(^)’
- object ‘v1_@name_suffix@’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- word 2
- info table of ‘IS’
- used items: <none>
- object ‘pap_@name_suffix@’:
- arity: 3
- literals: <none>
- used items: <none>
- object ‘isPrime_sat_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘v_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- named item ‘$fOrdNatural’
- named item ‘(<=)’
- object ‘v1_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: <none>
- object ‘pap_@name_suffix@’:
- arity: 3
- literals: <none>
- used items: <none>
- named item ‘(.)’
- named item ‘takeWhile’
- object ‘isPrime_sat_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘v_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘pap_@name_suffix@’:
- arity: 2
- literals: <none>
- used items:
- named item ‘$fIntegralNatural’
- named item ‘divides’
- object ‘v1_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: <none>
- object ‘pap_@name_suffix@’:
- arity: 3
- literals: <none>
- used items: <none>
- named item ‘$fFoldableList’
- named item ‘any’
- named item ‘not’
- object ‘primes’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- info table of ‘(:)’
- used items:
- named item ‘primes2_@name_suffix@’
- named item ‘primes1_@name_suffix@’
- object ‘primes1_@name_suffix@’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- word 2
- info table of ‘IS’
- used items:
- named item ‘$fNumNatural’
- named item ‘fromInteger’
- object ‘fibonaccisPtr’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- used items:
- named item ‘static_ptr’
- named item ‘$dTypeable2_@name_suffix@’
- named item ‘$fIsStaticStaticPtr’
- static-construction object ‘static_ptr’:
- data constructor: StaticPtr
- lifted: yes
- literals:
- word @large_word@
- used items:
- named item ‘static_ptr_sat_@name_suffix@’
- static-construction object ‘static_ptr_sat_@name_suffix@’:
- data constructor: StaticPtrInfo
- lifted: yes
- literals: <none>
- used items:
- named item ‘static_ptr_sat_@name_suffix@’
- object ‘static_ptr_sat_@name_suffix@’:
- arity: 0
- literals: top-level string "main"
- used items:
- object ‘static_ptr_sat_@name_suffix@’:
- arity: 0
- literals: <none>
- used items: named item ‘unpackCString#’
- object ‘static_ptr_sat_@name_suffix@’:
- arity: 0
- literals: top-level string "Example"
- used items:
- object ‘static_ptr_sat_@name_suffix@’:
- arity: 0
- literals: <none>
- used items: named item ‘unpackCString#’
- static-construction object ‘static_ptr_sat_@name_suffix@’:
- data constructor: (,)
- lifted: yes
- literals: <none>
- used items:
- named item ‘static_ptr_sat_@name_suffix@’
- static-construction object ‘static_ptr_sat_@name_suffix@’:
- data constructor: I#
- lifted: yes
- literals: word @large_word@
- used items: <none>
- static-construction object ‘static_ptr_sat_@name_suffix@’:
- data constructor: I#
- lifted: yes
- literals: word @large_word@
- used items: <none>
- object ‘static_ptr_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: named item ‘fibonaccis’
- object ‘positiveFibonaccis1_@name_suffix@’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- info table of ‘(:)’
- used items:
- named item ‘positiveFibonaccis2_@name_suffix@’
- named item ‘positiveFibonaccis_@name_suffix@’
- object ‘positiveFibonaccis2_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘positiveFibonaccis2_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: named item ‘positiveFibonaccis1_@name_suffix@’
- object ‘positiveFibonaccis2_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: named item ‘fibonaccis’
- object ‘positiveFibonaccis2_sat_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- named item ‘$fNumNatural’
- named item ‘(+)’
- named item ‘zipWith’
- object ‘fibonaccis’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- info table of ‘(:)’
- used items:
- named item ‘fibonaccis2_@name_suffix@’
- named item ‘fibonaccis1_@name_suffix@’
- object ‘fibonaccis2_@name_suffix@’:
- arity: 0
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: named item ‘positiveFibonaccis1_@name_suffix@’
- object ‘positiveFibonaccis_@name_suffix@’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- word 1
- info table of ‘IS’
- used items:
- named item ‘$fNumNatural’
- named item ‘fromInteger’
- object ‘fibonaccis1_@name_suffix@’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- word 0
- info table of ‘IS’
- used items:
- named item ‘$fNumNatural’
- named item ‘fromInteger’
- object ‘$dTypeable2_@name_suffix@’:
- arity: 0
- literals: <none>
- used items:
- named item ‘$dTypeable_@name_suffix@’
- named item ‘$dTypeable1_@name_suffix@’
- named item ‘mkTrAppChecked’
- object ‘$dTypeable1_@name_suffix@’:
- arity: 0
- literals: info table of ‘[]’
- used items:
- named item ‘$tcList’
- named item ‘mkTrCon’
- object ‘$dTypeable_@name_suffix@’:
- arity: 0
- literals: info table of ‘[]’
- used items:
- named item ‘$tcNatural’
- named item ‘mkTrCon’
- object ‘cstrlen’:
- arity: 2
- literals: <none>
- used items: named item ‘cstrlen1_@name_suffix@’
- object ‘cstrlen1_@name_suffix@’:
- arity: 2
- literals: <none>
- used items:
- object ‘ds1_@name_suffix@’:
- arity: 0
- literals:
- label ‘strlen’
- word 0
- foreign function of type ‘Pointer -> UInt@word_size@’
- used items:
- object ‘wild_@name_suffix@’:
- arity: 0
- literals: info table of ‘W@word_size@#’
- used items: <none>
- static-construction object ‘$tc'Nested’:
- data constructor: TyCon
- lifted: yes
- literals:
- word @large_word@
- word 1
- used items:
- named item ‘$trModule’
- named item ‘$tc'Nested2_@name_suffix@’
- named item ‘$krep17_@name_suffix@’
- static-construction object ‘$tc'Nested2_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$tc'Nested1_@name_suffix@’
- used items: <none>
- static-construction object ‘$krep17_@name_suffix@’:
- data constructor: KindRepFun
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep16_@name_suffix@’
- named item ‘$krep13_@name_suffix@’
- static-construction object ‘$krep16_@name_suffix@’:
- data constructor: KindRepTyConApp
- lifted: yes
- literals: <none>
- used items:
- named item ‘$tcPerfectTree’
- named item ‘$krep15_@name_suffix@’
- static-construction object ‘$krep15_@name_suffix@’:
- data constructor: (:)
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep4_@name_suffix@’
- named item ‘[]’
- static-construction object ‘$tc'PerfectTree’:
- data constructor: TyCon
- lifted: yes
- literals:
- word @large_word@
- word 1
- used items:
- named item ‘$trModule’
- named item ‘$tc'PerfectTree2_@name_suffix@’
- named item ‘$krep14_@name_suffix@’
- static-construction object ‘$tc'PerfectTree2_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$tc'PerfectTree1_@name_suffix@’
- used items: <none>
- static-construction object ‘$krep14_@name_suffix@’:
- data constructor: KindRepFun
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep1_@name_suffix@’
- named item ‘$krep13_@name_suffix@’
- static-construction object ‘$krep13_@name_suffix@’:
- data constructor: KindRepTyConApp
- lifted: yes
- literals: <none>
- used items:
- named item ‘$tcPerfectTree’
- named item ‘$krep12_@name_suffix@’
- static-construction object ‘$krep12_@name_suffix@’:
- data constructor: (:)
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep1_@name_suffix@’
- named item ‘[]’
- static-construction object ‘$tcPerfectTree’:
- data constructor: TyCon
- lifted: yes
- literals:
- word @large_word@
- word 0
- used items:
- named item ‘$trModule’
- named item ‘$tcPerfectTree2_@name_suffix@’
- named item ‘krep$*Arr*’
- static-construction object ‘$tcPerfectTree2_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$tcPerfectTree1_@name_suffix@’
- used items: <none>
- static-construction object ‘$tc'Node’:
- data constructor: TyCon
- lifted: yes
- literals:
- word @large_word@
- word 2
- used items:
- named item ‘$trModule’
- named item ‘$tc'Node2_@name_suffix@’
- named item ‘$krep11_@name_suffix@’
- static-construction object ‘$tc'Node2_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$tc'Node1_@name_suffix@’
- used items: <none>
- static-construction object ‘$krep11_@name_suffix@’:
- data constructor: KindRepFun
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep7_@name_suffix@’
- named item ‘$krep10_@name_suffix@’
- static-construction object ‘$krep10_@name_suffix@’:
- data constructor: KindRepFun
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep_@name_suffix@’
- named item ‘$krep9_@name_suffix@’
- static-construction object ‘$krep9_@name_suffix@’:
- data constructor: KindRepFun
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep7_@name_suffix@’
- static-construction object ‘$tc'Leaf’:
- data constructor: TyCon
- lifted: yes
- literals:
- word @large_word@
- word 2
- used items:
- named item ‘$trModule’
- named item ‘$tc'Leaf2_@name_suffix@’
- named item ‘$krep8_@name_suffix@’
- static-construction object ‘$tc'Leaf2_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$tc'Leaf1_@name_suffix@’
- used items: <none>
- static-construction object ‘$krep8_@name_suffix@’:
- data constructor: KindRepFun
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep1_@name_suffix@’
- named item ‘$krep7_@name_suffix@’
- static-construction object ‘$krep7_@name_suffix@’:
- data constructor: KindRepTyConApp
- lifted: yes
- literals: <none>
- used items:
- named item ‘$tcBinTree’
- named item ‘$krep6_@name_suffix@’
- static-construction object ‘$krep6_@name_suffix@’:
- data constructor: (:)
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep1_@name_suffix@’
- named item ‘$krep5_@name_suffix@’
- static-construction object ‘$krep5_@name_suffix@’:
- data constructor: (:)
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep_@name_suffix@’
- named item ‘[]’
- static-construction object ‘$tcBinTree’:
- data constructor: TyCon
- lifted: yes
- literals:
- word @large_word@
- word 0
- used items:
- named item ‘$trModule’
- named item ‘$tcBinTree2_@name_suffix@’
- named item ‘krep$*->*->*’
- static-construction object ‘$tcBinTree2_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$tcBinTree1_@name_suffix@’
- used items: <none>
- static-construction object ‘$krep4_@name_suffix@’:
- data constructor: KindRepTyConApp
- lifted: yes
- literals: <none>
- used items:
- named item ‘$tcTuple2’
- named item ‘$krep3_@name_suffix@’
- static-construction object ‘$krep3_@name_suffix@’:
- data constructor: (:)
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep1_@name_suffix@’
- named item ‘$krep2_@name_suffix@’
- static-construction object ‘$krep2_@name_suffix@’:
- data constructor: (:)
- lifted: yes
- literals: <none>
- used items:
- named item ‘$krep1_@name_suffix@’
- named item ‘[]’
- static-construction object ‘$krep1_@name_suffix@’:
- data constructor: KindRepVar
- lifted: yes
- literals: word 0
- used items: <none>
- static-construction object ‘$krep_@name_suffix@’:
- data constructor: KindRepVar
- lifted: yes
- literals: word 1
- used items: <none>
- static-construction object ‘$trModule’:
- data constructor: Module
- lifted: yes
- literals: <none>
- used items:
- named item ‘$trModule2_@name_suffix@’
- named item ‘$trModule4_@name_suffix@’
- static-construction object ‘$trModule4_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$trModule3_@name_suffix@’
- used items: <none>
- static-construction object ‘$trModule2_@name_suffix@’:
- data constructor: TrNameS
- lifted: yes
- literals: address ‘$trModule1_@name_suffix@’
- used items: <none>
- object ‘divides’:
- arity: 3
- literals: <none>
- used items:
- object ‘$dReal_@name_suffix@’:
- arity: 0
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘divides_sat_@name_suffix@’:
- arity: 1
- literals:
- label ‘_hpc_tickboxes_Example_hpc’
- word 0
- info table of ‘IS’
- used items:
- object ‘divides_sat_@name_suffix@’:
- arity: 0
- literals: <none>
- used items: named item ‘fromInteger’
- named item ‘$p1Real’
- object ‘divides_sat_@name_suffix@’:
- arity: 3
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items:
- object ‘divides_sat_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: <none>
- object ‘divides_sat_@name_suffix@’:
- arity: 1
- literals: label ‘_hpc_tickboxes_Example_hpc’
- used items: <none>
- named item ‘mod’
- object ‘divides_sat_@name_suffix@’:
- arity: 0
- literals: <none>
- used items:
- object ‘divides_sat_@name_suffix@’:
- arity: 0
- literals: <none>
- used items: named item ‘(==)’
- named item ‘$p1Ord’
- named item ‘$p2Real’
- named item ‘$p1Integral’
- object ‘Node’:
- arity: 3
- literals: info table of ‘Node’
- used items: <none>
- object ‘Leaf’:
- arity: 1
- literals: info table of ‘Leaf’
- used items: <none>
- object ‘Nested’:
- arity: 1
- literals: info table of ‘Nested’
- used items: <none>
- object ‘PerfectTree’:
- arity: 1
- literals: info table of ‘PerfectTree’
- used items: <none>
-data constructor info tables:
- info table of ‘PerfectTree’:
- number of words for pointers: 1
- number of words for non-pointers: 0
- info table of ‘Nested’:
- number of words for pointers: 1
- number of words for non-pointers: 0
- info table of ‘Leaf’:
- number of words for pointers: 1
- number of words for non-pointers: 0
- info table of ‘Node’:
- number of words for pointers: 3
- number of words for non-pointers: 0
-top-level strings:
- $tc'Nested1_@name_suffix@: "'Nested"
- $tc'PerfectTree1_@name_suffix@: "'PerfectTree"
- $tcPerfectTree1_@name_suffix@: "PerfectTree"
- $tc'Node1_@name_suffix@: "'Node"
- $tc'Leaf1_@name_suffix@: "'Leaf"
- $tcBinTree1_@name_suffix@: "BinTree"
- $trModule3_@name_suffix@: "Example"
- $trModule1_@name_suffix@: "main"
-breakpoints: <none>
-static-pointer table entries:
- @hash@: static_ptr
- @hash@: static_ptr1
-HPC information:
- hash: @hash@
- tick box: _hpc_tickboxes_Example_hpc
- number of ticks: 45
-
=====================================
testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-wasi → testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-javascript-unknown-ghcjs
=====================================
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a1ff5c48010de0ee2fa470e34d683d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a1ff5c48010de0ee2fa470e34d683d…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/spj-reinstallable-base2] 2 commits: Major patch to re-engineer known-key names
by sheaf (@sheaf) 07 Aug '26
by sheaf (@sheaf) 07 Aug '26
07 Aug '26
sheaf pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC
Commits:
a4464ef2 by Simon Peyton Jones at 2026-08-07T11:43:51+02:00
Major patch to re-engineer known-key names
This big patch implements the New Plan for known-key names,
described in #27013.
Read the big Note [Overview of known-key names] in GHC.Types.Name
Some things had to be reworked slightly to accomodate the new known-keys
design. A significant one was the generation of auxiliary KindRep
bindings, which was greatly simplified. Note [Grand plan for Typeable]
was updated accordingly. Another example: GHC.Internal.CString was
merged into GHC.Internal.Types.
Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita(a)gmail.com>
The couple hundreds of hours spent here by Rodrigo were sponsored by Well-Typed
Metrics: compile_time/bytes allocated
-------------------------------------
Baseline
Test Metric value New value Change
------------------------------------------------------------------------------------------
MultiComponentModules100(normal) ghc/alloc 24,312,779,672 24,990,470,432 +2.8% BAD
MultiComponentModulesRecomp(normal) ghc/alloc 601,924,960 621,884,888 +3.3% BAD
MultiComponentModulesRecomp100(normal) ghc/alloc 11,884,065,432 12,531,373,704 +5.4% BAD
MultiLayerModules(normal) ghc/alloc 3,861,537,072 3,706,919,512 -4.0% GOOD
T13701(normal) ghc/alloc 3,517,246,392 3,237,179,616 -8.0% GOOD
T13820(normal) ghc/alloc 28,961,056 29,663,208 +2.4% BAD
T14697(normal) ghc/alloc 472,044,184 443,550,048 -6.0% GOOD
T18140(normal) ghc/alloc 47,905,664 49,115,808 +2.5% BAD
T4801(normal) ghc/alloc 269,339,096 263,432,040 -2.2% GOOD
T783(normal) ghc/alloc 341,112,672 333,339,952 -2.3% GOOD
hard_hole_fits(normal) ghc/alloc 222,164,728 213,433,808 -3.9% GOOD
mhu-perf(normal) ghc/alloc 49,011,440 46,706,280 -4.7% GOOD
geo. mean +0.1%
minimum -8.0%
maximum +5.4%
All performance regressions were investigated in depth. The surviving
ones:
- MultiComponentModules100, MultiComponentModulesRecomp100,
MultiComponentModulesRecomp regresses because existing bugs that make
an additional implicit edge do too much redundant work: #27053 and #27461
- T13820, T18140, T10547, T13035 regress because we load an additional
interface and associated Names for GHC.Essentials.
-------------------------
Metric Decrease:
MultiLayerModules
T13701
T14697
T26989
T4801
T783
hard_hole_fits
mhu-perf
size_hello_obj
Metric Increase:
LinkableUsage01
MultiComponentModules100
MultiComponentModulesRecomp
MultiComponentModulesRecomp100
T10547
T13035
T13820
T18140
T18698a
T18698b
T20049
-------------------------
Bumps submodule binary
Closes #27013
- - - - -
e51eeb4b by sheaf at 2026-08-07T11:44:14+02:00
Allow GHC.Essentials to be hidden
This commit overhauls several aspects of the known entity handling,
in order to allow GHC.Essentials to be hidden without a proliferation
of special cases in the compiler.
The main contribution is to introduce the 'UnresolvedImport' datatype
which cleans up a lot of ad-hoc handling relating to 'ModSummary',
fixing #27603. This allows us to reduce duplication, e.g. by having
Backpack reuse 'mkUnresolvedImports' instead of replicating the
"add implicit imports" logic. It also makes it easier to avoid
undesirable edge cases (such as making sure that the Template Haskell
'reifyModule' function does not leak the implicit GHC.Essentials import).
In particular, the infamous 'findImportedModuleWithIsBoot' is now simply
'resolveImport', taking a single 'UnresolvedImport' and resolving it
to a 'FindResult' (usually a 'Module').
Other changes:
- Cache the result of looking up GHC.Essentials (in TcM and DsM
environments) to avoid redundant work.
This reduces allocations on LinkableUsage01 and hard_hole_fits.
- Properly look up known entities for StaticPointers like we do for
other known entities everywhere else. This allows e.g. modules in
ghc-internal to use -XStaticPointers.
- When using multiple home units, we are now careful to handle the
situation in which we may have multiple GHC.Essentials modules
around. See the new tests under 'driver/multipleHomeUnits'.
- - - - -
792 changed files:
- + changelog.d/refactor-known-names
- compiler/GHC.hs
- + compiler/GHC/Builtin.hs
- + compiler/GHC/Builtin/KnownKeys.hs
- + compiler/GHC/Builtin/KnownOccs.hs
- + compiler/GHC/Builtin/Modules.hs
- − compiler/GHC/Builtin/Names.hs
- − compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/PrimOps/Casts.hs
- compiler/GHC/Builtin/PrimOps/Ids.hs
- + compiler/GHC/Builtin/TH.hs
- compiler/GHC/Builtin/Uniques.hs
- compiler/GHC/Builtin/Uniques.hs-boot
- − compiler/GHC/Builtin/Utils.hs
- + compiler/GHC/Builtin/WiredIn/Ids.hs
- compiler/GHC/Builtin/Types/Prim.hs → compiler/GHC/Builtin/WiredIn/Prim.hs
- compiler/GHC/Builtin/Types/Literals.hs → compiler/GHC/Builtin/WiredIn/TypeLits.hs
- compiler/GHC/Builtin/Types.hs → compiler/GHC/Builtin/WiredIn/Types.hs
- compiler/GHC/Builtin/Types.hs-boot → compiler/GHC/Builtin/WiredIn/Types.hs-boot
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Multiplicity.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/LiberateCase.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Tidy.hs
- compiler/GHC/Driver/Downsweep.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Env/KnotVars.hs
- compiler/GHC/Driver/Env/Types.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main/Hsc.hs
- compiler/GHC/Driver/Main/Passes.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/HsToCore/Foreign/JavaScript.hs
- compiler/GHC/HsToCore/Foreign/Utils.hs
- compiler/GHC/HsToCore/Foreign/Wasm.hs
- compiler/GHC/HsToCore/ListComp.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Pmc/Check.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Pmc/Ppr.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Env.hs
- − compiler/GHC/Iface/Env.hs-boot
- compiler/GHC/Iface/Errors/Ppr.hs
- compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Lit.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Rename/Unbound.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Runtime/Context.hs
- compiler/GHC/Runtime/Debugger.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Heap/Inspect.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Stg/BcPrep.hs
- compiler/GHC/Stg/Unarise.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/DataCon.hs
- compiler/GHC/StgToCmm/Env.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/StgToCmm/Lit.hs
- compiler/GHC/StgToCmm/Ticky.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Arg.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/FFI.hs
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Utils.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Functor.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Deriv/Infer.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Arrow.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Default.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Foreign.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Instance/FunDeps.hs
- compiler/GHC/Tc/Instance/Typeable.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Plugin.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/FunDeps.hs
- compiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Rewrite.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Build.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Types/Constraint.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Types/LclEnv.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Concrete.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/DefaultEnv.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/Literal.hs
- compiler/GHC/Types/Name.hs
- compiler/GHC/Types/Name/Cache.hs
- compiler/GHC/Types/Name/Ppr.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/RepType.hs
- compiler/GHC/Types/TyThing.hs
- compiler/GHC/Types/Unique.hs
- compiler/GHC/Types/Unique/FM.hs
- + compiler/GHC/Types/UnresolvedImport.hs
- compiler/GHC/Types/Var.hs
- compiler/GHC/Unit.hs
- compiler/GHC/Unit/External.hs
- compiler/GHC/Unit/External/Index.hs
- compiler/GHC/Unit/External/ModuleOrigin.hs
- compiler/GHC/Unit/External/Providers.hs
- compiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/Finder/Types.hs
- compiler/GHC/Unit/Module/Deps.hs
- compiler/GHC/Unit/Module/ModSummary.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Unit/Types.hs
- compiler/GHC/Utils/Binary.hs
- − compiler/GHC/Utils/Binary/Typeable.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- compiler/ghc.cabal.in
- docs/users_guide/separate_compilation.rst
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Monad.hs
- ghc/Main.hs
- libraries/base/base.cabal.in
- libraries/base/src/Control/Applicative.hs
- libraries/base/src/Control/Concurrent.hs
- libraries/base/src/Control/Concurrent/Chan.hs
- libraries/base/src/Control/Concurrent/QSem.hs
- libraries/base/src/Control/Concurrent/QSemN.hs
- libraries/base/src/Data/Array/Byte.hs
- libraries/base/src/Data/Bifoldable.hs
- libraries/base/src/Data/Bifoldable1.hs
- libraries/base/src/Data/Bifunctor.hs
- libraries/base/src/Data/Bitraversable.hs
- libraries/base/src/Data/Bool.hs
- libraries/base/src/Data/Complex.hs
- libraries/base/src/Data/Data.hs
- libraries/base/src/Data/Enum.hs
- libraries/base/src/Data/Fixed.hs
- libraries/base/src/Data/Foldable1.hs
- libraries/base/src/Data/Functor/Classes.hs
- libraries/base/src/Data/Functor/Compose.hs
- libraries/base/src/Data/Functor/Contravariant.hs
- libraries/base/src/Data/Functor/Product.hs
- libraries/base/src/Data/Functor/Sum.hs
- libraries/base/src/Data/List.hs
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/base/src/Data/List/NubOrdSet.hs
- libraries/base/src/Data/Semigroup.hs
- libraries/base/src/Data/Version.hs
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/ByteOrder.hs
- + libraries/base/src/GHC/Essentials.hs
- libraries/base/src/GHC/Exts.hs
- libraries/base/src/GHC/Fingerprint.hs
- libraries/base/src/GHC/RTS/Flags.hs
- libraries/base/src/GHC/ResponseFile.hs
- libraries/base/src/GHC/Stats.hs
- libraries/base/src/GHC/Weak/Finalize.hs
- libraries/base/src/Numeric.hs
- libraries/base/src/Prelude.hs
- libraries/base/src/System/CPUTime/Posix/ClockGetTime.hsc
- libraries/base/src/System/CPUTime/Posix/RUsage.hsc
- libraries/base/src/System/CPUTime/Posix/Times.hsc
- libraries/base/src/System/CPUTime/Unsupported.hs
- libraries/base/src/System/Console/GetOpt.hs
- libraries/base/src/System/Exit.hs
- libraries/base/src/System/IO.hs
- libraries/base/src/System/IO/OS.hs
- libraries/base/src/System/IO/Unsafe.hs
- libraries/base/src/System/Info.hs
- libraries/base/src/System/Timeout.hs
- libraries/base/src/Text/Printf.hs
- libraries/base/src/Text/Read.hs
- libraries/base/src/Text/Show/Functions.hs
- libraries/binary
- libraries/ghc-experimental/src/Data/Sum/Experimental.hs
- libraries/ghc-experimental/src/Data/Tuple/Experimental.hs
- libraries/ghc-experimental/src/GHC/Profiling/Eras.hs
- libraries/ghc-experimental/src/Prelude/Experimental.hs
- libraries/ghc-internal/codepages/MakeTable.hs
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/include/RtsIfaceSymbols.h
- libraries/ghc-internal/src/GHC/Internal/AllocationLimitHandler.hs
- libraries/ghc-internal/src/GHC/Internal/Arr.hs
- libraries/ghc-internal/src/GHC/Internal/ArrayArray.hs
- libraries/ghc-internal/src/GHC/Internal/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Backend.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Backend/GMP.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Backend/Native.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/BigNat.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/BigNat.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Bignum/Integer.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Integer.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Bignum/Natural.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Natural.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Bignum/Primitives.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/WordArray.hs
- libraries/ghc-internal/src/GHC/Internal/Bits.hs
- libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs
- libraries/ghc-internal/src/GHC/Internal/CString.hs
- libraries/ghc-internal/src/GHC/Internal/Char.hs
- libraries/ghc-internal/src/GHC/Internal/Classes.hs
- libraries/ghc-internal/src/GHC/Internal/Classes/IP.hs
- libraries/ghc-internal/src/GHC/Internal/Clock.hsc
- libraries/ghc-internal/src/GHC/Internal/ClosureTypes.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/Bound.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/IO.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/POSIX.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/POSIX/Const.hsc
- libraries/ghc-internal/src/GHC/Internal/Conc/Signal.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/Sync.hs
- libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc
- libraries/ghc-internal/src/GHC/Internal/Control/Arrow.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Category.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Concurrent/MVar.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fail.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/IO/Class.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Imp.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Zip.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Bits.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Coerce.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Data.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Dynamic.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Either.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Function.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Const.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Utils.hs
- libraries/ghc-internal/src/GHC/Internal/Data/IORef.hs
- libraries/ghc-internal/src/GHC/Internal/Data/List.hs
- libraries/ghc-internal/src/GHC/Internal/Data/List/NonEmpty.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Maybe.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Monoid.hs
- libraries/ghc-internal/src/GHC/Internal/Data/NonEmpty.hs
- libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Proxy.hs
- libraries/ghc-internal/src/GHC/Internal/Data/STRef.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Semigroup/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Data/String.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Tuple.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Coercion.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Equality.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Typeable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Typeable/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Unique.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Version.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Void.hs
- libraries/ghc-internal/src/GHC/Internal/Debug/Trace.hs
- libraries/ghc-internal/src/GHC/Internal/Desugar.hs
- libraries/ghc-internal/src/GHC/Internal/Encoding/UTF8.hs
- libraries/ghc-internal/src/GHC/Internal/Enum.hs
- libraries/ghc-internal/src/GHC/Internal/Enum.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Environment.hs
- libraries/ghc-internal/src/GHC/Internal/Err.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Arr.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Array.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Control.hs
- libraries/ghc-internal/src/GHC/Internal/Event/EPoll.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/IntTable.hs
- libraries/ghc-internal/src/GHC/Internal/Event/IntVar.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Internal/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Event/KQueue.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Manager.hs
- libraries/ghc-internal/src/GHC/Internal/Event/PSQ.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Poll.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Thread.hs
- libraries/ghc-internal/src/GHC/Internal/Event/TimeOut.hs
- libraries/ghc-internal/src/GHC/Internal/Event/TimerManager.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Unique.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/Clock.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/FFI.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/ManagedThreadPool.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Exception/Context.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Context.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs-boot
- libraries/ghc-internal/src/GHC/Internal/ExecutionStack.hs
- libraries/ghc-internal/src/GHC/Internal/ExecutionStack/Internal.hsc
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- libraries/ghc-internal/src/GHC/Internal/Fingerprint.hs
- libraries/ghc-internal/src/GHC/Internal/Fingerprint/Type.hs
- libraries/ghc-internal/src/GHC/Internal/Float.hs
- libraries/ghc-internal/src/GHC/Internal/Float/ConversionUtils.hs
- libraries/ghc-internal/src/GHC/Internal/Float/RealFracMethods.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/ConstPtr.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/Error.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/String.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/String/Encoding.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/ForeignPtr/Imp.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Alloc.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Array.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Error.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Pool.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Utils.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Ptr.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Storable.hs
- libraries/ghc-internal/src/GHC/Internal/ForeignPtr.hs
- libraries/ghc-internal/src/GHC/Internal/ForeignSrcLang.hs
- libraries/ghc-internal/src/GHC/Internal/Functor/ZipList.hs
- libraries/ghc-internal/src/GHC/Internal/GHCi.hs
- libraries/ghc-internal/src/GHC/Internal/GHCi/Helpers.hs
- libraries/ghc-internal/src/GHC/Internal/Generics.hs
- libraries/ghc-internal/src/GHC/Internal/Heap/Closures.hs
- libraries/ghc-internal/src/GHC/Internal/Heap/Constants.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable/Types.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/InfoTableProf.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/ProfInfo/Types.hs
- libraries/ghc-internal/src/GHC/Internal/IO.hs
- libraries/ghc-internal/src/GHC/Internal/IO.hs-boot
- libraries/ghc-internal/src/GHC/Internal/IO/Buffer.hs
- libraries/ghc-internal/src/GHC/Internal/IO/BufferedIO.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Device.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage/API.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage/Table.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Failure.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Iconv.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Latin1.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Types.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/UTF16.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/UTF32.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/UTF8.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs-boot
- libraries/ghc-internal/src/GHC/Internal/IO/FD.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Internals.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Common.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Flock.hsc
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/LinuxOFD.hsc
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/NoOp.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Windows.hsc
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Text.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Types.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Types.hs-boot
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Windows.hs
- libraries/ghc-internal/src/GHC/Internal/IO/IOMode.hs
- libraries/ghc-internal/src/GHC/Internal/IO/SubSystem.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Unsafe.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Windows/Encoding.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Windows/Handle.hsc
- libraries/ghc-internal/src/GHC/Internal/IOArray.hs
- libraries/ghc-internal/src/GHC/Internal/IORef.hs
- libraries/ghc-internal/src/GHC/Internal/InfoProv.hs
- libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc
- libraries/ghc-internal/src/GHC/Internal/Int.hs
- libraries/ghc-internal/src/GHC/Internal/IsList.hs
- libraries/ghc-internal/src/GHC/Internal/Ix.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Foreign/Callback.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
- libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs
- libraries/ghc-internal/src/GHC/Internal/Lexeme.hs
- libraries/ghc-internal/src/GHC/Internal/List.hs
- libraries/ghc-internal/src/GHC/Internal/MVar.hs
- libraries/ghc-internal/src/GHC/Internal/Magic.hs
- libraries/ghc-internal/src/GHC/Internal/Magic/Dict.hs
- libraries/ghc-internal/src/GHC/Internal/Maybe.hs
- libraries/ghc-internal/src/GHC/Internal/Num.hs
- libraries/ghc-internal/src/GHC/Internal/Num.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Numeric.hs
- libraries/ghc-internal/src/GHC/Internal/OverloadedLabels.hs
- libraries/ghc-internal/src/GHC/Internal/Pack.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/Ext.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/Panic.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/PtrEq.hs
- libraries/ghc-internal/src/GHC/Internal/Profiling.hs
- libraries/ghc-internal/src/GHC/Internal/Ptr.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc
- libraries/ghc-internal/src/GHC/Internal/Read.hs
- libraries/ghc-internal/src/GHC/Internal/Real.hs
- libraries/ghc-internal/src/GHC/Internal/Real.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Records.hs
- libraries/ghc-internal/src/GHC/Internal/ST.hs
- libraries/ghc-internal/src/GHC/Internal/STM.hs
- libraries/ghc-internal/src/GHC/Internal/STRef.hs
- libraries/ghc-internal/src/GHC/Internal/Show.hs
- libraries/ghc-internal/src/GHC/Internal/Stable.hs
- libraries/ghc-internal/src/GHC/Internal/StableName.hs
- libraries/ghc-internal/src/GHC/Internal/Stack.hs
- libraries/ghc-internal/src/GHC/Internal/Stack.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/CloneStack.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/Constants.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/ConstantsProf.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs
- libraries/ghc-internal/src/GHC/Internal/StaticPtr.hs
- libraries/ghc-internal/src/GHC/Internal/StaticPtr/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Stats.hsc
- libraries/ghc-internal/src/GHC/Internal/Storable.hs
- libraries/ghc-internal/src/GHC/Internal/System/Environment.hs
- libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc
- libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc
- libraries/ghc-internal/src/GHC/Internal/System/IO/Error.hs
- libraries/ghc-internal/src/GHC/Internal/System/Mem.hs
- libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs
- libraries/ghc-internal/src/GHC/Internal/System/Posix/Types.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- libraries/ghc-internal/src/GHC/Internal/Text/ParserCombinators/ReadP.hs
- libraries/ghc-internal/src/GHC/Internal/Text/ParserCombinators/ReadPrec.hs
- libraries/ghc-internal/src/GHC/Internal/Text/Read/Lex.hs
- libraries/ghc-internal/src/GHC/Internal/TopHandler.hs
- libraries/ghc-internal/src/GHC/Internal/Tuple.hs
- libraries/ghc-internal/src/GHC/Internal/Type/Reflection.hs
- libraries/ghc-internal/src/GHC/Internal/Type/Reflection/Unsafe.hs
- libraries/ghc-internal/src/GHC/Internal/TypeError.hs
- libraries/ghc-internal/src/GHC/Internal/TypeLits.hs
- libraries/ghc-internal/src/GHC/Internal/TypeLits/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/TypeNats.hs
- libraries/ghc-internal/src/GHC/Internal/TypeNats/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Bits.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/GeneralCategory.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleLowerCaseMapping.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleTitleCaseMapping.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleUpperCaseMapping.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Version.hs
- libraries/ghc-internal/src/GHC/Internal/Unsafe/Coerce.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Conc.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Conc/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Exports.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Imports.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Weak.hs
- libraries/ghc-internal/src/GHC/Internal/Weak/Finalize.hs
- libraries/ghc-internal/src/GHC/Internal/Windows.hs
- libraries/ghc-internal/src/GHC/Internal/Word.hs
- libraries/ghc-internal/tools/ucd2haskell/exe/UCD2Haskell/ModuleGenerators.hs
- libraries/ghc-prim/Dummy.hs
- libraries/ghc-prim/ghc-prim.cabal
- libraries/template-haskell/Language/Haskell/TH/Lib.hs
- linters/lint-codes/LintCodes/Static.hs
- rts/include/rts/RtsToHsIface.h
- testsuite/driver/testutil.py
- testsuite/tests/ado/T13242a.stderr
- testsuite/tests/annotations/should_fail/annfail10.stderr
- testsuite/tests/backpack/cabal/bkpcabal07/Makefile
- testsuite/tests/backpack/should_compile/T20396.stderr
- testsuite/tests/backpack/should_fail/bkpfail17.stderr
- testsuite/tests/cabal/T12485/Makefile
- + testsuite/tests/cabal/T27013a/Makefile
- + testsuite/tests/cabal/T27013a/Setup.hs
- + testsuite/tests/cabal/T27013a/all.T
- + testsuite/tests/cabal/T27013a/composition.cabal
- + testsuite/tests/cabal/T27013a/src/Data/Composition.hs
- + testsuite/tests/cabal/T27013d/Composition.hs
- + testsuite/tests/cabal/T27013d/Makefile
- + testsuite/tests/cabal/T27013d/T27013d.stdout
- + testsuite/tests/cabal/T27013d/all.T
- testsuite/tests/callarity/unittest/CallArity1.hs
- testsuite/tests/corelint/LintEtaExpand.hs
- testsuite/tests/corelint/T21115b.stderr
- testsuite/tests/corelint/T27374.hs
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/deSugar/should_compile/T16615.stderr
- testsuite/tests/deSugar/should_compile/T2431.stderr
- testsuite/tests/default/DefaultImportFail01.stderr
- testsuite/tests/default/DefaultImportFail02.stderr
- testsuite/tests/default/DefaultImportFail03.stderr
- testsuite/tests/default/DefaultImportFail04.stderr
- testsuite/tests/default/DefaultImportFail05.stderr
- testsuite/tests/default/DefaultImportFail07.stderr
- testsuite/tests/default/T25775.stderr
- testsuite/tests/deriving/should_compile/T14682.stderr
- testsuite/tests/deriving/should_compile/T20496.stderr
- testsuite/tests/diagnostic-codes/codes.stdout
- + testsuite/tests/driver/T27013b/Makefile
- + testsuite/tests/driver/T27013b/T27013b.stdout
- + testsuite/tests/driver/T27013b/X.hs
- + testsuite/tests/driver/T27013b/all.T
- + testsuite/tests/driver/T27013c/Makefile
- + testsuite/tests/driver/T27013c/T27013c.stdout
- + testsuite/tests/driver/T27013c/X.hs
- + testsuite/tests/driver/T27013c/all.T
- + testsuite/tests/driver/T27013e/T27013e.hs
- + testsuite/tests/driver/T27013e/T27013e.stderr
- + testsuite/tests/driver/T27013e/all.T
- + testsuite/tests/driver/T27013f/T27013f.hs
- + testsuite/tests/driver/T27013f/T27013f.stderr
- + testsuite/tests/driver/T27013f/all.T
- + testsuite/tests/driver/T27013g/T27013g.hs
- + testsuite/tests/driver/T27013g/all.T
- + testsuite/tests/driver/T27013h/GHC/Essentials.hs
- + testsuite/tests/driver/T27013h/T27013h.stderr
- + testsuite/tests/driver/T27013h/all.T
- + testsuite/tests/driver/T27013h/unitT27013h
- + testsuite/tests/driver/T27013i/T27013i.hs
- + testsuite/tests/driver/T27013i/T27013i.stderr
- + testsuite/tests/driver/T27013i/all.T
- testsuite/tests/driver/T3007/A/Internal.hs
- testsuite/tests/driver/T3007/Makefile
- testsuite/tests/driver/make-prim/Makefile
- testsuite/tests/driver/multipleHomeUnits/Makefile
- testsuite/tests/driver/multipleHomeUnits/all.T
- + testsuite/tests/driver/multipleHomeUnits/essentials-home/GHC/Essentials.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-order-base/B.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-order-user/U.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-user/M.hs
- testsuite/tests/driver/multipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials.stdout
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials_order.stderr
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials_recomp.stdout
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsHome
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsHomeHidden
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsOrderBase
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsOrderUser
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsUser
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsUserHidden
- testsuite/tests/driver/recomp24656/Makefile
- testsuite/tests/driver/recomp24656/recomp24656.stdout
- + testsuite/tests/ghc-api/EssentialsCoverage.hs
- testsuite/tests/ghc-api/T8628.hs
- testsuite/tests/ghc-api/all.T
- testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
- testsuite/tests/ghci.debugger/scripts/break006.stderr
- testsuite/tests/ghci.debugger/scripts/print019.stderr
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T4175.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/ghci/scripts/ghci064.stdout
- testsuite/tests/hiefile/should_run/T23120.stdout
- testsuite/tests/iface/IfaceSharingIfaceType.hs
- testsuite/tests/iface/IfaceSharingName.hs
- testsuite/tests/indexed-types/should_fail/T12522a.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- testsuite/tests/javascript/Makefile
- testsuite/tests/javascript/T24495.hs
- testsuite/tests/module/mod185.stderr
- testsuite/tests/numeric/should_compile/T14170.stdout
- testsuite/tests/numeric/should_compile/T14465.stdout
- testsuite/tests/numeric/should_compile/T7116.stdout
- testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
- testsuite/tests/package/all.T
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T14189.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
- testsuite/tests/parser/should_fail/T16270h.hs
- testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
- testsuite/tests/patsyn/should_fail/T26465.stderr
- testsuite/tests/perf/should_run/ByteCodeAsm.hs
- testsuite/tests/plugins/defaulting-plugin/DefaultInterference.hs
- testsuite/tests/plugins/defaulting-plugin/DefaultInvalid.hs
- testsuite/tests/plugins/defaulting-plugin/DefaultMultiParam.hs
- testsuite/tests/plugins/plugins09.stdout
- testsuite/tests/plugins/plugins10.stdout
- testsuite/tests/plugins/plugins11.stdout
- testsuite/tests/plugins/simple-plugin/Simple/ReplacePlugin.hs
- testsuite/tests/plugins/static-plugins.stdout
- testsuite/tests/profiling/should_run/callstack001.stdout
- testsuite/tests/profiling/should_run/callstack002.stderr
- testsuite/tests/profiling/should_run/callstack002.stdout
- testsuite/tests/rename/should_compile/T3103/Foreign/Ptr.hs
- testsuite/tests/rename/should_compile/T3103/GHC/Base.lhs
- testsuite/tests/rename/should_compile/T3103/GHC/Word.hs
- testsuite/tests/rename/should_compile/T3103/test.T
- testsuite/tests/roles/should_compile/Roles1.stderr
- testsuite/tests/roles/should_compile/Roles13.stderr
- testsuite/tests/roles/should_compile/Roles14.stderr
- testsuite/tests/roles/should_compile/Roles2.stderr
- testsuite/tests/roles/should_compile/Roles3.stderr
- testsuite/tests/roles/should_compile/Roles4.stderr
- testsuite/tests/roles/should_compile/T8958.stderr
- testsuite/tests/simplCore/should_compile/OpaqueNoCastWW.stderr
- testsuite/tests/simplCore/should_compile/T13543.stderr
- testsuite/tests/simplCore/should_compile/T16038/T16038.stdout
- testsuite/tests/simplCore/should_compile/T3717.stderr
- testsuite/tests/simplCore/should_compile/T3772.stdout
- testsuite/tests/simplCore/should_compile/T4908.stderr
- testsuite/tests/simplCore/should_compile/T4930.stderr
- testsuite/tests/simplCore/should_compile/T7360.stderr
- testsuite/tests/simplCore/should_compile/T8274.stdout
- testsuite/tests/simplCore/should_compile/T9400.stderr
- testsuite/tests/simplCore/should_compile/noinline01.stderr
- testsuite/tests/simplCore/should_compile/par01.stderr
- testsuite/tests/simplCore/should_compile/rule2.stderr
- testsuite/tests/simplCore/should_compile/str-rules.hs
- testsuite/tests/tcplugins/ArgsPlugin.hs
- testsuite/tests/tcplugins/EmitWantedPlugin.hs
- testsuite/tests/tcplugins/RewritePlugin.hs
- testsuite/tests/tcplugins/T26395_Plugin.hs
- testsuite/tests/tcplugins/TyFamPlugin.hs
- testsuite/tests/th/T14741.hs
- testsuite/tests/th/T21547.stderr
- testsuite/tests/th/T26568.stderr
- + testsuite/tests/th/T27013th.hs
- testsuite/tests/th/TH_Roles2.stderr
- + testsuite/tests/th/TH_pragmaSpecOld.hs
- + testsuite/tests/th/TH_pragmaSpecOld.stderr
- testsuite/tests/th/all.T
- testsuite/tests/typecheck/should_compile/T13032.stderr
- testsuite/tests/typecheck/should_compile/T14273.stderr
- testsuite/tests/typecheck/should_compile/T18406b.stderr
- testsuite/tests/typecheck/should_compile/T18529.stderr
- testsuite/tests/typecheck/should_compile/holes.stderr
- testsuite/tests/typecheck/should_compile/holes2.stderr
- testsuite/tests/typecheck/should_compile/holes3.stderr
- testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr
- testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
- testsuite/tests/typecheck/should_fail/T12921.stderr
- testsuite/tests/typecheck/should_fail/T14884.stderr
- testsuite/tests/typecheck/should_fail/T15883b.stderr
- testsuite/tests/typecheck/should_fail/T15883c.stderr
- testsuite/tests/typecheck/should_fail/T15883d.stderr
- testsuite/tests/typecheck/should_fail/T21130.stderr
- testsuite/tests/typecheck/should_fail/T3323.stderr
- testsuite/tests/typecheck/should_fail/T5095.stderr
- testsuite/tests/typecheck/should_fail/T7279.stderr
- testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
- testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.stderr
- testsuite/tests/typecheck/should_fail/tcfail072.stderr
- testsuite/tests/typecheck/should_fail/tcfail097.stderr
- testsuite/tests/typecheck/should_fail/tcfail133.stderr
- testsuite/tests/typecheck/should_run/T22510.stdout
- testsuite/tests/unboxedsums/UbxSumLevPoly.hs
- testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs
- testsuite/tests/warnings/should_compile/DerivingTypeable.stderr
- utils/check-exact/Utils.hs
- utils/genprimopcode/Main.hs
- utils/haddock/haddock-api/src/Haddock/Convert.hs
- utils/haddock/haddock-api/src/Haddock/GhcUtils.hs
- utils/haddock/haddock-api/src/Haddock/Interface.hs
- utils/haddock/haddock-api/src/Haddock/Interface/AttachInstances.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Create.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/18d740ac5a4f078df1a1a3c3de2345…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/18d740ac5a4f078df1a1a3c3de2345…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/int-index/rta-patsyn] Discard type arguments in tcPatToExpr (#27440, #27583)
by Vladislav Zavialov (@int-index) 07 Aug '26
by Vladislav Zavialov (@int-index) 07 Aug '26
07 Aug '26
Vladislav Zavialov pushed to branch wip/int-index/rta-patsyn at Glasgow Haskell Compiler / GHC
Commits:
82063234 by Vladislav Zavialov at 2026-08-07T06:14:29+03:00
Discard type arguments in tcPatToExpr (#27440, #27583)
The builder expression of an implicitly bidirectional pattern synonym must not
mention types written in the RHS:
* Invisible type arguments led to a panic (#27440)
* Required type arguments failed with out-of-scope variables (#27583)
Both are now discarded, following the precedent established by pattern
signatures (#9867).
Discarding type arguments takes some care: a type pattern cannot be told from a
value pattern by syntax alone, as the `type` keyword may be omitted. Consider:
data T a b c where
MkT :: forall a. forall b c -> a -> T a b c
pattern P :: x -> T x y z
pattern P x = MkT @a (type b) c x
In P's right-hand side, `@a` and `type b` are clearly type arguments, but what
about `c` and `x`? We can only tell by matching the patterns against MkT's
type. So tcPatToExpr now runs in TcM and matches the arguments against the
constructor's TyVarBinders using zipPatsBndrs, which is made public for this
purpose. The resulting builder is $bP x = MkT _ _ x.
See Note [Discarding types in the builder expression].
Test cases: T27440a T27440b T27440c T27440d T27440e
T27583a T27583b T27583c T27583d T27583e T27583f T27583g
Metric Increase: LinkableUsage02
Metric Decrease: T27336
Assisted-by: Claude Opus 5
- - - - -
23 changed files:
- + changelog.d/T27440
- + changelog.d/T27583
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- + testsuite/tests/patsyn/should_compile/T27440a.hs
- + testsuite/tests/patsyn/should_compile/T27440b.hs
- + testsuite/tests/patsyn/should_compile/T27440c.hs
- testsuite/tests/patsyn/should_compile/all.T
- + testsuite/tests/patsyn/should_fail/T27440d.hs
- + testsuite/tests/patsyn/should_fail/T27440d.stderr
- testsuite/tests/patsyn/should_fail/all.T
- + testsuite/tests/vdq-rta/should_compile/T27583a.hs
- + testsuite/tests/vdq-rta/should_compile/T27583b.hs
- + testsuite/tests/vdq-rta/should_compile/T27583c.hs
- + testsuite/tests/vdq-rta/should_compile/T27583d.hs
- + testsuite/tests/vdq-rta/should_compile/T27583e.hs
- + testsuite/tests/vdq-rta/should_compile/T27583g.hs
- testsuite/tests/vdq-rta/should_compile/all.T
- + testsuite/tests/vdq-rta/should_fail/T27440e.hs
- + testsuite/tests/vdq-rta/should_fail/T27440e.stderr
- + testsuite/tests/vdq-rta/should_fail/T27583f.hs
- + testsuite/tests/vdq-rta/should_fail/T27583f.stderr
- testsuite/tests/vdq-rta/should_fail/all.T
Changes:
=====================================
changelog.d/T27440
=====================================
@@ -0,0 +1,8 @@
+section: compiler
+issues: #27440
+mrs: !16434
+synopsis:
+ Fix a panic on ``@ty`` in a pattern synonym RHS
+description:
+ An invisible type argument (``@ty``) in the right-hand side of an implicitly
+ bidirectional pattern synonym no longer causes a panic.
=====================================
changelog.d/T27583
=====================================
@@ -0,0 +1,9 @@
+section: compiler
+issues: #27583
+mrs: !16434
+synopsis:
+ Fix spurious out-of-scope errors from ``type ty`` in a pattern synonym RHS
+description:
+ A required type argument with an explicit namespace specifier (``type ty``)
+ in the right-hand side of an implicitly bidirectional pattern synonym no
+ longer reports variables bound by the pattern as out of scope.
=====================================
compiler/GHC/Tc/Gen/Pat.hs
=====================================
@@ -16,6 +16,7 @@ module GHC.Tc.Gen.Pat
, tcCheckPat, tcCheckPat_O, tcInferPat
, tcMatchPats
, addDataConStupidTheta
+ , zipPatsBndrs
)
where
@@ -1727,7 +1728,7 @@ split_con_ty_args :: LexicalFixity -- How to wrap value arguments
, [(HsTyPat GhcRn, TyVar)] -- Existentials
, HsConPatDetails GhcRn ) -- Value arguments
split_con_ty_args fixity con_like arg_pats = do
- (bndr_ty_arg_prs, value_args) <- zip_pats_bndrs arg_pats (conLikeUserTyVarBinders con_like)
+ (bndr_ty_arg_prs, value_args) <- zipPatsBndrs arg_pats (conLikeUserTyVarBinders con_like)
return $ if null ex_tvs -- Short cut common case
then (bndr_ty_arg_prs, [], mk_details fixity value_args)
else let (ex_prs, univ_prs) = partition is_existential bndr_ty_arg_prs
@@ -1743,24 +1744,75 @@ split_con_ty_args fixity con_like arg_pats = do
-- InfixCon becomes PrefixCon if there are fewer than 2 value arguments.
-- Test case: T25127_infix
-zip_pats_bndrs :: [LPat GhcRn] -> [TyVarBinder] -> TcM ([(HsTyPat GhcRn, TyVar)], [LPat GhcRn])
-zip_pats_bndrs (L loc pat : pats) (Bndr tv vis : tvbs)
+-- | Line the arguments of a 'ConPat' up against the 'TyVarBinder's of its
+-- 'ConLike', returning the type arguments with the binders they instantiate,
+-- and the remaining value arguments.
+--
+-- See Note [Zipping ConPat arguments with TyVarBinders]
+--
+-- Precondition: 'check_con_pat_arity' has passed for these arguments, so that
+-- we never run out of patterns while a required binder remains.
+zipPatsBndrs :: [LPat GhcRn] -> [TyVarBinder] -> TcM ([(HsTyPat GhcRn, TyVar)], [LPat GhcRn])
+zipPatsBndrs (L loc pat : pats) (Bndr tv vis : tvbs)
| isVisibleForAllTyFlag vis
= do { tp <- setSrcSpanA loc $ pat_to_type_pat pat
- ; (prs, pats') <- zip_pats_bndrs pats tvbs
+ ; (prs, pats') <- zipPatsBndrs pats tvbs
; return ((tp, tv) : prs, pats') }
| InvisPat pat_spec tp <- pat
, Invisible spec <- vis
, pat_spec == spec
- = do { (prs, pats') <- zip_pats_bndrs pats tvbs
+ = do { (prs, pats') <- zipPatsBndrs pats tvbs
; return ((tp, tv):prs, pats') }
-zip_pats_bndrs pats (Bndr _ vis : tvbs)
- -- zip_pats_bndrs [] (Bndr _ Required : tvbs)
+zipPatsBndrs pats (Bndr _ vis : tvbs)
+ -- zipPatsBndrs [] (Bndr _ Required : tvbs)
-- is ruled out by the arity check in splitConTyArgs,
-- so we can assume (isInvisibleForAllTyFlag vis)
= do { massert (isInvisibleForAllTyFlag vis)
- ; zip_pats_bndrs pats tvbs }
-zip_pats_bndrs pats [] = return ([], pats)
+ ; zipPatsBndrs pats tvbs }
+zipPatsBndrs pats [] = return ([], pats)
+
+{- Note [Zipping ConPat arguments with TyVarBinders]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The zipPatsBndrs function allows us to line up the arguments of a constructor
+pattern `MkT p1 p2 ... pn` with the TyVarBinders of MkT's type. Consider
+
+ MkT :: forall a b. forall c d -> a -> T a b c d
+
+Then, in a pattern match `MkT @s (type t) p q`, we have the following
+correspondence:
+
+ * pattern `@s` with the TyVarBinder `forall a.`
+ * no pattern with the TyVarBinder `forall b.`
+ * pattern `type t` with the TyVarBinder `forall c ->`
+ * pattern `p` with the TyVarBinder `forall d ->`
+ * pattern `q` is the one remaining value argument
+
+Note how `p` and `q` are exactly alike, and only the TyVarBinder can tell us
+that `p` is a required type argument rather than a value argument.
+
+So the call (zipPatsBndrs pats tvbs) with the inputs
+
+ pats = [@s, type t, p, q]
+ tvbs = [Bndr a Spec, Bndr b Spec, Bndr c Req, Bndr d Req]
+
+produces the following (ty_pats, val_pats) outputs:
+
+ ty_pats = [(s, a), (t, c), (p, d)]
+ val_pats = [q] -- remaining value arguments
+
+Note that the ty_pats components are stripped: the type patterns have lost the
+`@` or the `type` herald, and the binders have been reduced to their TyVars.
+
+This is currently used in two ways:
+
+1. In tcDataConPat/tcPatSynPat (via splitConTyArgs) to pass the type arguments
+ onto tcConTyArgs and the value arguments onto tcConValArgs.
+ See Note [Type applications in patterns] for more details.
+
+2. In tcPatToExpr, to discard the type arguments in the RHS of an implicitly
+ bidirectional pattern synonym, keeping only the value arguments.
+ See Note [Discarding types in the builder expression] in GHC.Tc.TyCl.PatSyn.
+-}
tcConTyArgs :: Subst -> PatEnv -> [(HsTyPat GhcRn, TyVar)]
-> TcM a -> TcM a
=====================================
compiler/GHC/Tc/TyCl/PatSyn.hs
=====================================
@@ -940,11 +940,9 @@ tcPatSynBuilderBind prag_fn (PSB { psb_id = ps_lname@(L loc ps_name)
| isUnidirectional dir
= return []
- | Left why <- mb_match_group -- Can't invert the pattern
- = setSrcSpan (getLocA lpat) $ failWithTc $ TcRnPatSynInvalidRhs ps_name lpat args why
-
- | Right match_group <- mb_match_group -- Bidirectional
- = do { patsyn <- tcLookupPatSyn ps_name
+ | otherwise -- Bidirectional
+ = do { match_group <- get_match_group
+ ; patsyn <- tcLookupPatSyn ps_name
; case patSynBuilder patsyn of {
Nothing -> return [] ;
-- This case happens if we found a type error in the
@@ -985,10 +983,10 @@ tcPatSynBuilderBind prag_fn (PSB { psb_id = ps_lname@(L loc ps_name)
; return builder_binds } } }
where
- mb_match_group
+ get_match_group
= case dir of
- ExplicitBidirectional explicit_mg -> Right explicit_mg
- ImplicitBidirectional -> fmap mk_mg (tcPatToExpr args lpat)
+ ExplicitBidirectional explicit_mg -> return explicit_mg
+ ImplicitBidirectional -> mk_mg <$> tcPatToExpr ps_name args lpat
Unidirectional -> panic "tcPatSynBuilderBind"
mk_mg :: LHsExpr GhcRn -> MatchGroup GhcRn (LHsExpr GhcRn)
@@ -1032,44 +1030,53 @@ add_void need_dummy_arg ty
| need_dummy_arg = mkVisFunTyMany unboxedUnitTy ty
| otherwise = ty
-tcPatToExpr :: [LocatedN Name] -> LPat GhcRn
- -> Either PatSynInvalidRhsReason (LHsExpr GhcRn)
+tcPatToExpr :: Name -> [LocatedN Name] -> LPat GhcRn -> TcM (LHsExpr GhcRn)
-- Given a /pattern/, return an /expression/ that builds a value
-- that matches the pattern. E.g. if the pattern is (Just [x]),
-- the expression is (Just [x]). They look the same, but the
-- input uses constructors from HsPat and the output uses constructors
-- from HsExpr.
--
--- Returns (Left r) if the pattern is not invertible, for reason r.
+-- Fails with TcRnPatSynInvalidRhs if the pattern is not invertible.
-- See Note [Builder for a bidirectional pattern synonym]
-tcPatToExpr args pat = go pat
+tcPatToExpr ps_name args pat = go pat
where
lhsVars = mkNameSet (map unLoc args)
+ invalidRhs :: PatSynInvalidRhsReason -> TcM a
+ invalidRhs why = setSrcSpan (getLocA pat) $
+ failWithTc $ TcRnPatSynInvalidRhs ps_name pat args why
+
-- Make a prefix con for prefix and infix patterns for simplicity
mkPrefixConExpr :: LocatedN (WithUserRdr Name)
-> [LPat GhcRn]
- -> Either PatSynInvalidRhsReason (HsExpr GhcRn)
- mkPrefixConExpr lcon@(L loc _) pats
- = do { exprs <- mapM go pats
+ -> TcM (HsExpr GhcRn)
+ mkPrefixConExpr lcon@(L loc con_name) pats
+ = do { con_like <- tcLookupConLike con_name
+ ; let tvbs = conLikeUserTyVarBinders con_like
+ ; (_ty_pats, val_pats) <- zipPatsBndrs pats tvbs
+ -- Type arguments _ty_pats are discarded, just like the SigPat's type.
+ -- See Note [Discarding types in the builder expression]
+ ; let ty_exprs = [wildCardTyArg | tvb <- tvbs, isVisibleForAllTyBinder tvb]
+ -- Placeholders `_` for the discarded required type arguments.
+ ; val_exprs <- mapM go val_pats
; let con = L (l2l loc) (HsVar noExtField lcon)
- ; return (unLoc $ mkHsApps con exprs)
- }
+ ; return (unLoc $ mkHsApps con (ty_exprs ++ val_exprs)) }
mkRecordConExpr :: LocatedN (WithUserRdr Name)
-> HsRecFields GhcRn (LPat GhcRn)
- -> Either PatSynInvalidRhsReason (HsExpr GhcRn)
+ -> TcM (HsExpr GhcRn)
mkRecordConExpr con (HsRecFields x fields dd)
= do { exprFields <- mapM go' fields
; return (RecordCon noExtField con (HsRecFields x exprFields dd)) }
- go' :: LHsRecField GhcRn (LPat GhcRn) -> Either PatSynInvalidRhsReason (LHsRecField GhcRn (LHsExpr GhcRn))
+ go' :: LHsRecField GhcRn (LPat GhcRn) -> TcM (LHsRecField GhcRn (LHsExpr GhcRn))
go' (L l rf) = L l <$> traverse go rf
- go :: LPat GhcRn -> Either PatSynInvalidRhsReason (LHsExpr GhcRn)
+ go :: LPat GhcRn -> TcM (LHsExpr GhcRn)
go (L loc p) = L loc <$> go1 p
- go1 :: Pat GhcRn -> Either PatSynInvalidRhsReason (HsExpr GhcRn)
+ go1 :: Pat GhcRn -> TcM (HsExpr GhcRn)
go1 (ConPat NoExtField con info)
= case info of
PrefixCon _ ps -> mkPrefixConExpr con ps
@@ -1077,13 +1084,13 @@ tcPatToExpr args pat = go pat
RecCon _ fields -> mkRecordConExpr con fields
go1 (SigPat _ pat _) = go1 (unLoc pat)
- -- See Note [Type signatures and the builder expression]
+ -- See Note [Discarding types in the builder expression]
go1 (VarPat _ (L l var))
| var `elemNameSet` lhsVars
= return $ mkHsVar (L l var)
| otherwise
- = Left (PatSynUnboundVar var)
+ = invalidRhs (PatSynUnboundVar var)
go1 (ParPat _ pat) = fmap (HsPar noExtField) (go pat)
go1 (ListPat _ pats)
= do { exprs <- mapM go pats
@@ -1104,10 +1111,7 @@ tcPatToExpr args pat = go pat
| otherwise = return $ HsOverLit noExtField n
go1 (SplicePat (HsUntypedSpliceTop _ pat) _) = go1 pat
go1 (SplicePat (HsUntypedSpliceNested _) _) = panic "tcPatToExpr: invalid nested splice"
- go1 (EmbTyPat _ tp) = return $ HsEmbTy noExtField (hstp_to_hswc tp)
- where hstp_to_hswc :: HsTyPat GhcRn -> LHsWcType GhcRn
- hstp_to_hswc (HsTP { hstp_ext = HsTPRn { hstp_nwcs = wcs }, hstp_body = hs_ty })
- = HsWC { hswc_ext = wcs, hswc_body = hs_ty }
+ go1 (EmbTyPat _ _tp) = panic "tcPatToExpr: invalid type pattern"
go1 (InvisPat _ _tp) = panic "tcPatToExpr: invalid invisible pattern"
go1 (XPat (HsPatExpanded _ pat))= go1 pat
@@ -1131,7 +1135,11 @@ tcPatToExpr args pat = go pat
go1 p@(NPlusKPat {}) = notInvertible p
go1 p@(OrPat {}) = notInvertible p
- notInvertible p = Left (PatSynNotInvertible p)
+ notInvertible p = invalidRhs (PatSynNotInvertible p)
+
+-- See Note [Discarding types in the builder expression]
+wildCardTyArg :: LHsExpr GhcRn
+wildCardTyArg = wrapGenSpan (HsHole (HoleVar (wrapGenSpan unnamedHoleRdrName)))
{- Note [Builder for a bidirectional pattern synonym]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1203,9 +1211,17 @@ one could write a nonsensical function like
or
g (K (Just True) False) = ...
-Note [Type signatures and the builder expression]
+Note [Discarding types in the builder expression]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The RHS of an implicitly bidirectional pattern synonym may mention types in
+three ways: a pattern signature (p :: ty), an invisible type argument (@ty),
+and a required type argument (type ty). Required type arguments may be obscured
+by the omission of the `type` keyword.
+
+A type may /bind/ variables when it occurs in a pattern, and those binders have
+no counterpart in the builder's scope, so tcPatToExpr must not carry them over.
Consider
+
pattern L x = Left x :: Either [a] [b]
In tc{Infer/Check}PatSynDecl we will check that the pattern has the
@@ -1223,6 +1239,71 @@ latter; #9867.) No, the job of the signature is done, so when
converting the pattern to an expression (for the builder RHS) we
simply discard the signature.
+The same reasoning applies to the other two forms, but the way we discard
+them differs. Which form an argument takes is not apparent from the pattern
+alone: in
+
+ pattern P x = MkT a x
+
+'a' looks like an ordinary variable pattern, and only the TyVarBinders in
+MkT's type say that it stands in a required type argument position. We get
+those binders from the typechecked ConLike, via conLikeUserTyVarBinders, so
+mkPrefixConExpr must look the constructor up before it can walk the arguments.
+It then lines them up against the binders with zipPatsBndrs, as described
+in Note [Zipping ConPat arguments with TyVarBinders] in GHC.Tc.Gen.Pat.
+
+Each argument is then treated accordingly:
+
+* Invisible type arguments (@ty) are dropped from the argument list
+ altogether. Given
+
+ pattern Q x = MkT @a x
+
+ the builder is $bQ x = MkT x. Dropping is safe because the argument
+ instantiates either a universal, which the expected type of the builder
+ already pins down, or an existential, which cannot take a concrete type
+ in a pattern anyway. Improper handling of type arguments led to #27440.
+
+* Required type arguments cannot be dropped, as that would change the syntactic
+ arity of the application. Instead, we replace them with wildcards `_`, the
+ equivalent of @_ for invisible type arguments. Given
+
+ pattern R x = MkT (type a) x
+ pattern P x = MkT a x
+
+ the builders are $bR x = MkT _ x and $bP x = MkT _ x, and the wildcard is
+ solved from the expected type. Retaining the type would mention a binder that
+ is not in scope in the builder (#27583).
+
+This reasoning holds when the RHS is a data constructor. Two caveats:
+
+* With a helper pattern synonym we can construct an example where discarding
+ the type argument rejects an otherwise valid program:
+
+ pattern Q :: forall a. Show a => Int -> S -- 'a' is ambiguous
+ pattern P n = Q @Bool n -- rejected: $bP n = Q n, ambiguous 'a'
+
+ The example introduces an ambiguous type variable occurring in a class
+ constraint. Such a variable serves no purpose, so we do not expect to
+ encounter this problem in practice. The workaround is to declare P
+ explicitly bidirectional and write the builder by hand.
+
+* A required type argument that binds a variable yields a suboptimal error
+ message: we fail to solve the wildcard, where we would rather report that 'a'
+ is not bound on the LHS.
+
+ data S where MkS :: forall a -> Show a => Int -> S
+ pattern P n = MkS a n -- $bP n = MkS _ n, ambiguous wildcard
+
+ Mind you, the program is rejected either way: it is not possible to bind 'a' on
+ the LHS until pattern synonyms support RequiredTypeArguments (#23704) or
+ TypeAbstractions (#27642).
+
+We will have to revisit this design once we do add support for those extensions
+in pattern synonym declarations (#23704, #27642). When type variables can be
+bound on the LHS, the builder has a scope for them, and discarding every type in
+the RHS is no longer the obvious thing to do.
+
Note [Record PatSyn Desugaring]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is important that prov_theta comes before req_theta as this ordering is used
=====================================
testsuite/tests/patsyn/should_compile/T27440a.hs
=====================================
@@ -0,0 +1,12 @@
+{-# LANGUAGE DataKinds, PatternSynonyms, TypeAbstractions #-}
+module T27440a where
+
+import Data.Kind (Type)
+
+newtype Lit = Lit { litName :: String }
+
+type LitOfValue :: Bool -> Type
+newtype LitOfValue v = LitOfValue { underlyingLit :: Lit }
+
+pattern FalseLit :: Lit -> LitOfValue False
+pattern FalseLit a = LitOfValue @False a
=====================================
testsuite/tests/patsyn/should_compile/T27440b.hs
=====================================
@@ -0,0 +1,7 @@
+{-# LANGUAGE PatternSynonyms, TypeAbstractions #-}
+module T27440b where
+
+data T a = MkT a
+
+pattern P :: a -> T a
+pattern P x = MkT @a x
=====================================
testsuite/tests/patsyn/should_compile/T27440c.hs
=====================================
@@ -0,0 +1,7 @@
+{-# LANGUAGE ExistentialQuantification, PatternSynonyms, TypeAbstractions #-}
+module T27440c where
+
+data S = forall a. Show a => MkS a
+
+pattern P :: () => Show a => a -> S
+pattern P x = MkS @a x
=====================================
testsuite/tests/patsyn/should_compile/all.T
=====================================
@@ -90,3 +90,7 @@ test('T23038', normal, compile_fail, [''])
test('T22328', normal, compile, [''])
test('T26331', normal, compile, [''])
test('T26331a', normal, compile, [''])
+
+test('T27440a', normal, compile, [''])
+test('T27440b', normal, compile, [''])
+test('T27440c', normal, compile, [''])
=====================================
testsuite/tests/patsyn/should_fail/T27440d.hs
=====================================
@@ -0,0 +1,7 @@
+{-# LANGUAGE ExistentialQuantification, PatternSynonyms, TypeAbstractions #-}
+module T27440d where
+
+data S = forall a. Show a => MkS a
+
+pattern P :: Show a => a -> S
+pattern P x = MkS @a x
=====================================
testsuite/tests/patsyn/should_fail/T27440d.stderr
=====================================
@@ -0,0 +1,12 @@
+T27440d.hs:7:22: error: [GHC-25897]
+ • Couldn't match expected type ‘a’ with actual type ‘a1’
+ ‘a1’ is a rigid type variable bound by
+ a pattern with constructor: MkS :: forall a. Show a => a -> S,
+ in a pattern synonym declaration
+ at T27440d.hs:7:15-22
+ ‘a’ is a rigid type variable bound by
+ the signature for pattern synonym ‘P’
+ at T27440d.hs:6:14-29
+ • In the declaration for pattern synonym ‘P’
+ • Relevant bindings include x :: a1 (bound at T27440d.hs:7:22)
+
=====================================
testsuite/tests/patsyn/should_fail/all.T
=====================================
@@ -55,3 +55,5 @@ test('patsyn_where_fail1', normal, compile_fail, [''])
test('patsyn_where_fail2', normal, compile_fail, [''])
test('patsyn_where_fail3', normal, compile_fail, [''])
test('patsyn_where_fail4', normal, compile_fail, [''])
+
+test('T27440d', normal, compile_fail, [''])
=====================================
testsuite/tests/vdq-rta/should_compile/T27583a.hs
=====================================
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms #-}
+module T27583a where
+
+data T a where
+ MkT :: forall a -> T a
+
+pattern P :: T a
+pattern P = MkT (type a)
=====================================
testsuite/tests/vdq-rta/should_compile/T27583b.hs
=====================================
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms #-}
+module T27583b where
+
+data T a where
+ MkT :: forall a -> T a
+
+pattern P :: T a
+pattern P = MkT a
=====================================
testsuite/tests/vdq-rta/should_compile/T27583c.hs
=====================================
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms #-}
+module T27583c where
+
+data T a where
+ MkT :: forall a -> T a
+
+pattern P :: T Int
+pattern P = MkT (type Int)
=====================================
testsuite/tests/vdq-rta/should_compile/T27583d.hs
=====================================
@@ -0,0 +1,21 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms #-}
+module T27583d where
+
+data T a where
+ MkT :: forall a -> a -> T a
+
+-- A required type argument is checked against the signature, with or without
+-- the 'type' herald. The variable/wildcard patterns x, _, (type x), (type _)
+-- can't mismatch the signature. Concrete types are in T27583e and T27583f.
+
+pattern P1 :: Int -> T Int
+pattern P1 n = MkT x n
+
+pattern P2 :: Int -> T Int
+pattern P2 n = MkT (type x) n
+
+pattern P3 :: Int -> T Int
+pattern P3 n = MkT _ n
+
+pattern P4 :: Int -> T Int
+pattern P4 n = MkT (type _) n
=====================================
testsuite/tests/vdq-rta/should_compile/T27583e.hs
=====================================
@@ -0,0 +1,21 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms #-}
+module T27583e where
+
+data T a where
+ MkT :: forall a -> a -> T a
+
+-- A required type argument is checked against the signature, with or without
+-- the 'type' herald. Here the type written in that position agrees with the
+-- signature. T27583f is the same four patterns with a type that does not.
+
+pattern P1 :: Int -> T Int
+pattern P1 n = MkT Int n
+
+pattern P2 :: Int -> T Int
+pattern P2 n = MkT (type Int) n
+
+pattern P3 :: Maybe Int -> T (Maybe Int)
+pattern P3 n = MkT (Maybe Int) n
+
+pattern P4 :: Maybe Int -> T (Maybe Int)
+pattern P4 n = MkT (type (Maybe Int)) n
=====================================
testsuite/tests/vdq-rta/should_compile/T27583g.hs
=====================================
@@ -0,0 +1,14 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms, TypeAbstractions #-}
+module T27583g where
+
+data T a b c where
+ MkT :: forall a. forall b c -> a -> T a b c
+
+-- Check all argument variants in a constructor pattern at once: the invisible
+-- type argument `@a`, the required type argument `type b` with the herald, the
+-- required type argument `c` without the herald, and the value argument `x`.
+--
+-- The resulting builder is $bP x = MkT _ _ x.
+
+pattern P :: x -> T x y z
+pattern P x = MkT @a (type b) c x
=====================================
testsuite/tests/vdq-rta/should_compile/all.T
=====================================
@@ -39,3 +39,10 @@ test('T23738_th', req_th, compile, [''])
test('T24159_viewpat', normal, compile, [''])
test('T24159_type_syntax', normal, compile, [''])
test('T24159_th_type_syntax', req_th, compile, [''])
+
+test('T27583a', normal, compile, [''])
+test('T27583b', normal, compile, [''])
+test('T27583c', normal, compile, [''])
+test('T27583d', normal, compile, [''])
+test('T27583e', normal, compile, [''])
+test('T27583g', normal, compile, [''])
=====================================
testsuite/tests/vdq-rta/should_fail/T27440e.hs
=====================================
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms, TypeAbstractions #-}
+module T27440e where
+
+data T a where
+ MkT :: forall a -> T a
+
+pattern P :: a -> T a
+pattern P x = MkT @a x
=====================================
testsuite/tests/vdq-rta/should_fail/T27440e.stderr
=====================================
@@ -0,0 +1,5 @@
+T27440e.hs:8:19: error: [GHC-88754]
+ • Ill-formed type pattern: @a
+ • In the pattern: MkT @a x
+ In the declaration for pattern synonym ‘P’
+
=====================================
testsuite/tests/vdq-rta/should_fail/T27583f.hs
=====================================
@@ -0,0 +1,21 @@
+{-# LANGUAGE GADTs, RequiredTypeArguments, PatternSynonyms #-}
+module T27583f where
+
+data T a where
+ MkT :: forall a -> a -> T a
+
+-- A required type argument is checked against the signature, with or without
+-- the 'type' herald. Here the type written in that position does not agree
+-- with the signature. T27583e is the same four patterns with a type that does.
+
+pattern P1 :: Int -> T Int
+pattern P1 n = MkT Bool n
+
+pattern P2 :: Int -> T Int
+pattern P2 n = MkT (type Bool) n
+
+pattern P3 :: Maybe Int -> T (Maybe Int)
+pattern P3 n = MkT (Maybe Bool) n
+
+pattern P4 :: Maybe Int -> T (Maybe Int)
+pattern P4 n = MkT (type (Maybe Bool)) n
=====================================
testsuite/tests/vdq-rta/should_fail/T27583f.stderr
=====================================
@@ -0,0 +1,24 @@
+T27583f.hs:12:16: error: [GHC-83865]
+ • Couldn't match expected type ‘Int’ with actual type ‘Bool’
+ • In the pattern: MkT Bool n
+ In the declaration for pattern synonym ‘P1’
+
+T27583f.hs:15:16: error: [GHC-83865]
+ • Couldn't match expected type ‘Int’ with actual type ‘Bool’
+ • In the pattern: MkT (type Bool) n
+ In the declaration for pattern synonym ‘P2’
+
+T27583f.hs:18:16: error: [GHC-83865]
+ • Couldn't match type ‘Bool’ with ‘Int’
+ Expected: Maybe Int
+ Actual: Maybe Bool
+ • In the pattern: MkT (Maybe Bool) n
+ In the declaration for pattern synonym ‘P3’
+
+T27583f.hs:21:16: error: [GHC-83865]
+ • Couldn't match type ‘Bool’ with ‘Int’
+ Expected: Maybe Int
+ Actual: Maybe Bool
+ • In the pattern: MkT (type (Maybe Bool)) n
+ In the declaration for pattern synonym ‘P4’
+
=====================================
testsuite/tests/vdq-rta/should_fail/all.T
=====================================
@@ -32,3 +32,6 @@ test('T24159_type_syntax_tc_fail', normal, compile_fail, [''])
test('T24159_type_syntax_th_fail', normal, ghci_script, ['T24159_type_syntax_th_fail.script'])
test('T25127_fail_th_quote', normal, compile_fail, [''])
test('T25127_fail_arity', normal, compile_fail, [''])
+
+test('T27440e', normal, compile_fail, [''])
+test('T27583f', normal, compile_fail, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/820632344faff832e67cfd162bf9422…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/820632344faff832e67cfd162bf9422…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/spj-reinstallable-base2] Allow GHC.Essentials to be hidden
by sheaf (@sheaf) 07 Aug '26
by sheaf (@sheaf) 07 Aug '26
07 Aug '26
sheaf pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC
Commits:
18d740ac by sheaf at 2026-08-07T02:54:34+02:00
Allow GHC.Essentials to be hidden
This commit overhauls several aspects of the known entity handling,
in order to allow GHC.Essentials to be hidden without a proliferation
of special cases in the compiler.
The main contribution is to introduce the 'UnresolvedImport' datatype
which cleans up a lot of ad-hoc handling relating to 'ModSummary',
fixing #27603. This allows us to reduce duplication, e.g. by having
Backpack reuse 'mkUnresolvedImports' instead of replicating the
"add implicit imports" logic. It also makes it easier to avoid
undesirable edge cases (such as making sure that the Template Haskell
'reifyModule' function does not leak the implicit GHC.Essentials import).
In particular, the infamous 'findImportedModuleWithIsBoot' is now simply
'resolveImport', taking a single 'UnresolvedImport' and resolving it
to a 'FindResult' (usually a 'Module').
Other changes:
- Cache the result of looking up GHC.Essentials (in TcM and DsM
environments) to avoid redundant work.
This reduces allocations on LinkableUsage01 and hard_hole_fits.
- Properly look up known entities for StaticPointers like we do for
other known entities everywhere else. This allows e.g. modules in
ghc-internal to use -XStaticPointers.
- When using multiple home units, we are now careful to handle the
situation in which we may have multiple GHC.Essentials modules
around. See the new tests under 'driver/multipleHomeUnits'.
- - - - -
107 changed files:
- compiler/GHC.hs
- compiler/GHC/Builtin.hs
- compiler/GHC/Builtin/Modules.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Tidy.hs
- compiler/GHC/Driver/Downsweep.hs
- compiler/GHC/Driver/Main/Passes.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/Iface/Errors/Ppr.hs
- compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Plugin.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Utils/Monad.hs
- + compiler/GHC/Types/UnresolvedImport.hs
- compiler/GHC/Unit/External.hs
- compiler/GHC/Unit/External/ModuleOrigin.hs
- compiler/GHC/Unit/External/Providers.hs
- compiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/Finder/Types.hs
- compiler/GHC/Unit/Module/Deps.hs
- compiler/GHC/Unit/Module/ModSummary.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Unit/Types.hs
- compiler/ghc.cabal.in
- ghc/GHCi/UI.hs
- ghc/Main.hs
- libraries/base/base.cabal.in
- linters/lint-codes/LintCodes/Static.hs
- testsuite/driver/testutil.py
- testsuite/tests/cabal/T12485/Makefile
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/diagnostic-codes/codes.stdout
- testsuite/tests/driver/T27013e/T27013e.hs
- testsuite/tests/driver/T27013e/T27013e.stderr
- testsuite/tests/driver/T27013f/T27013f.hs
- testsuite/tests/driver/T27013f/T27013f.stderr
- + testsuite/tests/driver/T27013g/T27013g.hs
- + testsuite/tests/driver/T27013g/all.T
- + testsuite/tests/driver/T27013h/GHC/Essentials.hs
- + testsuite/tests/driver/T27013h/T27013h.stderr
- + testsuite/tests/driver/T27013h/all.T
- + testsuite/tests/driver/T27013h/unitT27013h
- + testsuite/tests/driver/T27013i/T27013i.hs
- + testsuite/tests/driver/T27013i/T27013i.stderr
- + testsuite/tests/driver/T27013i/all.T
- testsuite/tests/driver/multipleHomeUnits/Makefile
- testsuite/tests/driver/multipleHomeUnits/all.T
- + testsuite/tests/driver/multipleHomeUnits/essentials-home/GHC/Essentials.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-order-base/B.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-order-user/U.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-user/M.hs
- testsuite/tests/driver/multipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials.stdout
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials_order.stderr
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials_recomp.stdout
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsHome
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsHomeHidden
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsOrderBase
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsOrderUser
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsUser
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsUserHidden
- + testsuite/tests/ghc-api/EssentialsCoverage.hs
- testsuite/tests/ghc-api/all.T
- testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T4175.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/ghci/scripts/ghci064.stdout
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/module/mod185.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T14189.stderr
- testsuite/tests/parser/should_fail/T16270h.hs
- testsuite/tests/plugins/plugins09.stdout
- testsuite/tests/plugins/plugins10.stdout
- testsuite/tests/plugins/plugins11.stdout
- testsuite/tests/plugins/static-plugins.stdout
- + testsuite/tests/th/T27013th.hs
- testsuite/tests/th/all.T
- utils/haddock/haddock-api/src/Haddock/Interface.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/18d740ac5a4f078df1a1a3c3de2345a…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/18d740ac5a4f078df1a1a3c3de2345a…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/int-index/error-codes] 18 commits: EPA: Remove LocatedP from OverlapMode
by Vladislav Zavialov (@int-index) 06 Aug '26
by Vladislav Zavialov (@int-index) 06 Aug '26
06 Aug '26
Vladislav Zavialov pushed to branch wip/int-index/error-codes at Glasgow Haskell Compiler / GHC
Commits:
85b10c00 by Alan Zimmerman at 2026-07-31T22:09:47+01:00
EPA: Remove LocatedP from OverlapMode
We have
type LocatedP = GenLocated SrcSpanAnnP
type SrcSpanAnnP = EpAnn AnnPragma
As the first step in removing this in favour of LocatedA which only
captures location, comments and trailing annotations, we remove it
from OverlapMode
We do this by moving the AnnPragma into the TTG extension point
instead.
- - - - -
c9a34a00 by Viktor Dukhovni at 2026-08-02T04:34:17-04:00
Fix note typo
- - - - -
4f2a21f7 by Andreas Klebinger at 2026-08-02T22:46:46-04:00
Apply oneShot Monad trick to STG LintM
- - - - -
21e4b89d by Andreas Klebinger at 2026-08-02T22:46:46-04:00
stgLint: Use a single reader env for read only arguments.
- - - - -
d415f38a by Alan Zimmerman at 2026-08-02T22:47:27-04:00
EPA: Remove LocatedP from CType
The next step of removing use of LocatedP by moving
the AnnPragma for CType into its TTG extension point
instead.
- - - - -
8fc6f882 by Simon Jakobi at 2026-08-05T14:53:41-04:00
testsuite: Don't crash on non-UTF-8 test output
read_stdout, read_stderr_for, read_comp_stderr and read_diff decoded
strictly (the first three with UTF-8, read_diff with the locale
encoding), so a test emitting invalid UTF-8 (binary output, or a crash
truncating a multi-byte character) raised UnicodeDecodeError and was
reported as a framework failure instead of its actual result.
Decode with errors='replace', like read_no_crs and safe_print.
Assisted-by: Claude Fable 5
- - - - -
56534866 by Simon Jakobi at 2026-08-05T14:53:41-04:00
testsuite: Colorize the test summary, also in CI
The summary headings were plain, and SUMMARY was colored unconditionally,
so the escapes also ended up in the file written by --summary-file.
Color is now decided per output sink via term_color.colored_if; see the
comments in term_color.
CI logs are not a tty, but GitLab's log viewer renders ANSI colors, so
add --force-colors and pass it in .gitlab/ci.sh.
Assisted-by: Claude Opus 5
- - - - -
bceb541a by Simon Jakobi at 2026-08-05T14:53:42-04:00
testsuite: Repeat unexpected failure output in the summary
Finding out why a test failed meant scrolling back through a possibly
very long log to the point where the test ran. The summary now repeats
the captured output of unexpected failures, before the statistics, so
the most interesting part is at the end of the log (#16720).
Output mismatches report their diff instead of the mismatching stream
(see Note [Redundant output in test results]). The repeated output is
bounded per stream, and skipped altogether beyond
MAX_SUMMARY_OUTPUT_TESTS failure blocks. Tests failing identically in
several ways share one block.
Test results now report a source-relative directory, stable regardless
of where the run was started from.
Assisted-by: Claude Fable 5
- - - - -
2ab02c57 by Ben Gamari at 2026-08-05T14:54:24-04:00
base: Don't drop exception context in SomeException(toException)
For reasons that are lost to time, the implementation of [CLC #200]
that was merged inappropriately dropped `ExceptionContext` in the
`toException` implementation given to `SomeException`.
Fix this infelicity.
[CLC #200]: https://github.com/haskell/core-libraries-committee/issues/200
- - - - -
126ce574 by Vladislav Zavialov at 2026-08-05T14:55:05-04:00
Test case for #20902
Starting with GHC 9.14.1 (the first major release to include 51e3ec83),
and from point releases GHC 9.10.2 and GHC 9.12.3 (backports cc4470be68
and b30f25591e), all examples in this ticket are handled as expected.
- - - - -
b14d8d59 by Alan Zimmerman at 2026-08-05T14:55:46-04:00
EPA: Remove LocatedP, last use in WarningTxt
The last step of removing LocatedP, by moving the AnnPragma for
WarningTxt into its TTG extension point instead.
This also allows us to remove LocatedP and SrcSpanAnnP
- - - - -
70b58c8f by Vladislav Zavialov at 2026-08-05T14:56:27-04:00
Test cases for #18725
Starting with GHC 9.4 (the first release to include 268efcc9a4), the program in
this ticket no longer panics. A standalone kind signature breaks the recursive
loop, so the type constructor can be used in a kind within its own group.
T18725a checks that this is accepted with the signature present, while T18725b
confirms it is still rejected without it.
- - - - -
b18c8dd5 by Zubin Duggal at 2026-08-06T15:51:01-04:00
hie files: Dump the type table when dumping with -ddump-hie
- - - - -
f839d0fb by Zubin Duggal at 2026-08-06T15:51:01-04:00
hie files: Take evidence for quantified constraints into account when saving evidence terms to the hie ast
Fixes #25709
- - - - -
5753ebaa by Simon Jakobi at 2026-08-06T15:51:43-04:00
testsuite: fix stale paths for the ghc-config build artifacts
ghc-config.hs moved from testsuite/mk/ to testsuite/ghc-config/ in
6c7a49139c, but the .gitignore entry and the clean rule still referred to
the old location. As a result the compiled ghc-config binary, which
boilerplate.mk rebuilds on every make-driven test run, showed up as an
untracked file and was never cleaned.
Assisted-by: Claude Opus 5
- - - - -
246d4d72 by Simon Peyton Jones at 2026-08-06T15:52:25-04:00
Documentation only
...driven by my investigation of #27591
- - - - -
be69e9df by Alan Zimmerman at 2026-08-06T15:53:05-04:00
EPA: Replace AnnPragma with individual types
We introduced AnnPragma as a common type for all pragma usages wrapped
in LocatedP / SrcSpanAnnP. Now that those are gone, and the AnnPragma
moved into the TTG points for the given items, we can ensure that each
carries only the annotations it needs.
So we remove AnnPragma, and in its place bring in
AnnCType
AnnWarningTxt
AnnOverlap
AnnAnnDecl
AnnPragSCC
- - - - -
93abb630 by Vladislav Zavialov at 2026-08-07T01:29:19+03:00
Increase test coverage of diagnostics, batch 2
Add test cases for the previously untested diagnostics:
[GHC-26133] TcRnForeignImportPrimSafeAnn
[GHC-68444] SumAltArityExceeded
[GHC-63966] IllegalSumAlt
[GHC-23882] IllegalDeclaration
[GHC-60220] InvalidCCallImpent
[GHC-18816] RecGadtNoCons
[GHC-38140] GadtNoCons
[GHC-37056] InvalidTypeInstanceHeader
[GHC-78486] InvalidTyFamInstLHS
[GHC-39639] DefaultDataInstDecl
[GHC-78822] AssocDefaultNotAssoc
[GHC-43510] NotSimpleUnliftedType
[GHC-41843] IOResultExpected
[GHC-07641] AtLeastOneArgExpected
[GHC-52886] InvalidTopDecl
Remove unused error constructors:
[GHC-92057] ImportLookupAmbiguous
- - - - -
83 changed files:
- .gitlab/ci.sh
- + changelog.d/T27455
- compiler/GHC/Builtin/Utils.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/Driver/Main/Passes.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Decls/Overlap.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Warnings.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/ForeignCall.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Unit/Module/Warnings.hs
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- libraries/ghc-internal/src/GHC/Internal/Ix.hs
- testsuite/.gitignore
- testsuite/Makefile
- testsuite/driver/runtests.py
- testsuite/driver/term_color.py
- testsuite/driver/testlib.py
- testsuite/tests/diagnostic-codes/codes.stdout
- testsuite/tests/ffi/should_fail/all.T
- + testsuite/tests/ffi/should_fail/ccfail006.hs
- + testsuite/tests/ffi/should_fail/ccfail006.stderr
- + testsuite/tests/ffi/should_fail/ccfail007.hs
- + testsuite/tests/ffi/should_fail/ccfail007.stderr
- + testsuite/tests/ffi/should_fail/ccfail008.hs
- + testsuite/tests/ffi/should_fail/ccfail008.stderr
- + testsuite/tests/ffi/should_fail/ccfail009.hs
- + testsuite/tests/ffi/should_fail/ccfail009.stderr
- testsuite/tests/ghc-e/should_fail/T18441fail7.stderr
- testsuite/tests/ghc-e/should_run/ghc-e005.stderr
- testsuite/tests/hiefile/should_compile/T24493.stderr
- + testsuite/tests/hiefile/should_run/T25709.hs
- + testsuite/tests/hiefile/should_run/T25709.stdout
- testsuite/tests/hiefile/should_run/all.T
- + testsuite/tests/saks/should_compile/T18725a.hs
- testsuite/tests/saks/should_compile/all.T
- + testsuite/tests/saks/should_fail/T18725b.hs
- + testsuite/tests/saks/should_fail/T18725b.stderr
- testsuite/tests/saks/should_fail/all.T
- + testsuite/tests/th/AssocDefaultNotAssoc.hs
- + testsuite/tests/th/AssocDefaultNotAssoc.stderr
- + testsuite/tests/th/T20902.hs
- + testsuite/tests/th/TH_InvalidTopDecl.hs
- + testsuite/tests/th/TH_InvalidTopDecl.stderr
- + testsuite/tests/th/TH_cvt_DefaultDataInstDecl.hs
- + testsuite/tests/th/TH_cvt_DefaultDataInstDecl.stderr
- + testsuite/tests/th/TH_cvt_GadtNoCons.hs
- + testsuite/tests/th/TH_cvt_GadtNoCons.stderr
- + testsuite/tests/th/TH_cvt_IllegalDeclaration.hs
- + testsuite/tests/th/TH_cvt_IllegalDeclaration.stderr
- + testsuite/tests/th/TH_cvt_IllegalSumAlt.hs
- + testsuite/tests/th/TH_cvt_IllegalSumAlt.stderr
- + testsuite/tests/th/TH_cvt_InvalidCCallImpent.hs
- + testsuite/tests/th/TH_cvt_InvalidCCallImpent.stderr
- + testsuite/tests/th/TH_cvt_InvalidTyFamInstLHS.hs
- + testsuite/tests/th/TH_cvt_InvalidTyFamInstLHS.stderr
- + testsuite/tests/th/TH_cvt_InvalidTypeInstanceHeader.hs
- + testsuite/tests/th/TH_cvt_InvalidTypeInstanceHeader.stderr
- + testsuite/tests/th/TH_cvt_RecGadtNoCons.hs
- + testsuite/tests/th/TH_cvt_RecGadtNoCons.stderr
- + testsuite/tests/th/TH_cvt_SumAltArityExceeded.hs
- + testsuite/tests/th/TH_cvt_SumAltArityExceeded.stderr
- testsuite/tests/th/all.T
- utils/check-exact/ExactPrint.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9faeeda23eac34894aa8cbf2492164…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9faeeda23eac34894aa8cbf2492164…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/T27557] Fix three bugs related to required type args and INLINE pragmas
by Simon Peyton Jones (@simonpj) 06 Aug '26
by Simon Peyton Jones (@simonpj) 06 Aug '26
06 Aug '26
Simon Peyton Jones pushed to branch wip/T27557 at Glasgow Haskell Compiler / GHC
Commits:
72002e69 by Simon Peyton Jones at 2026-08-06T23:00:33+01:00
Fix three bugs related to required type args and INLINE pragmas
* `GHC.Core.Opt.Arity.mkEtaForAllMCo` got the visibility flags back to front,
leading to a Lint error (#27557)
* The arity in an InlineSaturation is the VisArity not the Arity; the
two can differ when we have "required" type arguments. This made the
INLINE pragma argument counting go wrong in `makeCorePair` (#27590).
* When a simple binding has a type signature, we take special path in `tcPolyCheck`,
leading to an outer `AbsBinds` that has no dictionaries, even when the binding
is in fact overloaded. That confused the inline-arity computation in
`makeCorePair` (#27589).
The latter two are fixed using the new function `GHC.HsToCore.Binds.findSatArity`.
That actually simplifies the API of `makeCorePair`, which is nice.
The first bug is fixed by swapping the visiblity flags in
`GHC.Core.Opt.Arity.mkEtaForAllMCo`
Getting the INLINE behaviour right led to some perf changes:
* Runtime /halved/ on T7954 due to better specialisation
* Compile time increased by 6% in T21839c because a bit more inlining
happened, as it always should have done.
* For some reason compile-time max-bytes-used dropped by 30% on
T27336, but only on one build configuration; and it increased
on LinkableUsage02 by 6% on another configuration
Geometric mean effect on our compile time benchmarks is +0.1%.
Metric Decrease:
T27336
T7954
Metric Increase:
LinkableUsage02
T21839c
- - - - -
22 changed files:
- + changelog.d/T27557
- + changelog.d/T27589
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Types/Arity.hs
- compiler/GHC/Types/InlinePragma.hs
- compiler/GHC/Types/Var.hs
- libraries/base/tests/perf/ElemFusionUnknownList_O1.stderr
- libraries/base/tests/perf/ElemFusionUnknownList_O2.stderr
- + testsuite/tests/simplCore/should_compile/T27589.hs
- + testsuite/tests/simplCore/should_compile/T27589.stderr
- + testsuite/tests/simplCore/should_compile/T27590.hs
- + testsuite/tests/simplCore/should_compile/T27590.stderr
- testsuite/tests/simplCore/should_compile/all.T
- + testsuite/tests/typecheck/should_compile/T27557.hs
- testsuite/tests/typecheck/should_compile/all.T
Changes:
=====================================
changelog.d/T27557
=====================================
@@ -0,0 +1,8 @@
+section: compiler
+issues: #27577
+mrs: !16433
+synopsis:
+ Fix a Core Lint error involving RequiredTypeArguments
+description:
+ Fixes an issue with a coercion being used for eta expansion storing
+ the wrong visibility information, which caused a Core Lint error.
=====================================
changelog.d/T27589
=====================================
@@ -0,0 +1,10 @@
+section: compiler
+issues: #27589 #27590
+mrs: !16433
+synopsis:
+ Fixes to arity computations
+description:
+ The arity computation for INLINE pragmas now correctly takes into
+ account required type arguments. Separately, the arity computation
+ in ``tcPolyCheck`` now consistently handles dictionary arguments, fixing
+ a short-cut codepath which didn't
=====================================
compiler/GHC/Core/Opt/Arity.hs
=====================================
@@ -2370,11 +2370,15 @@ mkEtaForAllMCo (Bndr tcv vis) ty mco
| otherwise -> mk_fco (mkRepReflCo ty)
MCo co -> mk_fco co
where
- mk_fco co = MCo (mkForAllCo tcv vis coreTyLamForAllTyFlag MRefl co)
+ mk_fco co = MCo (mkForAllCo tcv coreTyLamForAllTyFlag vis MRefl co)
-- coreTyLamForAllTyFlag: See Note [The EtaInfo mechanism], particularly
-- the (EtaInfo Invariant). (sym co) wraps a lambda that always has
-- a ForAllTyFlag of coreTyLamForAllTyFlag; see Note [Required foralls in Core]
-- in GHC.Core.TyCo.Rep
+ --
+ -- Orientation: remember, the output of mkEtaForAllCo goes into an `EI bs mco`,
+ -- and is SymCo'd in `etaInfoAbs`. Hence the orientation of the visibility
+ -- flags. A bit of a brain-strain (#27557).
{-
************************************************************************
=====================================
compiler/GHC/Core/TyCo/Rep.hs
=====================================
@@ -534,6 +534,13 @@ looks like
Note that we must cast `a` by a cv bound in the same type in order to
make this work out.
+Notice that the corresponding /term/ looks like (Lam a expr):
+ * If `a` is a type variable, that lambda has no runtime significance;
+ it is erased
+ * If `a` is a coercion variable, we pass a (zero-width) runtime argument;
+ it is not erased
+The relevant predicate on the binder is `isRuntimeVar`.
+
See also https://gitlab.haskell.org/ghc/ghc/-/wikis/dependent-haskell/phase2
which gives a general road map that covers this space. Having this feature in
Core does *not* mean we have it in source Haskell. See #15710 about that.
=====================================
compiler/GHC/Hs/Expr.hs
=====================================
@@ -1687,10 +1687,11 @@ isSingletonMatchGroup matches
| otherwise
= False
-matchGroupArity :: MatchGroup (GhcPass id) body -> Arity
+matchGroupVisArity :: MatchGroup (GhcPass id) body -> VisArity
-- This is called before type checking, when mg_arg_tys is not set
-matchGroupArity MG { mg_alts = L _ [] } = 1 -- See Note [Empty mg_alts]
-matchGroupArity MG { mg_alts = L _ (alt1 : _) } = count isVisArgLPat (hsLMatchPats alt1)
+-- Returns the "visible arity" of the MatchGroup i.e. including required type arguments.
+matchGroupVisArity MG { mg_alts = L _ [] } = 1 -- See Note [Empty mg_alts]
+matchGroupVisArity MG { mg_alts = L _ (alt1 : _) } = count isVisArgLPat (hsLMatchPats alt1)
hsLMatchPats :: LMatch (GhcPass id) body -> [LPat (GhcPass id)]
hsLMatchPats (L _ (Match { m_pats = L _ pats })) = pats
=====================================
compiler/GHC/HsToCore/Binds.hs
=====================================
@@ -69,7 +69,7 @@ import GHC.Types.InlinePragma
import GHC.Types.Name
import GHC.Types.Var.Set
import GHC.Types.Var.Env
-import GHC.Types.Var( EvVar, mkLocalVar )
+import GHC.Types.Var( EvVar, mkLocalVar, isRuntimePiTyBinder )
import GHC.Types.SrcLoc
import GHC.Types.Basic
import GHC.Types.Unique.Set( nonDetEltsUniqSet )
@@ -196,7 +196,7 @@ dsHsBind dflags (VarBind { var_id = var
= do { core_expr <- dsLExpr expr
-- Dictionary bindings are always VarBinds,
-- so we only need do this here
- ; let core_bind@(id,_) = makeCorePair dflags var False 0 core_expr
+ ; let core_bind@(id,_) = makeCorePair dflags var False core_expr
force_var = if xopt LangExt.Strict dflags
then [id]
else []
@@ -211,11 +211,11 @@ dsHsBind dflags b@(FunBind { fun_id = L loc fun
; let body' = mkOptTickBox tick body
rhs = core_wrap (mkLams args body')
- core_binds@(id,_) = makeCorePair dflags fun False 0 rhs
+ core_binds@(id,_) = makeCorePair dflags fun False rhs
force_var
-- Bindings are strict when -XStrict is enabled
| xopt LangExt.Strict dflags
- , matchGroupArity matches == 0 -- no need to force lambdas
+ , matchGroupVisArity matches == 0 -- no need to force lambdas
= [id]
| isBangedHsBind b
= [id]
@@ -303,7 +303,7 @@ dsAbsBinds dflags tyvars dicts exports
; let global_id' = addIdSpecialisations global_id rules
main_bind = makeCorePair dflags global_id'
(isDefaultMethod prags)
- (dictArity dicts) rhs
+ rhs
; return (force_vars', fromOL spec_binds ++ [main_bind]) } }
@@ -386,7 +386,7 @@ dsAbsBinds dflags tyvars dicts exports
mk_aux_bind (lcl_id, rhs) = let lcl_w_inline = lookupVarEnv inline_env lcl_id
`orElse` lcl_id
in
- makeCorePair dflags lcl_w_inline False 0 rhs
+ makeCorePair dflags lcl_w_inline False rhs
inline_env :: IdEnv Id -- Maps a monomorphic local Id to one with
-- the inline pragma from the source
@@ -437,9 +437,9 @@ dsAbsBinds dflags tyvars dicts exports
-- the unfolding in the interface file is made in `GHC.Iface.Tidy.addExternal`
-- using this information.
------------------------
-makeCorePair :: DynFlags -> Id -> Bool -> Arity -> CoreExpr
+makeCorePair :: DynFlags -> Id -> Bool -> CoreExpr
-> (Id, CoreExpr)
-makeCorePair dflags gbl_id is_default_method dict_arity rhs
+makeCorePair dflags gbl_id is_default_method rhs
| is_default_method -- Default methods are *always* inlined
-- See Note [INLINE and default methods] in GHC.Tc.TyCl.Instance
= (gbl_id `setIdUnfolding` mkCompulsoryUnfolding' simpl_opts rhs, rhs)
@@ -456,22 +456,43 @@ makeCorePair dflags gbl_id is_default_method dict_arity rhs
inline_prag = idInlinePragma gbl_id
inlinable_unf = mkInlinableUnfolding simpl_opts StableUserSrc rhs
inline_pair
- | AppliedToAtLeast arity <- inlinePragmaSaturation inline_prag
+ | AppliedToAtLeast vis_arity <- inlinePragmaSaturation inline_prag
-- Add an Unfolding for an INLINE (but not for NOINLINE)
-- And eta-expand the RHS; see Note [Eta-expanding INLINE things]
- , let real_arity = dict_arity + arity
- -- NB: The arity passed to mkInlineUnfoldingWithArity
- -- must take account of the dictionaries
- = ( gbl_id `setIdUnfolding` mkInlineUnfoldingWithArity simpl_opts StableUserSrc real_arity rhs
- , etaExpand real_arity rhs)
+ , let runtime_arity = findSatArity vis_arity (idType gbl_id)
+ -- NB: runtime_arity: the arity passed to mkInlineUnfoldingWithArity
+ -- must take account of dictionaries and required type args
+ = ( gbl_id `setIdUnfolding` mkInlineUnfoldingWithArity simpl_opts StableUserSrc
+ runtime_arity rhs
+ , etaExpand runtime_arity rhs)
| otherwise
= pprTrace "makeCorePair: arity missing" (ppr gbl_id) $
(gbl_id `setIdUnfolding` mkInlineUnfoldingNoArity simpl_opts StableUserSrc rhs, rhs)
-dictArity :: [Var] -> Arity
--- Don't count coercion variables in arity
-dictArity dicts = count isId dicts
+findSatArity :: VisArity -> Type -> Arity
+-- Given the VisArity, find the value Arity of the function.
+-- This is the number of runtime-value arguments the function must be applied
+-- to before the INLINE pragma fires and inlines the function
+-- We must:
+-- add one for each invisible dictionary arg; and
+-- subtract one for each required type argment
+findSatArity vis_arity ty
+ = go vis_arity pi_bndrs
+ where
+ (pi_bndrs, _) = splitPiTys ty
+
+ go vis_arity (bndr : bndrs)
+ | isInvisiblePiTyBinder bndr = add_bndr bndr (go vis_arity bndrs)
+ | vis_arity == 0 = 0
+ | otherwise = add_bndr bndr (go (vis_arity-1) bndrs)
+ go vis_arity []
+ | vis_arity == 0 = 0
+ | otherwise = pprPanic "findSatArity" (ppr vis_arity $$ ppr ty)
+
+ add_bndr :: PiTyBinder -> Arity -> Arity
+ add_bndr bndr ar | isRuntimePiTyBinder bndr = ar+1
+ | otherwise = ar
{-
Note [Desugaring AbsBinds]
=====================================
compiler/GHC/HsToCore/Match.hs
=====================================
@@ -737,21 +737,21 @@ Call @match@ with all of this information!
-- There are three possible cases for matchWrapper's scrutinees argument:
--
-- 1. Nothing Used for FunBind, HsLam, HsLamcase, where there is no explicit scrutinee
--- The MatchGroup may have matchGroupArity of 0 or more. Examples:
--- f p1 q1 = ... -- matchGroupArity 2
+-- The MatchGroup may have matchGroupVisArity of 0 or more. Examples:
+-- f p1 q1 = ... -- matchGroupVisArity 2
-- f p2 q2 = ...
--
-- \cases | g1 -> ... -- matchGroupArity 0
-- | g2 -> ...
--
-- 2. Just [e] Used for HsCase, RecordUpd; exactly one scrutinee
--- The MatchGroup has matchGroupArity of exactly 1. Example:
--- case e of p1 -> e1 -- matchGroupArity 1
+-- The MatchGroup has matchGroupVisArity of exactly 1. Example:
+-- case e of p1 -> e1 -- matchGroupVisArity 1
-- p2 -> e2
--
-- 3. Just es Used for HsCmdLamCase; zero or more scrutinees
-- The MatchGroup has matchGroupArity of (length es). Example:
--- \cases p1 q1 -> returnA -< ... -- matchGroupArity 2
+-- \cases p1 q1 -> returnA -< ... -- matchGroupVisArity 2
-- p2 q2 -> ...
matchWrapper
=====================================
compiler/GHC/HsToCore/Ticks.hs
=====================================
@@ -288,7 +288,7 @@ addTickLHsBind (L pos (funBind@(FunBind { fun_id = L _ id, fun_matches = matches
-- We don't want to generate code for blacklisted positions
-- We don't want redundant ticks on simple pattern bindings
-- We don't want to tick non-exported bindings in TickExportedFunctions
- let simple = matchGroupArity matches == 0
+ let simple = matchGroupVisArity matches == 0
-- A binding is a "simple pattern binding" if it is a
-- funbind with zero patterns
toplev = null decl_path
=====================================
compiler/GHC/Tc/Gen/Bind.hs
=====================================
@@ -808,7 +808,7 @@ checkMonomorphismRestriction mbis lbinds
restricted (VarBind { var_ext = x }) = dataConCantHappen x
restricted b@(PatSynBind {}) = pprPanic "isRestrictedGroup/unrestricted" (ppr b)
- restricted_match mg = matchGroupArity mg == 0
+ restricted_match mg = matchGroupVisArity mg == 0
-- No args => like a pattern binding
-- Some args => a function binding
=====================================
compiler/GHC/Tc/Gen/Sig.hs
=====================================
@@ -599,26 +599,26 @@ mkPragEnv sigs binds
Nothing -> sig -- See Note [Pattern synonym inline arity]
-- ar_env maps a local to the arity of its definition
- ar_env :: NameEnv Arity
- ar_env = foldr lhsBindArity emptyNameEnv binds
+ ar_env :: NameEnv VisArity
+ ar_env = foldr lhsBindVisArity emptyNameEnv binds
-addInlinePragArity :: Arity -> LSig GhcRn -> LSig GhcRn
+addInlinePragArity :: VisArity -> LSig GhcRn -> LSig GhcRn
addInlinePragArity ar (L l (InlineSig x nm inl)) = L l (InlineSig x nm (add_inl_arity ar inl))
addInlinePragArity ar (L l (SpecSig x nm ty inl)) = L l (SpecSig x nm ty (add_inl_arity ar inl))
addInlinePragArity ar (L l (SpecSigE n x e inl)) = L l (SpecSigE n x e (add_inl_arity ar inl))
addInlinePragArity _ sig = sig
-add_inl_arity :: Arity -> InlinePragma GhcRn -> InlinePragma GhcRn
+add_inl_arity :: VisArity -> InlinePragma GhcRn -> InlinePragma GhcRn
add_inl_arity ar prag@(InlinePragma { inl_inline = inl_spec })
| Inline {} <- inl_spec -- Add arity only for real INLINE pragmas, not INLINABLE
= prag `setInlinePragmaSaturation` AppliedToAtLeast ar
| otherwise
= prag
-lhsBindArity :: LHsBind GhcRn -> NameEnv Arity -> NameEnv Arity
-lhsBindArity (L _ (FunBind { fun_id = id, fun_matches = ms })) env
- = extendNameEnv env (unLoc id) (matchGroupArity ms)
-lhsBindArity _ env = env -- PatBind/VarBind
+lhsBindVisArity :: LHsBind GhcRn -> NameEnv Arity -> NameEnv Arity
+lhsBindVisArity (L _ (FunBind { fun_id = id, fun_matches = ms })) env
+ = extendNameEnv env (unLoc id) (matchGroupVisArity ms)
+lhsBindVisArity _ env = env -- PatBind/VarBind
-----------------
=====================================
compiler/GHC/Types/Arity.hs
=====================================
@@ -84,7 +84,14 @@ like Haskell, there is more than one way to count those arguments.
forall a b. (Num a, Ord b) => a -> b -> a has arity <= 4
* `VisArity` is the syntactic notion of arity. It is the number of /visible/
- arguments, i.e. arguments that occur visibly in the source code.
+ arguments, i.e. arguments that occur visibly in the source code. For example:
+ f1 :: forall a. a -> a
+ f1 x = x
+ f2 :: forall a -> a -> a
+ f2 t x = x
+ Both have Arity 1 because there is one /value/ argument.
+ But f1 has VisArity 1 while f2 has VisArity 2, becuase f2 has a required
+ type argument.
In a function call `f x y z`, we can confidently say that f's vis-arity >= 3,
simply because we see three arguments [x,y,z]. We write (>=) rather than (==)
=====================================
compiler/GHC/Types/InlinePragma.hs
=====================================
@@ -104,7 +104,7 @@ import GHC.Prelude
import GHC.Data.FastString
import GHC.Hs.Extension
-import GHC.Types.Arity (Arity)
+import GHC.Types.Arity (VisArity)
import GHC.Types.SourceText (SourceText(..))
import GHC.Utils.Binary
import GHC.Utils.Outputable
@@ -125,12 +125,13 @@ infixl 1 `setInlinePragmaActivation`,
-- | The arity /at which to/ inline a function.
-- This may differ from the function's syntactic arity.
data InlineSaturation
- = AppliedToAtLeast !Arity
+ = AppliedToAtLeast !VisArity
-- ^ Inline only when applied to @n@ explicit
- -- (non-type, non-dictionary) arguments.
+ -- (required type or value) arguments.
--
-- That is, 'AppliedToAtLeast' describes the number of
-- *source-code* arguments the thing must be applied to.
+
| AnySaturation
-- ^ There does not exist an explicit number of arguments
-- that the inlining process should be applied to.
=====================================
compiler/GHC/Types/Var.hs
=====================================
@@ -82,7 +82,7 @@ module GHC.Types.Var (
-- * PiTyBinder
PiTyBinder(..), PiTyVarBinder,
isInvisiblePiTyBinder, isInvisibleAnonPiTyBinder,
- isVisiblePiTyBinder,
+ isVisiblePiTyBinder, isRuntimePiTyBinder,
isTyBinder, isNamedPiTyBinder, isAnonPiTyBinder,
namedPiTyBinder_maybe, anonPiTyBinderType_maybe, piTyBinderType,
@@ -757,7 +757,12 @@ instance NamedThing tv => NamedThing (VarBndr tv flag) where
-- not. See Note [PiTyBinders]
data PiTyBinder
= Named ForAllTyBinder -- A type-lambda binder, with a ForAllTyFlag
- | Anon (Scaled Type) FunTyFlag -- A term-lambda binder. Type here can be CoercionTy.
+ -- Erased (not passed at runtime) if the binder is
+ -- a type variable; not erased if coercion variable
+
+ | Anon (Scaled Type) FunTyFlag -- A term-lambda binder, passing a runtime value
+ -- The argument can be a constraint (incl dictionary)
+ -- or an ordinary value
-- The arrow is described by the FunTyFlag
deriving Data
@@ -792,6 +797,12 @@ namedPiTyBinder_maybe :: PiTyBinder -> Maybe TyCoVar
namedPiTyBinder_maybe (Named tv) = Just $ binderVar tv
namedPiTyBinder_maybe _ = Nothing
+isRuntimePiTyBinder :: PiTyBinder -> Bool
+isRuntimePiTyBinder (Anon {}) = True -- Always passed at runtime
+isRuntimePiTyBinder (Named (Bndr tcv _)) = isCoVar tcv
+ -- isCoVar: see Note [Why ForAllTy can quantify over a coercion variable]
+ -- and Note [Unused coercion variable in ForAllTy], in GHC.Core.TyCo.Rep
+
-- | Does this binder bind a variable that is /not/ erased? Returns
-- 'True' for anonymous binders.
isAnonPiTyBinder :: PiTyBinder -> Bool
@@ -817,7 +828,7 @@ piTyBinderType (Named (Bndr tv _)) = varType tv
piTyBinderType (Anon ty _) = scaledThing ty
{- Note [PiTyBinders]
-~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~
But a type like
forall a. Maybe a -> forall b. (a,b) -> b
@@ -830,14 +841,18 @@ argument to a Pi-type. GHC Core currently supports two different
Pi-types:
* Anon ty1 fun_flag: a non-dependent function type,
- written with ->, e.g. ty1 -> ty2
- represented as FunTy ty1 ty2. These are
- lifted to Coercions with the corresponding FunCo.
+ written with ->, e.g. ty1 -> ty2
+ represented as FunTy ty1 ty2.
+
+ See wrinkle (PIT1)
+
+ These are lifted to Coercions with the corresponding FunCo.
+
+ * Named (Var tcv forall_flag): a dependent polytype,
+ written with forall, e.g. forall (a:*). ty
+ represented as ForAllTy (Bndr a v) ty
- * Named (Var tv forall_flag)
- A dependent compile-time-only polytype,
- written with forall, e.g. forall (a:*). ty
- represented as ForAllTy (Bndr a v) ty
+ See wrinkle (PIT2)
Both forms of Pi-types classify terms/types that take an argument. In other
words, if `x` is either a function or a polytype, `x arg` makes sense
@@ -845,12 +860,16 @@ words, if `x` is either a function or a polytype, `x arg` makes sense
Wrinkles
-* The Anon constructor of PiTyBinder contains a FunTyFlag. Since
+(PIT1) The Anon constructor of PiTyBinder contains a FunTyFlag. Since
the PiTyBinder really only describes the /argument/ it should perhaps
only have a TypeOrConstraint rather than a full FunTyFlag. But it's
very convenient to have the full FunTyFlag, say in mkPiTys, so that's
what we do.
+(PIT2) The `tcv` in `Named (Var tcv forall_flag) is usually a type variable
+ but can exceptionally be a coercion variable: see
+ Note [Why ForAllTy can quantify over a coercion variable].
+ If it's a type variable it will be erased; if coercion variable it will not.
Note [VarBndrs, ForAllTyBinders, TyConBinders, and visibility]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=====================================
libraries/base/tests/perf/ElemFusionUnknownList_O1.stderr
=====================================
@@ -43,17 +43,17 @@ fusionElemFilter
jump go1 eta
fusionNotElemConcatMap
- = \ x x1 ->
+ = \ x eta ->
joinrec {
go1 ds
= case ds of {
[] -> True;
: y ys ->
- case y of { I# x2 ->
- case x of { I# x3 ->
- case ==# x3 (+# x2 1#) of {
+ case y of { I# x1 ->
+ case x of { I# x2 ->
+ case ==# x2 (+# x1 1#) of {
__DEFAULT ->
- case ==# x3 (+# x2 2#) of {
+ case ==# x2 (+# x1 2#) of {
__DEFAULT -> jump go1 ys;
1# -> False
};
@@ -62,20 +62,20 @@ fusionNotElemConcatMap
}
}
}; } in
- jump go1 x1
+ jump go1 eta
fusionElemConcatMap
- = \ x x1 ->
+ = \ x eta ->
joinrec {
go1 ds
= case ds of {
[] -> False;
: y ys ->
- case y of { I# x2 ->
- case x of { I# x3 ->
- case ==# x3 (+# x2 1#) of {
+ case y of { I# x1 ->
+ case x of { I# x2 ->
+ case ==# x2 (+# x1 1#) of {
__DEFAULT ->
- case ==# x3 (+# x2 2#) of {
+ case ==# x2 (+# x1 2#) of {
__DEFAULT -> jump go1 ys;
1# -> True
};
@@ -84,7 +84,7 @@ fusionElemConcatMap
}
}
}; } in
- jump go1 x1
+ jump go1 eta
fusionNotElemMap
= \ x eta ->
=====================================
libraries/base/tests/perf/ElemFusionUnknownList_O2.stderr
=====================================
@@ -77,25 +77,25 @@ fusionElemFilter
jump go1 eta
fusionNotElemConcatMap
- = \ x x1 ->
- case x1 of {
+ = \ x eta ->
+ case eta of {
[] -> True;
: y ys ->
- case y of { I# x2 ->
- case x of { I# x3 ->
- case ==# x3 (+# x2 1#) of {
+ case y of { I# x1 ->
+ case x of { I# x2 ->
+ case ==# x2 (+# x1 1#) of {
__DEFAULT ->
- case ==# x3 (+# x2 2#) of {
+ case ==# x2 (+# x1 2#) of {
__DEFAULT ->
joinrec {
go1 ds
= case ds of {
[] -> True;
: y1 ys1 ->
- case y1 of { I# x4 ->
- case ==# x3 (+# x4 1#) of {
+ case y1 of { I# x3 ->
+ case ==# x2 (+# x3 1#) of {
__DEFAULT ->
- case ==# x3 (+# x4 2#) of {
+ case ==# x2 (+# x3 2#) of {
__DEFAULT -> jump go1 ys1;
1# -> False
};
@@ -113,25 +113,25 @@ fusionNotElemConcatMap
}
fusionElemConcatMap
- = \ x x1 ->
- case x1 of {
+ = \ x eta ->
+ case eta of {
[] -> False;
: y ys ->
- case y of { I# x2 ->
- case x of { I# x3 ->
- case ==# x3 (+# x2 1#) of {
+ case y of { I# x1 ->
+ case x of { I# x2 ->
+ case ==# x2 (+# x1 1#) of {
__DEFAULT ->
- case ==# x3 (+# x2 2#) of {
+ case ==# x2 (+# x1 2#) of {
__DEFAULT ->
joinrec {
go1 ds
= case ds of {
[] -> False;
: y1 ys1 ->
- case y1 of { I# x4 ->
- case ==# x3 (+# x4 1#) of {
+ case y1 of { I# x3 ->
+ case ==# x2 (+# x3 1#) of {
__DEFAULT ->
- case ==# x3 (+# x4 2#) of {
+ case ==# x2 (+# x3 2#) of {
__DEFAULT -> jump go1 ys1;
1# -> True
};
=====================================
testsuite/tests/simplCore/should_compile/T27589.hs
=====================================
@@ -0,0 +1,9 @@
+module T28589 where
+
+wombat :: Num a => a -> a
+{-# INLINE wombat #-}
+wombat x = x+x*x
+
+g :: Num a => [a] -> [a]
+g ys = map wombat ys
+ -- wombat should not inline here
=====================================
testsuite/tests/simplCore/should_compile/T27589.stderr
=====================================
@@ -0,0 +1,3 @@
+wombat [InlPrag=INLINE (sat-args=1)] :: forall a. Num a => a -> a
+wombat
+ map @a @a (wombat @a $dNum) ys
=====================================
testsuite/tests/simplCore/should_compile/T27590.hs
=====================================
@@ -0,0 +1,10 @@
+{-# LANGUAGE RequiredTypeArguments #-}
+
+module Foo where
+
+wombat :: forall a -> a -> Maybe a
+{-# INLINE wombat #-}
+wombat t x = Just x
+
+g y = wombat Int (y+y)
+ -- wombat /should/ inline here
=====================================
testsuite/tests/simplCore/should_compile/T27590.stderr
=====================================
@@ -0,0 +1,2 @@
+wombat [InlPrag=INLINE (sat-args=2)] :: forall a -> a -> Maybe a
+wombat
=====================================
testsuite/tests/simplCore/should_compile/all.T
=====================================
@@ -609,3 +609,5 @@ test('T4081', normal, compile, ['-O -ddump-simpl -dsuppress-uniques -dsuppress-a
test('T27261', [extra_files(['T27261_aux.hs'])], multimod_compile, ['T27261', '-v0 -O'])
test('T27296', [], makefile_test, ['T27296'])
test('T27296b', [], makefile_test, ['T27296b'])
+test('T27589', [grep_errmsg(r'wombat')], compile, ['-O -ddump-simpl -dno-typeable-binds -dsuppress-uniques'])
+test('T27590', [grep_errmsg(r'wombat')], compile, ['-O -ddump-simpl -dno-typeable-binds -dsuppress-uniques'])
=====================================
testsuite/tests/typecheck/should_compile/T27557.hs
=====================================
@@ -0,0 +1,9 @@
+{-# LANGUAGE RequiredTypeArguments #-}
+
+module RequiredTypeArgumentsMkSymCo where
+
+import Data.Kind (Type)
+
+f :: forall a . forall (b :: Type) -> a -> a
+f t = id
+{-# INLINE f #-}
=====================================
testsuite/tests/typecheck/should_compile/all.T
=====================================
@@ -968,4 +968,4 @@ test('T24464', normal, compile, [''])
test('ExpansionQLIm', normal, compile, [''])
test('T23135', normal, compile, [''])
test('LazyFieldAnnotations', normal, compile, [''])
-
+test('T27557', normal, compile, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/72002e694e007cae4f0a77e657c3207…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/72002e694e007cae4f0a77e657c3207…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/spj-reinstallable-base2] 2 commits: Major patch to re-engineer known-key names
by sheaf (@sheaf) 06 Aug '26
by sheaf (@sheaf) 06 Aug '26
06 Aug '26
sheaf pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC
Commits:
0fa57d2b by Simon Peyton Jones at 2026-08-06T23:36:36+02:00
Major patch to re-engineer known-key names
This big patch implements the New Plan for known-key names,
described in #27013.
Read the big Note [Overview of known-key names] in GHC.Types.Name
Some things had to be reworked slightly to accomodate the new known-keys
design. A significant one was the generation of auxiliary KindRep
bindings, which was greatly simplified. Note [Grand plan for Typeable]
was updated accordingly. Another example: GHC.Internal.CString was
merged into GHC.Internal.Types.
Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita(a)gmail.com>
The couple hundreds of hours spent here by Rodrigo were sponsored by Well-Typed
Metrics: compile_time/bytes allocated
-------------------------------------
Baseline
Test Metric value New value Change
------------------------------------------------------------------------------------------
MultiComponentModules100(normal) ghc/alloc 24,312,779,672 24,990,470,432 +2.8% BAD
MultiComponentModulesRecomp(normal) ghc/alloc 601,924,960 621,884,888 +3.3% BAD
MultiComponentModulesRecomp100(normal) ghc/alloc 11,884,065,432 12,531,373,704 +5.4% BAD
MultiLayerModules(normal) ghc/alloc 3,861,537,072 3,706,919,512 -4.0% GOOD
T13701(normal) ghc/alloc 3,517,246,392 3,237,179,616 -8.0% GOOD
T13820(normal) ghc/alloc 28,961,056 29,663,208 +2.4% BAD
T14697(normal) ghc/alloc 472,044,184 443,550,048 -6.0% GOOD
T18140(normal) ghc/alloc 47,905,664 49,115,808 +2.5% BAD
T4801(normal) ghc/alloc 269,339,096 263,432,040 -2.2% GOOD
T783(normal) ghc/alloc 341,112,672 333,339,952 -2.3% GOOD
hard_hole_fits(normal) ghc/alloc 222,164,728 213,433,808 -3.9% GOOD
mhu-perf(normal) ghc/alloc 49,011,440 46,706,280 -4.7% GOOD
geo. mean +0.1%
minimum -8.0%
maximum +5.4%
All performance regressions were investigated in depth. The surviving
ones:
- MultiComponentModules100, MultiComponentModulesRecomp100,
MultiComponentModulesRecomp regresses because existing bugs that make
an additional implicit edge do too much redundant work: #27053 and #27461
- T13820, T18140, T10547, T13035 regress because we load an additional
interface and associated Names for GHC.Essentials.
-------------------------
Metric Decrease:
MultiLayerModules
T13701
T14697
T26989
T4801
T783
hard_hole_fits
mhu-perf
size_hello_obj
Metric Increase:
LinkableUsage01
MultiComponentModules100
MultiComponentModulesRecomp
MultiComponentModulesRecomp100
T10547
T13035
T13820
T18140
T20049
-------------------------
Bumps submodule binary
Closes #27013
- - - - -
40e854fa by sheaf at 2026-08-06T23:36:37+02:00
Allow GHC.Essentials to be hidden
This commit overhauls several aspects of the known entity handling,
in order to allow GHC.Essentials to be hidden without a proliferation
of special cases in the compiler.
The main contribution is to introduce the 'UnresolvedImport' datatype
which cleans up a lot of ad-hoc handling relating to 'ModSummary',
fixing #27603. This allows us to reduce duplication, e.g. by having
Backpack reuse 'mkUnresolvedImports' instead of replicating the
"add implicit imports" logic. It also makes it easier to avoid
undesirable edge cases (such as making sure that the Template Haskell
'reifyModule' function does not leak the implicit GHC.Essentials import).
In particular, the infamous 'findImportedModuleWithIsBoot' is now simply
'resolveImport', taking a single 'UnresolvedImport' and resolving it
to a 'FindResult' (usually a 'Module').
Other changes:
- Cache the result of looking up GHC.Essentials (in TcM and DsM
environments) to avoid redundant work.
This reduces allocations on LinkableUsage01 and hard_hole_fits.
- Properly look up known entities for StaticPointers like we do for
other known entities everywhere else. This allows e.g. modules in
ghc-internal to use -XStaticPointers.
- When using multiple home units, we are now careful to handle the
situation in which we may have multiple GHC.Essentials modules
around. See the new tests under 'driver/multipleHomeUnits'.
- - - - -
790 changed files:
- + changelog.d/refactor-known-names
- compiler/GHC.hs
- + compiler/GHC/Builtin.hs
- + compiler/GHC/Builtin/KnownKeys.hs
- + compiler/GHC/Builtin/KnownOccs.hs
- + compiler/GHC/Builtin/Modules.hs
- − compiler/GHC/Builtin/Names.hs
- − compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/PrimOps/Casts.hs
- compiler/GHC/Builtin/PrimOps/Ids.hs
- + compiler/GHC/Builtin/TH.hs
- compiler/GHC/Builtin/Uniques.hs
- compiler/GHC/Builtin/Uniques.hs-boot
- − compiler/GHC/Builtin/Utils.hs
- + compiler/GHC/Builtin/WiredIn/Ids.hs
- compiler/GHC/Builtin/Types/Prim.hs → compiler/GHC/Builtin/WiredIn/Prim.hs
- compiler/GHC/Builtin/Types/Literals.hs → compiler/GHC/Builtin/WiredIn/TypeLits.hs
- compiler/GHC/Builtin/Types.hs → compiler/GHC/Builtin/WiredIn/Types.hs
- compiler/GHC/Builtin/Types.hs-boot → compiler/GHC/Builtin/WiredIn/Types.hs-boot
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Multiplicity.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/LiberateCase.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Tidy.hs
- compiler/GHC/Driver/Downsweep.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Env/KnotVars.hs
- compiler/GHC/Driver/Env/Types.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main/Hsc.hs
- compiler/GHC/Driver/Main/Passes.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/HsToCore/Foreign/JavaScript.hs
- compiler/GHC/HsToCore/Foreign/Utils.hs
- compiler/GHC/HsToCore/Foreign/Wasm.hs
- compiler/GHC/HsToCore/ListComp.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Pmc/Check.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Pmc/Ppr.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Env.hs
- − compiler/GHC/Iface/Env.hs-boot
- compiler/GHC/Iface/Errors/Ppr.hs
- compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Lit.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Rename/Unbound.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Runtime/Context.hs
- compiler/GHC/Runtime/Debugger.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Heap/Inspect.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Stg/BcPrep.hs
- compiler/GHC/Stg/Unarise.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/DataCon.hs
- compiler/GHC/StgToCmm/Env.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/StgToCmm/Lit.hs
- compiler/GHC/StgToCmm/Ticky.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Arg.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/FFI.hs
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Utils.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Functor.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Deriv/Infer.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Arrow.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Default.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Foreign.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Instance/FunDeps.hs
- compiler/GHC/Tc/Instance/Typeable.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Plugin.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/FunDeps.hs
- compiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Rewrite.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Build.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Types/Constraint.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Types/LclEnv.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Concrete.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/DefaultEnv.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/Literal.hs
- compiler/GHC/Types/Name.hs
- compiler/GHC/Types/Name/Cache.hs
- compiler/GHC/Types/Name/Ppr.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/RepType.hs
- compiler/GHC/Types/TyThing.hs
- compiler/GHC/Types/Unique.hs
- compiler/GHC/Types/Unique/FM.hs
- + compiler/GHC/Types/UnresolvedImport.hs
- compiler/GHC/Types/Var.hs
- compiler/GHC/Unit.hs
- compiler/GHC/Unit/External.hs
- compiler/GHC/Unit/External/Index.hs
- compiler/GHC/Unit/External/ModuleOrigin.hs
- compiler/GHC/Unit/External/Providers.hs
- compiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/Finder/Types.hs
- compiler/GHC/Unit/Module/Deps.hs
- compiler/GHC/Unit/Module/ModSummary.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Unit/Types.hs
- compiler/GHC/Utils/Binary.hs
- − compiler/GHC/Utils/Binary/Typeable.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- compiler/ghc.cabal.in
- docs/users_guide/separate_compilation.rst
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Monad.hs
- ghc/Main.hs
- libraries/base/base.cabal.in
- libraries/base/src/Control/Applicative.hs
- libraries/base/src/Control/Concurrent.hs
- libraries/base/src/Control/Concurrent/Chan.hs
- libraries/base/src/Control/Concurrent/QSem.hs
- libraries/base/src/Control/Concurrent/QSemN.hs
- libraries/base/src/Data/Array/Byte.hs
- libraries/base/src/Data/Bifoldable.hs
- libraries/base/src/Data/Bifoldable1.hs
- libraries/base/src/Data/Bifunctor.hs
- libraries/base/src/Data/Bitraversable.hs
- libraries/base/src/Data/Bool.hs
- libraries/base/src/Data/Complex.hs
- libraries/base/src/Data/Data.hs
- libraries/base/src/Data/Enum.hs
- libraries/base/src/Data/Fixed.hs
- libraries/base/src/Data/Foldable1.hs
- libraries/base/src/Data/Functor/Classes.hs
- libraries/base/src/Data/Functor/Compose.hs
- libraries/base/src/Data/Functor/Contravariant.hs
- libraries/base/src/Data/Functor/Product.hs
- libraries/base/src/Data/Functor/Sum.hs
- libraries/base/src/Data/List.hs
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/base/src/Data/List/NubOrdSet.hs
- libraries/base/src/Data/Semigroup.hs
- libraries/base/src/Data/Version.hs
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/ByteOrder.hs
- + libraries/base/src/GHC/Essentials.hs
- libraries/base/src/GHC/Exts.hs
- libraries/base/src/GHC/Fingerprint.hs
- libraries/base/src/GHC/RTS/Flags.hs
- libraries/base/src/GHC/ResponseFile.hs
- libraries/base/src/GHC/Stats.hs
- libraries/base/src/GHC/Weak/Finalize.hs
- libraries/base/src/Numeric.hs
- libraries/base/src/Prelude.hs
- libraries/base/src/System/CPUTime/Posix/ClockGetTime.hsc
- libraries/base/src/System/CPUTime/Posix/RUsage.hsc
- libraries/base/src/System/CPUTime/Posix/Times.hsc
- libraries/base/src/System/CPUTime/Unsupported.hs
- libraries/base/src/System/Console/GetOpt.hs
- libraries/base/src/System/Exit.hs
- libraries/base/src/System/IO.hs
- libraries/base/src/System/IO/OS.hs
- libraries/base/src/System/IO/Unsafe.hs
- libraries/base/src/System/Info.hs
- libraries/base/src/System/Timeout.hs
- libraries/base/src/Text/Printf.hs
- libraries/base/src/Text/Read.hs
- libraries/base/src/Text/Show/Functions.hs
- libraries/binary
- libraries/ghc-experimental/src/Data/Sum/Experimental.hs
- libraries/ghc-experimental/src/Data/Tuple/Experimental.hs
- libraries/ghc-experimental/src/GHC/Profiling/Eras.hs
- libraries/ghc-experimental/src/Prelude/Experimental.hs
- libraries/ghc-internal/codepages/MakeTable.hs
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/include/RtsIfaceSymbols.h
- libraries/ghc-internal/src/GHC/Internal/AllocationLimitHandler.hs
- libraries/ghc-internal/src/GHC/Internal/Arr.hs
- libraries/ghc-internal/src/GHC/Internal/ArrayArray.hs
- libraries/ghc-internal/src/GHC/Internal/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Backend.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Backend/GMP.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Backend/Native.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/BigNat.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/BigNat.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Bignum/Integer.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Integer.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Bignum/Natural.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/Natural.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Bignum/Primitives.hs
- libraries/ghc-internal/src/GHC/Internal/Bignum/WordArray.hs
- libraries/ghc-internal/src/GHC/Internal/Bits.hs
- libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs
- libraries/ghc-internal/src/GHC/Internal/CString.hs
- libraries/ghc-internal/src/GHC/Internal/Char.hs
- libraries/ghc-internal/src/GHC/Internal/Classes.hs
- libraries/ghc-internal/src/GHC/Internal/Classes/IP.hs
- libraries/ghc-internal/src/GHC/Internal/Clock.hsc
- libraries/ghc-internal/src/GHC/Internal/ClosureTypes.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/Bound.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/IO.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/POSIX.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/POSIX/Const.hsc
- libraries/ghc-internal/src/GHC/Internal/Conc/Signal.hs
- libraries/ghc-internal/src/GHC/Internal/Conc/Sync.hs
- libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc
- libraries/ghc-internal/src/GHC/Internal/Control/Arrow.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Category.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Concurrent/MVar.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fail.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/IO/Class.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Imp.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Zip.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Bits.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Coerce.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Data.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Dynamic.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Either.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Function.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Const.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Utils.hs
- libraries/ghc-internal/src/GHC/Internal/Data/IORef.hs
- libraries/ghc-internal/src/GHC/Internal/Data/List.hs
- libraries/ghc-internal/src/GHC/Internal/Data/List/NonEmpty.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Maybe.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Monoid.hs
- libraries/ghc-internal/src/GHC/Internal/Data/NonEmpty.hs
- libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Proxy.hs
- libraries/ghc-internal/src/GHC/Internal/Data/STRef.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Semigroup/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Data/String.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Tuple.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Coercion.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Equality.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Typeable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Typeable/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Unique.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Version.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Void.hs
- libraries/ghc-internal/src/GHC/Internal/Debug/Trace.hs
- libraries/ghc-internal/src/GHC/Internal/Desugar.hs
- libraries/ghc-internal/src/GHC/Internal/Encoding/UTF8.hs
- libraries/ghc-internal/src/GHC/Internal/Enum.hs
- libraries/ghc-internal/src/GHC/Internal/Enum.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Environment.hs
- libraries/ghc-internal/src/GHC/Internal/Err.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Arr.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Array.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Control.hs
- libraries/ghc-internal/src/GHC/Internal/Event/EPoll.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/IntTable.hs
- libraries/ghc-internal/src/GHC/Internal/Event/IntVar.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Internal/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Event/KQueue.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Manager.hs
- libraries/ghc-internal/src/GHC/Internal/Event/PSQ.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Poll.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Thread.hs
- libraries/ghc-internal/src/GHC/Internal/Event/TimeOut.hs
- libraries/ghc-internal/src/GHC/Internal/Event/TimerManager.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Unique.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/Clock.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/FFI.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/ManagedThreadPool.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Exception/Context.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Context.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs-boot
- libraries/ghc-internal/src/GHC/Internal/ExecutionStack.hs
- libraries/ghc-internal/src/GHC/Internal/ExecutionStack/Internal.hsc
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- libraries/ghc-internal/src/GHC/Internal/Fingerprint.hs
- libraries/ghc-internal/src/GHC/Internal/Fingerprint/Type.hs
- libraries/ghc-internal/src/GHC/Internal/Float.hs
- libraries/ghc-internal/src/GHC/Internal/Float/ConversionUtils.hs
- libraries/ghc-internal/src/GHC/Internal/Float/RealFracMethods.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/ConstPtr.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/Error.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/String.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/String/Encoding.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/ForeignPtr/Imp.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Alloc.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Array.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Error.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Pool.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Utils.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Ptr.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Storable.hs
- libraries/ghc-internal/src/GHC/Internal/ForeignPtr.hs
- libraries/ghc-internal/src/GHC/Internal/ForeignSrcLang.hs
- libraries/ghc-internal/src/GHC/Internal/Functor/ZipList.hs
- libraries/ghc-internal/src/GHC/Internal/GHCi.hs
- libraries/ghc-internal/src/GHC/Internal/GHCi/Helpers.hs
- libraries/ghc-internal/src/GHC/Internal/Generics.hs
- libraries/ghc-internal/src/GHC/Internal/Heap/Closures.hs
- libraries/ghc-internal/src/GHC/Internal/Heap/Constants.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable/Types.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/InfoTableProf.hsc
- libraries/ghc-internal/src/GHC/Internal/Heap/ProfInfo/Types.hs
- libraries/ghc-internal/src/GHC/Internal/IO.hs
- libraries/ghc-internal/src/GHC/Internal/IO.hs-boot
- libraries/ghc-internal/src/GHC/Internal/IO/Buffer.hs
- libraries/ghc-internal/src/GHC/Internal/IO/BufferedIO.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Device.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage/API.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage/Table.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Failure.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Iconv.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Latin1.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/Types.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/UTF16.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/UTF32.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Encoding/UTF8.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs-boot
- libraries/ghc-internal/src/GHC/Internal/IO/FD.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Internals.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Common.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Flock.hsc
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/LinuxOFD.hsc
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/NoOp.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Windows.hsc
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Text.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Types.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Types.hs-boot
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Windows.hs
- libraries/ghc-internal/src/GHC/Internal/IO/IOMode.hs
- libraries/ghc-internal/src/GHC/Internal/IO/SubSystem.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Unsafe.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Windows/Encoding.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Windows/Handle.hsc
- libraries/ghc-internal/src/GHC/Internal/IOArray.hs
- libraries/ghc-internal/src/GHC/Internal/IORef.hs
- libraries/ghc-internal/src/GHC/Internal/InfoProv.hs
- libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc
- libraries/ghc-internal/src/GHC/Internal/Int.hs
- libraries/ghc-internal/src/GHC/Internal/IsList.hs
- libraries/ghc-internal/src/GHC/Internal/Ix.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Foreign/Callback.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
- libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs
- libraries/ghc-internal/src/GHC/Internal/Lexeme.hs
- libraries/ghc-internal/src/GHC/Internal/List.hs
- libraries/ghc-internal/src/GHC/Internal/MVar.hs
- libraries/ghc-internal/src/GHC/Internal/Magic.hs
- libraries/ghc-internal/src/GHC/Internal/Magic/Dict.hs
- libraries/ghc-internal/src/GHC/Internal/Maybe.hs
- libraries/ghc-internal/src/GHC/Internal/Num.hs
- libraries/ghc-internal/src/GHC/Internal/Num.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Numeric.hs
- libraries/ghc-internal/src/GHC/Internal/OverloadedLabels.hs
- libraries/ghc-internal/src/GHC/Internal/Pack.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/Ext.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/Panic.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/PtrEq.hs
- libraries/ghc-internal/src/GHC/Internal/Profiling.hs
- libraries/ghc-internal/src/GHC/Internal/Ptr.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc
- libraries/ghc-internal/src/GHC/Internal/Read.hs
- libraries/ghc-internal/src/GHC/Internal/Real.hs
- libraries/ghc-internal/src/GHC/Internal/Real.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Records.hs
- libraries/ghc-internal/src/GHC/Internal/ST.hs
- libraries/ghc-internal/src/GHC/Internal/STM.hs
- libraries/ghc-internal/src/GHC/Internal/STRef.hs
- libraries/ghc-internal/src/GHC/Internal/Show.hs
- libraries/ghc-internal/src/GHC/Internal/Stable.hs
- libraries/ghc-internal/src/GHC/Internal/StableName.hs
- libraries/ghc-internal/src/GHC/Internal/Stack.hs
- libraries/ghc-internal/src/GHC/Internal/Stack.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/CloneStack.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/Constants.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/ConstantsProf.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs
- libraries/ghc-internal/src/GHC/Internal/StaticPtr.hs
- libraries/ghc-internal/src/GHC/Internal/StaticPtr/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Stats.hsc
- libraries/ghc-internal/src/GHC/Internal/Storable.hs
- libraries/ghc-internal/src/GHC/Internal/System/Environment.hs
- libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc
- libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc
- libraries/ghc-internal/src/GHC/Internal/System/IO/Error.hs
- libraries/ghc-internal/src/GHC/Internal/System/Mem.hs
- libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs
- libraries/ghc-internal/src/GHC/Internal/System/Posix/Types.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- libraries/ghc-internal/src/GHC/Internal/Text/ParserCombinators/ReadP.hs
- libraries/ghc-internal/src/GHC/Internal/Text/ParserCombinators/ReadPrec.hs
- libraries/ghc-internal/src/GHC/Internal/Text/Read/Lex.hs
- libraries/ghc-internal/src/GHC/Internal/TopHandler.hs
- libraries/ghc-internal/src/GHC/Internal/Tuple.hs
- libraries/ghc-internal/src/GHC/Internal/Type/Reflection.hs
- libraries/ghc-internal/src/GHC/Internal/Type/Reflection/Unsafe.hs
- libraries/ghc-internal/src/GHC/Internal/TypeError.hs
- libraries/ghc-internal/src/GHC/Internal/TypeLits.hs
- libraries/ghc-internal/src/GHC/Internal/TypeLits/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/TypeNats.hs
- libraries/ghc-internal/src/GHC/Internal/TypeNats/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Bits.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/GeneralCategory.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleLowerCaseMapping.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleTitleCaseMapping.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleUpperCaseMapping.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Version.hs
- libraries/ghc-internal/src/GHC/Internal/Unsafe/Coerce.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Conc.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Conc/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Exports.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Imports.hs
- libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Types.hs
- libraries/ghc-internal/src/GHC/Internal/Weak.hs
- libraries/ghc-internal/src/GHC/Internal/Weak/Finalize.hs
- libraries/ghc-internal/src/GHC/Internal/Windows.hs
- libraries/ghc-internal/src/GHC/Internal/Word.hs
- libraries/ghc-internal/tools/ucd2haskell/exe/UCD2Haskell/ModuleGenerators.hs
- libraries/ghc-prim/Dummy.hs
- libraries/ghc-prim/ghc-prim.cabal
- libraries/template-haskell/Language/Haskell/TH/Lib.hs
- linters/lint-codes/LintCodes/Static.hs
- rts/include/rts/RtsToHsIface.h
- testsuite/driver/testutil.py
- testsuite/tests/ado/T13242a.stderr
- testsuite/tests/annotations/should_fail/annfail10.stderr
- testsuite/tests/backpack/cabal/bkpcabal07/Makefile
- testsuite/tests/backpack/should_compile/T20396.stderr
- testsuite/tests/backpack/should_fail/bkpfail17.stderr
- testsuite/tests/cabal/T12485/Makefile
- + testsuite/tests/cabal/T27013a/Makefile
- + testsuite/tests/cabal/T27013a/Setup.hs
- + testsuite/tests/cabal/T27013a/all.T
- + testsuite/tests/cabal/T27013a/composition.cabal
- + testsuite/tests/cabal/T27013a/src/Data/Composition.hs
- + testsuite/tests/cabal/T27013d/Composition.hs
- + testsuite/tests/cabal/T27013d/Makefile
- + testsuite/tests/cabal/T27013d/T27013d.stdout
- + testsuite/tests/cabal/T27013d/all.T
- testsuite/tests/callarity/unittest/CallArity1.hs
- testsuite/tests/corelint/LintEtaExpand.hs
- testsuite/tests/corelint/T21115b.stderr
- testsuite/tests/corelint/T27374.hs
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/deSugar/should_compile/T16615.stderr
- testsuite/tests/deSugar/should_compile/T2431.stderr
- testsuite/tests/default/DefaultImportFail01.stderr
- testsuite/tests/default/DefaultImportFail02.stderr
- testsuite/tests/default/DefaultImportFail03.stderr
- testsuite/tests/default/DefaultImportFail04.stderr
- testsuite/tests/default/DefaultImportFail05.stderr
- testsuite/tests/default/DefaultImportFail07.stderr
- testsuite/tests/default/T25775.stderr
- testsuite/tests/deriving/should_compile/T14682.stderr
- testsuite/tests/deriving/should_compile/T20496.stderr
- testsuite/tests/diagnostic-codes/codes.stdout
- + testsuite/tests/driver/T27013b/Makefile
- + testsuite/tests/driver/T27013b/T27013b.stdout
- + testsuite/tests/driver/T27013b/X.hs
- + testsuite/tests/driver/T27013b/all.T
- + testsuite/tests/driver/T27013c/Makefile
- + testsuite/tests/driver/T27013c/T27013c.stdout
- + testsuite/tests/driver/T27013c/X.hs
- + testsuite/tests/driver/T27013c/all.T
- + testsuite/tests/driver/T27013e/T27013e.hs
- + testsuite/tests/driver/T27013e/T27013e.stderr
- + testsuite/tests/driver/T27013e/all.T
- + testsuite/tests/driver/T27013f/T27013f.hs
- + testsuite/tests/driver/T27013f/T27013f.stderr
- + testsuite/tests/driver/T27013f/all.T
- + testsuite/tests/driver/T27013g/T27013g.hs
- + testsuite/tests/driver/T27013g/all.T
- + testsuite/tests/driver/T27013h/GHC/Essentials.hs
- + testsuite/tests/driver/T27013h/T27013h.stderr
- + testsuite/tests/driver/T27013h/all.T
- + testsuite/tests/driver/T27013h/unitT27013h
- + testsuite/tests/driver/T27013i/T27013i.hs
- + testsuite/tests/driver/T27013i/T27013i.stderr
- + testsuite/tests/driver/T27013i/all.T
- testsuite/tests/driver/T3007/A/Internal.hs
- testsuite/tests/driver/T3007/Makefile
- testsuite/tests/driver/make-prim/Makefile
- testsuite/tests/driver/multipleHomeUnits/Makefile
- testsuite/tests/driver/multipleHomeUnits/all.T
- + testsuite/tests/driver/multipleHomeUnits/essentials-home/GHC/Essentials.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-order-base/B.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-order-user/U.hs
- + testsuite/tests/driver/multipleHomeUnits/essentials-user/M.hs
- testsuite/tests/driver/multipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials.stdout
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials_order.stderr
- + testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_essentials_recomp.stdout
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsHome
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsHomeHidden
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsOrderBase
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsOrderUser
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsUser
- + testsuite/tests/driver/multipleHomeUnits/unitEssentialsUserHidden
- testsuite/tests/driver/recomp24656/Makefile
- testsuite/tests/driver/recomp24656/recomp24656.stdout
- testsuite/tests/ghc-api/T8628.hs
- testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
- testsuite/tests/ghci.debugger/scripts/break006.stderr
- testsuite/tests/ghci.debugger/scripts/print019.stderr
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T4175.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/ghci/scripts/ghci064.stdout
- testsuite/tests/hiefile/should_run/T23120.stdout
- testsuite/tests/iface/IfaceSharingIfaceType.hs
- testsuite/tests/iface/IfaceSharingName.hs
- testsuite/tests/indexed-types/should_fail/T12522a.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- testsuite/tests/javascript/Makefile
- testsuite/tests/javascript/T24495.hs
- testsuite/tests/module/mod185.stderr
- testsuite/tests/numeric/should_compile/T14170.stdout
- testsuite/tests/numeric/should_compile/T14465.stdout
- testsuite/tests/numeric/should_compile/T7116.stdout
- testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
- testsuite/tests/package/all.T
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T14189.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
- testsuite/tests/parser/should_fail/T16270h.hs
- testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
- testsuite/tests/patsyn/should_fail/T26465.stderr
- testsuite/tests/perf/should_run/ByteCodeAsm.hs
- testsuite/tests/plugins/defaulting-plugin/DefaultInterference.hs
- testsuite/tests/plugins/defaulting-plugin/DefaultInvalid.hs
- testsuite/tests/plugins/defaulting-plugin/DefaultMultiParam.hs
- testsuite/tests/plugins/plugins09.stdout
- testsuite/tests/plugins/plugins10.stdout
- testsuite/tests/plugins/plugins11.stdout
- testsuite/tests/plugins/simple-plugin/Simple/ReplacePlugin.hs
- testsuite/tests/plugins/static-plugins.stdout
- testsuite/tests/profiling/should_run/callstack001.stdout
- testsuite/tests/profiling/should_run/callstack002.stderr
- testsuite/tests/profiling/should_run/callstack002.stdout
- testsuite/tests/rename/should_compile/T3103/Foreign/Ptr.hs
- testsuite/tests/rename/should_compile/T3103/GHC/Base.lhs
- testsuite/tests/rename/should_compile/T3103/GHC/Word.hs
- testsuite/tests/rename/should_compile/T3103/test.T
- testsuite/tests/roles/should_compile/Roles1.stderr
- testsuite/tests/roles/should_compile/Roles13.stderr
- testsuite/tests/roles/should_compile/Roles14.stderr
- testsuite/tests/roles/should_compile/Roles2.stderr
- testsuite/tests/roles/should_compile/Roles3.stderr
- testsuite/tests/roles/should_compile/Roles4.stderr
- testsuite/tests/roles/should_compile/T8958.stderr
- testsuite/tests/simplCore/should_compile/OpaqueNoCastWW.stderr
- testsuite/tests/simplCore/should_compile/T13543.stderr
- testsuite/tests/simplCore/should_compile/T16038/T16038.stdout
- testsuite/tests/simplCore/should_compile/T3717.stderr
- testsuite/tests/simplCore/should_compile/T3772.stdout
- testsuite/tests/simplCore/should_compile/T4908.stderr
- testsuite/tests/simplCore/should_compile/T4930.stderr
- testsuite/tests/simplCore/should_compile/T7360.stderr
- testsuite/tests/simplCore/should_compile/T8274.stdout
- testsuite/tests/simplCore/should_compile/T9400.stderr
- testsuite/tests/simplCore/should_compile/noinline01.stderr
- testsuite/tests/simplCore/should_compile/par01.stderr
- testsuite/tests/simplCore/should_compile/rule2.stderr
- testsuite/tests/simplCore/should_compile/str-rules.hs
- testsuite/tests/tcplugins/ArgsPlugin.hs
- testsuite/tests/tcplugins/EmitWantedPlugin.hs
- testsuite/tests/tcplugins/RewritePlugin.hs
- testsuite/tests/tcplugins/T26395_Plugin.hs
- testsuite/tests/tcplugins/TyFamPlugin.hs
- testsuite/tests/th/T14741.hs
- testsuite/tests/th/T21547.stderr
- testsuite/tests/th/T26568.stderr
- + testsuite/tests/th/T27013th.hs
- testsuite/tests/th/TH_Roles2.stderr
- + testsuite/tests/th/TH_pragmaSpecOld.hs
- + testsuite/tests/th/TH_pragmaSpecOld.stderr
- testsuite/tests/th/all.T
- testsuite/tests/typecheck/should_compile/T13032.stderr
- testsuite/tests/typecheck/should_compile/T14273.stderr
- testsuite/tests/typecheck/should_compile/T18406b.stderr
- testsuite/tests/typecheck/should_compile/T18529.stderr
- testsuite/tests/typecheck/should_compile/holes.stderr
- testsuite/tests/typecheck/should_compile/holes2.stderr
- testsuite/tests/typecheck/should_compile/holes3.stderr
- testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr
- testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
- testsuite/tests/typecheck/should_fail/T12921.stderr
- testsuite/tests/typecheck/should_fail/T14884.stderr
- testsuite/tests/typecheck/should_fail/T15883b.stderr
- testsuite/tests/typecheck/should_fail/T15883c.stderr
- testsuite/tests/typecheck/should_fail/T15883d.stderr
- testsuite/tests/typecheck/should_fail/T21130.stderr
- testsuite/tests/typecheck/should_fail/T3323.stderr
- testsuite/tests/typecheck/should_fail/T5095.stderr
- testsuite/tests/typecheck/should_fail/T7279.stderr
- testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
- testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.stderr
- testsuite/tests/typecheck/should_fail/tcfail072.stderr
- testsuite/tests/typecheck/should_fail/tcfail097.stderr
- testsuite/tests/typecheck/should_fail/tcfail133.stderr
- testsuite/tests/typecheck/should_run/T22510.stdout
- testsuite/tests/unboxedsums/UbxSumLevPoly.hs
- testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs
- testsuite/tests/warnings/should_compile/DerivingTypeable.stderr
- utils/check-exact/Utils.hs
- utils/genprimopcode/Main.hs
- utils/haddock/haddock-api/src/Haddock/Convert.hs
- utils/haddock/haddock-api/src/Haddock/GhcUtils.hs
- utils/haddock/haddock-api/src/Haddock/Interface.hs
- utils/haddock/haddock-api/src/Haddock/Interface/AttachInstances.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Create.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f680e170934897e65697946f19c92e…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f680e170934897e65697946f19c92e…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/int-index/rta-patsyn] 18 commits: EPA: Remove LocatedP from OverlapMode
by Vladislav Zavialov (@int-index) 06 Aug '26
by Vladislav Zavialov (@int-index) 06 Aug '26
06 Aug '26
Vladislav Zavialov pushed to branch wip/int-index/rta-patsyn at Glasgow Haskell Compiler / GHC
Commits:
85b10c00 by Alan Zimmerman at 2026-07-31T22:09:47+01:00
EPA: Remove LocatedP from OverlapMode
We have
type LocatedP = GenLocated SrcSpanAnnP
type SrcSpanAnnP = EpAnn AnnPragma
As the first step in removing this in favour of LocatedA which only
captures location, comments and trailing annotations, we remove it
from OverlapMode
We do this by moving the AnnPragma into the TTG extension point
instead.
- - - - -
c9a34a00 by Viktor Dukhovni at 2026-08-02T04:34:17-04:00
Fix note typo
- - - - -
4f2a21f7 by Andreas Klebinger at 2026-08-02T22:46:46-04:00
Apply oneShot Monad trick to STG LintM
- - - - -
21e4b89d by Andreas Klebinger at 2026-08-02T22:46:46-04:00
stgLint: Use a single reader env for read only arguments.
- - - - -
d415f38a by Alan Zimmerman at 2026-08-02T22:47:27-04:00
EPA: Remove LocatedP from CType
The next step of removing use of LocatedP by moving
the AnnPragma for CType into its TTG extension point
instead.
- - - - -
8fc6f882 by Simon Jakobi at 2026-08-05T14:53:41-04:00
testsuite: Don't crash on non-UTF-8 test output
read_stdout, read_stderr_for, read_comp_stderr and read_diff decoded
strictly (the first three with UTF-8, read_diff with the locale
encoding), so a test emitting invalid UTF-8 (binary output, or a crash
truncating a multi-byte character) raised UnicodeDecodeError and was
reported as a framework failure instead of its actual result.
Decode with errors='replace', like read_no_crs and safe_print.
Assisted-by: Claude Fable 5
- - - - -
56534866 by Simon Jakobi at 2026-08-05T14:53:41-04:00
testsuite: Colorize the test summary, also in CI
The summary headings were plain, and SUMMARY was colored unconditionally,
so the escapes also ended up in the file written by --summary-file.
Color is now decided per output sink via term_color.colored_if; see the
comments in term_color.
CI logs are not a tty, but GitLab's log viewer renders ANSI colors, so
add --force-colors and pass it in .gitlab/ci.sh.
Assisted-by: Claude Opus 5
- - - - -
bceb541a by Simon Jakobi at 2026-08-05T14:53:42-04:00
testsuite: Repeat unexpected failure output in the summary
Finding out why a test failed meant scrolling back through a possibly
very long log to the point where the test ran. The summary now repeats
the captured output of unexpected failures, before the statistics, so
the most interesting part is at the end of the log (#16720).
Output mismatches report their diff instead of the mismatching stream
(see Note [Redundant output in test results]). The repeated output is
bounded per stream, and skipped altogether beyond
MAX_SUMMARY_OUTPUT_TESTS failure blocks. Tests failing identically in
several ways share one block.
Test results now report a source-relative directory, stable regardless
of where the run was started from.
Assisted-by: Claude Fable 5
- - - - -
2ab02c57 by Ben Gamari at 2026-08-05T14:54:24-04:00
base: Don't drop exception context in SomeException(toException)
For reasons that are lost to time, the implementation of [CLC #200]
that was merged inappropriately dropped `ExceptionContext` in the
`toException` implementation given to `SomeException`.
Fix this infelicity.
[CLC #200]: https://github.com/haskell/core-libraries-committee/issues/200
- - - - -
126ce574 by Vladislav Zavialov at 2026-08-05T14:55:05-04:00
Test case for #20902
Starting with GHC 9.14.1 (the first major release to include 51e3ec83),
and from point releases GHC 9.10.2 and GHC 9.12.3 (backports cc4470be68
and b30f25591e), all examples in this ticket are handled as expected.
- - - - -
b14d8d59 by Alan Zimmerman at 2026-08-05T14:55:46-04:00
EPA: Remove LocatedP, last use in WarningTxt
The last step of removing LocatedP, by moving the AnnPragma for
WarningTxt into its TTG extension point instead.
This also allows us to remove LocatedP and SrcSpanAnnP
- - - - -
70b58c8f by Vladislav Zavialov at 2026-08-05T14:56:27-04:00
Test cases for #18725
Starting with GHC 9.4 (the first release to include 268efcc9a4), the program in
this ticket no longer panics. A standalone kind signature breaks the recursive
loop, so the type constructor can be used in a kind within its own group.
T18725a checks that this is accepted with the signature present, while T18725b
confirms it is still rejected without it.
- - - - -
b18c8dd5 by Zubin Duggal at 2026-08-06T15:51:01-04:00
hie files: Dump the type table when dumping with -ddump-hie
- - - - -
f839d0fb by Zubin Duggal at 2026-08-06T15:51:01-04:00
hie files: Take evidence for quantified constraints into account when saving evidence terms to the hie ast
Fixes #25709
- - - - -
5753ebaa by Simon Jakobi at 2026-08-06T15:51:43-04:00
testsuite: fix stale paths for the ghc-config build artifacts
ghc-config.hs moved from testsuite/mk/ to testsuite/ghc-config/ in
6c7a49139c, but the .gitignore entry and the clean rule still referred to
the old location. As a result the compiled ghc-config binary, which
boilerplate.mk rebuilds on every make-driven test run, showed up as an
untracked file and was never cleaned.
Assisted-by: Claude Opus 5
- - - - -
246d4d72 by Simon Peyton Jones at 2026-08-06T15:52:25-04:00
Documentation only
...driven by my investigation of #27591
- - - - -
be69e9df by Alan Zimmerman at 2026-08-06T15:53:05-04:00
EPA: Replace AnnPragma with individual types
We introduced AnnPragma as a common type for all pragma usages wrapped
in LocatedP / SrcSpanAnnP. Now that those are gone, and the AnnPragma
moved into the TTG points for the given items, we can ensure that each
carries only the annotations it needs.
So we remove AnnPragma, and in its place bring in
AnnCType
AnnWarningTxt
AnnOverlap
AnnAnnDecl
AnnPragSCC
- - - - -
98f91999 by Vladislav Zavialov at 2026-08-06T20:00:30+00:00
Discard type arguments in tcPatToExpr (#27440, #27583)
The builder expression of an implicitly bidirectional pattern synonym must not
mention types written in the RHS:
* Invisible type arguments led to a panic (#27440)
* Required type arguments failed with out-of-scope variables (#27583)
Both are now discarded, following the precedent established by pattern
signatures (#9867).
Discarding type arguments takes some care: a type pattern cannot be told from a
value pattern by syntax alone, as the `type` keyword may be omitted. Consider:
data T a b c where
MkT :: forall a. forall b c -> a -> T a b c
pattern P :: x -> T x y z
pattern P x = MkT @a (type b) c x
In P's right-hand side, `@a` and `type b` are clearly type arguments, but what
about `c` and `x`? We can only tell by matching the patterns against MkT's
type. So tcPatToExpr now runs in TcM and matches the arguments against the
constructor's TyVarBinders using zipPatsBndrs, which is made public for this
purpose. The resulting builder is $bP x = MkT _ _ x.
See Note [Discarding types in the builder expression].
Test cases: T27440a T27440b T27440c T27440d T27440e
T27583a T27583b T27583c T27583d T27583e T27583f T27583g
Assisted-by: Claude Opus 5
- - - - -
71 changed files:
- .gitlab/ci.sh
- + changelog.d/T27440
- + changelog.d/T27455
- + changelog.d/T27583
- compiler/GHC/Builtin/Utils.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/Driver/Main/Passes.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Decls/Overlap.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Warnings.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/ForeignCall.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Unit/Module/Warnings.hs
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- libraries/ghc-internal/src/GHC/Internal/Ix.hs
- testsuite/.gitignore
- testsuite/Makefile
- testsuite/driver/runtests.py
- testsuite/driver/term_color.py
- testsuite/driver/testlib.py
- testsuite/tests/ghc-e/should_fail/T18441fail7.stderr
- testsuite/tests/ghc-e/should_run/ghc-e005.stderr
- testsuite/tests/hiefile/should_compile/T24493.stderr
- + testsuite/tests/hiefile/should_run/T25709.hs
- + testsuite/tests/hiefile/should_run/T25709.stdout
- testsuite/tests/hiefile/should_run/all.T
- + testsuite/tests/patsyn/should_compile/T27440a.hs
- + testsuite/tests/patsyn/should_compile/T27440b.hs
- + testsuite/tests/patsyn/should_compile/T27440c.hs
- testsuite/tests/patsyn/should_compile/all.T
- + testsuite/tests/patsyn/should_fail/T27440d.hs
- + testsuite/tests/patsyn/should_fail/T27440d.stderr
- testsuite/tests/patsyn/should_fail/all.T
- + testsuite/tests/saks/should_compile/T18725a.hs
- testsuite/tests/saks/should_compile/all.T
- + testsuite/tests/saks/should_fail/T18725b.hs
- + testsuite/tests/saks/should_fail/T18725b.stderr
- testsuite/tests/saks/should_fail/all.T
- + testsuite/tests/th/T20902.hs
- testsuite/tests/th/all.T
- + testsuite/tests/vdq-rta/should_compile/T27583a.hs
- + testsuite/tests/vdq-rta/should_compile/T27583b.hs
- + testsuite/tests/vdq-rta/should_compile/T27583c.hs
- + testsuite/tests/vdq-rta/should_compile/T27583d.hs
- + testsuite/tests/vdq-rta/should_compile/T27583e.hs
- + testsuite/tests/vdq-rta/should_compile/T27583g.hs
- testsuite/tests/vdq-rta/should_compile/all.T
- + testsuite/tests/vdq-rta/should_fail/T27440e.hs
- + testsuite/tests/vdq-rta/should_fail/T27440e.stderr
- + testsuite/tests/vdq-rta/should_fail/T27583f.hs
- + testsuite/tests/vdq-rta/should_fail/T27583f.stderr
- testsuite/tests/vdq-rta/should_fail/all.T
- utils/check-exact/ExactPrint.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5bc2ffd0505fb2e1ce36b78ddfd497…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5bc2ffd0505fb2e1ce36b78ddfd497…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][master] EPA: Replace AnnPragma with individual types
by Marge Bot (@marge-bot) 06 Aug '26
by Marge Bot (@marge-bot) 06 Aug '26
06 Aug '26
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
be69e9df by Alan Zimmerman at 2026-08-06T15:53:05-04:00
EPA: Replace AnnPragma with individual types
We introduced AnnPragma as a common type for all pragma usages wrapped
in LocatedP / SrcSpanAnnP. Now that those are gone, and the AnnPragma
moved into the TTG points for the given items, we can ensure that each
carries only the annotations it needs.
So we remove AnnPragma, and in its place bring in
AnnCType
AnnWarningTxt
AnnOverlap
AnnAnnDecl
AnnPragSCC
- - - - -
9 changed files:
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Decls/Overlap.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Types/ForeignCall.hs
- compiler/GHC/Unit/Module/Warnings.hs
- utils/check-exact/ExactPrint.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
Changes:
=====================================
compiler/GHC/Hs/Decls.hs
=====================================
@@ -1528,7 +1528,7 @@ instance OutputableBndrId p
************************************************************************
-}
-type instance XHsAnnotation (GhcPass _) = (AnnPragma, SourceText)
+type instance XHsAnnotation (GhcPass _) = (AnnAnnDecl, SourceText)
type instance XXAnnDecl (GhcPass _) = DataConCantHappen
instance (OutputableBndrId p) => Outputable (AnnDecl (GhcPass p)) where
=====================================
compiler/GHC/Hs/Decls/Overlap.hs
=====================================
@@ -26,7 +26,7 @@ import GHC.Prelude
import GHC.Hs.Extension
-import GHC.Parser.Annotation ( AnnPragma )
+import GHC.Parser.Annotation ( AnnOverlap )
import Language.Haskell.Syntax.Decls.Overlap
import Language.Haskell.Syntax.Extension
@@ -67,8 +67,8 @@ instance NFData OverlapFlag where
instance Outputable OverlapFlag where
ppr flag = ppr (overlapMode flag) <+> pprSafeOverlap (isSafeOverlap flag)
-type instance XOverlapMode GhcPs = (SourceText, AnnPragma)
-type instance XOverlapMode GhcRn = (SourceText, AnnPragma)
+type instance XOverlapMode GhcPs = (SourceText, AnnOverlap)
+type instance XOverlapMode GhcRn = (SourceText, AnnOverlap)
type instance XOverlapMode GhcTc = SourceText
type instance XXOverlapMode (GhcPass _) = DataConCantHappen
=====================================
compiler/GHC/Hs/Expr.hs
=====================================
@@ -612,7 +612,7 @@ instance NoAnn AnnFunRhs where
-- ---------------------------------------------------------------------
-type instance XSCC (GhcPass _) = (AnnPragma, SourceText)
+type instance XSCC (GhcPass _) = (AnnPragSCC, SourceText)
type instance XXPragE (GhcPass _) = DataConCantHappen
type instance XCDotFieldOcc (GhcPass _) = AnnFieldLabel
=====================================
compiler/GHC/Parser.y
=====================================
@@ -1473,13 +1473,13 @@ inst_decl :: { LInstDecl GhcPs }
overlap_pragma :: { Maybe (LocatedA (OverlapMode GhcPs)) }
: '{-# OVERLAPPABLE' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Overlappable (getOVERLAPPABLE_PRAGs $1,
- AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
+ AnnOverlap (glR $1) (epTok $2)))) }
| '{-# OVERLAPPING' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Overlapping (getOVERLAPPING_PRAGs $1,
- AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
+ AnnOverlap (glR $1) (epTok $2)))) }
| '{-# OVERLAPS' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Overlaps (getOVERLAPS_PRAGs $1,
- AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
+ AnnOverlap (glR $1) (epTok $2)))) }
| '{-# INCOHERENT' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Incoherent (getINCOHERENT_PRAGs $1,
- AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
+ AnnOverlap (glR $1) (epTok $2)))) }
| {- empty -} { Nothing }
deriv_strategy_no_via :: { LDerivStrategy GhcPs }
@@ -1710,13 +1710,13 @@ datafam_inst_hdr :: { Located (Maybe (LHsContext GhcPs), HsOuterFamEqnTyVarBndrs
capi_ctype :: { Maybe (LocatedA (CType GhcPs)) }
capi_ctype : '{-# CTYPE' STRING STRING '#-}'
{% fmap Just $ amsA' (sLL $1 $> (mkCType (getCTYPEs $1) (getSTRINGs $3)
- (AnnPragma (glR $1) (epTok $4) noAnn (glR $2) (glR $3) noAnn noAnn)
+ (AnnCType (glR $1) (epTok $4) (glR $2) (glR $3))
(Just (Header (getSTRINGs $2) (getSTRING $2)))
(getSTRING $3)))}
| '{-# CTYPE' STRING '#-}'
{% fmap Just $ amsA' (sLL $1 $> (mkCType (getCTYPEs $1) (getSTRINGs $2)
- (AnnPragma (glR $1) (epTok $3) noAnn noAnn (glR $2) noAnn noAnn)
+ (AnnCType (glR $1) (epTok $3) noAnn (glR $2))
Nothing (getSTRING $2)))}
| { Nothing }
@@ -2078,11 +2078,11 @@ to varid (used for rule_vars), 'checkRuleTyVarBndrNames' must be updated.
maybe_warning_pragma :: { Maybe (LWarningTxt GhcPs) }
: '{-# DEPRECATED' strings '#-}'
{% fmap Just $ amsA' (sLL $1 $> $
- DeprecatedTxt (getDEPRECATED_PRAGs $1, AnnPragma (glR $1) (epTok $3) (fst $ unLoc $2) noAnn noAnn noAnn noAnn)
+ DeprecatedTxt (getDEPRECATED_PRAGs $1, AnnWarningTxt (glR $1) (epTok $3) (fst $ unLoc $2))
(snd $ unLoc $2))}
| '{-# WARNING' warning_category strings '#-}'
{% fmap Just $ amsA' (sLL $1 $> $
- WarningTxt (getWARNING_PRAGs $1, AnnPragma (glR $1) (epTok $4) (fst $ unLoc $3) noAnn noAnn noAnn noAnn)
+ WarningTxt (getWARNING_PRAGs $1, AnnWarningTxt (glR $1) (epTok $4) (fst $ unLoc $3))
$2 (snd $ unLoc $3))}
| {- empty -} { Nothing }
@@ -2165,19 +2165,19 @@ stringlist :: { Located (OrdList (LocatedA (WithHsDocIdentifiers (StringLiteral
annotation :: { LHsDecl GhcPs }
: '{-# ANN' name_var aexp '#-}' {% runPV (unECP $3) >>= \ $3 ->
amsA' (sLL $1 $> (AnnD noExtField $ HsAnnotation
- (AnnPragma (glR $1) (epTok $4) noAnn noAnn noAnn noAnn noAnn,
+ (AnnAnnDecl (glR $1) (epTok $4) noAnn noAnn,
(getANN_PRAGs $1))
(ValueAnnProvenance $2) $3)) }
| '{-# ANN' 'type' otycon aexp '#-}' {% runPV (unECP $4) >>= \ $4 ->
amsA' (sLL $1 $> (AnnD noExtField $ HsAnnotation
- (AnnPragma (glR $1) (epTok $5) noAnn noAnn noAnn (epTok $2) noAnn,
+ (AnnAnnDecl (glR $1) (epTok $5) (epTok $2) noAnn,
(getANN_PRAGs $1))
(TypeAnnProvenance $3) $4)) }
| '{-# ANN' 'module' aexp '#-}' {% runPV (unECP $3) >>= \ $3 ->
amsA' (sLL $1 $> (AnnD noExtField $ HsAnnotation
- (AnnPragma (glR $1) (epTok $4) noAnn noAnn noAnn noAnn (epTok $2),
+ (AnnAnnDecl (glR $1) (epTok $4) noAnn (epTok $2),
(getANN_PRAGs $1))
ModuleAnnProvenance $3)) }
@@ -3052,12 +3052,12 @@ prag_e :: { Located (HsPragE GhcPs) }
: '{-# SCC' STRING '#-}' {% do { scc <- getSCC $2
; return (sLL $1 $>
(HsPragSCC
- (AnnPragma (glR $1) (epTok $3) noAnn (glR $2) noAnn noAnn noAnn,
+ (AnnPragSCC (glR $1) (epTok $3) (glR $2),
(getSCC_PRAGs $1))
(StringLiteral (getSTRINGs $2) scc)))} }
| '{-# SCC' VARID '#-}' { sLL $1 $>
(HsPragSCC
- (AnnPragma (glR $1) (epTok $3) noAnn (glR $2) noAnn noAnn noAnn,
+ (AnnPragSCC (glR $1) (epTok $3) (glR $2),
(getSCC_PRAGs $1))
(StringLiteral NoSourceText (fastStringToShortText $ getVARID $2))) }
=====================================
compiler/GHC/Parser/Annotation.hs
=====================================
@@ -36,7 +36,7 @@ module GHC.Parser.Annotation (
AnnList(..), AnnListBrackets(..),
AnnParen(..),
- AnnPragma(..),
+ AnnCType(..),AnnWarningTxt(..),AnnOverlap(..),AnnAnnDecl(..),AnnPragSCC(..),
AnnBooleanFormula(..),
NameAnn(..), NameAdornment(..),
NoEpAnns(..),
@@ -627,15 +627,40 @@ data NameAdornment
-- | exact print annotation used for capturing the locations of
-- annotations in pragmas.
-data AnnPragma
- = AnnPragma {
- apr_open :: EpaLocation,
- apr_close :: EpToken "#-}",
- apr_squares :: (EpToken "[", EpToken "]"),
- apr_loc1 :: EpaLocation,
- apr_loc2 :: EpaLocation,
- apr_type :: EpToken "type",
- apr_module :: EpToken "module"
+data AnnCType
+ = AnnCType {
+ ac_open :: EpaLocation,
+ ac_close :: EpToken "#-}",
+ ac_loc1 :: EpaLocation,
+ ac_loc2 :: EpaLocation
+ } deriving (Data,Eq)
+
+data AnnWarningTxt
+ = AnnWarningTxt {
+ awt_open :: EpaLocation,
+ awt_close :: EpToken "#-}",
+ awt_squares :: (EpToken "[", EpToken "]")
+ } deriving (Data,Eq)
+
+data AnnOverlap
+ = AnnOverlap {
+ ao_open :: EpaLocation,
+ ao_close :: EpToken "#-}"
+ } deriving (Data,Eq)
+
+data AnnAnnDecl
+ = AnnAnnDecl {
+ ad_open :: EpaLocation,
+ ad_close :: EpToken "#-}",
+ ad_type :: EpToken "type",
+ ad_module :: EpToken "module"
+ } deriving (Data,Eq)
+
+data AnnPragSCC
+ = AnnPragSCC {
+ aps_open :: EpaLocation,
+ aps_close :: EpToken "#-}",
+ aps_loc1 :: EpaLocation
} deriving (Data,Eq)
-- ---------------------------------------------------------------------
@@ -1020,8 +1045,20 @@ instance NoAnn a => NoAnn (AnnList a) where
instance NoAnn NameAnn where
noAnn = NameAnnTrailing []
-instance NoAnn AnnPragma where
- noAnn = AnnPragma noAnn noAnn noAnn noAnn noAnn noAnn noAnn
+instance NoAnn AnnCType where
+ noAnn = AnnCType noAnn noAnn noAnn noAnn
+
+instance NoAnn AnnWarningTxt where
+ noAnn = AnnWarningTxt noAnn noAnn noAnn
+
+instance NoAnn AnnOverlap where
+ noAnn = AnnOverlap noAnn noAnn
+
+instance NoAnn AnnAnnDecl where
+ noAnn = AnnAnnDecl noAnn noAnn noAnn noAnn
+
+instance NoAnn AnnPragSCC where
+ noAnn = AnnPragSCC noAnn noAnn noAnn
instance NoAnn AnnParen where
noAnn = AnnParens noAnn noAnn
@@ -1107,7 +1144,23 @@ instance Outputable AnnListBrackets where
ppr (ListBanana o c) = text "ListBanana" <+> ppr o <+> ppr c
ppr ListNone = text "ListNone"
-instance Outputable AnnPragma where
- ppr (AnnPragma o c s l ca t m)
- = text "AnnPragma" <+> ppr o <+> ppr c <+> ppr s <+> ppr l
- <+> ppr ca <+> ppr ca <+> ppr t <+> ppr m
+instance Outputable AnnCType where
+ ppr (AnnCType o c l ca)
+ = text "AnnCType" <+> ppr o <+> ppr c <+> ppr l
+ <+> ppr ca <+> ppr ca
+
+instance Outputable AnnWarningTxt where
+ ppr (AnnWarningTxt o c s)
+ = text "AnnWarningTxt" <+> ppr o <+> ppr c <+> ppr s
+
+instance Outputable AnnOverlap where
+ ppr (AnnOverlap o c)
+ = text "AnnOverlap" <+> ppr o <+> ppr c
+
+instance Outputable AnnAnnDecl where
+ ppr (AnnAnnDecl o c t m)
+ = text "AnnAnnDecl" <+> ppr o <+> ppr c <+> ppr t <+> ppr m
+
+instance Outputable AnnPragSCC where
+ ppr (AnnPragSCC o c l)
+ = text "AnnPragSCC" <+> ppr o <+> ppr c <+> ppr l
=====================================
compiler/GHC/Types/ForeignCall.hs
=====================================
@@ -109,7 +109,7 @@ import Data.Data (Data)
import Data.Functor ((<&>))
import Control.DeepSeq (NFData(..))
-import GHC.Parser.Annotation (AnnPragma, noAnn)
+import GHC.Parser.Annotation (AnnCType, noAnn)
{-
************************************************************************
@@ -216,7 +216,7 @@ defaultCType :: String -> CType (GhcPass p)
defaultCType =
CType (CTypeGhc NoSourceText NoSourceText noAnn) Nothing . packHText
-mkCType :: SourceText -> SourceText -> AnnPragma -> Maybe (Header (GhcPass p)) -> HText -> CType (GhcPass p)
+mkCType :: SourceText -> SourceText -> AnnCType -> Maybe (Header (GhcPass p)) -> HText -> CType (GhcPass p)
mkCType x y ann m =
CType (CTypeGhc x y ann) m
@@ -303,7 +303,7 @@ data StaticTargetGhc = StaticTargetGhc
data CTypeGhc = CTypeGhc
{ cTypeSourceText :: SourceText
, cTypeOtherText :: SourceText
- , cTypeAnn :: AnnPragma
+ , cTypeAnn :: AnnCType
}
deriving (Data, Eq)
=====================================
compiler/GHC/Unit/Module/Warnings.hs
=====================================
@@ -158,8 +158,8 @@ warningTxtSame w1 w2
instance Outputable (InWarningCategory (GhcPass pass)) where
ppr (InWarningCategory _ wt) = text "in" <+> doubleQuotes (ppr wt)
-type instance XDeprecatedTxt (GhcPass _) = (SourceText, AnnPragma)
-type instance XWarningTxt (GhcPass _) = (SourceText, AnnPragma)
+type instance XDeprecatedTxt (GhcPass _) = (SourceText, AnnWarningTxt)
+type instance XWarningTxt (GhcPass _) = (SourceText, AnnWarningTxt)
type instance XXWarningTxt (GhcPass _) = DataConCantHappen
type instance XInWarningCategory (GhcPass _) = (EpToken "in", SourceText)
type instance XXInWarningCategory (GhcPass _) = DataConCantHappen
=====================================
utils/check-exact/ExactPrint.hs
=====================================
@@ -288,10 +288,6 @@ instance HasTrailing [TrailingAnn] where
trailing a = a
setTrailing _ ts = ts
-instance HasTrailing AnnPragma where
- trailing _ = []
- setTrailing a _ = a
-
instance HasTrailing AnnParen where
trailing _ = []
setTrailing a _ = a
@@ -1559,22 +1555,22 @@ instance ExactPrint (WarningTxt GhcPs) where
getAnnotationEntry _ = NoEntryVal
setAnnotationAnchor a _ _ _ = a
- exact (WarningTxt (src, AnnPragma o c (os,cs) l1 l2 t m) mb_cat ws) = do
+ exact (WarningTxt (src, AnnWarningTxt o c (os,cs)) mb_cat ws) = do
o' <- markAnnOpen'' o src "{-# WARNING"
mb_cat' <- markAnnotated mb_cat
os' <- markEpToken os
ws' <- mapM markAnnotated ws
cs' <- markEpToken cs
c' <- markEpToken c
- return (WarningTxt (src, AnnPragma o' c' (os',cs') l1 l2 t m) mb_cat' ws')
+ return (WarningTxt (src, AnnWarningTxt o' c' (os',cs')) mb_cat' ws')
- exact (DeprecatedTxt (src, AnnPragma o c (os,cs) l1 l2 t m) ws) = do
+ exact (DeprecatedTxt (src, AnnWarningTxt o c (os,cs)) ws) = do
o' <- markAnnOpen'' o src "{-# DEPRECATED"
os' <- markEpToken os
ws' <- mapM markAnnotated ws
cs' <- markEpToken cs
c' <- markEpToken c
- return (DeprecatedTxt (src, AnnPragma o' c' (os',cs') l1 l2 t m) ws')
+ return (DeprecatedTxt (src, AnnWarningTxt o' c' (os',cs')) ws')
instance ExactPrint (InWarningCategory GhcPs) where
getAnnotationEntry _ = NoEntryVal
@@ -2251,35 +2247,35 @@ instance ExactPrint (OverlapMode GhcPs) where
setAnnotationAnchor a _ _ _ = a
-- NOTE: NoOverlap is only used in the typechecker
- exact (NoOverlap (src, AnnPragma o c s l1 l2 t m)) = do
+ exact (NoOverlap (src, AnnOverlap o c)) = do
o' <- markAnnOpen'' o src "{-# NO_OVERLAP"
c' <- markEpToken c
- return (NoOverlap (src, AnnPragma o' c' s l1 l2 t m))
+ return (NoOverlap (src, AnnOverlap o' c'))
- exact (Overlappable (src, AnnPragma o c s l1 l2 t m)) = do
+ exact (Overlappable (src, AnnOverlap o c)) = do
o' <- markAnnOpen'' o src "{-# OVERLAPPABLE"
c' <- markEpToken c
- return (Overlappable (src, AnnPragma o' c' s l1 l2 t m))
+ return (Overlappable (src, AnnOverlap o' c'))
- exact (Overlapping (src, AnnPragma o c s l1 l2 t m)) = do
+ exact (Overlapping (src, AnnOverlap o c)) = do
o' <- markAnnOpen'' o src "{-# OVERLAPPING"
c' <- markEpToken c
- return (Overlapping (src, AnnPragma o' c' s l1 l2 t m))
+ return (Overlapping (src, AnnOverlap o' c'))
- exact (Overlaps (src, AnnPragma o c s l1 l2 t m)) = do
+ exact (Overlaps (src, AnnOverlap o c)) = do
o' <- markAnnOpen'' o src "{-# OVERLAPS"
c' <- markEpToken c
- return (Overlaps (src, AnnPragma o' c' s l1 l2 t m))
+ return (Overlaps (src, AnnOverlap o' c'))
- exact (Incoherent (src, AnnPragma o c s l1 l2 t m)) = do
+ exact (Incoherent (src, AnnOverlap o c)) = do
o' <- markAnnOpen'' o src "{-# INCOHERENT"
c' <- markEpToken c
- return (Incoherent (src, AnnPragma o' c' s l1 l2 t m))
+ return (Incoherent (src, AnnOverlap o' c'))
- exact (NonCanonical (src, AnnPragma o c s l1 l2 t m)) = do
+ exact (NonCanonical (src, AnnOverlap o c)) = do
o' <- markAnnOpen'' o src "{-# INCOHERENT"
c' <- markEpToken c
- return (Incoherent (src, AnnPragma o' c' s l1 l2 t m))
+ return (Incoherent (src, AnnOverlap o' c'))
-- ---------------------------------------------------------------------
@@ -2706,7 +2702,7 @@ instance ExactPrint (AnnDecl GhcPs) where
getAnnotationEntry _ = NoEntryVal
setAnnotationAnchor a _ _ _ = a
- exact (HsAnnotation (AnnPragma o c s l1 l2 t m, src) prov e) = do
+ exact (HsAnnotation (AnnAnnDecl o c t m, src) prov e) = do
o' <- markAnnOpen'' o src "{-# ANN"
(t', m', prov') <-
case prov of
@@ -2723,7 +2719,7 @@ instance ExactPrint (AnnDecl GhcPs) where
e' <- markAnnotated e
c' <- markEpToken c
- return (HsAnnotation (AnnPragma o' c' s l1 l2 t' m',src) prov' e')
+ return (HsAnnotation (AnnAnnDecl o' c' t' m',src) prov' e')
-- ---------------------------------------------------------------------
@@ -3146,11 +3142,11 @@ instance ExactPrint (HsPragE GhcPs) where
getAnnotationEntry HsPragSCC{} = NoEntryVal
setAnnotationAnchor a _ _ _ = a
- exact (HsPragSCC (AnnPragma o c s l1 l2 t m,st) sl) = do
+ exact (HsPragSCC (AnnPragSCC o c l1,st) sl) = do
o' <- markAnnOpen'' o st "{-# SCC"
l1' <- printStringAtAA l1 (sourceTextToString (stringLitSourceText sl) (unpackHText $ sl_fs sl))
c' <- markEpToken c
- return (HsPragSCC (AnnPragma o' c' s l1' l2 t m,st) sl)
+ return (HsPragSCC (AnnPragSCC o' c' l1',st) sl)
instance ExactPrint (HsTypedSplice GhcPs) where
getAnnotationEntry _ = NoEntryVal
@@ -4408,7 +4404,7 @@ instance Typeable p => ExactPrint (CType (GhcPass p)) where
exact (CType ext mh ct) = do
let stp = cTypeSourceText ext
stct = cTypeOtherText ext
- AnnPragma o c s l1 l2 t m = cTypeAnn ext
+ AnnCType o c l1 l2 = cTypeAnn ext
o' <- markAnnOpen'' o stp "{-# CTYPE"
l1' <- case mh of
Nothing -> return l1
@@ -4416,7 +4412,7 @@ instance Typeable p => ExactPrint (CType (GhcPass p)) where
printStringAtAA l1 (toSourceTextWithSuffix srcH "" "")
l2' <- printStringAtAA l2 (toSourceTextWithSuffix stct (unpackHText ct) "")
c' <- markEpToken c
- return (CType (ext { cTypeAnn = AnnPragma o' c' s l1' l2' t m }) mh ct)
+ return (CType (ext { cTypeAnn = AnnCType o' c' l1' l2' }) mh ct)
-- ---------------------------------------------------------------------
=====================================
utils/haddock/haddock-api/src/Haddock/Types.hs
=====================================
@@ -838,7 +838,7 @@ type instance Anno (HsSigType DocNameI) = SrcSpanAnnA
type instance Anno (BooleanFormula DocNameI) = SrcSpanAnnBF
type instance Anno (OverlapMode DocNameI) = SrcSpanAnnA
type instance Anno (CType DocNameI) = SrcSpanAnnA
-type instance Anno (Header DocNameI) = EpAnn AnnPragma
+type instance Anno (Header DocNameI) = SrcSpanAnnA
type instance Anno (HsModifierOf (LocatedA (HsType DocNameI)) DocNameI) = SrcSpanAnnA
type instance Anno (HsContextDetails DocNameI a) = SrcSpanAnnA
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/be69e9dfc4bf2c2256c1c70af1e30cd…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/be69e9dfc4bf2c2256c1c70af1e30cd…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
246d4d72 by Simon Peyton Jones at 2026-08-06T15:52:25-04:00
Documentation only
...driven by my investigation of #27591
- - - - -
3 changed files:
- compiler/GHC/Core/Class.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Types/Id/Make.hs
Changes:
=====================================
compiler/GHC/Core/Class.hs
=====================================
@@ -84,9 +84,9 @@ data Class
-- Here fun-deps are [([a,b],[c]), ([a,c],[b])]
type FunDep a = ([a],[a])
-type ClassOpItem = (Id, DefMethInfo)
- -- Selector function; contains unfolding
- -- Default-method info
+type ClassOpItem = ( Id -- Dictionary selector function
+ -- See Note [Dictionary selectors]
+ , DefMethInfo) -- Default-method info
type DefMethInfo = Maybe (Name, DefMethSpec Type)
-- Nothing No default method
@@ -164,7 +164,19 @@ classMinimalDef :: Class -> ClassMinimalDef
classMinimalDef Class{ classBody = ConcreteClass{ cls_min_def = d } } = d
classMinimalDef _ = mkTrue -- TODO: make sure this is the right direction
-{-
+{- Note [Dictionary selectors]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Each `ClassOpItem` stores a dictionary selector `Id`:
+
+* The type of the selector is always closed, and has form
+ forall a1..an. C a1 .. an => blah
+ where `a1..an` are the class variables, and
+ `blah` is the method type.
+ See GHC.Types.Id.Make.mkDictSelId, which constructs them.
+
+* The selector has no unfolding, but one RULE.
+ See Note [ClassOp/DFun selection] in GHC.Tc.TyCl.Instance
+
Note [Associated type defaults]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following is an example of associated type defaults:
=====================================
compiler/GHC/Rename/HsType.hs
=====================================
@@ -1188,10 +1188,20 @@ bindHsOuterTyVarBndrs :: OutputableBndrFlag flag 'Renamed
-> RnM (a, FreeNames)
bindHsOuterTyVarBndrs doc mb_cls implicit_vars outer_bndrs thing_inside =
case outer_bndrs of
+
HsOuterImplicit{} ->
+ -- Add an implicit `forall a1..an` at the top, where `a1..an`
+ -- are not-otherwise-in-scope type variables.
+ -- Used when there is no forall, or a /visible/ (forall a -> blah)
+ -- See Note [forall-or-nothing rule] in Language.Haskell.Syntax.Type
rnImplicitTvOccs mb_cls implicit_vars $ \implicit_vars' ->
thing_inside $ HsOuterImplicit { hso_ximplicit = implicit_vars' }
+
HsOuterExplicit{hso_bndrs = exp_bndrs} ->
+ -- The type already has an explicit, user-written, invisible forall,
+ -- so do not add an implicit forall
+ -- See Note [forall-or-nothing rule] in Language.Haskell.Syntax.Type
+ --
-- Note: If we pass mb_cls instead of Nothing below, bindLHsTyVarBndrs
-- will use class variables for any names the user meant to bring in
-- scope here. This is an explicit forall, so we want fresh names, not
=====================================
compiler/GHC/Types/Id/Make.hs
=====================================
@@ -480,7 +480,7 @@ Therefore there is no loss of generality if we make all selectors unrestricted.
mkDictSelId :: Name -- Name of one of the *value* selectors
-- (dictionary superclass or method)
-> Class -> Id
--- Important: see Note [ClassOp/DFun selection] in GHC.Tc.TyCl.Instance
+-- See Note [Dictionary selectors]
mkDictSelId name clas
= mkGlobalId (ClassOpId clas terminating) name sel_ty info
where
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/246d4d72c05111928ae3a8ef42c12d1…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/246d4d72c05111928ae3a8ef42c12d1…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0