{"id":15663863,"url":"https://github.com/yoeight/deiko-config","last_synced_at":"2025-05-05T23:45:19.782Z","repository":{"id":8722309,"uuid":"10393711","full_name":"YoEight/deiko-config","owner":"YoEight","description":"A small configuration library written in Haskell","archived":false,"fork":false,"pushed_at":"2019-10-12T15:41:15.000Z","size":124,"stargazers_count":17,"open_issues_count":6,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-26T07:36:26.002Z","etag":null,"topics":[],"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/YoEight.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}},"created_at":"2013-05-30T22:51:02.000Z","updated_at":"2024-02-11T06:12:11.000Z","dependencies_parsed_at":"2022-09-05T00:51:02.788Z","dependency_job_id":null,"html_url":"https://github.com/YoEight/deiko-config","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoEight%2Fdeiko-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoEight%2Fdeiko-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoEight%2Fdeiko-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoEight%2Fdeiko-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YoEight","download_url":"https://codeload.github.com/YoEight/deiko-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596325,"owners_count":21773842,"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":[],"created_at":"2024-10-03T13:40:12.607Z","updated_at":"2025-05-05T23:45:19.761Z","avatar_url":"https://github.com/YoEight.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Small configuration library written in Haskell\n\n[![Build Status](https://travis-ci.org/YoEight/deiko-config.png?branch=master)](https://travis-ci.org/YoEight/deiko-config)\n\n##Overview\n\nUses [Typesafe-config](https://github.com/typesafehub/config)'s format: HOCON\n\nHOCON stands for Human-Optimized Config Object Notation. It's basically a JSON superset\n\nHere's an example:\n\n```\n# This is a comment\n\nfoo.bar = ${toto}\n\ntoto = false\n\nrawString = \"\"\"\n            This is a multi-\n            lines String\n            \"\"\"\n\nanother.string = \"I'm a String\"\n\none.more.string = one more string\n\nnested {\n   list: [ one\n         , 1\n         , \"both\"]\n   \n   homing = { \n     pass: { b: feez } { a: \"Prop\"}\n   }\n\n   another: [1,2,3] [4,5,6]\n}\n```\n\nMore information about the format can be found on [Typesafe-config project page](https://github.com/typesafehub/config).\n\nThe library provides good error messages and comes with a bottom-up type inferencer in order to catch more configuration errors.\n\nHere some use-cases:\n\n1) `foo = [\"bar\", { baz : 42 }]`\n\nYou'll have:\n\n```\nfoo:1:8-13: Expecting String but having Object\n```\n\nreason: List has only one inner type\n\n2) `foo = [\"bar\"] [{ baz : 42 }]`\n\nYou'll have:\n\n```\nfoo:1:7-14: Expecting List[String] but having List[Object]\n```\n\nreason: You can't merge Lists of different types\n\n##Example\n\n```haskell\n{-# LANGUAGE OverloadedStrings #-}\nimport Data.Config\nimport Data.Text (Text)\n\ndata Foo = Foo { fooPort :: Int, fooAddr :: Text }\n\nmain :: IO ()\nmain = do\n  foo \u003c- loadFooProps\n  withFoo foo\n\n  where\n    loadFooProps = do\n      config \u003c- loadConfig \"conf/baz.conf\"\n      port   \u003c- getInteger \"foo.port\" config\n      addr   \u003c- getString \"foo.addr\" config\n      return (Foo port addr)\n\nwithFoo :: Foo -\u003e IO ()\nwithFoo = ...\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoeight%2Fdeiko-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoeight%2Fdeiko-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoeight%2Fdeiko-config/lists"}