Skip to content

Rebinding 'apply' in a let binding in 'ado notation' does not produce an error #3702

@JordanMartinez

Description

@JordanMartinez

See https://gist.github.com/JordanMartinez/6494136e3acebc80113401fe39dd515b

This produces an error in 'do notation:'

normalBind_let_only :: Box Int
normalBind_let_only = do
  let
    bind = NormalBind.bind

    discard = NormalBind.discard

  three <- Box 3
  Box unit
  two <- Box 2
  pure (three + two)

The corresponding situation in 'ado notation' does not even though it should:

normalApply_let_only :: Box Int
normalApply_let_only = ado
  let
    apply = NormalApply.apply
    map = NormalMap.map

  three <- Box 3
  two <- Box 2
  in three + two

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