[Haskell-cafe] Void vs ()
MarLinn
monkleyon at gmail.com
Fri Mar 24 22:44:13 UTC 2017
> Not sure what you mean by "role your own i"
Oups. *roll
Basically what I did with ThereIsNoIOnlyZuul. A custom Void/().
> Well, Void *is* ThereIsNoIOnlyZuul, at least AFAICT? :)
Apart from details, I think so too, yes. Void has instances and some
primitive functions while Zuul has a more meaningful name (well…
theoretically) and the ability to become more than itself later on. Say
you're doing it like I suggested, but then you decide that () would have
been better than something Void-like – just add a single constructor to
Zuul, done. No global search-replace necessary. But it also comes down
to preferences. I personally have started to define my own types even
for things that could be trivially expressed via Bool, Maybe, or Either
just so that my types are more mnemonic. But then some of my hobby
projects stall because I can spend hours on adjusting types before I
even start to really implement something… Painting the yak shed, if you
will.
Cheers,
MarLinn
More information about the Haskell-Cafe
mailing list