diff --git a/CHANGES.markdown b/CHANGES.markdown
--- a/CHANGES.markdown
+++ b/CHANGES.markdown
@@ -2,7 +2,17 @@
 
 [`weighted-regexp`]: http://hackage.haskell.org/package/weighted-regexp
 
+# 0.3.1
+
+## Expose internal data types and matching functions
+
+Added new module `Text.RegExp.Internal` that exposes internal data
+types and matching functions. Users probably don't want to use it
+unless they implement their own matching functions.
+
 # 0.3.0.1
+
+## Conditional build dependencies
 
 Moved build dependencies for QuickCheck and Criterion test programs
 under a conditional so they are only pulled in if one actually
diff --git a/dist/build/Text/RegExp/Parser.hs b/dist/build/Text/RegExp/Parser.hs
--- a/dist/build/Text/RegExp/Parser.hs
+++ b/dist/build/Text/RegExp/Parser.hs
@@ -299,7 +299,7 @@
 {-# LINE 1 "templates/GenericTemplate.hs" #-}
 {-# LINE 1 "templates/GenericTemplate.hs" #-}
 {-# LINE 1 "<built-in>" #-}
-{-# LINE 1 "<command line>" #-}
+{-# LINE 1 "<command-line>" #-}
 {-# LINE 1 "templates/GenericTemplate.hs" #-}
 -- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp 
 
diff --git a/src/Text/RegExp/Internal.hs b/src/Text/RegExp/Internal.hs
new file mode 100644
--- /dev/null
+++ b/src/Text/RegExp/Internal.hs
@@ -0,0 +1,19 @@
+-- |
+-- Module      : Text.RegExp
+-- Copyright   : Thomas Wilke, Frank Huch, and Sebastian Fischer
+-- License     : BSD3
+-- Maintainer  : Sebastian Fischer <mailto:sebf@informatik.uni-kiel.de>
+-- Stability   : experimental
+-- 
+-- This module exports internal data types and matching functions. You
+-- do not need to import it unless you want to write your own matching
+-- algorithms.
+-- 
+module Text.RegExp.Internal (
+
+  module Text.RegExp.Data, module Text.RegExp.Matching
+
+  ) where
+
+import Text.RegExp.Data
+import Text.RegExp.Matching
diff --git a/weighted-regexp.cabal b/weighted-regexp.cabal
--- a/weighted-regexp.cabal
+++ b/weighted-regexp.cabal
@@ -1,5 +1,5 @@
 Name:          weighted-regexp
-Version:       0.3.0.1
+Version:       0.3.1
 Cabal-Version: >= 1.6
 Synopsis:      Weighted Regular Expression Matcher
 Description:
@@ -28,6 +28,7 @@
                         Text.RegExp.Matching.Leftmost,
                         Text.RegExp.Matching.Longest,
                         Text.RegExp.Matching.LeftLong,
+                        Text.RegExp.Internal,
                         Data.Semiring,
                         Data.Semiring.Properties
   Other-Modules:        Text.RegExp.Data,
@@ -60,6 +61,7 @@
                         Text.RegExp.Matching.LeftLong,
                         Data.Semiring,
                         Data.Semiring.Properties
+                        Text.RegExp.Internal,
                         Text.RegExp.Data,
                         Text.RegExp.Parser,
                         Text.RegExp.Matching,
@@ -92,6 +94,7 @@
                         Text.RegExp.Matching.Longest,
                         Text.RegExp.Matching.LeftLong,
                         Data.Semiring,
+                        Text.RegExp.Internal,
                         Text.RegExp.Data,
                         Text.RegExp.Parser,
                         Text.RegExp.Matching,
