Regression of parent of data constructor check for bundled pattern synonyms
This head.hackage nightly pipeline failed to build pqueue
with the following error:
Renamer/typechecker [Data.PQueue.Prio.Min]: alloc=25102384 time=21.742
src/Data/PQueue/Prio/Min.hs:35:3: error: [GHC-88993]
• The type constructor ‘MinPQueue’ is not the parent of the data constructor ‘Empty’.
Data constructors can only be exported with their parent type constructor.
Parent: MinPQueue
• In the export: MinPQueue(Data.PQueue.Prio.Min.Empty, (:<))
|
35 | MinPQueue (Data.PQueue.Prio.Min.Empty, (:<)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[12 of 13] Compiling Data.PQueue.Min ( src/Data/PQueue/Min.hs, dist/build/Data/PQueue/Min.o, dist/build/Data/PQueue/Min.dyn_o )
*** Parser [Data.PQueue.Min]:
Parser [Data.PQueue.Min]: alloc=6808592 time=2.564
*** Renamer/typechecker [Data.PQueue.Min]:
*** ConsistencyCheck [Data.PQueue.Min]:
ConsistencyCheck [Data.PQueue.Min]: alloc=46024 time=0.072
Renamer/typechecker [Data.PQueue.Min]: alloc=16820256 time=14.244
src/Data/PQueue/Min.hs:32:3: error: [GHC-88993]
• The type constructor ‘MinQueue’ is not the parent of the data constructor ‘Empty’.
Data constructors can only be exported with their parent type constructor.
Parent: MinQueue
• In the export: MinQueue(Data.PQueue.Min.Empty, (:<))
|
32 | MinQueue (Data.PQueue.Min.Empty, (:<)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: [Cabal-7125]
Failed to build pqueue-1.5.0.0 (which is required by test-Agda-1.0). See the build log above for details.
It looks like there has been a regression in the handling of this parent of data constructor check.
Perhaps this is related to bdf93da8 (cc @sheaf)
This is the module that fails to compile: https://github.com/lspitzner/pqueue/blob/master/src/Data/PQueue/Min.hs
Edited by Teo Camarasu