on master help sign in
arity in Compiler a bit safer.
commite8c6a5bb03126078d352048df05027a362faf06e authorMatus Tejiscak <ziman@functor.sk> dateWed 26 Feb 2014, 14:09 (13 years ago) parentb7d5cbc
1 file changed+2−1
src/IRTS/Compiler.hs+2−1
src/IRTS/Compiler.hs+2−1
@@ -269,7 +269,8 @@ instance ToIR (TT Name) where
269269 [TyDecl (DCon tag ar) _] -> ar
270270 [TyDecl Ref ty] -> length $ getArgTys ty
271271 [Operator ty ar op] -> ar
272− _ -> 0
272+ [] -> 0 -- no definition, probably local name => can't erase anything
273+ def -> error $ "unknown arity: " ++ show (n, def)
273274
274275 used = maybe [] (map fst . usedpos) $ lookupCtxtExact n (idris_callgraph ist)
275276 fst4 (x,_,_,_) = x