{"action":"opened","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/2048","repository_url":"https://api.github.com/repos/purescript/purescript","labels_url":"https://api.github.com/repos/purescript/purescript/issues/2048/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/2048/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/2048/events","html_url":"https://github.com/purescript/purescript/issues/2048","id":150219196,"number":2048,"title":"Inline newtype destructuring","user":{"login":"dkoontz","id":7493,"avatar_url":"https://avatars.githubusercontent.com/u/7493?v=3","gravatar_id":"","url":"https://api.github.com/users/dkoontz","html_url":"https://github.com/dkoontz","followers_url":"https://api.github.com/users/dkoontz/followers","following_url":"https://api.github.com/users/dkoontz/following{/other_user}","gists_url":"https://api.github.com/users/dkoontz/gists{/gist_id}","starred_url":"https://api.github.com/users/dkoontz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkoontz/subscriptions","organizations_url":"https://api.github.com/users/dkoontz/orgs","repos_url":"https://api.github.com/users/dkoontz/repos","events_url":"https://api.github.com/users/dkoontz/events{/privacy}","received_events_url":"https://api.github.com/users/dkoontz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-21T23:30:24Z","updated_at":"2016-04-21T23:30:24Z","closed_at":null,"body":"I'm not sure if this feature has a specific name, but in Haskell you can do this\r\n\r\n```haskell\r\nnewtype Foo = Foo String\r\n\r\nmyFunction :: Foo -> _\r\nmyFunction foo =\r\n    let (Foo f) = foo\r\n    in ... use f here ...\r\n```\r\n\r\nThe same thing fails in Purescript with `Unable to parse module, unexpected \"Foo\" expecting symbol`\r\n\r\nThis would make working with newtypes a bit more convenient as the alternatives are a `case of` or a specific conversion function."}}