[project @ 2001-02-26 15:41:18 by simonpj]
authorsimonpj <unknown>
Mon, 26 Feb 2001 15:41:18 +0000 (15:41 +0000)
committersimonpj <unknown>
Mon, 26 Feb 2001 15:41:18 +0000 (15:41 +0000)
Dont print generic insts if there arent any

ghc/compiler/typecheck/TcInstDcls.lhs

index fd70cff..53e30cc 100644 (file)
@@ -312,6 +312,9 @@ getGenericInstances class_decls
     let
        gen_inst_info = concat gen_inst_infos
     in
+    if null gen_inst_info then
+       returnTc []
+    else
     getDOptsTc                                         `thenTc`  \ dflags ->
     ioToTc (dumpIfSet_dyn dflags Opt_D_dump_deriv "Generic instances" 
                      (vcat (map pprInstInfo gen_inst_info)))