{"id":22047048,"url":"https://github.com/kczulko/scalaz-mtl-issue","last_synced_at":"2025-08-22T09:48:33.042Z","repository":{"id":159431361,"uuid":"155622141","full_name":"kczulko/scalaz-mtl-issue","owner":"kczulko","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-31T21:05:21.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T14:38:08.446Z","etag":null,"topics":["mtl","scalaz"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kczulko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-31T20:54:39.000Z","updated_at":"2018-10-31T21:43:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"98a4ce3a-b615-4da5-9047-c704e6f4a7ab","html_url":"https://github.com/kczulko/scalaz-mtl-issue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kczulko/scalaz-mtl-issue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kczulko%2Fscalaz-mtl-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kczulko%2Fscalaz-mtl-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kczulko%2Fscalaz-mtl-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kczulko%2Fscalaz-mtl-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kczulko","download_url":"https://codeload.github.com/kczulko/scalaz-mtl-issue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kczulko%2Fscalaz-mtl-issue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270011172,"owners_count":24511896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mtl","scalaz"],"created_at":"2024-11-30T13:24:44.315Z","updated_at":"2025-08-12T06:06:06.219Z","avatar_url":"https://github.com/kczulko.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scalaz-mtl-issue\n\nIf you move `MS: MonadState[F,Int]` within `def dummyProgram[F]` definition, like here \n\n```scala\ndef dummyProgram[F[_]](implicit ME: MonadError[F,Throwable], MS: MonadState[F,Int]): F[Unit]\n```\nand adjust materialization properly (just remove `stms` parameter application)\n```scala\ndummyProgram[StateT[EitherT[Id,Throwable,?],Int,?]]\n```\n\nYou will end up with the following error (scala 2.12.7:\n\n```bash\n[error] /home/kczulko/Projects/scalaz-mtl-issue/src/main/scala/example/Hello.scala:13:20: value flatMap is not a member of type parameter F[Int]\n[error]       i      \u003c- MS.get\n[error]                    ^\n[error] /home/kczulko/Projects/scalaz-mtl-issue/src/main/scala/example/Hello.scala:14:23: value flatMap is not a member of type parameter F[Unit]\n[error]       _      \u003c- MS.put(i + 1)\n[error]                       ^\n[error] /home/kczulko/Projects/scalaz-mtl-issue/src/main/scala/example/Hello.scala:15:17: value map is not a member of type parameter F[_1]\n[error]       result \u003c- if (i \u003c 0) ME.raiseError(new Throwable(\":/\")) else ME.point(())\n[error]                 ^\n[error] three errors found\n[error] (Compile / compileIncremental) Compilation failed\n[error] Total time: 0 s, completed 2018-10-31 21:51:54\n```\n\nLeaving `MS` as explicit parameter doesn't raise compile time error and program runs fine:\n\n```bash\nsbt:scalaz-mtl-issue\u003e run\n[info] Packaging /home/kczulko/Projects/scalaz-mtl-issue/target/scala-2.12/scalaz-mtl-issue_2.12-0.1.0-SNAPSHOT.jar ...\n[info] Done packaging.\n[info] Running example.Main \nsuccess (3,())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkczulko%2Fscalaz-mtl-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkczulko%2Fscalaz-mtl-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkczulko%2Fscalaz-mtl-issue/lists"}