diff --git a/COPYRIGHT b/COPYRIGHT
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -4,7 +4,7 @@
 name is marked (ACS), the copyright rests with Applied Communication
 Sciences.
 
-Copyright (C) 2011-2014. All rights reserved.
+Copyright (C) 2011-2016. All rights reserved.
 Copyright (C) 2012-2013 Applied Communication Sciences. All rights
 reserved.
 
diff --git a/README b/README
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 file COPYRIGHT for a list of authors, copyright holders, licensing,
 and other details. All rights reserved.
 
@@ -26,17 +26,17 @@
 Before you can compile Quipper, you have to install some Haskell
 libraries:
 
- * random v.1.0.1.1
- * mtl v.2.1.2
- * primes v.0.2.1.0
- * Lattices v.0.0.1 (note: "Lattices" must be capitalized)
- * zlib v.0.5.4.1
- * easyrender v.0.1.0.0
- * fixedprec v.0.2.1.0
- * newsynth v.0.1.0.0
- * containers v.0.5.2.1
- * set-monad v.0.1.0.0
- * QuickCheck v.2.6
+ * random >= 1.0.1.1
+ * mtl >= 2.1.2
+ * primes >= 0.2.1.0
+ * Lattices >= 0.0.1 (note: "Lattices" must be capitalized)
+ * zlib >= 0.5.4.1
+ * easyrender >= 0.1.0.0
+ * fixedprec >= 0.2.1.0
+ * newsynth >= 0.3.0.1
+ * containers >= 0.5.2.1
+ * set-monad >= 0.1.0.0
+ * QuickCheck >= 2.6
 
 This can be done using Cabal. On the command line, use the
 following commands:
@@ -85,6 +85,12 @@
 # also install template-haskell-2.7.0.0:
 
 cabal install QuickCheck
+
+Special note for GHC 7.10.*:
+============================
+
+Quipper will not work with ghc 7.10. Please use ghc 7.8 or earlier, or
+ghc 8.0 or later.
 
 Browsing the documentation and source code
 ==========================================
diff --git a/quipper.cabal b/quipper.cabal
--- a/quipper.cabal
+++ b/quipper.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                quipper
-version:             0.7
+version:             0.8
 synopsis:            Quipper is an embedded, scalable functional programming language for quantum computing.
 -- description:         
 homepage:            http://www.mathstat.dal.ca/~selinger/quipper/
@@ -20,6 +20,6 @@
   exposed-modules:     Quipper, Quipper.Generic, Quipper.CircLifting, Quipper.Printing, Quipper.Classical, Quipper.QData, Quipper.Internal, Quipper.Monad, Quipper.Control, Quipper.Circuit, Quipper.QClasses, Quipper.Labels, Quipper.Transformer
   other-modules:       Libraries.Template, Libraries.RandomSource, Libraries.CommandLine, Libraries.ShowAll, Libraries.Auxiliary, Libraries.Typeable, Libraries.PortableSignals, Libraries.Sampling, Libraries.Tuple, Libraries.Template.LiftQ, Libraries.Template.Auxiliary, Libraries.Template.ErrorMsgQ, Libraries.Template.Lifting
   other-extensions:    GADTs, RankNTypes, FlexibleInstances, OverlappingInstances, MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances, CPP, StandaloneDeriving, DeriveDataTypeable, ScopedTypeVariables, TypeSynonymInstances, TemplateHaskell, BangPatterns, FlexibleContexts, TypeFamilies, Rank2Types, ExistentialQuantification
-  build-depends:       base >=4.6 && <4.7, random >=1.0 && <1.1, containers >=0.5 && <0.6, unix >=2.6 && <2.7, template-haskell >=2.8 && <2.9, mtl >=2.1 && <2.2, easyrender >=0.1 && <0.2, process >=1.1 && <1.2, directory >=1.2 && <1.3
+  build-depends:       base >=4.6 && <4.10, random >=1.0 && <1.1, containers >=0.5 && <0.6, unix >=2.6 && <2.8, template-haskell >=2.8 && <2.12, mtl >=2.1 && <2.3, easyrender >=0.1 && <0.2, process >=1.1 && <1.5, directory >=1.2 && <1.3, primes >=0.2 && <0.3
   hs-source-dirs:      src
   default-language:    Haskell2010
