on master help sign in
Coverage checker fix for nested constants

Need to generate possible cases for constants in constructor arguments too.

commit4c163359e61b7494f82713d8e653c51bffbf03a5 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateFri 19 Dec 2014, 14:09 (12 years ago) parentba1f8e3
1 file changed+1−5
src/Idris/Coverage.hs+1−5
src/Idris/Coverage.hs+1−5
@@ -163,10 +163,6 @@ genAll i args
163163 lotsOfChars = map Ch ['a'..]
164164 lotsOfStrings = map Str (map (("some string " ++).show) [1..])
165165
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−
170166 nubMap f acc [] = acc
171167 nubMap f acc (x : xs) = nubMap f (fnub' acc (f x)) xs
172168
@@ -183,7 +179,7 @@ genAll i args
183179 ([pimp (sUN "a") Placeholder True,
184180 pimp (sUN "P") Placeholder True] ++
185181 [pexp t,pexp v]) o
186− otherPats o@(PConstant c) = return o
182+ otherPats o@(PConstant c) = inventConsts [o] -- return o
187183 otherPats arg = return Placeholder
188184
189185 ops fc n xs o