{"action":"opened","issue":{"url":"https://api.github.com/repos/luna/luna-studio/issues/1113","repository_url":"https://api.github.com/repos/luna/luna-studio","labels_url":"https://api.github.com/repos/luna/luna-studio/issues/1113/labels{/name}","comments_url":"https://api.github.com/repos/luna/luna-studio/issues/1113/comments","events_url":"https://api.github.com/repos/luna/luna-studio/issues/1113/events","html_url":"https://github.com/luna/luna-studio/issues/1113","id":362996840,"node_id":"MDU6SXNzdWUzNjI5OTY4NDA=","number":1113,"title":"ToJSON instances are not automatically derived","user":{"login":"wdanilo","id":1623053,"node_id":"MDQ6VXNlcjE2MjMwNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1623053?v=4","gravatar_id":"","url":"https://api.github.com/users/wdanilo","html_url":"https://github.com/wdanilo","followers_url":"https://api.github.com/users/wdanilo/followers","following_url":"https://api.github.com/users/wdanilo/following{/other_user}","gists_url":"https://api.github.com/users/wdanilo/gists{/gist_id}","starred_url":"https://api.github.com/users/wdanilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdanilo/subscriptions","organizations_url":"https://api.github.com/users/wdanilo/orgs","repos_url":"https://api.github.com/users/wdanilo/repos","events_url":"https://api.github.com/users/wdanilo/events{/privacy}","received_events_url":"https://api.github.com/users/wdanilo/received_events","type":"User","site_admin":false},"labels":[{"id":829046794,"node_id":"MDU6TGFiZWw4MjkwNDY3OTQ=","url":"https://api.github.com/repos/luna/luna-studio/labels/C%20-%20IDE","name":"C - IDE","color":"E29B47","default":false},{"id":827542099,"node_id":"MDU6TGFiZWw4Mjc1NDIwOTk=","url":"https://api.github.com/repos/luna/luna-studio/labels/D%20-%20Core%20Contributor","name":"D - Core Contributor","color":"b4fca6","default":false},{"id":827542712,"node_id":"MDU6TGFiZWw4Mjc1NDI3MTI=","url":"https://api.github.com/repos/luna/luna-studio/labels/P%20-%20High","name":"P - High","color":"c76300","default":false},{"id":517524863,"node_id":"MDU6TGFiZWw1MTc1MjQ4NjM=","url":"https://api.github.com/repos/luna/luna-studio/labels/T%20-%20Enhancement","name":"T - Enhancement","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":{"login":"kustosz","id":1214109,"node_id":"MDQ6VXNlcjEyMTQxMDk=","avatar_url":"https://avatars2.githubusercontent.com/u/1214109?v=4","gravatar_id":"","url":"https://api.github.com/users/kustosz","html_url":"https://github.com/kustosz","followers_url":"https://api.github.com/users/kustosz/followers","following_url":"https://api.github.com/users/kustosz/following{/other_user}","gists_url":"https://api.github.com/users/kustosz/gists{/gist_id}","starred_url":"https://api.github.com/users/kustosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kustosz/subscriptions","organizations_url":"https://api.github.com/users/kustosz/orgs","repos_url":"https://api.github.com/users/kustosz/repos","events_url":"https://api.github.com/users/kustosz/events{/privacy}","received_events_url":"https://api.github.com/users/kustosz/received_events","type":"User","site_admin":false},"assignees":[{"login":"kustosz","id":1214109,"node_id":"MDQ6VXNlcjEyMTQxMDk=","avatar_url":"https://avatars2.githubusercontent.com/u/1214109?v=4","gravatar_id":"","url":"https://api.github.com/users/kustosz","html_url":"https://github.com/kustosz","followers_url":"https://api.github.com/users/kustosz/followers","following_url":"https://api.github.com/users/kustosz/following{/other_user}","gists_url":"https://api.github.com/users/kustosz/gists{/gist_id}","starred_url":"https://api.github.com/users/kustosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kustosz/subscriptions","organizations_url":"https://api.github.com/users/kustosz/orgs","repos_url":"https://api.github.com/users/kustosz/repos","events_url":"https://api.github.com/users/kustosz/events{/privacy}","received_events_url":"https://api.github.com/users/kustosz/received_events","type":"User","site_admin":false},{"login":"mikusp","id":2052578,"node_id":"MDQ6VXNlcjIwNTI1Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/2052578?v=4","gravatar_id":"","url":"https://api.github.com/users/mikusp","html_url":"https://github.com/mikusp","followers_url":"https://api.github.com/users/mikusp/followers","following_url":"https://api.github.com/users/mikusp/following{/other_user}","gists_url":"https://api.github.com/users/mikusp/gists{/gist_id}","starred_url":"https://api.github.com/users/mikusp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikusp/subscriptions","organizations_url":"https://api.github.com/users/mikusp/orgs","repos_url":"https://api.github.com/users/mikusp/repos","events_url":"https://api.github.com/users/mikusp/events{/privacy}","received_events_url":"https://api.github.com/users/mikusp/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-09-24T01:39:22Z","updated_at":"2018-09-24T01:39:22Z","closed_at":null,"author_association":"MEMBER","body":"### General Summary\r\n\r\nIt's very cumbersome to write every `toJSON` instance by hand. Thus our datatypes should provide a way to derive it. There are 2 approaches. First is to provide deriving mechanism (like in Haskell). Second is to allow some methods to default to a generic implementation. While both ways require some complex changes to the compiler, we should for now just automatically derive `toJSON` for every class if not provided with an explicit implementation. JSON is our basic visualization type and having such functionality would make debugging graphs much easier.\r\n\r\n### Steps to Reproduce\r\n\r\nUse the code:\r\n\r\n```haskell\r\n\r\nimport Std.Base\r\n\r\nclass Vector:\r\n    x :: Int\r\n    y :: Int\r\n    z :: Int\r\n\r\ndef main:\r\n    v = Vector 1 2 3 \r\n\r\n```\r\n\r\n### Expected Result\r\n\r\nThe `v` node should have working visualization.\r\n\r\n### Actual Result\r\n\r\nThe visualization is not available due to lack of `toJSON` method implementation.\r\n\r\n### Luna Version\r\n1.4.101.6"}}
{"actor":{"display_login":"wdanilo"}}