Skip to content

Allow cpara_SList to put constraint on the ys as well #183

@SeungheonOh

Description

@SeungheonOh

Currently,

cpara_SList :: All c xs => proxy c -> r ('[] :: [k]) -> (forall (y :: k) (ys :: [k]). (c y, All c ys) => r ys -> r (y ': ys)) -> r xs

allows to put constraint on the "current" element(y) in the type list. I found myself (re)writing cpara_SList that allows to put constraint on the both the current element y and remaining types in the type list ys like following:

ccpara_SList ::
    Proxy c ->
    Proxy d ->
    r '[] ->
    (forall y ys. (c y, d ys, MyAll c d ys) => r ys -> r (y ': ys)) ->
    r xs

Would this be something that can be upstreamed? I don't see any drawbacks since it's just more general version of original cpara_SList. If yes, I will make a PR. I already have the implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions