{"action":"created","issue":{"url":"https://api.github.com/repos/Michaelt293/isotope/issues/16","repository_url":"https://api.github.com/repos/Michaelt293/isotope","labels_url":"https://api.github.com/repos/Michaelt293/isotope/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Michaelt293/isotope/issues/16/comments","events_url":"https://api.github.com/repos/Michaelt293/isotope/issues/16/events","html_url":"https://github.com/Michaelt293/isotope/issues/16","id":213038928,"number":16,"title":"Parsing element symbols and chemical formulas","user":{"login":"Michaelt293","id":14012083,"avatar_url":"https://avatars1.githubusercontent.com/u/14012083?v=3","gravatar_id":"","url":"https://api.github.com/users/Michaelt293","html_url":"https://github.com/Michaelt293","followers_url":"https://api.github.com/users/Michaelt293/followers","following_url":"https://api.github.com/users/Michaelt293/following{/other_user}","gists_url":"https://api.github.com/users/Michaelt293/gists{/gist_id}","starred_url":"https://api.github.com/users/Michaelt293/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michaelt293/subscriptions","organizations_url":"https://api.github.com/users/Michaelt293/orgs","repos_url":"https://api.github.com/users/Michaelt293/repos","events_url":"https://api.github.com/users/Michaelt293/events{/privacy}","received_events_url":"https://api.github.com/users/Michaelt293/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-09T13:36:20Z","updated_at":"2017-03-09T20:51:52Z","closed_at":null,"body":"Using an older version of megaparsec (4.4.0), Isotope had really nice error messages -\r\n```\r\nghci> [mol|Ch4|]\r\n\r\n<interactive>:5:6: error:\r\n    • Could not parse formula: 1:2:\r\nunexpected 'h'\r\nexpecting \"Ag\", \"Al\", \"Ar\", \"As\", \"Au\", \"Ba\", \"Be\", \"Bi\", \"Br\", \"Ca\", \"Cd\", \"Ce\", \"Cl\", \"Co\", \"Cr\", \"Cs\", \"Cu\", \"Dy\", \"Er\", \"Eu\", \"Fe\", \"Ga\", \"Gd\", \"Ge\", \"He\", \"Hf\", \"Hg\", \"Ho\", \"In\", \"Ir\", \"Kr\", \"La\", \"Li\", \"Lu\", \"Mg\", \"Mn\", \"Mo\", \"Na\", \"Nb\", \"Nd\", \"Ne\", \"Ni\", \"Os\", \"Pa\", \"Pb\", \"Pd\", \"Pr\", \"Pt\", \"Rb\", \"Re\", \"Rh\", \"Ru\", \"Sb\", \"Sc\", \"Se\", \"Si\", \"Sm\", \"Sn\", \"Sr\", \"Ta\", \"Tb\", \"Te\", \"Th\", \"Ti\", \"Tl\", \"Tm\", \"Xe\", \"Yb\", \"Zn\", \"Zr\", '(', 'B', 'C', 'F', 'H', 'I', 'K', 'N', 'O', 'P', 'S', 'U', 'V', 'W', 'Y', or end of input\r\n    • In the quasi-quotation: [mol|Ch4|]\r\n```\r\n\r\nWith the latest version of megaparsec, error messages not as clear -\r\n```\r\nghci> [mol|Ch4|]\r\n\r\n<interactive>:2:6: error:\r\n    • Could not parse formula: ParseError {errorPos = SourcePos {sourceName = \"\", sourceLine = Pos 1, sourceColumn = Pos 2} :| [], errorUnexpected = fromList [Tokens ('h' :| \"\")], errorExpected = fromList [Tokens ('(' :| \"\"),Tokens ('A' :| \"g\"),Tokens ('A' :| \"l\"),Tokens ('A' :| \"r\"),Tokens ('A' :| \"s\"),Tokens ('A' :| \"u\"),Tokens ('B' :| \"\"),Tokens ('B' :| \"a\"),Tokens ('B' :| \"e\"),Tokens ('B' :| \"i\"),Tokens ('B' :| \"r\"),Tokens ('C' :| \"\"),Tokens ('C' :| \"a\"),Tokens ('C' :| \"d\"),Tokens ('C' :| \"e\"),Tokens ('C' :| \"l\"),Tokens ('C' :| \"o\"),Tokens ('C' :| \"r\"),Tokens ('C' :| \"s\"),Tokens ('C' :| \"u\"),Tokens ('D' :| \"y\"),Tokens ('E' :| \"r\"),Tokens ('E' :| \"u\"),Tokens ('F' :| \"\"),Tokens ('F' :| \"e\"),Tokens ('G' :| \"a\"),Tokens ('G' :| \"d\"),Tokens ('G' :| \"e\"),Tokens ('H' :| \"\"),Tokens ('H' :| \"e\"),Tokens ('H' :| \"f\"),Tokens ('H' :| \"g\"),Tokens ('H' :| \"o\"),Tokens ('I' :| \"\"),Tokens ('I' :| \"n\"),Tokens ('I' :| \"r\"),Tokens ('K' :| \"\"),Tokens ('K' :| \"r\"),Tokens ('L' :| \"a\"),Tokens ('L' :| \"i\"),Tokens ('L' :| \"u\"),Tokens ('M' :| \"g\"),Tokens ('M' :| \"n\"),Tokens ('M' :| \"o\"),Tokens ('N' :| \"\"),Tokens ('N' :| \"a\"),Tokens ('N' :| \"b\"),Tokens ('N' :| \"d\"),Tokens ('N' :| \"e\"),Tokens ('N' :| \"i\"),Tokens ('O' :| \"\"),Tokens ('O' :| \"s\"),Tokens ('P' :| \"\"),Tokens ('P' :| \"a\"),Tokens ('P' :| \"b\"),Tokens ('P' :| \"d\"),Tokens ('P' :| \"r\"),Tokens ('P' :| \"t\"),Tokens ('R' :| \"b\"),Tokens ('R' :| \"e\"),Tokens ('R' :| \"h\"),Tokens ('R' :| \"u\"),Tokens ('S' :| \"\"),Tokens ('S' :| \"b\"),Tokens ('S' :| \"c\"),Tokens ('S' :| \"e\"),Tokens ('S' :| \"i\"),Tokens ('S' :| \"m\"),Tokens ('S' :| \"n\"),Tokens ('S' :| \"r\"),Tokens ('T' :| \"a\"),Tokens ('T' :| \"b\"),Tokens ('T' :| \"e\"),Tokens ('T' :| \"h\"),Tokens ('T' :| \"i\"),Tokens ('T' :| \"l\"),Tokens ('T' :| \"m\"),Tokens ('U' :| \"\"),Tokens ('V' :| \"\"),Tokens ('W' :| \"\"),Tokens ('X' :| \"e\"),Tokens ('Y' :| \"\"),Tokens ('Y' :| \"b\"),Tokens ('Z' :| \"n\"),Tokens ('Z' :| \"r\"),Label ('i' :| \"nteger\"),EndOfInput], errorCustom = fromList []}\r\n    • In the quasi-quotation: [mol|Ch4|]\r\n```"},"comment":{"url":"https://api.github.com/repos/Michaelt293/isotope/issues/comments/285479258","html_url":"https://github.com/Michaelt293/isotope/issues/16#issuecomment-285479258","issue_url":"https://api.github.com/repos/Michaelt293/isotope/issues/16","id":285479258,"user":{"login":"Michaelt293","id":14012083,"avatar_url":"https://avatars1.githubusercontent.com/u/14012083?v=3","gravatar_id":"","url":"https://api.github.com/users/Michaelt293","html_url":"https://github.com/Michaelt293","followers_url":"https://api.github.com/users/Michaelt293/followers","following_url":"https://api.github.com/users/Michaelt293/following{/other_user}","gists_url":"https://api.github.com/users/Michaelt293/gists{/gist_id}","starred_url":"https://api.github.com/users/Michaelt293/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michaelt293/subscriptions","organizations_url":"https://api.github.com/users/Michaelt293/orgs","repos_url":"https://api.github.com/users/Michaelt293/repos","events_url":"https://api.github.com/users/Michaelt293/events{/privacy}","received_events_url":"https://api.github.com/users/Michaelt293/received_events","type":"User","site_admin":false},"created_at":"2017-03-09T20:51:52Z","updated_at":"2017-03-09T20:51:52Z","body":"Megaparsec 5 introduced new error types resulting in the issue mentioned.\r\n\r\n>Megaparsec 5 introduces well-typed error messages and ability to use custom data types to adjust the library to your domain of interest. No need to keep your info as shapeless bunch of strings anymore.\r\n\r\nThis has now been fixed and will be included in version 0.4.0.0."}}
{"actor":{"display_login":"Michaelt293"}}