Hi,Would this be something Ryan could use for detecting safe instances for LVish?On Mon, Oct 7, 2013 at 10:32 AM, Dag Odenhall <dag.odenhall@gmail.com> wrote:
Here‘s a thought: doesn’t
Generic
already have an unused phantom type that's only there “just in case we need to add something in the future”?No, it doesn't.Just a thought: what if we had a type familytype family Derives (t :: k1) (c :: k2) :: Bool
which would automatically be instantiated by GHC appropriately? E.g., if the user had the following code:data MyData = MyData deriving (Eq, Generic)
deriving instance Show MyDatainstance Ord MyDataGHC would automatically instantiate:
type instance Derives MyData Eq = True
type instance Derives MyData Generic = True
type instance Derives MyData Show = True
type instance Derives MyData Ord = False
Cheers,
Pedro
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs