
Hello Bryan, On 2013-10-11 at 20:27:08 +0200, Bryan O'Sullivan wrote: [...]
For packages that are listed in blue, the versions that are breaking are the latest available. I've CCed the authors of said packages on this email. Folks, please fix your stuff!
btw, is there somewhere some wiki-page/gist/whatever where howto/cookbook-like information is being collected on how to make packages compatible with the new environment (possibly maximizing the compatibility version range)?
From jwlato at gmail.com Mon Oct 7 06:53:36 2013 From: jwlato at gmail.com (John Lato) Date: Mon, 7 Oct 2013 01:53:36 -0500 Subject: Proposal: GHC.Generics marked UNSAFE for SafeHaskell In-Reply-To:
References: <5251E425.8060900@earth.li> Message-ID: X-List-Received-Date: Sat, 12 Oct 2013 07:41:33 -0000 X-List-Received-Date: Sat, 12 Oct 2013 07:41:33 -0000
Andres is right that it's not as evil as defining your own Typeable. The crux of the matter is that Generic essentially allows full access to the data type. Unfortunately it's easy to forget this... On Mon, Oct 7, 2013 at 1:43 AM, Andres L?h <andres at well-typed.com> wrote:
While I understand you all feel uncomfortable with this, I do not think the problem demonstrated by John has anything to do with Generic.
I've made a fork here
https://github.com/kosmikus/safe-bugtest
that shows an (IMHO) similar problem using Show and Read instead of Generic. (And something slightly different could certainly also produced using Enum).
If you're deriving Generic, then yes, you gain the functionality of that class, which is to inspect the structure of the type, and then yes, you can in principle construct any value of that type. So deriving Generic for types that should be abstract is always going to be risky. But this is no different than deriving any other class, only that Generic gives you particularly fine-grained access to the internals of a type.
Also, at least in my opinion, it is entirely valid to define your own Generic instances. It's more work, and while I haven't used it often so far, I can imagine that there are good use cases. I don't think it's anywhere near as evil as defining your own Typeable instances.
Cheers, Andres
-- Andres L?h, Haskell Consultant Well-Typed LLP, http://www.well-typed.com