{"action":"created","issue":{"url":"https://api.github.com/repos/dry-rb/dry-types/issues/80","repository_url":"https://api.github.com/repos/dry-rb/dry-types","labels_url":"https://api.github.com/repos/dry-rb/dry-types/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/dry-rb/dry-types/issues/80/comments","events_url":"https://api.github.com/repos/dry-rb/dry-types/issues/80/events","html_url":"https://github.com/dry-rb/dry-types/issues/80","id":150190002,"number":80,"title":"Replace kleisli with some minor dependency","user":{"login":"flash-gordon","id":802486,"avatar_url":"https://avatars.githubusercontent.com/u/802486?v=3","gravatar_id":"","url":"https://api.github.com/users/flash-gordon","html_url":"https://github.com/flash-gordon","followers_url":"https://api.github.com/users/flash-gordon/followers","following_url":"https://api.github.com/users/flash-gordon/following{/other_user}","gists_url":"https://api.github.com/users/flash-gordon/gists{/gist_id}","starred_url":"https://api.github.com/users/flash-gordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flash-gordon/subscriptions","organizations_url":"https://api.github.com/users/flash-gordon/orgs","repos_url":"https://api.github.com/users/flash-gordon/repos","events_url":"https://api.github.com/users/flash-gordon/events{/privacy}","received_events_url":"https://api.github.com/users/flash-gordon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-21T21:00:14Z","updated_at":"2016-04-24T10:47:31Z","closed_at":null,"body":"It looks like we have some issues with kleisli gem. First of all the author didn't release the new gem version that would include much welcome removal of obsolete blank_slate hack. When I tried to add dry-types to my existing rails project this first thing I saw was StackOverflowError. It if very unfriendly error tbh :) After some time of debugging I figured out that the problem was caused by [other gem](https://github.com/kschiess/parslet/pull/154) that uses blankslate (without reason, actually). I absolutely don't blame the author at all, it is OSS so he can do whatever he wants. \r\n\r\nThe second issue is that kleisli adds some pollution to the global environment. E.g. it adds `#Maybe` and `#Right` methods to object so the become a private members of almost any object in runtime. I think it is against our rules :) Also I Maybe/Either methods a lot and found a tricky problem with using them inside a namespaced blocks of dry-container because [NamespaceDSL](https://github.com/dry-rb/dry-container/blob/master/lib/dry/container/namespace_dsl.rb) uses SimpleDelegator that inherits from BasicObject and _does not_ delegate to private methods so I got really unexpected NoMethodError.\r\n\r\nThird is that I think we do not need most of kleisli classes. I doubt we need more than Maybe + Either. And from the other side we can add some other stuff to a potential monad/fp dependency.\r\n\r\nFinally I think the API of kleisli is quite good but not perfect. Twisting it a bit would be really nice.\r\n\r\nI propose to create a minor dry-monad/dry-fp dependency so we can solve all that issues. I quickly made a couple of files (untested :)) that can become a new gem:\r\nMaybe: https://gist.github.com/flash-gordon/a6e6c0956b802d387e2fe81d9b7530b7\r\nEither: https://gist.github.com/flash-gordon/446d38a1c7295e1b9ffcbe1302741522\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/dry-rb/dry-types/issues/comments/213934392","html_url":"https://github.com/dry-rb/dry-types/issues/80#issuecomment-213934392","issue_url":"https://api.github.com/repos/dry-rb/dry-types/issues/80","id":213934392,"user":{"login":"solnic","id":1066,"avatar_url":"https://avatars.githubusercontent.com/u/1066?v=3","gravatar_id":"","url":"https://api.github.com/users/solnic","html_url":"https://github.com/solnic","followers_url":"https://api.github.com/users/solnic/followers","following_url":"https://api.github.com/users/solnic/following{/other_user}","gists_url":"https://api.github.com/users/solnic/gists{/gist_id}","starred_url":"https://api.github.com/users/solnic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solnic/subscriptions","organizations_url":"https://api.github.com/users/solnic/orgs","repos_url":"https://api.github.com/users/solnic/repos","events_url":"https://api.github.com/users/solnic/events{/privacy}","received_events_url":"https://api.github.com/users/solnic/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T10:47:30Z","updated_at":"2016-04-24T10:47:30Z","body":"@flash-gordon can you push your ideas to a branch under dry-monads project and open a PR to discuss APIs?"}}