Proposal: Data.Proxy

Neil Mitchell ndmitchell at
Thu Feb 8 05:49:46 EST 2007


> Also, due to the increasing popularity of witness types, I propose a
> optimization/pragmatic hint (warning, only 5 mins thought, please improve):
> does exactly what it says, and hints to the code generator that it
> can use 0 bytes to represent the value by some variation of the State# magic.

That pragma changes the semantics of the data type from being
populated by _|_ and Proxy, to being populated by nothing. Pragma's
should try not to change the semantics.

Wouldn't a definition such as:

data Proxy a

Achieve the same effect?

(Of course, we are still writing the Haskell 98 libraries, so we
should just use normal data for now)



More information about the Libraries mailing list