diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011, Mikhail Vorozhtsov
+Copyright (c) 2011-2014, Mikhail Vorozhtsov
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without 
diff --git a/data-endian.cabal b/data-endian.cabal
--- a/data-endian.cabal
+++ b/data-endian.cabal
@@ -1,5 +1,5 @@
 Name: data-endian
-Version: 0.0.1
+Version: 0.1
 Category: Data
 Stability: experimental
 Synopsis: Endian-sensitive data
@@ -11,7 +11,7 @@
 
 Author: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
 Maintainer: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
-Copyright: 2011 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
+Copyright: 2011-2014 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
 License: BSD3
 License-File: LICENSE
 
@@ -23,9 +23,8 @@
   Location: https://github.com/mvv/data-endian.git
 
 Library
-  Build-Depends: base < 5
+  Build-Depends: base >= 4 && < 5
   Hs-Source-Dirs: src
   GHC-Options: -Wall
   Exposed-Modules:
     Data.Endian
-
diff --git a/src/Data/Endian.hs b/src/Data/Endian.hs
--- a/src/Data/Endian.hs
+++ b/src/Data/Endian.hs
@@ -1,14 +1,27 @@
 {-# LANGUAGE UnicodeSyntax #-}
 {-# LANGUAGE CPP #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+#if MIN_VERSION_base(4,6,0)
+{-# LANGUAGE DeriveGeneric #-}
+#endif
 
-module Data.Endian (
-    EndianSensitive(..),
-    toBigEndian,
-    fromBigEndian,
-    toLittleEndian,
-    fromLittleEndian
+module Data.Endian
+  ( Endian(..)
+  , isLittleEndian
+  , isBigEndian
+  , EndianSensitive(..)
+  , toLittleEndian
+  , fromLittleEndian
+  , toBigEndian
+  , fromBigEndian
   ) where
 
+import Data.Typeable (Typeable)
+import Data.Data (Data)
+#if MIN_VERSION_base(4,6,0)
+import GHC.Generics (Generic)
+#endif
+import Data.Ix (Ix)
 import Data.Int
 import Data.Word
 import Data.Bits
@@ -18,35 +31,54 @@
 
 #include <HsBaseConfig.h>
 
--- | Raw, endian-sensitive data
+-- | Endianness.
+data Endian = LittleEndian -- ^ Little-endian
+            | BigEndian    -- ^ Big-endian
+            deriving (Typeable, Data, Show, Read,
+#if MIN_VERSION_base(4,6,0)
+                      Generic,
+#endif
+                      Eq, Ord, Bounded, Enum, Ix)
+
+-- | Return 'True' if the supplied value is 'LittleEndian'.
+isLittleEndian ∷ Endian → Bool
+isLittleEndian LittleEndian = True
+isLittleEndian BigEndian    = False
+
+-- | Return 'True' if the supplied value is 'BigEndian'.
+isBigEndian ∷ Endian → Bool
+isBigEndian LittleEndian = False
+isBigEndian BigEndian    = True
+
+-- | Raw, endian-sensitive data.
 class EndianSensitive α where
-  -- | Change the endianness of the argument
+  -- | Change the endianness of the argument.
   swapEndian ∷ α → α
 
--- | Convert from the native format to big-endian
-toBigEndian      ∷ EndianSensitive α ⇒ α → α
--- | Convert from big-endian to the native format
-fromBigEndian    ∷ EndianSensitive α ⇒ α → α
--- | Convert from the native format to little-endian
+-- | Convert from the native format to little-endian.
 toLittleEndian   ∷ EndianSensitive α ⇒ α → α
--- | Convert from little-endian to the native format
+-- | Convert from little-endian to the native format.
 fromLittleEndian ∷ EndianSensitive α ⇒ α → α
+-- | Convert from the native format to big-endian.
+toBigEndian      ∷ EndianSensitive α ⇒ α → α
+-- | Convert from big-endian to the native format.
+fromBigEndian    ∷ EndianSensitive α ⇒ α → α
 
 #ifdef WORDS_BIGENDIAN
-toBigEndian      = id
 toLittleEndian   = swapEndian
+toBigEndian      = id
 #else
-toBigEndian      = swapEndian
 toLittleEndian   = id
+toBigEndian      = swapEndian
 #endif
 
-fromBigEndian    = toBigEndian
 fromLittleEndian = toLittleEndian
+fromBigEndian    = toBigEndian
 
-{-# INLINE toBigEndian #-}
-{-# INLINE fromBigEndian #-}
 {-# INLINE toLittleEndian #-}
 {-# INLINE fromLittleEndian #-}
+{-# INLINE toBigEndian #-}
+{-# INLINE fromBigEndian #-}
 
 instance EndianSensitive α ⇒ EndianSensitive [α] where
   swapEndian = map swapEndian
@@ -214,4 +246,3 @@
              . fromIntegral
   {-# INLINE swapEndian #-}
 #endif
-
