i can use somesing
great effect able dynamically generate singletons , pattern-match on them able fun stuff
> let x = somesing sfalse :: somesing ('kproxy :: kproxy bool) -- pretend x dynamically generated using io or > case x of somesing sfalse -> blah blah somesing strue -> blah blah
however, i'm not sure how snat
, data family instance sing nat
. 1 issue have i'm not able ever snat
data constructor in scope when importing of relevant modules (data.singletons
, data.singletons.typelits
, data.singletons.prelude
, etc.) , enabling extensions (even though snat
constructor shows when use :browse
, :i sing
)
...another issue have ... there aren't separate constructors match on sfalse
, strue
...there's 1 constructor! :o how supposed use in same way?
i believe problem there 2 natural number singleton types both called snat
. 1 seem have found goes ghc typelits. constructor not exported defining module, it's integer
underneath. can access integer, whole thing seems pretty useless proofs. other snat
version deals classic peano naturals. it'll work proofs, slow @ runtime. i've not yet seen haskell natural both proofs , speed.
Comments
Post a Comment