{"action":"created","issue":{"url":"https://api.github.com/repos/gracelang/language/issues/64","repository_url":"https://api.github.com/repos/gracelang/language","labels_url":"https://api.github.com/repos/gracelang/language/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/gracelang/language/issues/64/comments","events_url":"https://api.github.com/repos/gracelang/language/issues/64/events","html_url":"https://github.com/gracelang/language/issues/64","id":135491123,"number":64,"title":"What's a type (module \"build order\") ","user":{"login":"apblack","id":410893,"avatar_url":"https://avatars.githubusercontent.com/u/410893?v=3","gravatar_id":"","url":"https://api.github.com/users/apblack","html_url":"https://github.com/apblack","followers_url":"https://api.github.com/users/apblack/followers","following_url":"https://api.github.com/users/apblack/following{/other_user}","gists_url":"https://api.github.com/users/apblack/gists{/gist_id}","starred_url":"https://api.github.com/users/apblack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apblack/subscriptions","organizations_url":"https://api.github.com/users/apblack/orgs","repos_url":"https://api.github.com/users/apblack/repos","events_url":"https://api.github.com/users/apblack/events{/privacy}","received_events_url":"https://api.github.com/users/apblack/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gracelang/language/labels/1:now","name":"1:now","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-02-22T17:50:12Z","updated_at":"2016-03-21T10:23:46Z","closed_at":null,"body":"I find that I don't know what a type is.  For example, is this legal code?\r\n\r\n```grace\r\ndef empty = object {\r\n    inherits Singleton.new\r\n    method asString -> String {\"empty\"}\r\n}\r\n\r\ndef full = Singleton.named \"full\"\r\n\r\ntype OptionNumber =  Number | empty | full\r\n\r\ndef block1 = { x:OptionNumber ->\r\n    match(x)\r\n      case {n:Number -> \"Number {n}\"}\r\n      case {y:empty -> \"Singleton {y}\"}\r\n      case {z:full -> \"Singleton {z}\"}\r\n      case {_ -> \"should not happen\"}\r\n}\r\n```\r\n\r\nIs `OptionNumber` a legal type?  It seems to me that `OptionNumber` is a pattern, but not a type.  But perhaps someone wiser than I could explain what a type is?"},"comment":{"url":"https://api.github.com/repos/gracelang/language/issues/comments/199213811","html_url":"https://github.com/gracelang/language/issues/64#issuecomment-199213811","issue_url":"https://api.github.com/repos/gracelang/language/issues/64","id":199213811,"user":{"login":"kjx","id":1917107,"avatar_url":"https://avatars.githubusercontent.com/u/1917107?v=3","gravatar_id":"","url":"https://api.github.com/users/kjx","html_url":"https://github.com/kjx","followers_url":"https://api.github.com/users/kjx/followers","following_url":"https://api.github.com/users/kjx/following{/other_user}","gists_url":"https://api.github.com/users/kjx/gists{/gist_id}","starred_url":"https://api.github.com/users/kjx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjx/subscriptions","organizations_url":"https://api.github.com/users/kjx/orgs","repos_url":"https://api.github.com/users/kjx/repos","events_url":"https://api.github.com/users/kjx/events{/privacy}","received_events_url":"https://api.github.com/users/kjx/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T10:23:46Z","updated_at":"2016-03-21T10:23:46Z","body":"does that make `asType` another default method?   Can it be overridden?  if not, it's just a syntatic variation for `Singleton(o)` as in the spec, (which also has a `manifest` annotation already)"}}