diff --git a/src/Data/Union.hs b/src/Data/Union.hs
--- a/src/Data/Union.hs
+++ b/src/Data/Union.hs
@@ -9,11 +9,28 @@
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE EmptyCase #-}
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeFamilies #-}
 
 {- |
 
 Extensible type-safe unions.
 
+>>> let a = openUnion # (5 :: Int) :: OpenUnion '[Bool, Int]
+
+>>> a ^? openUnion @Int
+Just 5
+
+>>> a ^? openUnion @Bool
+Nothing
+
+>>> a ^? openUnion @Char
+<interactive>:7:6: error:
+    • No instance for (UElem Char '[] (RIndex Char '[]))
+        arising from a use of ‘openUnion’
+    • In the second argument of ‘(^?)’, namely ‘openUnion @Char’
+      In the expression: a ^? openUnion @Char
+      In an equation for ‘it’: it = a ^? openUnion @Char
+
 -}
 
 module Data.Union
@@ -36,6 +53,8 @@
 import Data.Typeable
 import Data.Vinyl.TypeLevel
 import Data.Union.Prism
+import Data.Hashable
+import qualified GHC.Generics as G
 
 -- | A union is parameterized by a universe @u@, an interpretation @f@
 -- and a list of labels @as@. The labels of the union are given by
@@ -181,3 +200,20 @@
       where
         matchR = This . Identity <$> fromException sE
         matchL = That <$> fromException sE
+
+instance G.Generic (Union f '[]) where
+  type Rep (Union f '[]) = G.V1
+  from = absurdUnion
+  to = \case{}
+
+instance G.Generic (Union f (a ': as)) where
+  type Rep (Union f (a ': as)) =
+    G.C1 ('G.MetaCons "This" 'G.PrefixI 'False) (G.Rec0 (f a)) G.:+:
+    G.C1 ('G.MetaCons "That" 'G.PrefixI 'False) (G.Rec0 (Union f as))
+  from = union (G.R1 . G.M1 . G.K1) (G.L1 . G.M1 . G.K1)
+  to = \case
+    G.L1 (G.M1 (G.K1 a)) -> This a
+    G.R1 (G.M1 (G.K1 u)) -> That u
+
+instance Hashable (Union f '[])
+instance (Hashable (f a), Hashable (Union f as)) => Hashable (Union f (a ': as))
diff --git a/union.cabal b/union.cabal
--- a/union.cabal
+++ b/union.cabal
@@ -1,5 +1,5 @@
 name:                union
-version:             0.1.1.2
+version:             0.1.2
 synopsis:            Extensible type-safe unions
 description:
 
@@ -37,11 +37,12 @@
                        RankNTypes
                        ScopedTypeVariables
                        TypeOperators
-  build-depends:       base >=4.8 && <4.11
-               ,       vinyl >=0.5 && <0.6
-               ,       profunctors >=5.1 && <5.3
+  build-depends:       base >=4.8 && <4.13
+               ,       vinyl >=0.5 && <0.11
+               ,       profunctors >=5.1 && <5.4
                ,       tagged >=0.8 && <0.9
                ,       deepseq >=1.4 && <1.5
+               ,       hashable >=1.2 && <1.3
   hs-source-dirs:      src
   default-language:    Haskell2010
   ghc-options:         -Wall
