#7347: Existential data constructors should not be promoted ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.1 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------
Comment(by kosmikus): Well, this works in 7.6.1: {{{ data Ex = forall a. MkEx a type family F (t :: Ex) :: * type instance F (MkEx Int) = Int type instance F (MkEx Bool) = String }}} And I don't see how it's dangerous or any different from this: {{{ data Wrap = MkWrap Int f :: Wrap -> Int f (MkWrap 0) = 0 f (MkWrap 1) = 42 }}} The point is still that if the kind of the promoted constructor is {{{ MkEx :: * -> Ex }}} then there's no actual existential on the type level. We've just created a wrapper for values of kind *. I'm ''not'' arguing that we should promote constructors that would get polymorphic kinds of the form {{{ MkStrange :: forall k. k -> Ex }}} AFAIK, Pedro makes use of promoted existentials in at least one of his generic universe encodings. So it'd be nice if they keep working, unless there's actually a problem with them. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7347#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs