{"id":16336903,"url":"https://github.com/angerman/data-bitcode-edsl","last_synced_at":"2026-05-01T06:34:11.994Z","repository":{"id":79904386,"uuid":"65057613","full_name":"angerman/data-bitcode-edsl","owner":"angerman","description":"Data.BitCode.EDSL","archived":false,"fork":false,"pushed_at":"2017-12-03T12:28:11.000Z","size":188,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-16T15:50:24.339Z","etag":null,"topics":["bitcode","haskell","llvm"],"latest_commit_sha":null,"homepage":null,"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/angerman.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}},"created_at":"2016-08-06T00:40:15.000Z","updated_at":"2024-04-09T15:24:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2d3f486-9524-4d8d-bc3e-6121a6c08779","html_url":"https://github.com/angerman/data-bitcode-edsl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angerman/data-bitcode-edsl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fdata-bitcode-edsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fdata-bitcode-edsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fdata-bitcode-edsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fdata-bitcode-edsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angerman","download_url":"https://codeload.github.com/angerman/data-bitcode-edsl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angerman%2Fdata-bitcode-edsl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32487597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["bitcode","haskell","llvm"],"created_at":"2024-10-10T23:45:17.666Z","updated_at":"2026-05-01T06:34:11.980Z","avatar_url":"https://github.com/angerman.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data.BitCode\n\nPure haskell support for reading and writing the BitCode Container Format.\n\n---\n\n# Tools\n\nTo see the block list (as seen by the bitcode reader), use\n\n```\n$ llvm-bcanalyzer file.bc -dump|less\n```\n\nto verify the dissassembly looks as expected, use\n\n```\n$ llvm-dis -f file.bc -show-annotations \u0026\u0026 less file.ll\n```\n\nand to turn the produced bitcode into a binary, use\n\n```\n$ llc file.bc -filetype=obj # will produce file.o\n```\n\nto subsequently link with a linker.\n\n`clang` however can do all the linking from a bc file onwards:\n\n```\n$ clang file.bc \u0026\u0026 ./a.out\n```\n\n---\n\n# TODO: \n- [ ] build sample app that uses more than one function. (e.g. call out to a second function)\n- [ ] Unify ANON_STRUCT and NAMED_STRUCT. If it has a name it's named, otherwise it's anonynmous.\n- [ ] Put CallingConv into the function type, instead of the function. The issue is that we might\n      bitcast a function, but loose the relevant information on how to call the casted result, if\n      we do not store the relevant information in the result of a cast op.\n- [ ] Resolve all ForwardReferences (A few more FwdRef's were introduced that are non yet all resolved).\n\n# High Prio\n\n- [ ] Support all instructions\n- [ ] Applicative Module Construction interface\n- [ ] Some form of support for Metadata\n- [ ] Some form of support for Attributes\n- [ ] Support USELIST\n- [ ] Extensive haddock documentaiton\n- [ ] Convert VBR to Signed VBR. Signed VBR's value is shifted by 1, and the low bit indicates if negative or not.\n  - [x] Used in `CST_CODE_INTEGER`, `CST_CODE_WIDE_INTEGER`\n  - [ ] and `CONSTANTS_BLOCK` records.\n  - [ ] Also for phi instruction operands in `MODULE_CODE_VERSION` 1.\n\n# Medium Prio\n\n- [ ] Rename `XXX_CODE_YYY` into `YYY`, they usually live in the corresponding module anyway.\n- [ ] Drop the Call Markers file and unify with BitFlags (including inAllocaMask, SwiftErrorMask, ...)\n- [ ] Rename `read` to `expect`, where it's used in expectance.\n- [ ] Rename `parse` to `read`\n- [ ] Use use Control.Monad (when, unless) where possible.\n- [ ] Add doc tests to make verify it works; and for documentation.\n      Need to figure out how to do this properly. No idea yet.\n\n# Low Prio\n\n- [ ] Support Function Block VSTs\n- [ ] Writer: Add support for VST Offsets to the writer (since 3.8).\n      (Not sure if this will be mandatory in the future).\n      See: https://reviews.llvm.org/D12536\n      The linked document: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view describes\n      the reasoning. We likely does *not* support ThinLTO without this.\n- [ ] Writer: Support BasicBlock Labels (`VST_CODE_BBENTRY`)\n- [ ] Compare LLVM  IR/*.h diffs and add @since@ flags.\n      Not sure how to do this properly.\n- [ ] Abbreviation support\n      This is not strictly necessary as it's only a compression scheme. Would still be nice to have.\n      However, the logic for the encoding would probably have to live in Data.BitCode.LLVM, as the\n      information about the actuall types is erazed when transfered through NBitCode.\n  - [ ] Add abbreviation width knowledge to the writer.\n  - [ ] Add support for returning the abbreviaion id, for defAbbrev to be used in abbrevRecord, in the writer monad.\n  - [ ] Add support for obtaining the current abbreviation map to the reader monad (push, pop?).\n  - [ ] Add support to obtain the current abbreviationWidth from the reader monad (push, pop?).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangerman%2Fdata-bitcode-edsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangerman%2Fdata-bitcode-edsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangerman%2Fdata-bitcode-edsl/lists"}