{"id":36419234,"url":"https://github.com/theiterators/sealed-monad","last_synced_at":"2026-01-11T17:02:16.609Z","repository":{"id":37037717,"uuid":"162301730","full_name":"theiterators/sealed-monad","owner":"theiterators","description":"Scala library for nice business logic oriented, for-comprehension-style error handling","archived":false,"fork":false,"pushed_at":"2025-07-12T09:15:35.000Z","size":1700,"stargazers_count":23,"open_issues_count":14,"forks_count":7,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-12T11:35:54.680Z","etag":null,"topics":["error-handling","for-comprehension","monad","monad-transformers","monaderror","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theiterators.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2018-12-18T14:38:15.000Z","updated_at":"2025-05-23T10:46:32.000Z","dependencies_parsed_at":"2023-12-08T15:24:31.619Z","dependency_job_id":"b8217e0b-db6b-4467-ac9f-574a0ceb78d0","html_url":"https://github.com/theiterators/sealed-monad","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/theiterators/sealed-monad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiterators%2Fsealed-monad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiterators%2Fsealed-monad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiterators%2Fsealed-monad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiterators%2Fsealed-monad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theiterators","download_url":"https://codeload.github.com/theiterators/sealed-monad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theiterators%2Fsealed-monad/sbom","scorecard":{"id":878862,"data":{"date":"2025-08-11","repo":{"name":"github.com/theiterators/sealed-monad","commit":"5a346b3596f0be8cd8f370032705eb202004fc02"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:124: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:129: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:134: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:147: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:158: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:168: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:178: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:188: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:198: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:208: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:251: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:256: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:261: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:274: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:285: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/draft.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/draft.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mdoc.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/mdoc.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mdoc.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/mdoc.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mdoc.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/mdoc.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/mdoc.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/mdoc.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/mdoc.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/theiterators/sealed-monad/mdoc.yml/master?enable=pin","Info:   0 out of  19 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/clean.yml:1","Warn: no topLevel permission defined: .github/workflows/draft.yml:1","Warn: no topLevel permission defined: .github/workflows/mdoc.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-mf6x-hrgr-658f","Warn: Project is vulnerable to: GHSA-xrh7-m5pp-39r6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T07:12:14.598Z","repository_id":37037717,"created_at":"2025-08-24T07:12:14.598Z","updated_at":"2025-08-24T07:12:14.598Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["error-handling","for-comprehension","monad","monad-transformers","monaderror","scala"],"created_at":"2026-01-11T17:02:16.547Z","updated_at":"2026-01-11T17:02:16.604Z","avatar_url":"https://github.com/theiterators.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sealed-monad\n\n[![Maven Central](https://img.shields.io/maven-central/v/pl.iterators/sealed-monad_2.13.svg)]()\n[![GitHub license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](https://raw.githubusercontent.com/theiterators/sealed-monad/master/COPYING)\n[![sealed-monad Scala version support](https://index.scala-lang.org/theiterators/sealed-monad/sealed-monad/latest-by-scala-version.svg)](https://index.scala-lang.org/theiterators/sealed-monad/sealed-monad)\n\nSealed Monad is a Scala library that provides elegant, business logic-oriented, for-comprehension-style error handling. It enhances code readability and maintainability by allowing you to express business logic with clear error handling in a linear, declarative way.\n\n## What is Sealed Monad?\n\nSealed Monad can be thought of as \"EitherT on steroids, with more human-readable method names.\" It provides a clean, intuitive, and type-safe way to handle errors in functional programming, particularly in complex business logic scenarios.\n\nIf you've ever found yourself writing deeply nested pattern matching or complex conditional structures for error handling, Sealed Monad offers a more elegant approach.\n\n## Key Benefits\n\n- **Linear Code Flow**: Write top-down, sequential code that's easy to follow\n- **Type Safety**: Enforce handling of all error cases at compile time\n- **Reduced Boilerplate**: No need to map between different error types when combining functions\n- **For-Comprehension Friendly**: Leverage Scala's for-comprehensions for clean, pipeline-style code\n- **Business-Logic Oriented**: Error handling focused on representing business outcomes, not just technical errors\n\n## Quick Example\n\nHere's a simple example showing how Sealed Monad can clean up a typical validation workflow:\n\n```scala\nimport pl.iterators.sealedmonad.syntax._\nimport cats.effect.IO\n\n// Define our result ADT\nsealed trait CreateUserResponse\nobject CreateUserResponse {\n  case class Success(id: String) extends CreateUserResponse\n  case object EmailAlreadyExists extends CreateUserResponse\n  case object InvalidEmail extends CreateUserResponse\n  case object PasswordTooWeak extends CreateUserResponse\n}\n\ndef createUser(request: CreateUserRequest): IO[CreateUserResponse] = {\n  (for {\n    // Validate email format\n    _ \u003c- validateEmail(request.email)\n          .ensure(isValid =\u003e isValid, CreateUserResponse.InvalidEmail)\n    \n    // Check if email already exists\n    emailExists \u003c- userRepository.emailExists(request.email).seal\n    _ \u003c- (!emailExists).pure[IO]\n          .ensure(identity, CreateUserResponse.EmailAlreadyExists)\n    \n    // Validate password strength\n    _ \u003c- validatePassword(request.password)\n          .ensure(isStrong =\u003e isStrong, CreateUserResponse.PasswordTooWeak)\n    \n    // All validations passed, create the user\n    userId \u003c- userRepository.create(request.email, request.password).seal\n  } yield CreateUserResponse.Success(userId)).run\n}\n```\n\n## Installation\n\nAdd the following to your `build.sbt`:\n\n```scala\nlibraryDependencies += \"pl.iterators\" %% \"sealed-monad\" % \"2.0\"\n```\n\nFor more detailed installation instructions and examples, see the [Installation Guide](installation).\n\n## Documentation\n\n- [Motivations \u0026 Core Concepts](https://theiterators.github.io/sealed-monad/motivations)\n- [Installation Guide](https://theiterators.github.io/sealed-monad/installation)\n- [Practical Use Cases](https://theiterators.github.io/sealed-monad/usecases)\n- [API Reference](https://theiterators.github.io/sealed-monad/api-reference)\n- [Best Practices](https://theiterators.github.io/sealed-monad/best-practices)\n- [Comparison with Other Approaches](https://theiterators.github.io/sealed-monad/comparison)\n- [Migration Guide](https://theiterators.github.io/sealed-monad/migration-guide)\n- [FAQ](https://theiterators.github.io/sealed-monad/faq)\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheiterators%2Fsealed-monad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheiterators%2Fsealed-monad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheiterators%2Fsealed-monad/lists"}