diff --git a/copilot-language.cabal b/copilot-language.cabal
--- a/copilot-language.cabal
+++ b/copilot-language.cabal
@@ -1,6 +1,6 @@
 cabal-version:       >=1.10
 name:                copilot-language
-version:             0.5
+version:             0.6
 synopsis:            A Haskell-embedded DSL for monitoring hard real-time
                      distributed systems.
 description:
diff --git a/src/Copilot/Language/Operators/Cast.hs b/src/Copilot/Language/Operators/Cast.hs
--- a/src/Copilot/Language/Operators/Cast.hs
+++ b/src/Copilot/Language/Operators/Cast.hs
@@ -23,7 +23,7 @@
 
 --------------------------------------------------------------------------------
 
-castBool :: (Num a, Typed a) => Stream Bool -> Stream a
+castBool :: (Eq a, Num a, Typed a) => Stream Bool -> Stream a
 castBool (Const bool) = Const $ if bool then 1 else 0
 castBool x            = Op3 (C.Mux typeOf) x 1 0
 
diff --git a/src/Copilot/Language/Stream.hs b/src/Copilot/Language/Stream.hs
--- a/src/Copilot/Language/Stream.hs
+++ b/src/Copilot/Language/Stream.hs
@@ -64,7 +64,7 @@
 
 --------------------------------------------------------------------------------
 
-instance (Typed a, Eq a, Num a) => Num (Stream a) where
+instance (Typed a, P.Eq a, Num a) => Num (Stream a) where
   (Const x) + (Const y)   = Const (x + y)
   (Const 0) + y           = y
   x + (Const 0)           = x
@@ -93,7 +93,7 @@
 
 -- XXX we may not want to precompute these if they're constants if someone is
 -- relying on certain floating-point behavior.
-instance (Typed a, Fractional a) => Fractional (Stream a) where
+instance (Typed a, P.Eq a, Fractional a) => Fractional (Stream a) where
   (/)                     = Op2 (Core.Fdiv typeOf) 
 
   recip (Const x)         = Const (recip x)
@@ -105,7 +105,7 @@
 
 -- XXX we may not want to precompute these if they're constants if someone is
 -- relying on certain floating-point behavior.
-instance (Typed a, Floating a) => Floating (Stream a) where
+instance (Typed a, Eq a, Floating a) => Floating (Stream a) where
   pi           = Const pi
   exp          = Op1 (Core.Exp typeOf)
   sqrt         = Op1 (Core.Sqrt typeOf)
