Skip to content

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

@andreasabel

Description

@andreasabel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions