{"id":28832708,"url":"https://github.com/elaforge/fix-imports","last_synced_at":"2025-10-30T06:42:44.860Z","repository":{"id":145854017,"uuid":"123175178","full_name":"elaforge/fix-imports","owner":"elaforge","description":"Automatically add and delete imports in a Haskell module.","archived":false,"fork":false,"pushed_at":"2025-02-19T12:43:04.000Z","size":411,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-19T08:13:53.373Z","etag":null,"topics":[],"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/elaforge.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-27T19:08:36.000Z","updated_at":"2025-05-30T00:27:54.000Z","dependencies_parsed_at":"2023-05-18T11:30:45.285Z","dependency_job_id":null,"html_url":"https://github.com/elaforge/fix-imports","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elaforge/fix-imports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elaforge%2Ffix-imports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elaforge%2Ffix-imports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elaforge%2Ffix-imports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elaforge%2Ffix-imports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elaforge","download_url":"https://codeload.github.com/elaforge/fix-imports/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elaforge%2Ffix-imports/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018219,"owners_count":26086307,"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-10-14T02:00:06.444Z","response_time":60,"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":[],"created_at":"2025-06-19T08:13:49.192Z","updated_at":"2025-10-14T07:38:11.153Z","avatar_url":"https://github.com/elaforge.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"`fix-imports` is a small standalone program to manage the import block of a\nhaskell program.  It will try to add import lines for qualified names\nwith no corresponding import, remove unused import lines, and keep the\nimport block sorted, with optional rules for grouping.\n\nSupport for unqualified imports is limited to symbols you explicitly configure,\nso if you list `System.FilePath ((\u003c/\u003e))`, it will add that import when you use\nit, or remove when it's no longer used, but it won't go search modules for\nunqualified imports.\n\nIt doesn't mess with non-managed unqualified imports, so you can still use\nunqualified imports, you just have to do it manually.\n\nSince it's a unix-style filter, it should be possible to integrate into any\neditor.  There's an example vimrc to bind to a key in vim.\n\n### Usage:\n\nNormally you would integrate it with your editor (see `vimrc` for a vim\nexample), but for testing, here's an example invocation:\n\n    fix-imports -i src -i test src/A/B/C.hs \u003csrc/A/B/C.hs\n    [ fixed contents of A/B/C.hs, or an error ]\n\nThe `-i` flag is like ghc's `-i` flag, it will add an aditional root to the\nmodule search path.  The example will find modules in both `test/*` and\n`src/*`, in addition to the package db.\n\n`fix-imports` will look for `.ghc.environment.*` in the current directory\nand use it for pkgs to search.  This is created by cabal v2, but only if\nyou have `write-ghc-environment-files: always` in `cabal.project`.\nOtherwise, it assumes cabal v1 and will use the `ghc-pkg` command to use\nthe global package db.\n\nIf it doesn't seem to see packages you think it should, run with `--debug`\nto see what it sees.\n\nI don't use stack, but my understanding is this is enough to get `ghc-pkg`\nworking:\n\n    export GHC_PACKAGE_PATH=$(stack path --ghc-package-path)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felaforge%2Ffix-imports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felaforge%2Ffix-imports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felaforge%2Ffix-imports/lists"}