[darcs-devel] [patch1850] introduce TestOnly class
Ganesh Sittampalam
bugs at darcs.net
Mon Jul 15 18:15:41 UTC 2019
Ganesh Sittampalam <ganesh at earth.li> added the comment:
On 15/07/2019 17:51, Ben Franksen wrote:
> My only comment wrt the general idea is that I see no way to use
> this technique to flag export of data constructors: it works only if
> we add dedicated functions that aren't used internally. This can
> become a bit heavy-weight especially for GADTs
pattern synonyms seem to work (I guess bidirectional ones would too), e.g.:
pattern PrimP
:: TestOnly => NamedPrim prim wX wY -> RepoPatchV3 prim wX wY
pattern PrimP prim <- Prim prim
But it is still boilerplate.
> Here is a completely different idea: we add WARNING pragmas.
The disadvantage of these is that they aren't transitive, and that
disabling them means disabling deprecations from other imports too.
Perhaps I also find TestOnly a bit more elegant, but I'm probably biased
by having come up with it recently.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1850>
__________________________________
More information about the darcs-devel
mailing list