Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/8db5e6781ce9c0138a399e84abe57ced7152f24c

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

commit 8db5e6781ce9c0138a399e84abe57ced7152f24c
Author: Max Bolingbroke <batterseapo...@hotmail.com>
Date:   Wed Jun 29 19:03:21 2011 +0100

    Fix build of plugin code, write script for installing it inplace (for 
testing)

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

 compiler/supercompile/.gitignore             |    2 ++
 compiler/supercompile/CHSC.hs                |    6 ++++--
 compiler/supercompile/chsc-plugin.cabal      |   13 +++++++++++--
 compiler/supercompile/install-plugin-inplace |    8 ++++++++
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/compiler/supercompile/.gitignore b/compiler/supercompile/.gitignore
new file mode 100644
index 0000000..1c20c83
--- /dev/null
+++ b/compiler/supercompile/.gitignore
@@ -0,0 +1,2 @@
+# Ignore directory created by install-plugin-inplace
+dist/
diff --git a/compiler/supercompile/CHSC.hs b/compiler/supercompile/CHSC.hs
index 1063c4d..c617de8 100644
--- a/compiler/supercompile/CHSC.hs
+++ b/compiler/supercompile/CHSC.hs
@@ -3,7 +3,9 @@ module CHSC (Supercompile(..), plugin) where
 import Supercompile
 import GhcPlugins
 
-import Data.List (nub)
+import Data.Data     (Data)
+import Data.Typeable (Typeable)
+import Data.List     (nub)
 
 
 -- The supercomplier behaves as follows:
@@ -33,7 +35,7 @@ pass unconditional guts = do
     should_sc <- case unconditional of
         True  -> return (const True)
         False -> do
-            anns <- getFirstAnnotations deserializeWithData guts
+            anns :: UniqFM Supercompile <- getFirstAnnotations 
deserializeWithData guts
             mod <- getModule
             return $ if mod `elemUFM` anns
                       then const True
diff --git a/compiler/supercompile/chsc-plugin.cabal 
b/compiler/supercompile/chsc-plugin.cabal
index a8b5a53..752a33b 100644
--- a/compiler/supercompile/chsc-plugin.cabal
+++ b/compiler/supercompile/chsc-plugin.cabal
@@ -35,6 +35,15 @@ Library
         Supercompile.Termination.TagBag
         Supercompile.Utilities
         Supercompile
+    Extensions:
+        CPP,
+        PatternGuards,
+        ExistentialQuantification,
+        ScopedTypeVariables,
+        FlexibleInstances,
+        RankNTypes,
+        DeriveDataTypeable
     Build-Depends:
-        base >= 4,
-        ghc >= 7.1
+        base >= 4.3 && < 4.4,
+        containers >= 0.4 && < 0.5,
+        ghc >= 7.1 && < 7.2
diff --git a/compiler/supercompile/install-plugin-inplace 
b/compiler/supercompile/install-plugin-inplace
new file mode 100755
index 0000000..d226fec
--- /dev/null
+++ b/compiler/supercompile/install-plugin-inplace
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+SCRIPT_DIR=$(cd $(dirname "$0"); pwd)
+INPLACE_DIR="$SCRIPT_DIR/../../inplace"
+
+# NB: this script relies on the installed Cabal (presumably from the 
bootstrapping compiler)
+# actually understanding the package metadata used by the in-tree Cabal. 
Risky, but works for now.
+cabal install --disable-library-profiling --user 
--with-ghc=$INPLACE_DIR/bin/ghc-stage2 --with-ghc-pkg=$INPLACE_DIR/bin/ghc-pkg 
--package-db=$INPLACE_DIR/lib/package.conf.d



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to