on master help sign in
Coverage checker fix for nested constants
4c16335Edwin Brady
src/Idris/Coverage.hs+1−5
@@ -163,10 +163,6 @@ genAll i args
163 lotsOfChars = map Ch ['a'..]
163 lotsOfChars = map Ch ['a'..]
164 lotsOfStrings = map Str (map (("some string " ++).show) [1..])
164 lotsOfStrings = map Str (map (("some string " ++).show) [1..])
165
165
166− conForm (PApp _ (PRef fc n) _) = isConName n (tt_ctxt i)
167− conForm (PRef fc n) = isConName n (tt_ctxt i)
168− conForm _ = False
169−
170 nubMap f acc [] = acc
166 nubMap f acc [] = acc
171 nubMap f acc (x : xs) = nubMap f (fnub' acc (f x)) xs
167 nubMap f acc (x : xs) = nubMap f (fnub' acc (f x)) xs
172
168
@@ -183,7 +179,7 @@ genAll i args
183 ([pimp (sUN "a") Placeholder True,
179 ([pimp (sUN "a") Placeholder True,
184 pimp (sUN "P") Placeholder True] ++
180 pimp (sUN "P") Placeholder True] ++
185 [pexp t,pexp v]) o
181 [pexp t,pexp v]) o
186− otherPats o@(PConstant c) = return o
182+ otherPats o@(PConstant c) = inventConsts [o] -- return o
187 otherPats arg = return Placeholder
183 otherPats arg = return Placeholder
188
184
189 ops fc n xs o
185 ops fc n xs o