{"id":16320337,"url":"https://github.com/fgaz/polyvariadic","last_synced_at":"2025-08-08T07:06:47.653Z","repository":{"id":56875037,"uuid":"87634876","full_name":"fgaz/polyvariadic","owner":"fgaz","description":"Create and apply polyvariadic functions","archived":false,"fork":false,"pushed_at":"2022-06-03T16:11:32.000Z","size":28,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-24T13:56:16.875Z","etag":null,"topics":["function","haskell","polyvariadic","varargs"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/polyvariadic","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/fgaz.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":"2017-04-08T13:13:02.000Z","updated_at":"2025-06-03T13:44:11.000Z","dependencies_parsed_at":"2022-08-20T10:40:35.201Z","dependency_job_id":null,"html_url":"https://github.com/fgaz/polyvariadic","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fgaz/polyvariadic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgaz%2Fpolyvariadic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgaz%2Fpolyvariadic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgaz%2Fpolyvariadic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgaz%2Fpolyvariadic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgaz","download_url":"https://codeload.github.com/fgaz/polyvariadic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgaz%2Fpolyvariadic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269379169,"owners_count":24407369,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["function","haskell","polyvariadic","varargs"],"created_at":"2024-10-10T22:44:04.038Z","updated_at":"2025-08-08T07:06:47.588Z","avatar_url":"https://github.com/fgaz.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polyvariadic\n\n**Creation and application of polyvariadic functions**\n\n[![builds.sr.ht status](https://builds.sr.ht/~fgaz/polyvariadic/commits.svg)](https://builds.sr.ht/~fgaz/polyvariadic/commits?)\n[![Hackage](https://img.shields.io/hackage/v/polyvariadic.svg)](https://hackage.haskell.org/package/polyvariadic)\n\nFor example, the classic printf:\n\n```haskell\n{-# LANGUAGE MultiParamTypeClasses #-}\n{-# LANGUAGE FlexibleInstances #-}\n{-# LANGUAGE FlexibleContexts #-}\nimport Data.Function.Polyvariadic\nimport Data.Accumulator\n\nmagicChar = '%'\nnotMagicChar = (/= magicChar)\n\ndata PrintfAccum = PrintfAccum { done :: String, todo :: String }\n\ninstance Show x =\u003e Accumulator PrintfAccum x where\n  accumulate x (PrintfAccum done (_:todo)) = PrintfAccum\n                                              (done ++ show x ++ takeWhile notMagicChar todo)\n                                              (dropWhile notMagicChar todo)\n  accumulate _ acc = acc\n\nprintf' str = polyvariadic\n               (PrintfAccum (takeWhile notMagicChar str) (dropWhile notMagicChar str))\n               done\n```\n\n```haskell\n\u003e\u003e\u003e printf' \"aaa%bbb%ccc%ddd\" \"TEST\" 123 True\n\"aaa\\\"TEST\\\"bbb123cccTrueddd\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgaz%2Fpolyvariadic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgaz%2Fpolyvariadic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgaz%2Fpolyvariadic/lists"}