{"id":17212430,"url":"https://github.com/jackfirth/compact-annotations","last_synced_at":"2025-04-11T16:42:52.924Z","repository":{"id":23220346,"uuid":"26577551","full_name":"jackfirth/compact-annotations","owner":"jackfirth","description":"A Typed Racket package for writing compact polymorphic (and non-polymorphic) function annotations with a syntax similar to that of Haskell's type annotations","archived":false,"fork":false,"pushed_at":"2015-12-04T23:12:10.000Z","size":220,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T12:25:04.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Racket","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/jackfirth.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-11-13T08:08:15.000Z","updated_at":"2020-09-09T18:29:45.000Z","dependencies_parsed_at":"2022-08-21T21:31:45.949Z","dependency_job_id":null,"html_url":"https://github.com/jackfirth/compact-annotations","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/jackfirth%2Fcompact-annotations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfirth%2Fcompact-annotations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfirth%2Fcompact-annotations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfirth%2Fcompact-annotations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackfirth","download_url":"https://codeload.github.com/jackfirth/compact-annotations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248442353,"owners_count":21104164,"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-15T03:00:01.740Z","updated_at":"2025-04-11T16:42:52.900Z","avatar_url":"https://github.com/jackfirth.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"compact-annotations [![Build Status](https://travis-ci.org/jackfirth/compact-annotations.svg)](https://travis-ci.org/jackfirth/compact-annotations) [![Coverage Status](https://coveralls.io/repos/jackfirth/compact-annotations/badge.svg)](https://coveralls.io/r/jackfirth/compact-annotations)\n===================\n[Documentation](http://pkg-build.racket-lang.org/doc/compact-annotations/index.html)\n\nA Typed Racket package for writing compact polymorphic (and non-polymorphic) function annotations with a syntax similar to that of Haskell's type annotations.\n\nExamples:\n\n    (require compact-annotations)\n\n    (:: flip A B =\u003e A -\u003e (A -\u003e B) -\u003e B)\n    (define ((flip v) f)\n      (f v))\n    \n    (:: zip-with A B C =\u003e (A B -\u003e C) -\u003e (Listof A) (Listof B) -\u003e (Listof C))\n    (define ((zip-with zipper) as bs)\n      (map zipper as bs))\n      \n    (:: compare-as A B =\u003e (A A -\u003e Boolean) -\u003e (B -\u003e A) -\u003e B B -\u003e Boolean)\n    (define (((compare-as base-compare) convert) v1 v2)\n      (base-compare (convert v1) (convert v2)))\n\n    (:: string-shorter? String String -\u003e Boolean)\n    (define string-shorter?\n      (((inst compare-as Real) \u003c) string-length))\n\n    (:: in-range? Real Real + Boolean -\u003e Real -\u003e Boolean)\n    (define ((in-range? low high [include-endpoints? #t]) x)\n      ((if include-endpoints? \u003c= \u003c) low x high))\n    \n    (:: and? A =\u003e * (A -\u003e Boolean) -\u003e A -\u003e Boolean)\n    (define ((and? . ps) a)\n      (andmap (λ ([p : (A -\u003e Boolean)]) (p a)) ps))\n\nTo install, run `raco pkg install compact-annotations`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackfirth%2Fcompact-annotations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackfirth%2Fcompact-annotations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackfirth%2Fcompact-annotations/lists"}