{"action":"created","issue":{"url":"https://api.github.com/repos/ndmitchell/hoogle/issues/263","repository_url":"https://api.github.com/repos/ndmitchell/hoogle","labels_url":"https://api.github.com/repos/ndmitchell/hoogle/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/ndmitchell/hoogle/issues/263/comments","events_url":"https://api.github.com/repos/ndmitchell/hoogle/issues/263/events","html_url":"https://github.com/ndmitchell/hoogle/pull/263","id":372013027,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MzMwOTU4","number":263,"title":"Type search","user":{"login":"matt-noonan","id":14229603,"node_id":"MDQ6VXNlcjE0MjI5NjAz","avatar_url":"https://avatars3.githubusercontent.com/u/14229603?v=4","gravatar_id":"","url":"https://api.github.com/users/matt-noonan","html_url":"https://github.com/matt-noonan","followers_url":"https://api.github.com/users/matt-noonan/followers","following_url":"https://api.github.com/users/matt-noonan/following{/other_user}","gists_url":"https://api.github.com/users/matt-noonan/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-noonan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-noonan/subscriptions","organizations_url":"https://api.github.com/users/matt-noonan/orgs","repos_url":"https://api.github.com/users/matt-noonan/repos","events_url":"https://api.github.com/users/matt-noonan/events{/privacy}","received_events_url":"https://api.github.com/users/matt-noonan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-19T15:43:35Z","updated_at":"2018-10-19T20:41:44Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ndmitchell/hoogle/pulls/263","html_url":"https://github.com/ndmitchell/hoogle/pull/263","diff_url":"https://github.com/ndmitchell/hoogle/pull/263.diff","patch_url":"https://github.com/ndmitchell/hoogle/pull/263.patch"},"body":"This is a first go at adding type search on top of the fingerprint filtering. The query (or some simple variations of it) is checked against the proposed answer signature by attempting to unify the answer with the query, keeping type variables in the query fixed. The amount of \"unification work\" needed gives a cost, that is later combined with the fingerprint cost and a heuristic about the number of abstract constraints.\r\n\r\nI made a list of test cases (see `todo3.txt`) that did not previously work, to help mark progress as type search is added. Some of the test cases come from github issues, others are things I came across on stackoverflow, twitter, etc. Even this simple type search seems to improve the results quite a bit, compared to fingerprint-only search.\r\n\r\nMy editor setup made some formatting changes via `stylish-haskell`, adding a bit of noise to this PR. Please do let me know if you'd rather I undid those changes."},"comment":{"url":"https://api.github.com/repos/ndmitchell/hoogle/issues/comments/431492836","html_url":"https://github.com/ndmitchell/hoogle/pull/263#issuecomment-431492836","issue_url":"https://api.github.com/repos/ndmitchell/hoogle/issues/263","id":431492836,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTQ5MjgzNg==","user":{"login":"ndmitchell","id":1651197,"node_id":"MDQ6VXNlcjE2NTExOTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1651197?v=4","gravatar_id":"","url":"https://api.github.com/users/ndmitchell","html_url":"https://github.com/ndmitchell","followers_url":"https://api.github.com/users/ndmitchell/followers","following_url":"https://api.github.com/users/ndmitchell/following{/other_user}","gists_url":"https://api.github.com/users/ndmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/ndmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndmitchell/subscriptions","organizations_url":"https://api.github.com/users/ndmitchell/orgs","repos_url":"https://api.github.com/users/ndmitchell/repos","events_url":"https://api.github.com/users/ndmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/ndmitchell/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T20:41:44Z","updated_at":"2018-10-19T20:41:44Z","author_association":"OWNER","body":"Thanks for the Stylish Haskell - looks fine now.\r\n\r\nI can live with 0.5s in the short term, although 0.1s would be ideal for the website - but better results slower is probably a preference from what we have now. If only 1/3 of the time goes into type matching then I'm not sure I'd worry too much just yet. Does the fingerprint actually care about permuted arguments? It shouldn't - and then you can only rerun the fingerprint for the Maybe insertion rather than each time around. I'd hoped you could even run the fingerprint without Maybe insertion and use the results with it, since the difference should be not huge."}}
{"actor":{"display_login":"ndmitchell"}}