{"action":"closed","issue":{"url":"https://api.github.com/repos/kowainik/tomland/issues/95","repository_url":"https://api.github.com/repos/kowainik/tomland","labels_url":"https://api.github.com/repos/kowainik/tomland/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/kowainik/tomland/issues/95/comments","events_url":"https://api.github.com/repos/kowainik/tomland/issues/95/events","html_url":"https://github.com/kowainik/tomland/issues/95","id":365299488,"node_id":"MDU6SXNzdWUzNjUyOTk0ODg=","number":95,"title":"Swap order of type arguments for `BiMap` in `match` and `arrayOf` functions","user":{"login":"ChShersh","id":4276606,"node_id":"MDQ6VXNlcjQyNzY2MDY=","avatar_url":"https://avatars0.githubusercontent.com/u/4276606?v=4","gravatar_id":"","url":"https://api.github.com/users/ChShersh","html_url":"https://github.com/ChShersh","followers_url":"https://api.github.com/users/ChShersh/followers","following_url":"https://api.github.com/users/ChShersh/following{/other_user}","gists_url":"https://api.github.com/users/ChShersh/gists{/gist_id}","starred_url":"https://api.github.com/users/ChShersh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChShersh/subscriptions","organizations_url":"https://api.github.com/users/ChShersh/orgs","repos_url":"https://api.github.com/users/ChShersh/repos","events_url":"https://api.github.com/users/ChShersh/events{/privacy}","received_events_url":"https://api.github.com/users/ChShersh/received_events","type":"User","site_admin":false},"labels":[{"id":1074239493,"node_id":"MDU6TGFiZWwxMDc0MjM5NDkz","url":"https://api.github.com/repos/kowainik/tomland/labels/Hacktoberfest","name":"Hacktoberfest","color":"FBA36B","default":false},{"id":890142497,"node_id":"MDU6TGFiZWw4OTAxNDI0OTc=","url":"https://api.github.com/repos/kowainik/tomland/labels/codec","name":"codec","color":"b8e006","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-01T03:48:01Z","updated_at":"2018-10-11T14:51:11Z","closed_at":"2018-10-11T14:51:10Z","author_association":"MEMBER","body":"Currently we have the following combinator:\r\n\r\n```haskell\r\ndata BiMap a b = BiMap\r\n    { forward  :: a -> Maybe b\r\n    , backward :: b -> Maybe a\r\n    }\r\n\r\nprism :: (object -> Maybe field) -> (field -> object) -> BiMap object field\r\nprism preview review = BiMap preview (Just . review)\r\n```\r\n\r\nBut usually it's used with `invert` function to get required type:\r\n\r\n```haskell\r\n_Url :: BiMap Text Source\r\n_Url = Toml.invert $ Toml.prism matchUrl Url\r\n```\r\n\r\nWe need to add combinator like `invert . prism` but I don't know proper name for it 😞 The name should be short because it's going to be used often."}}
{"actor":{"display_login":"ChShersh"}}