{"action":"opened","issue":{"url":"https://api.github.com/repos/jcristovao/newtype-generics/issues/20","repository_url":"https://api.github.com/repos/jcristovao/newtype-generics","labels_url":"https://api.github.com/repos/jcristovao/newtype-generics/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/jcristovao/newtype-generics/issues/20/comments","events_url":"https://api.github.com/repos/jcristovao/newtype-generics/issues/20/events","html_url":"https://github.com/jcristovao/newtype-generics/issues/20","id":293760977,"number":20,"title":"How can ala (or ala') implement under2?","user":{"login":"kozross","id":8463904,"avatar_url":"https://avatars2.githubusercontent.com/u/8463904?v=4","gravatar_id":"","url":"https://api.github.com/users/kozross","html_url":"https://github.com/kozross","followers_url":"https://api.github.com/users/kozross/followers","following_url":"https://api.github.com/users/kozross/following{/other_user}","gists_url":"https://api.github.com/users/kozross/gists{/gist_id}","starred_url":"https://api.github.com/users/kozross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kozross/subscriptions","organizations_url":"https://api.github.com/users/kozross/orgs","repos_url":"https://api.github.com/users/kozross/repos","events_url":"https://api.github.com/users/kozross/events{/privacy}","received_events_url":"https://api.github.com/users/kozross/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-02T03:23:21Z","updated_at":"2018-02-02T03:23:21Z","closed_at":null,"author_association":"NONE","body":"I read the following in the [documentation for ``ala``][1]:\r\n\r\nThe reason for the signature of the hof is due to ``ala`` not caring about structure. To illustrate why this is important, another function in this package is ``under``. It is not extremely useful; ``under2`` might be more useful (with e.g., ``mappend``), but then we already digging the trench of \"What about ``under3``? ``under4``?\". The solution utilized here is to just hand off the \"packer\" to the hof. That way your structure can be imposed in the hof, whatever you may want it to be (e.g., List, Traversable).\r\n\r\nHowever, I am not seeing how you could implement\r\n\r\n    under2 :: (Newtype n, Newtype n', o' ~ O n', o ~ O n) => (o -> n) -> (n -> n -> n') -> o -> o -> o' \r\n\r\nusing either ``ala`` or ``ala'``. Am I misunderstanding what the documentation means by ``under2``, the ``ala`` and ``ala'`` functions, or both?\r\n\r\n[1]: https://hackage.haskell.org/package/newtype-generics-0.5.1/docs/Control-Newtype.html#v:ala"}}
{"actor":{"display_login":"kozross"}}