You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to call mkSumType $ Proxy @(Foo A B), I get an expected error that type kinds mismatch for A. When I try smth like mkSumType $ Proxy @(Foo "id" A), it compiles and generates PureScript code like this:
newtypeFoo "id" a=Foo{unwrapFoo::a}derive instancegenericFoo :: Generica=>Generic (Foo "id" a)
--------------------------------------------------------------------------------_Foo::forall "id" a. Prism' (Foo "id" a) { unwrapFoo::a}
_Foo = prism' Foo f
where
f (Foo r) = Just r
The text was updated successfully, but these errors were encountered:
are type kinds already supported by the PureScript compiler?! If so one needs to check whether GHC generics can deal with this, then it should not be hard to implement this. PRs welcome!
I have a newtype:
When I try to call
mkSumType $ Proxy @(Foo A B)
, I get an expected error that type kinds mismatch forA
. When I try smth likemkSumType $ Proxy @(Foo "id" A)
, it compiles and generates PureScript code like this:The text was updated successfully, but these errors were encountered: