{"action":"created","issue":{"url":"https://api.github.com/repos/frp-arduino/frp-arduino/issues/21","labels_url":"https://api.github.com/repos/frp-arduino/frp-arduino/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/frp-arduino/frp-arduino/issues/21/comments","events_url":"https://api.github.com/repos/frp-arduino/frp-arduino/issues/21/events","html_url":"https://github.com/frp-arduino/frp-arduino/issues/21","id":54917013,"number":21,"title":"Question: Should DAG.Expression remain untyped?","user":{"login":"mvcisback","id":388723,"avatar_url":"https://avatars.githubusercontent.com/u/388723?v=3","gravatar_id":"","url":"https://api.github.com/users/mvcisback","html_url":"https://github.com/mvcisback","followers_url":"https://api.github.com/users/mvcisback/followers","following_url":"https://api.github.com/users/mvcisback/following{/other_user}","gists_url":"https://api.github.com/users/mvcisback/gists{/gist_id}","starred_url":"https://api.github.com/users/mvcisback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvcisback/subscriptions","organizations_url":"https://api.github.com/users/mvcisback/orgs","repos_url":"https://api.github.com/users/mvcisback/repos","events_url":"https://api.github.com/users/mvcisback/events{/privacy}","received_events_url":"https://api.github.com/users/mvcisback/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/frp-arduino/frp-arduino/labels/question","name":"question","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-01-20T17:59:43Z","updated_at":"2015-01-22T21:15:49Z","closed_at":null,"body":"If I have time, I may try to tackle this. The main idea is changing the definition of `DAG.Expression` to `DAG.Expression a`\r\n\r\nfor Example:\r\n```haskell\r\n{-# LANGUAGE GADTs #-}\r\n\r\ndata Expression a where\r\n  Input :: Int -> Expression Int\r\n  Not :: Expression Bool -> Expression (Bool -> Bool)\r\n  Even :: Integral a => Expression a -> Expression Bool\r\n  ByteConstant :: Byte -> Expression Byte\r\n  ...\r\n  ...\r\n  -- new proposed expression\r\n  Apply :: Expression (a -> b) -> Expression a -> Expression b\r\n```\r\n\r\nAside from helping check the correctness of the Code Generator, this might allow `DAG.Expression` to just merge with `DSL.Expression` since they're likely be isomorphic."},"comment":{"url":"https://api.github.com/repos/frp-arduino/frp-arduino/issues/comments/71100238","html_url":"https://github.com/frp-arduino/frp-arduino/issues/21#issuecomment-71100238","issue_url":"https://api.github.com/repos/frp-arduino/frp-arduino/issues/21","id":71100238,"user":{"login":"mvcisback","id":388723,"avatar_url":"https://avatars.githubusercontent.com/u/388723?v=3","gravatar_id":"","url":"https://api.github.com/users/mvcisback","html_url":"https://github.com/mvcisback","followers_url":"https://api.github.com/users/mvcisback/followers","following_url":"https://api.github.com/users/mvcisback/following{/other_user}","gists_url":"https://api.github.com/users/mvcisback/gists{/gist_id}","starred_url":"https://api.github.com/users/mvcisback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvcisback/subscriptions","organizations_url":"https://api.github.com/users/mvcisback/orgs","repos_url":"https://api.github.com/users/mvcisback/repos","events_url":"https://api.github.com/users/mvcisback/events{/privacy}","received_events_url":"https://api.github.com/users/mvcisback/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T21:15:49Z","updated_at":"2015-01-22T21:15:49Z","body":"haha, ok.\r\n\r\nAlso, I seem to have misunderstood what input was. Yes in the case of any type you would just define\r\n\r\n`Input :: Int -> Expression a`\r\n\r\nThen the first use of it will set the type.\r\n\r\nI.E.\r\n```haskell\r\nmyInput :: Expression Int\r\nmyInput = Input 0\r\n```\r\n\r\nwhich is the **exact** same situation as the phantom type."}}