diff --git a/Language/KansasLava/Probes.hs b/Language/KansasLava/Probes.hs
--- a/Language/KansasLava/Probes.hs
+++ b/Language/KansasLava/Probes.hs
@@ -45,7 +45,7 @@
 -- with the given function.
 {-# NOINLINE setProbes #-}
 setProbes :: (forall a i . (Rep a) => String -> Signal i a -> Signal i a) -> IO ()
-setProbes = writeIORef probeFn . ProbeFn
+setProbes f = writeIORef probeFn (ProbeFn f)
 
 -- | The callback is called for every element of every probed value, in evaluation order.
 -- The arguments are fully evaluted (so printing them will not cause any side-effects of evaluation.
diff --git a/Language/KansasLava/Protocols/Patch.hs b/Language/KansasLava/Protocols/Patch.hs
--- a/Language/KansasLava/Protocols/Patch.hs
+++ b/Language/KansasLava/Protocols/Patch.hs
@@ -187,9 +187,9 @@
 ------------------------------------------------
 
 -- | An instance of the Unit type contains a value that carries no information.
-class Unit a where
+class Unit unit where
   -- | The name of the specific value.
-  unit :: a
+  unit :: unit
 
 
 unUnit :: (Unit unit) => unit -> ()
diff --git a/Language/KansasLava/Rep.hs b/Language/KansasLava/Rep.hs
--- a/Language/KansasLava/Rep.hs
+++ b/Language/KansasLava/Rep.hs
@@ -57,7 +57,7 @@
     showRep (XBool (Just True))  = "high"
     showRep (XBool (Just False)) = "low"
 
-$(repIntegral ''Int     (S $ bitSize $ (error "witness" :: Int)))
+$(repIntegral ''Int     (S $ finiteBitSize $ (error "witness" :: Int)))
 
 $(repIntegral ''Word8   (U  8))
 $(repIntegral ''Word32  (U 32))
diff --git a/Language/KansasLava/Rep/TH.hs b/Language/KansasLava/Rep/TH.hs
--- a/Language/KansasLava/Rep/TH.hs
+++ b/Language/KansasLava/Rep/TH.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TemplateHaskell, TypeFamilies #-}
+{-# LANGUAGE TemplateHaskell, TypeFamilies, CPP #-}
 
 module Language.KansasLava.Rep.TH where
 
@@ -21,9 +21,14 @@
 		, dataInstD  (return [])
 		 	     ''X [conT tyName] Nothing
 				[ normalC xConsName
-					  [ strictType notStrict (appT (conT ''Maybe) (conT tyName)) ]
-				]
-				(return [])
+                                  [ bangType (bang noSourceUnpackedness noSourceStrictness)
+                                    (appT (conT ''Maybe) (conT tyName)) ]
+                                ]
+#if MIN_VERSION_template_haskell(2,12,0)
+                                []
+#else
+                                (return [])
+#endif
 		, funD 'optX
 		  	[clause [varP x]
 				      (normalB
@@ -70,9 +75,14 @@
 		, dataInstD  (return [])
 		 	     ''X [conT tyName] Nothing
 				[ normalC xConsName
-					  [ strictType notStrict (appT (conT ''Maybe) (conT tyName)) ]
-				]
-				(return [])
+                                  [ bangType (bang noSourceUnpackedness noSourceStrictness)
+                                    (appT (conT ''Maybe) (conT tyName)) ]
+                                ]
+#if MIN_VERSION_template_haskell(2,12,0)
+                                []
+#else
+                                (return [])
+#endif
 		, funD 'optX
 		  	[clause [varP x]
 				      (normalB
diff --git a/Language/KansasLava/Signal.hs b/Language/KansasLava/Signal.hs
--- a/Language/KansasLava/Signal.hs
+++ b/Language/KansasLava/Signal.hs
@@ -156,7 +156,11 @@
     s1 `rotateR` n = primS2 (rotateR) "rotateR" s1  (pureS n)
     complement s   = primS1 (complement) "complement"  s
     bitSize s      = typeWidth (typeOfS s)
+    bitSizeMaybe s = Just $ typeWidth (typeOfS s)
     isSigned s     = isTypeSigned (typeOfS s)
+
+instance (Show a, FiniteBits a, Rep a) => FiniteBits (Signal i a) where
+    finiteBitSize s = typeWidth (typeOfS s)
 
 instance (Eq a, Show a, Fractional a, Rep a) => Fractional (Signal i a) where
     s1 / s2 = primS2 (/) "/"  s1  s2
diff --git a/Language/KansasLava/Utils.hs b/Language/KansasLava/Utils.hs
--- a/Language/KansasLava/Utils.hs
+++ b/Language/KansasLava/Utils.hs
@@ -109,7 +109,7 @@
 -- | Predicate to see if a Signed value is positive.
 isPositive :: forall sig i ix . (sig ~ Signal i, Size ix, Integral ix, Rep ix) => sig (Signed ix) -> sig Bool
 isPositive a = bitNot $ testABit a (fromIntegral msb)
-    where msb = bitSize a - 1
+    where msb = finiteBitSize a - 1
 
 infixr 3 .&&.
 infixr 2 .||.
diff --git a/kansas-lava.cabal b/kansas-lava.cabal
--- a/kansas-lava.cabal
+++ b/kansas-lava.cabal
@@ -1,5 +1,5 @@
 Name:               kansas-lava
-Version:            0.2.4.4
+Version:            0.2.4.5
 Synopsis:           Kansas Lava is a hardware simulator and VHDL generator.
 
 Description: 
@@ -43,7 +43,7 @@
         base >= 4 && < 5, 
         dotgen >= 0.4.1,
         containers,
-        sized-types >= 0.3.4 && < 0.4,
+        sized-types >= 0.3.5.2 && < 0.4,
         data-default,
         random,
         strict,
@@ -53,7 +53,7 @@
         process,
         netlist >= 0.3.1,
         netlist-to-vhdl >= 0.3.1,
-        template-haskell >= 2.11 && < 2.12,
+        template-haskell >= 2.11,
         bytestring,
         data-reify == 0.6
   Exposed-modules:
