Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S stdpp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 79
    • Issues 79
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Iris
  • stdpp
  • Merge requests
  • !16

Make `fmap` left associative.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Robbert Krebbers requested to merge fmap_assoc into master Nov 08, 2017
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 6

This follows the associativity in Haskell. So, something like

f <$> g <$> h

Is now parsed as:

(f <$> g) <$> h

Since the functor is a generalized form of function application, this also now also corresponds with the associativity of function application, which is also left associative.

Todo

What should be the level? It used to be at level 60, which was already an arbitrary choice. However, this has to be changed since that level (60) is right associative. I tentatively put it at level 61, which is totally arbitrary too.

Clearly, the level should be above list append and cons (++ and ::, which are both at level 60). Things like f <$> xs ++ ys should be parsed as f <$> (xs ++ ys), similarly to what happens in Haskell. Are there other constraints? How should it interact with the monad notations (>>=, do notation, ...).

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fmap_assoc