on master help sign in
Allow single constructor types in proof search
commit6e7c036b13da901bbe9282dcaf4501b6114f3040 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateWed 12 Aug 2015, 15:28 (11 years ago) parent65f4945
1 file changed+2−1
src/Idris/ProofSearch.hs+2−1
src/Idris/ProofSearch.hs+2−1
@@ -203,7 +203,8 @@ proofSearch rec fromProver ambigok deferonfail maxDepth elab fn nroot psnames hi
203203 case lookupCtxtExact n (idris_datatypes ist) of
204204 Just t -> do
205205 let others = hints ++ con_names t ++ autohints
206− when (not fromProver) -- in interactive mode,
206+ when (not fromProver && length (con_names t) > 1)
207+ -- in interactive mode,
207208 -- don't just guess (fine for 'auto',
208209 -- since that's part of the point...)
209210 $ checkConstructor ist others