{"id":24394393,"url":"https://github.com/danidrd/multisets_in_haskell","last_synced_at":"2026-05-23T08:02:32.700Z","repository":{"id":269477075,"uuid":"907441074","full_name":"danidrd/MultiSets_in_Haskell","owner":"danidrd","description":"Implementation of a MultiSet in Haskell without using Data.Multiset","archived":false,"fork":false,"pushed_at":"2024-12-31T18:35:21.000Z","size":335,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T20:14:33.807Z","etag":null,"topics":["datatype","haskell"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danidrd.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dco":null,"cla":null}},"created_at":"2024-12-23T15:32:03.000Z","updated_at":"2024-12-31T18:35:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"a313a144-c817-4615-a901-13b17d809e0d","html_url":"https://github.com/danidrd/MultiSets_in_Haskell","commit_stats":null,"previous_names":["danidrd/multisets_in_haskell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danidrd/MultiSets_in_Haskell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danidrd%2FMultiSets_in_Haskell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danidrd%2FMultiSets_in_Haskell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danidrd%2FMultiSets_in_Haskell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danidrd%2FMultiSets_in_Haskell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danidrd","download_url":"https://codeload.github.com/danidrd/MultiSets_in_Haskell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danidrd%2FMultiSets_in_Haskell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33387656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"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":["datatype","haskell"],"created_at":"2025-01-19T19:24:09.427Z","updated_at":"2026-05-23T08:02:32.674Z","avatar_url":"https://github.com/danidrd.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MultiSet Haskell Module\n\n## Description\n\nThe `MultiSet` module provides an implementation of multisets (sets that allow duplicate elements) in Haskell. It includes functions to perform various operations on multisets, such as adding elements, counting occurrences, extracting elements, checking subset relations, computing unions and check same elements between Multisets.\n\nThe module ensures that all operations return well-formed multisets, where:\n- All multiplicities are positive.\n- There are no duplicate elements (all elements are distinct).\n\nA `main` program is included to test the functionalities provided by the module.\nA `test` program is included to test also read and write from/to files. (token = \\n) =\u003e if you want to change the files in input,\nmake sure that the file in question is well formatted (only a word for each line).\n\n---\n\n## Features\n\nThe `MultiSet` module provides the following functionalities:\n\n1. **Add an Element**: Adds an element to a multiset, increasing its multiplicity if it already exists.\n2. **Count Occurrences**: Counts the occurrences of a given element in the multiset.\n3. **Extract Elements**: Extracts all elements of the multiset as a list, duplicating each element based on its multiplicity.\n4. **Check Subset Relation**: Determines if one multiset is a subset of another.\n5. **Union**: Computes the union of two multisets, summing the multiplicities of shared elements.\n6. **Ensure Well-Formedness**: All operations guarantee the result is a well-formed multiset.\n7. **Check Same Elements**: Determines if one multiset has the same elements (without considering multiplicities) of another.\n\n---\n\n## Installation\n\n1. Clone this repository to your local machine:\n   ```bash\n   git clone https://github.com/danidrd/MultiSets_in_Haskell.git\n   cd MultiSets_in_Haskell\n2. Ensure you have GHC (Glasgow Haskell Compiler) installed. If not, you can download and install it from the official website: https://www.haskell.org/ghc/\n3. Compile the Haskell source code:\n   ```bash\n   ghc -o main main.hs MultiSet.hs\n   ghc -o test TestMSet.hs MultiSet.hs\n4. Run the compiled program:\n   ```bash\n   ./test\n   ./main\n   ```\n   **In alternative**:\n   ```bash\n   runghc TestMSet.hs\n   runghc main.hs\n5. Check the results with checker.awk\n   ```bash\n   chmod 755 checker.awk\n   ./checker.awk gana-out.txt anag-out.txt \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanidrd%2Fmultisets_in_haskell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanidrd%2Fmultisets_in_haskell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanidrd%2Fmultisets_in_haskell/lists"}