-
Notifications
You must be signed in to change notification settings - Fork 49
Support type kinds #27
Copy link
Copy link
Open
Labels
Description
I have a newtype:
newtype Foo (name :: Symbol) a = Foo { unwrapFoo :: a } deriving (Generic, ...)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:
newtype Foo "id" a =
Foo {
unwrapFoo :: a
}
derive instance genericFoo :: Generic a => Generic (Foo "id" a)
--------------------------------------------------------------------------------
_Foo :: forall "id" a. Prism' (Foo "id" a) { unwrapFoo :: a}
_Foo = prism' Foo f
where
f (Foo r) = Just rReactions are currently unavailable