{"id":13681813,"url":"https://github.com/haskell-foundation/foundation","last_synced_at":"2025-04-30T06:32:23.493Z","repository":{"id":8402894,"uuid":"58267893","full_name":"haskell-foundation/foundation","owner":"haskell-foundation","description":"Empire strikes back","archived":true,"fork":false,"pushed_at":"2023-06-14T02:43:39.000Z","size":2603,"stargazers_count":464,"open_issues_count":94,"forks_count":91,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-02T18:10:43.137Z","etag":null,"topics":["foundation","haskell","prelude"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haskell-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","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}},"created_at":"2016-05-07T13:48:40.000Z","updated_at":"2024-07-13T15:48:35.000Z","dependencies_parsed_at":"2024-08-02T13:34:09.730Z","dependency_job_id":null,"html_url":"https://github.com/haskell-foundation/foundation","commit_stats":{"total_commits":1700,"total_committers":48,"mean_commits":"35.416666666666664","dds":"0.34058823529411764","last_synced_commit":"6d2b86c1a0393543a1812115c9b5c92086f7c855"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-foundation%2Ffoundation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-foundation%2Ffoundation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-foundation%2Ffoundation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-foundation%2Ffoundation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haskell-foundation","download_url":"https://codeload.github.com/haskell-foundation/foundation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223912841,"owners_count":17224206,"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":["foundation","haskell","prelude"],"created_at":"2024-08-02T13:01:36.189Z","updated_at":"2024-11-12T01:30:34.710Z","avatar_url":"https://github.com/haskell-foundation.png","language":"Haskell","readme":"Foundation\n==========\n\n![Continuous integration](https://github.com/haskell-foundation/foundation/workflows/Continuous%20integration/badge.svg)\n[![Doc](https://readthedocs.org/projects/haskell-foundation/badge/?version=latest)](http://haskell-foundation.readthedocs.io/en/latest/)\n[![Stackage version](https://www.stackage.org/package/foundation/badge/lts?label=Stackage)](https://www.stackage.org/package/foundation)\n[![Hackage version](https://img.shields.io/hackage/v/foundation.svg?label=Hackage)](https://hackage.haskell.org/package/foundation)\n[![BSD3](https://img.shields.io/badge/License-BSD-blue.svg)](https://en.wikipedia.org/wiki/BSD_License)\n[![Haskell](https://img.shields.io/badge/Language-Haskell-yellowgreen.svg)](https://www.haskell.org)\n[![Coverage Status](https://coveralls.io/repos/github/haskell-foundation/foundation/badge.svg?branch=master)](https://coveralls.io/github/haskell-foundation/foundation?branch=master)\n\nDocumentation:\n\n* [Read the doc](https://haskell-foundation.readthedocs.io/en/latest/)\n* [Foundation on stackage](https://www.stackage.org/package/foundation)\n* [Foundation on hackage](https://hackage.haskell.org/package/foundation)\n\nDiscuss:\n\n* [Gitter](https://gitter.im/haskell-foundation/foundation)\n\nGoals\n=====\n\n* provide a base like set of modules that provide a consistent set of features and bugfixes across multiple versions of GHC (unlike base).\n* provide a better and more efficient prelude than base's prelude.\n* be self-sufficient: no external dependencies apart from base (or ghc packages).\n* provide better data-types: packed unicode string by default, arrays.\n* Better numerical classes that better represent mathematical things (No more all-in-one Num).\n\nSupport\n=======\n\nSee [Haskell packages guidelines](https://github.com/vincenthz/haskell-pkg-guidelines/blob/master/README.md#support)\n\nUsage\n=====\n\nHow to use with the normal Prelude\n----------------------------------\n\nAdd the `foundation` package in your cabal file, and it's recommended to import Foundation qualified if\nyou're planning to use with the normal Prelude:\n\nFor example:\n\n```haskell\nimport qualified Foundation as F\n```\n\nIt's also recommended if you're going to deal with packages using text, bytestring, vector.. to use\nthe `foundation-edge` package.\n\nHow to use fully without Prelude\n--------------------------------\n\nDisable the built-in prelude at the top of your file:\n\n```haskell\n{-# LANGUAGE NoImplicitPrelude #-}\n```\n\nOr directly in your project cabal file:\n\n```haskell\nDefault-Extensions: NoImplicitPrelude\n```\n\nThen in your modules:\n\n```haskell\nimport Foundation\n```\n\nAdvanced settings\n----------------------\n\nPlease check out the chapter [Advanced Usage Options](docs/advanced-runtime.md) in the\ndocumentation.\n\n\nHow to contribute\n=================\n\nContribution guide can be found\n[here](https://haskell-foundation.readthedocs.io/en/latest/contributing/).\n\n\nProfiling\n---------\n\nIf you want to see the core (simpl step) or the assembly (asm step), then you can build with\n\n    stack build --ghc-options -ddump-simpl --ghc-options -ddump-asm\n\nNote that it doesn't actually will create the necessary extra files if the modules doesn't need building.\n\nyou can then find your build by-products in:\n\n    .stack-work/dist/\u003carchitecture\u003e/Cabal-\u003cCabalVersion\u003e/build/\n\nEach modules that get compiled will create an equivalent file in the build directory:\n\n* ModuleName.dump-simpl\n* ModuleName.dump-asm\n\nFor profiling individual programs, the following command is useful:\n\n    stack ghc -- -O --make X.hs -prof -auto-all -caf-all -fforce-recomp\n\nBenchmarking\n------------\n\nTo get the list of benchmark:\n\n    stack bench --benchmark-arguments -l\n\nTo compare against other libraries, you need to set the `bench-all` flag\n\n    stack bench --flag foundation:bench-all --benchmark-arguments -l\n\nTo run a specific or set of benchmarks :\n\n    stack bench --flag foundation:bench-all --benchmark-arguments 'types/String/SplitAt/mascii-10/Text'\n    stack bench --flag foundation:bench-all --benchmark-arguments '-m prefix types/String/SplitAt'\n    stack bench --flag foundation:bench-all --benchmark-arguments '-m glob types/String/SplitAt'\n\nTo register a set of benchmarks:\n\n    stack bench --flag foundation:bench-all --benchmark-arguments \"--csv $(git describe).csv\"\n\n\nDesign\n======\n\nFoundation started on the simple idea of trying to put everything I need in one\nsimple and consistent package. The amazing haskell ecosystem is extremely\nfragmented and maintained by different people with different goals, free time,\nand style. The overall scare of not trying to change anything relatively\ncentral (`base`, `bytestring`, `text`, `vector`, ...) for a promise of stability\nhas pushed many people to work on their own thing, leading to unnecessary work\nduplication and further fragmentation.\n\n\nFoundation uses and abuses type families.\n\n\nCode Organisation\n=================\n\nEvery foundation modules start by `Foundation`.\n\n* `Foundation` is the prelude replacement module.\n* `Basement.Compat` contains only compatibilty and re-export from ghc/ghc-prim/base.\n* `Foundation.Primitive` is where all the lowlevel magic happens:\n  * Important types that underpins many others part\n  * Pervasive features\n","funding_links":[],"categories":["Haskell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-foundation%2Ffoundation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaskell-foundation%2Ffoundation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-foundation%2Ffoundation/lists"}