It turns out that Darcs never actually uses the full power of the GADTs
extension, that is, to restrict sum and products of some ADT *by
replacing some type variable by a concrete type* (see eg ).
Darcs' code does, however, restrict certain ADT by repeating the same
-- | Forward lists
data FL a wX wZ where
(:>:) :: a wX wY -> FL a wY wZ -> FL a wX wZ
NilFL :: FL a wX wX
However (and to my surprise) this is handled already by the strictly
less poweful GADTSyntax extension (that exists since GHC 7.2) , which
now must be accompanied by ExistentialQuantification.
I haven't measured whether this change makes Darcs' compilation faster.
I hope so!
Anyway I think it is a good idea that we use the smallest language
extensions possible; when we need real GADTs we can activate them again.
1 patch for repository http://darcs.net:
Author: Guillaume Hoffmann <firstname.lastname@example.org>
Date: Thu Feb 22 12:04:27 -03 2018
* replace GADTs extension by GADTSyntax and ExistentialQuantification
So the explanation for why can we repeat type variables even with just
GADTSyntax is that it is enabled by the ExistentialQuantification extension.
I'm attaching and screening a patch that does the same as the previous
one for the test harness, and also disables all extensions for the darcs