on master help sign in
trivial Docs.hs (generating docs.json missing " on type line)

Was a quote before the type value, but not after, leading to unhelpful error: elm: Illegal unescaped character in string:

commit0064813300202e7a622798380b03bdf37cf22038 authorngunn <ngunn@computationalthinking.org.uk> dateThu 21 Mar 2013, 13:27 (14 years ago) parent82a5a65
1 file changed+3−3
compiler/Docs.hs+3−3
compiler/Docs.hs+3−3
@@ -30,18 +30,18 @@ toModule (name, values) =
3030toValue (name, tipe, desc) =
3131 "{ \"name\" : " ++ show name ++
3232 ",\n \"type\" : \"" ++ show tipe ++
33− ",\n \"desc\" : " ++ show desc ++ "\n }"
33+ "\",\n \"desc\" : " ++ show desc ++ "\n }"
3434
3535docParse :: String -> Either String (String, [(String, Type, String)])
3636docParse = setupParser $ do
3737 optional freshLine
3838 (,) <$> option "Main" moduleName <*> types
39− where
39+ where
4040 skip = manyTill anyChar simpleNewline >> return []
4141 end = many1 anyChar >> return []
4242 types = concat <$> many (docs <|> try skip <|> end)
4343 getName = intercalate "." . fst
44− moduleName = do optional freshLine
44+ moduleName = do optional freshLine
4545 getName <$> moduleDef `followedBy` freshLine
4646
4747docs :: IParser [(String, Type, String)]