Skip to content

ZipList Bind/Monad #72

@joneshf

Description

@joneshf

If I understand the new programmable type errors, it seems like this instance can be added:

instance zipListIsNotBind
  :: Fail "ZipList is not Bind. Any implementation would break the associativity law"
  => Bind ZipList where
    bind = crashWith "bind: unreachable"

Also, does this stop the hierarchy? Or can someone take this Bind instance and use it to make a Monad ZipList and higher instances?

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