{"action":"created","issue":{"url":"https://api.github.com/repos/acowley/Frames/issues/27","labels_url":"https://api.github.com/repos/acowley/Frames/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/acowley/Frames/issues/27/comments","events_url":"https://api.github.com/repos/acowley/Frames/issues/27/events","html_url":"https://github.com/acowley/Frames/issues/27","id":80289651,"number":27,"title":"Multiple custom column types","user":{"login":"cocreature","id":1313584,"avatar_url":"https://avatars.githubusercontent.com/u/1313584?v=3","gravatar_id":"","url":"https://api.github.com/users/cocreature","html_url":"https://github.com/cocreature","followers_url":"https://api.github.com/users/cocreature/followers","following_url":"https://api.github.com/users/cocreature/following{/other_user}","gists_url":"https://api.github.com/users/cocreature/gists{/gist_id}","starred_url":"https://api.github.com/users/cocreature/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocreature/subscriptions","organizations_url":"https://api.github.com/users/cocreature/orgs","repos_url":"https://api.github.com/users/cocreature/repos","events_url":"https://api.github.com/users/cocreature/events{/privacy}","received_events_url":"https://api.github.com/users/cocreature/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-24T22:22:26Z","updated_at":"2015-05-25T08:53:13Z","closed_at":null,"body":"I have two custom column types\r\n```haskell\r\nnewtype NumericalAnswer = NumericalAnswer (Maybe Int) deriving (Show,Read,Eq,Ord)\r\nnewtype SkillLevel = SkillLevel (Maybe Text) deriving (Show,Read,Eq,Ord)\r\n\r\ninstance Readable NumericalAnswer where\r\n  fromText t\r\n    | t == \"0\" = return $ NumericalAnswer $ Just 0\r\n    | t == \"1\" = return $ NumericalAnswer $ Just 1\r\n    | t == \"2\" = return $ NumericalAnswer $ Just 2\r\n    | t == \"3\" = return $ NumericalAnswer $ Just 3\r\n    | t == \"4\" = return $ NumericalAnswer $ Just 4\r\n    | t == \"\\\"\\\"\" || t == \"Don't know\" = return $ NumericalAnswer Nothing\r\n    | otherwise = mzero\r\n\r\ninstance Readable SkillLevel where\r\n  fromText t\r\n    | t `elem` [\"none\",\"beginner\",\"learning\",\"competent\",\"expert\"] = return $ SkillLevel (Just t)\r\n    | t == \"\\\"\\\"\" = return $ SkillLevel Nothing\r\n    | otherwise = mzero\r\n```\r\nWhen I add only one of them to `MyColumns` and call\r\n```haskell\r\ntableTypes'\r\n  rowGen {rowTypeName = \"Answer\"\r\n         ,columnUniverse = $(colQ ''MyColumns)}\r\n  \"data/raw-anon-v1-0.csv\"\r\n```\r\nexactly those columns I want end up being converted to the added type. However if I define\r\n```haskell\r\ntype MyColumns =  SkillLevel ': NumericalAnswer ': CommonColumns\r\n```\r\nthe columns that should convert to `NumericalAnswer` (and do so if I don't add SkillLevel) stay Text.\r\nIt's probably me doing something terribly wrong, but I can't quite figure out what."},"comment":{"url":"https://api.github.com/repos/acowley/Frames/issues/comments/105171128","html_url":"https://github.com/acowley/Frames/issues/27#issuecomment-105171128","issue_url":"https://api.github.com/repos/acowley/Frames/issues/27","id":105171128,"user":{"login":"cocreature","id":1313584,"avatar_url":"https://avatars.githubusercontent.com/u/1313584?v=3","gravatar_id":"","url":"https://api.github.com/users/cocreature","html_url":"https://github.com/cocreature","followers_url":"https://api.github.com/users/cocreature/followers","following_url":"https://api.github.com/users/cocreature/following{/other_user}","gists_url":"https://api.github.com/users/cocreature/gists{/gist_id}","starred_url":"https://api.github.com/users/cocreature/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocreature/subscriptions","organizations_url":"https://api.github.com/users/cocreature/orgs","repos_url":"https://api.github.com/users/cocreature/repos","events_url":"https://api.github.com/users/cocreature/events{/privacy}","received_events_url":"https://api.github.com/users/cocreature/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T08:53:13Z","updated_at":"2015-05-25T08:53:13Z","body":"Sure, this is the [code](https://gist.github.com/cocreature/0d0940e94b63c978bc41). Apart from the custom columns there is not much going on there. I used the fpcomplete survey available [here](http://download.fpcomplete.com/haskell-survey-2015-05.zip). Deriving `Typeable` didn't change anything."}}