{"id":15787126,"url":"https://github.com/fumieval/monad-skeleton","last_synced_at":"2025-04-30T08:21:15.819Z","repository":{"id":29436339,"uuid":"32972392","full_name":"fumieval/monad-skeleton","owner":"fumieval","description":"Operational monad library","archived":false,"fork":false,"pushed_at":"2021-11-30T08:13:45.000Z","size":44,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-11T14:27:24.774Z","etag":null,"topics":["haskell","monads"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fumieval.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-27T07:07:21.000Z","updated_at":"2023-05-20T04:58:59.000Z","dependencies_parsed_at":"2022-09-12T11:44:35.202Z","dependency_job_id":null,"html_url":"https://github.com/fumieval/monad-skeleton","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumieval%2Fmonad-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumieval%2Fmonad-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumieval%2Fmonad-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumieval%2Fmonad-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fumieval","download_url":"https://codeload.github.com/fumieval/monad-skeleton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666653,"owners_count":21624347,"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","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":["haskell","monads"],"created_at":"2024-10-04T21:05:22.504Z","updated_at":"2025-04-30T08:21:15.799Z","avatar_url":"https://github.com/fumieval.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"monad-skeleton\n======================\n\n[![Build Status](https://travis-ci.org/fumieval/monad-skeleton.svg?branch=master)](https://travis-ci.org/fumieval/monad-skeleton)\n[![Hackage](https://img.shields.io/hackage/v/monad-skeleton.svg)](https://hackage.haskell.org/package/monad-skeleton)\n\nThis package provides `Skeleton`, an operational monad (i.e. free monad that does not require the Functor implementation). The internal encoding\ngives O(1) bind and monadic reflection.\n\n`Skeleton` promotes unit instructions to a monad. It is isomorphic to\n`MonadView (Skeleton t)`:\n\n```haskell\ndata MonadView t m x where\n  Return :: a -\u003e MonadView t m a\n  (:\u003e\u003e=) :: !(t a) -\u003e (a -\u003e m b) -\u003e MonadView t m b\n\nboned :: MonadView t (Skeleton t) a -\u003e Skeleton t a\ndebone :: Skeleton t a -\u003e MonadView t (Skeleton t) a\n```\n\nGADTs are handy to define instructions:\n\n```haskell\ndata Interaction x where\n  Get :: Interaction String\n  Put :: String -\u003e Interaction ()\n\necho :: Skeleton Interaction ()\necho = bone Get \u003e\u003e= bone . Put\n```\n\nUse `debone` to interpret a computation.\n\n```haskell\ninterpret :: Skeleton Interaction a -\u003e IO a\ninterpret m = case debone m of\n  Return a -\u003e return a\n  Get :\u003e\u003e= k -\u003e getLine \u003e\u003e= interpret . k\n  Put s :\u003e\u003e= k -\u003e putStrLn s \u003e\u003e= interpret . k\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffumieval%2Fmonad-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffumieval%2Fmonad-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffumieval%2Fmonad-skeleton/lists"}