Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing getAs and getAs2 (while we have getAs1) #3

Open
andreasabel opened this issue Jun 7, 2024 · 0 comments
Open

Missing getAs and getAs2 (while we have getAs1) #3

andreasabel opened this issue Jun 7, 2024 · 0 comments

Comments

@andreasabel
Copy link

newtype As (a :: Type) b = As b
-- type As1 :: Type -> Type -> Type
-- |
-- Like @As@ for kind @k -> Type@.
--
newtype As1 (f :: k1 -> Type) (g :: k1 -> Type) (a :: k1)
= As1 {getAs1 :: g a}
-- type As1 :: (k1 -> Type) -> (k1 -> Type) -> k1 -> Type
-- |
-- Like @As@ for kind @k1 -> k2 -> Type@.
--
newtype As2 f g a b
= As2 (g a b)

Missing getAs and getAs2 (while we have getAs1).

You might want to write things like map (proj @a . getAs) xs so a destructor for As would be great to have by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant