Verified Commit ef4b096b authored by Camil Staps's avatar Camil Staps 🚀

Trace documentation parsing error and warnings

parent 0dac7ca9
......@@ -238,11 +238,11 @@ handleModule opts fp w
[(pd,id) \\ pd=:(PD_Function pos id _ _ _ _) <- dcldefs] ++
[(pd,id) \\ pd=:(PD_TypeSpec pos id _ _ _) <- dcldefs],
Just docstring <- [getComment pd documentation],
Right (doc,_) <- [parseDoc docstring]]
doc <- parseDocWithWarnings docstring]
[(id.id_name,doc) \\
pd=:(PD_Type {td_ident=id}) <- dcldefs,
Just docstring <- [getComment pd documentation],
Right (doc,_) <- [parseDoc docstring]]
doc <- parseDocWithWarnings docstring]
// Write properties
| nprops == 0 = w
# w = output INFO
......@@ -287,11 +287,15 @@ where
interleave _ [] = []
interleave g [x:xs] = [g,x:interleave g xs]
parseDocWithWarnings s = case parseDoc s of
Left e -> traceParseError e []
Right (r,ws) -> traceParseWarnings ws [r]
generatePropertyModule :: !String !String ![String] ![String] !(Maybe ModuleDoc)
![(!String, !FunctionDoc)] ![(!String, !TypeDoc)]
-> (!Int, !Real, !String)
generatePropertyModule testmodname modname print_options test_options mod_doc fes tes
= (length props, coverage, tests)
= (n_props, coverage, tests)
where
n_props = length props
coverage = toReal (length (filter (not o isEmpty) propsets)) / toReal (length fes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment