News for hackers. Stuff that matters.
Re:The type system is a programmer's best friend by hither_shores on Saturday November 05, 2022 @01:29PM (#33483559)
> 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

There are no comments on this comment yet.