[commit: ghc] master: Two wibbles to fix the build (a154944)

git at git.haskell.org git at git.haskell.org
Wed May 13 08:51:03 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a154944bf07b2e13175519bafebd5a03926bf105/ghc

>---------------------------------------------------------------

commit a154944bf07b2e13175519bafebd5a03926bf105
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed May 13 09:51:49 2015 +0100

    Two wibbles to fix the build
    
    ...following the constraint-tuple patch.
    
    * There was interaction with the recent Safe Haskell change
    * Haddock comoplained about constraint tuples defined but not used


>---------------------------------------------------------------

a154944bf07b2e13175519bafebd5a03926bf105
 compiler/typecheck/TcInteract.hs  | 3 ++-
 libraries/ghc-prim/GHC/Classes.hs | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index ce51b0d..603c127 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -2026,7 +2026,8 @@ matchClassInst _ clas [ ty ] _
 matchClassInst _ clas ts _
   | isCTupleClass clas
   , let data_con = tyConSingleDataCon (classTyCon clas)
-  = return (GenInst ts (EvDFunApp (dataConWrapId data_con) ts))
+        tuple_ev = EvDFunApp (dataConWrapId data_con) ts
+  = return (GenInst ts tuple_ev True)
             -- The dfun is the data constructor!
 
 matchClassInst _ clas [k,t] _
diff --git a/libraries/ghc-prim/GHC/Classes.hs b/libraries/ghc-prim/GHC/Classes.hs
index 5a3e48e..73ae69e 100644
--- a/libraries/ghc-prim/GHC/Classes.hs
+++ b/libraries/ghc-prim/GHC/Classes.hs
@@ -6,7 +6,12 @@
   -- ip :: IP x a => a  is strictly speaking ambiguous, but IP is magic
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
--- XXX -fno-warn-unused-imports needed for the GHC.Tuple import below. Sigh.
+-- -fno-warn-unused-imports needed for the GHC.Tuple import below. Sigh.
+
+{-# OPTIONS_GHC -fno-warn-unused-top-binds #-}
+-- -fno-warn-unused-top-binds is there (I hope) to stop Haddock complaining
+-- about the constraint tuples being defined but not used
+
 {-# OPTIONS_HADDOCK hide #-}
 -----------------------------------------------------------------------------
 -- |



More information about the ghc-commits mailing list