
#13179: Levity-polymorphic data types -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12708 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Replying to [comment:2 RyanGlScott]:
I'm afraid your definitions may not be what you think they are.
Fiddlesticks, I was worried something like this was happening. Replying to [comment:3 goldfire]:
As well they should be. When creating data constructors, we need to know representations of their fields.
, could something like this work (possibly with UnliftedDataTypes) {{{#!hs Product :: forall rep₁ rep₂. (k -> TYPE rep₁) -> (k -> TYPE rep₂) -> (k -> TYPE (rep₁ <> rep₂)) }}} for some handwavey `Max` {{{#!hs Sum :: forall rep₁ rep₂. (k -> TYPE rep₁) -> (k -> TYPE rep₂) -> (k -> TYPE (Max rep₁ rep₂)) }}} More importantly, are there any '''actual''' cases in base/core amenable to levity polymorphism? If not I'll close the ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13179#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler