@@ -395,6 +395,7 @@ buildDepMap ci ctx mainName = addPostulates $ dfs S.empty M.empty [mainName]
395 getArity n = case lookupDef n ctx of
395 getArity n = case lookupDef n ctx of
396 [CaseOp ci ty tys def tot cdefs] -> length tys
396 [CaseOp ci ty tys def tot cdefs] -> length tys
397 [TyDecl (DCon tag arity) _] -> arity
397 [TyDecl (DCon tag arity) _] -> arity
398+ [TyDecl (Ref) ty] -> length $ getArgTys ty
398 [Operator ty arity op] -> arity
399 [Operator ty arity op] -> arity
399 df -> error $ "unknown entity " ++ show n ++ ": " ++ show df
400 df -> error $ "unknown entity " ++ show n ++ ": " ++ show df