diff --git a/src/System/Wordexp.chs b/src/System/Wordexp.chs
--- a/src/System/Wordexp.chs
+++ b/src/System/Wordexp.chs
@@ -15,13 +15,13 @@
 import Control.Exception (Exception)
 import Control.Monad
 import Data.Data (Data)
-import Data.Monoid (Monoid(..))
 import Data.Typeable (Typeable)
 import Foreign
 import Foreign.C
 import Foreign.C.Types
 
 import Data.Array (Ix)
+import Data.Semigroup (Semigroup(..), Monoid(..))
 
 #include <wordexp.h>
 
@@ -50,9 +50,13 @@
   deriving (Show, Read, Eq, Ord, Bounded, Num, Bits, Ix, Data, Typeable)
 #endif
 
+instance Semigroup Flags where
+  (<>) = (.|.)
+  {-# INLINE (<>) #-}
+
 instance Monoid Flags where
   mempty = Flags 0
-  a `mappend` b = a .|. b
+  mappend = (<>)
   {-# INLINE mappend #-}
 
 -- | Disable command substitution in patterns, treat them as errors
diff --git a/wordexp.cabal b/wordexp.cabal
--- a/wordexp.cabal
+++ b/wordexp.cabal
@@ -1,5 +1,5 @@
 name:                wordexp
-version:             0.1.0.0
+version:             0.2.0.0
 synopsis:            wordexp(3) wrappers
 description:         man wordexp
 license:             BSD3
@@ -12,7 +12,8 @@
 
 library
   build-depends:     base >= 4 && < 5,
-                     array
+                     array,
+                     semigroups
   hs-source-dirs:    src
   exposed-modules:   System.Wordexp
                      System.Wordexp.Simple
