[Haskell-cafe] Why can't I bind unlifted values at the top level?

Jaro Reinders jaro.reinders at gmail.com
Sat Jan 21 21:52:33 UTC 2023

On 21-01-2023 20:00, Ben Gamari wrote:
> However, I suspect you do have a point when it comes to unlifted data
> constructors. I think it would be fine to allow an application of a
> data constructor of an unlifted type on the top-level:
>    type UMaybe :: Type -> UnliftedType
>    data UMaybe a = UNothing | UJust a
>    x :: UMaybe Int
>    x = UJust 42
> Perhaps you could open a ticket for this?

This ticket seems related: #17521 Consider top-level unlifted bindings [1].

Or do you think it needs a separate ticket?

Cheers, Jaro

[1] https://gitlab.haskell.org/ghc/ghc/-/issues/17521

More information about the Haskell-Cafe mailing list