--- a/src/Tools/Code/code_haskell.ML Mon Dec 14 10:23:25 2009 +0100
+++ b/src/Tools/Code/code_haskell.ML Mon Dec 14 10:24:04 2009 +0100
@@ -330,11 +330,12 @@
fun deriving_show tyco =
let
fun deriv _ "fun" = false
- | deriv tycos tyco = member (op =) tycos tyco orelse
- case try (Graph.get_node program) tyco
+ | deriv tycos tyco = not (tyco = Code_Thingol.fun_tyco)
+ andalso (member (op =) tycos tyco
+ orelse case try (Graph.get_node program) tyco
of SOME (Code_Thingol.Datatype (_, (_, cs))) => forall (deriv' (tyco :: tycos))
(maps snd cs)
- | NONE => true
+ | NONE => true)
and deriv' tycos (tyco `%% tys) = deriv tycos tyco
andalso forall (deriv' tycos) tys
| deriv' _ (ITyVar _) = true