From 9fd4126858ff63ef9dc1c71f439eed11ef69f169 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 11 Jul 2008 13:14:21 +0000 Subject: [PATCH] Remove the need for undecidable instances in LazyUniqFM --- compiler/Makefile | 4 ---- compiler/utils/LazyUniqFM.lhs | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler/Makefile b/compiler/Makefile index 7e17acf..6385c77 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -599,10 +599,6 @@ endif # prototype via a global option instead of a myriad of per-file OPTIONS SRC_HC_OPTS += '-\#include "cutils.h"' -ifeq "$(ghc_ge_605)" "NO" -utils/LazyUniqFM_HC_OPTS += -fallow-undecidable-instances -endif - # ---------------------------------------------------------------------------- # Generate supporting stuff for prelude/PrimOp.lhs # from prelude/primops.txt diff --git a/compiler/utils/LazyUniqFM.lhs b/compiler/utils/LazyUniqFM.lhs index 55b438f..99be163 100644 --- a/compiler/utils/LazyUniqFM.lhs +++ b/compiler/utils/LazyUniqFM.lhs @@ -12,7 +12,6 @@ Basically, the things need to be in class @Uniquable@, and we use the \begin{code} {-# OPTIONS -Wall -fno-warn-name-shadowing -Werror #-} -{-# LANGUAGE UndecidableInstances #-} module LazyUniqFM ( UniqFM, -- abstract type @@ -180,7 +179,7 @@ data Lazy a = Lazy { fromLazy :: a } newtype UniqFM ele = MkUniqFM (S.UniqFM (Lazy ele)) -instance Outputable (S.UniqFM (Lazy a)) => Outputable (UniqFM a) where +instance Outputable a => Outputable (UniqFM a) where ppr (MkUniqFM fm) = ppr fm instance Outputable a => Outputable (Lazy a) where -- 1.7.10.4