{"id":15771721,"url":"https://github.com/nwtgck/hindent-show","last_synced_at":"2025-03-31T12:11:04.978Z","repository":{"id":87735707,"uuid":"133215820","full_name":"nwtgck/hindent-show","owner":"nwtgck","description":"Pretty printing by hindent","archived":false,"fork":false,"pushed_at":"2018-05-14T12:24:24.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2024-10-11T15:11:36.774Z","etag":null,"topics":["haskell","haskell-library","haskell-stack","pretty-print"],"latest_commit_sha":null,"homepage":"","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/nwtgck.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-05-13T07:40:29.000Z","updated_at":"2018-05-14T12:02:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"47804a56-c671-4474-a823-d67b29f1722c","html_url":"https://github.com/nwtgck/hindent-show","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"5fafe6da26c201499350da6ad7853ce625852e59"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhindent-show","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhindent-show/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhindent-show/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhindent-show/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwtgck","download_url":"https://codeload.github.com/nwtgck/hindent-show/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465228,"owners_count":20781919,"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":["haskell","haskell-library","haskell-stack","pretty-print"],"created_at":"2024-10-04T15:04:42.988Z","updated_at":"2025-03-31T12:11:04.952Z","avatar_url":"https://github.com/nwtgck.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hindent-show\n[![Build Status](https://travis-ci.com/nwtgck/hindent-show.svg?branch=master)](https://travis-ci.com/nwtgck/hindent-show)\n\nPretty printing by hindent\n\n## Install\n\nAdd this library to your `stack.yaml` like the following if you use [Stack](https://docs.haskellstack.org/en/stable/README/).\n\n```yaml\n...\nextra-deps:\n- git: https://github.com/nwtgck/hindent-show.git\n  commit: 7b3c1fa21f7fac8f124361d1ab8fdaf0155a1445\n...\n```\n\nThen, add `hindent-show` to your `package.yaml`.\n\n```yaml\n...\nlibrary:\n dependencies:\n - hindent-show\n...\n```\n\n\n## Usage - pretty-print a data structure\n\nHere is an example to pretty-print a tree.\n\n```hs\ndata Tree a\n  = Node { value :: a\n         , left :: (Tree a)\n         , right :: (Tree a) }\n  | Leaf\n  deriving (Show)\n\n\nmain :: IO\nmain = do\n  let tree1 = Node 1 (Node 2 Leaf (Node 1 (Node 2 Leaf Leaf) Leaf)) (Node 1 (Node 2 Leaf Leaf) Leaf)\n  hindentPrint tree1\n```\n\n### output\n\n```txt\nNode\n{ value = 1\n, left =\n    Node\n    { value = 2\n    , left = Leaf\n    , right =\n        Node\n        { value = 1\n        , left = Node {value = 2, left = Leaf, right = Leaf}\n        , right = Leaf\n        }\n    }\n, right =\n    Node\n    { value = 1\n    , left = Node {value = 2, left = Leaf, right = Leaf}\n    , right = Leaf\n    }\n}\n```\n\n## Usage - indent of code\n\n```hs\nmain :: IO ()\nmain = do\n  let formated :: String\n      formated = hidentFormat \"a = [332521132,20783,30,4093902,1390,109301,93132,3901,83912,218491,284913]\"\n  putStrLn formated\n\n``` \n\n### output\n\n```\na =\n  [ 332521132\n  , 20783\n  , 30\n  , 4093902\n  , 1390\n  , 109301\n  , 93132\n  , 3901\n  , 83912\n  , 218491\n  , 284913\n  ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwtgck%2Fhindent-show","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwtgck%2Fhindent-show","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwtgck%2Fhindent-show/lists"}