{"id":37991764,"url":"https://github.com/takoeight0821/malgo","last_synced_at":"2026-01-16T18:44:03.884Z","repository":{"id":37931212,"uuid":"88398264","full_name":"takoeight0821/malgo","owner":"takoeight0821","description":"A statically typed functional programming language.","archived":false,"fork":false,"pushed_at":"2025-12-14T07:58:13.000Z","size":40856,"stargazers_count":46,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-15T09:18:56.826Z","etag":null,"topics":["compiler","functional-language","functional-programming","malgo","programming-language"],"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/takoeight0821.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2017-04-16T07:32:44.000Z","updated_at":"2025-12-14T07:58:16.000Z","dependencies_parsed_at":"2023-09-22T16:55:59.169Z","dependency_job_id":"93aa3837-a692-477f-8ab9-fde9d4432568","html_url":"https://github.com/takoeight0821/malgo","commit_stats":null,"previous_names":["takoeight0821/malgo"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/takoeight0821/malgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takoeight0821%2Fmalgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takoeight0821%2Fmalgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takoeight0821%2Fmalgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takoeight0821%2Fmalgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takoeight0821","download_url":"https://codeload.github.com/takoeight0821/malgo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takoeight0821%2Fmalgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["compiler","functional-language","functional-programming","malgo","programming-language"],"created_at":"2026-01-16T18:44:03.791Z","updated_at":"2026-01-16T18:44:03.868Z","avatar_url":"https://github.com/takoeight0821.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# malgo\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/malgo-lang/malgo)\n[![CI](https://github.com/malgo-lang/malgo/actions/workflows/build.yml/badge.svg)](https://github.com/malgo-lang/malgo/actions/workflows/build.yml)\n\nA statically typed functional programming language.\n\n## Requirement\n\n* [cabal-install](https://www.haskell.org/cabal/)\n\n## Installation\n\n### Installing Malgo\n\n```sh\ngit clone https://github.com/malgo-lang/malgo\ncd malgo\ncabal install\n```\n\n## Directory Structure\n\nA brief overview of the main directories and files:\n\n```\napp/           # CLI entry point (Main.hs)\ndocs/          # Documentation and references\nexamples/      # Example Malgo source files\nnix/           # Nix-related files\nruntime/       # Malgo runtime and standard library\nsrc/           # Main source code (Haskell)\ntest/          # Test suites and testcases\nREADME.md      # This file\nmalgo.cabal    # Cabal project file\n```\n\n## Usage\n\nTo evaluate programs:\n\n```sh\nmalgo eval [OPTIONS] SOURCE\n```\n\n- `eval` — Evaluate a Malgo program.\n- `SOURCE` — Path to the source file to evaluate (required).\n\n#### Options\n- `--no-opt` — Disable optimizations during compilation.\n- `--lambdalift` — Enable lambda lifting.\n- `--debug-mode` — Enable debug mode for verbose output.\n\n#### Example\n\n```sh\nmalgo eval --no-opt --debug-mode examples/malgo/Hello.mlg\n```\n\nThis will evaluate `examples/malgo/Hello.mlg` with optimizations disabled and debug mode enabled.\n\n## Examples\n\nThe `examples/malgo/` directory contains a variety of example programs demonstrating Malgo's features. Here are some highlights:\n\n### Hello, world\nFile: `examples/malgo/Hello.mlg`\n```malgo\nmodule {..} = import \"../../runtime/malgo/Builtin.mlg\"\nmodule {..} = import \"../../runtime/malgo/Prelude.mlg\"\n\ndef main = {\n  putStrLn \"Hello, world!\"\n}\n```\n\n### Fibonacci number\nFile: `examples/malgo/Fib.mlg`\n```malgo\nmodule {..} = import \"../../runtime/malgo/Builtin.mlg\"\nmodule {..} = import \"../../runtime/malgo/Prelude.mlg\"\n\ninfix 4 (\u003c=)\ndef (\u003c=) = { x y -\u003e leInt32 x y }\n\ninfixl 6 (+)\ndef (+) = { x y -\u003e addInt32 x y }\n\ninfixl 6 (-)\ndef (-) = { x y -\u003e subInt32 x y }\n\ndef fib = { n -\u003e\n  if (n \u003c= 1)\n    { 1 }\n    { fib (n - 1) + fib (n - 2) }\n}\n\ndef main = {\n  fib 5 |\u003e toStringInt32 |\u003e putStrLn\n}\n```\n\n### List operations\nFile: `examples/malgo/List.mlg`\n```malgo\nmodule {..} = import \"../../runtime/malgo/Builtin.mlg\"\nmodule {..} = import \"../../runtime/malgo/Prelude.mlg\"\n\ninfix 4 (\u003c=)\ndef (\u003c=) : Int32 -\u003e Int32 -\u003e Bool\ndef (\u003c=) = {x y -\u003e leInt32 x y}\n\ninfixl 6 (+)\ndef (+) : Int32 -\u003e Int32 -\u003e Int32\ndef (+) = {x y -\u003e addInt32 x y}\n\ninfixl 6 (-)\ndef (-) : Int32 -\u003e Int32 -\u003e Int32\ndef (-) = {x y -\u003e subInt32 x y}\n\ndef map : (a -\u003e b) -\u003e List a -\u003e List b\ndef map =\n  { _ Nil -\u003e Nil,\n    f (Cons x xs) -\u003e Cons (f x) (map f xs)\n  }\n\ndef sum : List Int32 -\u003e Int32\ndef sum =\n  { Nil -\u003e 0,\n    Cons x xs -\u003e x + sum xs\n  }\n\n-- [0 .. n]\ndef below : Int32 -\u003e List Int32\ndef below = { n -\u003e\n  if (n \u003c= 0)\n     { [0] }\n     { Cons n (below (n - 1)) }\n}\n\ndef main = {\n  sum (map (addInt32 1) (below 10))\n    |\u003e toStringInt32\n    |\u003e putStrLn\n}\n```\n\n### Lisp interpreter\n\nhttps://github.com/malgo-lang/minilisp\n\n\n## For Developers\n\nThis project uses [mise](https://github.com/jdx/mise) for managing development tools and tasks. The `mise.toml` file defines tool versions and common development workflows.\n\n### Toolchain\n- **GHC** (via ghcup)\n- **cabal-install**\n- **hpack**\n- **Haskell Language Server (HLS)**\n- **go** (for changelog generation)\n- **watchexec** (for file watching)\n- **git-chglog** (for changelog generation)\n\n### Common Tasks\nRun these with `mise run \u003ctask\u003e`:\n\n- `setup` — Install and set up all required tools and dependencies.\n- `setup-hls` — Build and set up Haskell Language Server for the project.\n- `build` — Build the project (`hpack \u0026\u0026 cabal build`).\n- `test` — Run the test suite. Optionally filter tests with `--option match=\u003cpattern\u003e`.\n- `exec` — Run the project executable (`cabal exec malgo-exe`).\n- `changelog` — Generate the changelog using `git-chglog`.\n\nSee `mise.toml` for more details and customization.\n\n## Release Workflow\n\n- **Labels:** Use PR labels `breaking`, `feat`, `fix` following Conventional Commits to drive semantic version bumps.\n- **Auto-labeling:** PRs are auto-labeled from commit messages via CI.\n- **Release PR:** On pushes to `master`, CI computes the next version, creates a draft GitHub Release, and opens a `release/vX.Y.Z` PR.\n- **Publish:** Merging a `release/*` PR to `master` tags the commit and publishes the GitHub Release.\n- **Notes:** Releases use generated notes; excluded labels: `skip-changelog`, `duplicate`, `invalid`.\n\nTo create labels via GitHub CLI:\n\n```bash\ngh label create breaking --description \"Major version bump (breaking change)\" --color D93F0B\ngh label create feat --description \"Minor version bump (feature)\" --color 0E8A16\ngh label create fix --description \"Patch version bump (fix)\" --color FBCA04\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakoeight0821%2Fmalgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakoeight0821%2Fmalgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakoeight0821%2Fmalgo/lists"}