diff --git a/src/Libraries/Auxiliary.hs b/src/Libraries/Auxiliary.hs
--- a/src/Libraries/Auxiliary.hs
+++ b/src/Libraries/Auxiliary.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
@@ -731,7 +731,7 @@
 blist_concat l = foldr (+++) blist_empty l
 
 instance (Show a) => Show (BList a) where
-	show bl = show (list_of_blist bl) 
+        show bl = show (list_of_blist bl) 
 
 -- ----------------------------------------------------------------------
 -- * Strings optimized for fast concatenation
diff --git a/src/Libraries/CommandLine.hs b/src/Libraries/CommandLine.hs
--- a/src/Libraries/CommandLine.hs
+++ b/src/Libraries/CommandLine.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/PortableSignals.hs b/src/Libraries/PortableSignals.hs
--- a/src/Libraries/PortableSignals.hs
+++ b/src/Libraries/PortableSignals.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/RandomSource.hs b/src/Libraries/RandomSource.hs
--- a/src/Libraries/RandomSource.hs
+++ b/src/Libraries/RandomSource.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/Sampling.hs b/src/Libraries/Sampling.hs
--- a/src/Libraries/Sampling.hs
+++ b/src/Libraries/Sampling.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/ShowAll.hs b/src/Libraries/ShowAll.hs
--- a/src/Libraries/ShowAll.hs
+++ b/src/Libraries/ShowAll.hs
@@ -1,11 +1,11 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
 -- ======================================================================
 
 {-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE OverlappingInstances #-}
+
 
 -- | This module extends the 'show' function to be able to convert any
 -- term to a string, even if its type is not an instance of the 'Show'
diff --git a/src/Libraries/Template.hs b/src/Libraries/Template.hs
--- a/src/Libraries/Template.hs
+++ b/src/Libraries/Template.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/Template/Auxiliary.hs b/src/Libraries/Template/Auxiliary.hs
--- a/src/Libraries/Template/Auxiliary.hs
+++ b/src/Libraries/Template/Auxiliary.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/Template/ErrorMsgQ.hs b/src/Libraries/Template/ErrorMsgQ.hs
--- a/src/Libraries/Template/ErrorMsgQ.hs
+++ b/src/Libraries/Template/ErrorMsgQ.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/Template/LiftQ.hs b/src/Libraries/Template/LiftQ.hs
--- a/src/Libraries/Template/LiftQ.hs
+++ b/src/Libraries/Template/LiftQ.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/Template/Lifting.hs b/src/Libraries/Template/Lifting.hs
--- a/src/Libraries/Template/Lifting.hs
+++ b/src/Libraries/Template/Lifting.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
@@ -145,7 +145,7 @@
 litTHtoExpAST :: TH.Lit -> LiftQ Exp
 litTHtoExpAST (TH.CharL c) = return $ LitE $ CharL c
 litTHtoExpAST (TH.StringL s) = return $ ListE $ map (LitE . CharL) s
-litTHtoExpAST (TH.IntegerL i) = return $ LitE $ IntegerL i	
+litTHtoExpAST (TH.IntegerL i) = return $ LitE $ IntegerL i      
 litTHtoExpAST (TH.RationalL r) = return $ LitE $ RationalL r
 litTHtoExpAST x = errorMsg ("lifting not handled for " ++ (show x))
 
@@ -153,7 +153,7 @@
 litTHtoPatAST :: TH.Lit -> LiftQ Pat
 litTHtoPatAST (TH.CharL c) = return $ LitP $ CharL c
 litTHtoPatAST (TH.StringL s) = return $ ListP $ map (LitP . CharL) s
-litTHtoPatAST (TH.IntegerL i) = return $ LitP $ IntegerL i	
+litTHtoPatAST (TH.IntegerL i) = return $ LitP $ IntegerL i      
 litTHtoPatAST (TH.RationalL r) = return $ LitP $ RationalL r
 litTHtoPatAST x = errorMsg ("lifting not handled for " ++ (show x))
 
@@ -558,13 +558,13 @@
 liftExpAST (CaseE exp matches) = do
   exp' <- liftExpAST exp
   matches' <- mapM liftMatchAST matches
-  fresh_name <- newName "case"
+  fresh_name <- newName "varfromcase"
   return $ doE [BindS fresh_name exp']
                $ CaseE (VarE fresh_name) matches'
   
 liftExpAST (ListE exps) = do
   exps' <- mapM liftExpAST exps
-  fresh_names <- mapM newName $ replicate (length exps) "liste"
+  fresh_names <- mapM newName $ replicate (length exps) "varfromlist"
   return $ 
     doE (map (uncurry BindS) $ zip fresh_names exps')
        $ AppE ReturnE $ ListE $ map VarE fresh_names
diff --git a/src/Libraries/Tuple.hs b/src/Libraries/Tuple.hs
--- a/src/Libraries/Tuple.hs
+++ b/src/Libraries/Tuple.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Libraries/Typeable.hs b/src/Libraries/Typeable.hs
--- a/src/Libraries/Typeable.hs
+++ b/src/Libraries/Typeable.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper.hs b/src/Quipper.hs
--- a/src/Quipper.hs
+++ b/src/Quipper.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper/CircLifting.hs b/src/Quipper/CircLifting.hs
--- a/src/Quipper/CircLifting.hs
+++ b/src/Quipper/CircLifting.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
@@ -359,9 +359,9 @@
 -- >   1 |--N------- output: not a.
 template_not ::  Circ (Qubit -> Circ Qubit)
 template_not  = return $ \b -> do
-	  r <- qinit_qubit True;
+          r <- qinit_qubit True;
           qnot_at r `controlled` b
-	  return r
+          return r
 
 
 ----------------------------------------------------------------------
@@ -400,7 +400,7 @@
 template_symb_vbar_symb_vbar_ = return $ \b1 -> return $ \b2 -> do 
          r <- qinit_qubit True; 
          qnot_at r `controlled` b1 .==. 0 .&&. b2 .==. 0;
-	 return r
+         return r
 
 
 -- | Lifted version of 'bool_xor':
@@ -417,7 +417,7 @@
 template_bool_xor ::  Circ (Qubit -> Circ (Qubit -> Circ Qubit))
 template_bool_xor = return $ \b1 -> return $ \b2 -> do 
          r <- qinit_qubit False
-	 qnot_at r `controlled` b1
+         qnot_at r `controlled` b1
          qnot_at r `controlled` b2
          return r
 
diff --git a/src/Quipper/Circuit.hs b/src/Quipper/Circuit.hs
--- a/src/Quipper/Circuit.hs
+++ b/src/Quipper/Circuit.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper/Classical.hs b/src/Quipper/Classical.hs
--- a/src/Quipper/Classical.hs
+++ b/src/Quipper/Classical.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper/Control.hs b/src/Quipper/Control.hs
--- a/src/Quipper/Control.hs
+++ b/src/Quipper/Control.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper/Generic.hs b/src/Quipper/Generic.hs
--- a/src/Quipper/Generic.hs
+++ b/src/Quipper/Generic.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
@@ -361,7 +361,7 @@
     do_bit :: Bit -> Circ Bit
     do_bit = return                                                         
 
--- | Heterogeneous version of 'measure'. Given a heterogeneous data
+-- | Heterogeneous version of 'prepare'. Given a heterogeneous data
 -- structure, prepare qubits from all classical bits, and leave any
 -- qubits unchanged.
 qc_prepare :: (QCData qc) => qc -> Circ (QCType Qubit Qubit qc)
diff --git a/src/Quipper/Internal.hs b/src/Quipper/Internal.hs
--- a/src/Quipper/Internal.hs
+++ b/src/Quipper/Internal.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper/Labels.hs b/src/Quipper/Labels.hs
--- a/src/Quipper/Labels.hs
+++ b/src/Quipper/Labels.hs
@@ -1,9 +1,10 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
 -- ======================================================================
 
+{-# LANGUAGE Unsafe #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeSynonymInstances #-}
 {-# LANGUAGE FlexibleInstances #-}
diff --git a/src/Quipper/Monad.hs b/src/Quipper/Monad.hs
--- a/src/Quipper/Monad.hs
+++ b/src/Quipper/Monad.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper/Printing.hs b/src/Quipper/Printing.hs
--- a/src/Quipper/Printing.hs
+++ b/src/Quipper/Printing.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
@@ -499,25 +499,25 @@
 assign_x_coordinates :: FormatStyle -> [Gate] -> X -> (X, [(Gate, X)])
 assign_x_coordinates fs gs x0 =
   let ((x,ws), xgs) = mapAccumL (\ (x, ws) g ->
-	-- count the wires attached to the gate. If there is precisely
-	-- one (unary gate), merge it with adjacent unary gates. Do
-	-- not merge comments.
+        -- count the wires attached to the gate. If there is precisely
+        -- one (unary gate), merge it with adjacent unary gates. Do
+        -- not merge comments.
         let merge = case (g, wirelist_of_gate g) of
               (Comment _ _ _, _) -> Nothing
               (_, [w]) -> Just w
               (_, _) -> Nothing
         in
-	case merge of
+        case merge of
           Just w ->
             if not (w `elem` ws) then
-	      ((x, w:ws), (g, x))
-	    else
-	      ((x + (xoff fs), [w]), (g, x + (xoff fs)))
+              ((x, w:ws), (g, x))
+            else
+              ((x + (xoff fs), [w]), (g, x + (xoff fs)))
           _ ->
-	    if ws == [] then
-	      ((x + (xoff fs), []), (g, x))
-	    else
-	      ((x + 2.0 * (xoff fs), []), (g, x + (xoff fs)))
+            if ws == [] then
+              ((x + (xoff fs), []), (g, x))
+            else
+              ((x + 2.0 * (xoff fs), []), (g, x + (xoff fs)))
         ) (x0, []) gs
   in
    if ws == [] then
diff --git a/src/Quipper/QClasses.hs b/src/Quipper/QClasses.hs
--- a/src/Quipper/QClasses.hs
+++ b/src/Quipper/QClasses.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
diff --git a/src/Quipper/QData.hs b/src/Quipper/QData.hs
--- a/src/Quipper/QData.hs
+++ b/src/Quipper/QData.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
@@ -1012,7 +1012,7 @@
 -- initialized from a 'Bool'; a 'Qubit' can be measured, resulting in
 -- a 'Bit', etc. For this reason, the type class 'QShape' establishes a
 -- relation between three types:
--- 	
+--      
 -- [@qa@] A data structure having 'Qubit' at the leaves.
 -- 
 -- [@ca@] A data structure of the same shape as @qa@, having 'Bit' at
diff --git a/src/Quipper/Transformer.hs b/src/Quipper/Transformer.hs
--- a/src/Quipper/Transformer.hs
+++ b/src/Quipper/Transformer.hs
@@ -1,4 +1,4 @@
--- This file is part of Quipper. Copyright (C) 2011-2014. Please see the
+-- This file is part of Quipper. Copyright (C) 2011-2016. Please see the
 -- file COPYRIGHT for a list of authors, copyright holders, licensing,
 -- and other details. All rights reserved.
 -- 
@@ -593,7 +593,7 @@
      transformer :: Transformer m a b,
      define_subroutine :: BoxId -> TypedSubroutine -> m (),     
      lifting_function :: b -> m Bool
-  }	
+  }     
 
 -- | Like 'transform_bcircuit_rec', but for dynamic-boxed circuits.
 --
