Hi there !
Thank you for this library, this is almost exactly what I needed.
However, it would be great if one could use Opt with Int (or any other Num type, or Rationaltype, and so on so forth).
This is possible by changing Opt to :
data Opt (def :: k) a where
Def :: forall {k} def a. SingDef def a => Opt (def :: k) a
Some :: forall {k} def a. a -> Opt (def :: k) a
and then define what the conversion function is for each kind via the class
class SingKind k => SingDef (def :: k) a where
demoteDef :: a
What do you think ?
I made a PR #2 that showcases what I mean.
Cheers !
Alice
Hi there !
Thank you for this library, this is almost exactly what I needed.
However, it would be great if one could use
OptwithInt(or any otherNumtype, orRationaltype, and so on so forth).This is possible by changing
Optto :and then define what the conversion function is for each kind via the class
What do you think ?
I made a PR #2 that showcases what I mean.
Cheers !
Alice