Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T transformers
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • curry-packages
  • transformers
  • Merge requests
  • !3

Fix: Add missing (<*>) implementation for StateT

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Fredrik Wieczerkowski requested to merge missing-state-application into master Mar 07, 2022
  • Overview 2
  • Commits 1
  • Changes 1

While evaluating

Control.Monad.Trans.State> evalState ((\x -> (x ++ " world")) <$> get) "hello"
"hello world"

works correctly, evaluating

Control.Monad.Trans.State> evalState (pure (\x -> (x ++ " world")) <*> get) "hello"

currently causes the program to loop (due to an infinite recursion between the default definition of (<*>) and liftA2). This branch fixes this oversight by adding the corresponding (<*>) implementation to the Applicative instance of StateT.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: missing-state-application