{"id":18083060,"url":"https://github.com/progval/ml-typer","last_synced_at":"2025-04-05T23:14:41.073Z","repository":{"id":18153582,"uuid":"21248970","full_name":"progval/ML-Typer","owner":"progval","description":"Typer for a simple pure functional subset of OCaml for educational purposes.","archived":false,"fork":false,"pushed_at":"2014-06-26T18:45:15.000Z","size":245,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T05:37:39.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":false,"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/progval.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}},"created_at":"2014-06-26T17:30:07.000Z","updated_at":"2018-03-22T15:28:29.000Z","dependencies_parsed_at":"2022-08-04T22:15:25.690Z","dependency_job_id":null,"html_url":"https://github.com/progval/ML-Typer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2FML-Typer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2FML-Typer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2FML-Typer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2FML-Typer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/progval","download_url":"https://codeload.github.com/progval/ML-Typer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411238,"owners_count":20934654,"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":[],"created_at":"2024-10-31T14:06:49.635Z","updated_at":"2025-04-05T23:14:41.050Z","avatar_url":"https://github.com/progval.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Simple ML typer\n\nThis is a typer of a very simple purely functional ML-like language.\nThe language supports :\n* Basic integer arithmetics\n* Tuples\n* Sum types\n* Conditional expressions\n* Unary functions\n* let ... in form\n* Pattern matching\n\nThe goal is to build an interface showing how a ML-like typer works,\nstarting with a very simple subset and adding more and more features,\nmore and more complex.\n\n### Usage\n\nThe typer is written in OCaml, with OCamlLex and OcamlYacc for the\nfrontend. Just compile with make and run it:\n\n```\nmake\n./typer\n```\n\nYou can enter any expression directly on stdin, and terminate with\ndouble semi-colon or EOF (^D). The typer works on a single expression.\n\n### Syntax\n\n##### Integer arithmetics\n\n```ocaml\na + b\na - b\na * b\na / b\n```\n\n##### Tuples\n\n```ocaml\n(a, b, c, d)\n```\n\n##### Sum types\n\n```ocaml\nFoo a\nBar (a, b, c)\n```\n\n##### Conditional expressions\n\n```ocaml\nifz expr then expr_true else expr_false\n```\n\n##### Unary functions\n\n```ocaml\nfun pattern -\u003e expression\n```\n\n##### let ... in\n\n```ocaml\nlet pattern = expr in body\n```\n\n##### pattern matching\n\n```ocaml\nmatch expr with\n| pattern1 -\u003e expr1\n| pattern2 -\u003e expr2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogval%2Fml-typer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogval%2Fml-typer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogval%2Fml-typer/lists"}