Don't crash on :addmissing for defns with no clauses
Fixes #2298.
commita0b9687bae7ad99a28490876eeece08c3ef6403e
authorDavid Raymond Christiansen <david@davidchristiansen.dk>
dateTue 19 May 2015, 16:27 (11 years ago)
parentfbdd59b
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 ++ "~"