on master help sign in
Merge pull request #2299 from david-christiansen/issue/2298

Don't crash on :addmissing for defns with no clauses

commit5b8ad9f753c1f0d2d7974d23ed8cde22e889d9c8 authorDavid Christiansen <david@davidchristiansen.dk> dateTue 19 May 2015, 22:06 (11 years ago) parent9174cf3a0b9687
1 file changed+1
src/Idris/Interactive.hs+1
src/Idris/Interactive.hs+1
@@ -102,6 +102,7 @@ addMissing fn updatefile l n
102102 [] -> return ""
103103 [(_, tms)] -> do tms' <- nameMissing tms
104104 showNew (show n ++ "_rhs") 1 indent tms'
105+ other -> return "" -- happens if called on a metavar, or with no clauses
105106 let (nonblank, rest) = span (not . all isSpace) (tyline:later)
106107 if updatefile
107108 then do let fb = fn ++ "~"