4 ms·
> but I don't think e.g. Haskell98 can do it out of the box in an analogous way? This is basically the runtime representation of `data Email = Verified { email
by hither_shores 4y ago
> but I don't think e.g. Haskell98 can do it out of the box in an analogous way?
This is basically the runtime representation of `data Email = Verified { email :: string } | Unverified { email :: string }`, but promoting `Verified` and `Unverified` to type level requires an extension:
data Email (verified :: bool) where
Verified :: string -> Email true
Unverified :: string -> Email false