Runtime representation of (# a #) - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

TheMatten

What's the runtime representation of 'TupleRep '[ 'LiftedRep] (that is, (# a #) type)?

Sandy Maguire

i'm having a hard time parsing this

TheMatten

Basically, "how's (# a #) represented at runtime" :sweat_smile:
chessai pointed me to this comment: https://github.com/mckeankylej/unpacked-maybe/issues/3#issuecomment-567167058

we could use a type family to make sure users can't nest Maybe's, but then we can't write a functor instance or we could do the following, using unboxed sums: data Maybe a = Maybe (# (#...