Open Skyfold opened 2 years ago
Thanks for pointing this out!
The typical clay
style for this is to create a new type class:
class Not a where
not :: a -> Refinement
instance Not Selector where
...
instance Not Refinement where
...
So rather an open sum than a closed sum.
Feel free to send a PR if you want :)
The not selector can be applied to a selector
:not(p)
or to a refinementinput:not(:checked)
, however the type signature for not isnot :: Selector -> Refinement
.What I need is effectively
not :: Either Selector Refinement -> Refinement
, though it would not be nice to writeinput # not (Left checked)
. Ideally, I would like to writenot p
andinput # not checked
.How would you like this implemented?