{"id":23651582,"url":"https://github.com/athanclark/dag","last_synced_at":"2026-01-29T17:33:19.009Z","repository":{"id":25495851,"uuid":"28927014","full_name":"athanclark/dag","owner":"athanclark","description":"A well-typed Directed Acyclic Graph in Haskell","archived":false,"fork":false,"pushed_at":"2015-01-25T05:14:44.000Z","size":288,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-01T02:43:14.949Z","etag":null,"topics":["dag","directed-acyclic-graph","graph","haskell","type-level-programming"],"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/athanclark.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}},"created_at":"2015-01-07T18:11:25.000Z","updated_at":"2025-02-21T16:08:44.000Z","dependencies_parsed_at":"2022-08-06T04:15:30.569Z","dependency_job_id":null,"html_url":"https://github.com/athanclark/dag","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/athanclark/dag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fdag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fdag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fdag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fdag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athanclark","download_url":"https://codeload.github.com/athanclark/dag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fdag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28881982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["dag","directed-acyclic-graph","graph","haskell","type-level-programming"],"created_at":"2024-12-28T16:38:31.897Z","updated_at":"2026-01-29T17:33:18.987Z","avatar_url":"https://github.com/athanclark.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Stories in Ready](https://badge.waffle.io/athanclark/dag.png?label=ready\u0026title=Ready)](https://waffle.io/athanclark/dag)\ndag\n===\n\n\u003e Directed Acyclic Graphs for Haskell\n\n## Description\n\nThis is a type-safe directed acyclic graph library for Haskell. This library\ndiffers from others in a number of ways:\n\n- Edge construction is incremental, creating a \"schema\":\n\n  ```haskell\n  {-# LANGUAGE DataKinds #-}\n\n  import Data.Graph.DAG.Edge\n\n  -- | Edges are statically defined:\n  edges = ECons (Edge :: EdgeValue \"foo\" \"bar\") $\n    ECons (Edge :: EdgeValue \"bar\" \"baz\") $\n    ECons (Edge :: EdgeValue \"foo\" \"baz\")\n    unique -- ENil, but casted for uniquely edged graphs\n  ```\n\n- The nodes are separate from edges; graph may be not connected:\n\n  ```haskell\n  data Cool = AllRight\n            | Radical\n            | SuperDuper\n\n  graph = GCons \"foo\" AllRight $\n    GCons \"bar\" Radical $\n    GCons \"baz\" SuperDuper $\n    GNil edges\n  ```\n\n- Type safety throughout edge construction:\n\n  ```haskell\n  *Data.Graph.DAG\u003e :t edges\n  edges\n    :: EdgeSchema\n         '['EdgeType \"foo\" \"bar\", 'EdgeType \"bar\" \"baz\",\n           'EdgeType \"foo\" \"baz\"] -- Type list of edges\n         '['(\"foo\", '[\"bar\", \"baz\"]), '(\"bar\", '[\"baz\"])] -- potential loops\n         'True -- uniqueness\n  ```\n\n- Various type-level computation\n\n  ```haskell\n  *Data.Graph.DAG\u003e :t getSpanningTrees $ edges\n  getSpanningTrees $ edges\n    :: Data.Proxy.Proxy\n         '['Node \"foo\" '['Node \"bar\" '['Node \"baz\" '[]],\n                         'Node \"baz\" '[]],\n           'Node \"bar\" '['Node \"baz\" '[]],\n           'Node \"baz\" '[]]\n\n  *Data.Graph.DAG\u003e reflect $ getSpanningTrees $ edges\n  [Node \"foo\" [Node \"bar\" [Node \"baz\" []]\n              ,Node \"baz\" []]\n  ,Node \"bar\" [Node \"baz\" []]\n  ,Node \"baz\" []]\n  ```\n\nThis library is still very naive, but it will give us compile-time enforcement\nof acyclicity in these graphs - ideal for dependency graphs.\n\n## Usage\n\nYou will need `-XDataKinds` for the type-level symbols:\n\n```haskell\n{-# LANGUAGE DataKinds #-}\n\nimport Data.Graph.DAG\nimport GHC.TypeLits\n\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fdag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathanclark%2Fdag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fdag/lists"}