[darcs-users] darcs patch: change the kind of the witness types
ganesh at earth.li
Sun Sep 6 19:34:04 UTC 2009
On Sat, 5 Sep 2009, Jason Dagit wrote:
> On Wed, Sep 2, 2009 at 5:09 PM, Ganesh Sittampalam<ganesh at earth.li> wrote:
>> Thu Sep 3 01:07:22 BST 2009 Ganesh Sittampalam <ganesh at earth.li>
>> * change the kind of the witness types
>> A problem with the type witnesses combined with the EqCheck type and
>> unsafeCoerceP is that they can be abused to coerce concrete types. By
>> changing the kind of the witnesses to something obscure (and arbitrarily
>> chosen), this danger should be minimised.
>> Unfortunately this change causes a flood of GHC warnings in the witnesses
>> build caused by http://hackage.haskell.org/trac/ghc/ticket/959, and a single
>> warning about an unused data constructor that I had to add because I can't
>> figure out how to get empty data decls with a kind signature in GHC 6.10.4.
> I like the contents of this patch, but I don't like that it adds
> warnings we can't silence. Fortunately the warnings are only during
> the witness build. The warning itself looks like this:
Having worked with darcs a bit more since submitting the patch, I'm
inclined to feel that actually these warnings are way too annoying, so I
withdraw the patch for now and will investigate if there are any better
> This warning can be suppressed by a type signature fixing `x'
> but is harmless without -O (and usually harmless anyway).
> See http://hackage.haskell.org/trac/ghc/ticket/959 for details
> We don't (currently) compile the type-witness build with
> optimizations. Eventually we might want to do that. So this change
> still going to be harmless for us if we used -O?
Eventually we'll want the witnesses build to be the real darcs and will
therefore need -O, and I do agree the message is a bit worrying.
More information about the darcs-users