
29 Oct
2013
29 Oct
'13
12:31 a.m.
Lyndon Maydwell
writes: I was wondering if it's possible to have automatic deriving for some classes for the Void type. ...
Hi Lyndon, I'm struggling to see any use case for that. You'd 'achieve' `show (undefined :: Nada)` crashing your program at run- time; rather than failing to compile (if you didn't have the instance). Just bite the bullet and give your Void type a constructor. AntC
I guess the obvious one would be Show.
data Nada deriving Show
{* instance Show Nada where show _ = undefined *}