diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,7 @@
 # Changelog
 
+* **1.2.0.1**
+  - Fix compile error
 * **1.2.0.0**
   - Move `Range` to its own module (hiding the constructor)
   - Setup automated release builds using Travis. Executables for Linux
diff --git a/pandoc-include-code.cabal b/pandoc-include-code.cabal
--- a/pandoc-include-code.cabal
+++ b/pandoc-include-code.cabal
@@ -8,7 +8,7 @@
 author:              Oskar Wickström
 maintainer:          Oskar Wickström
 homepage:	     https://github.com/owickstrom/pandoc-include-code
-version:             1.2.0.0
+version:             1.2.0.1
 cabal-version:       >= 1.8
 build-type:          Simple
 category:            Documentation
diff --git a/src/Text/Pandoc/Filter/IncludeCode.hs b/src/Text/Pandoc/Filter/IncludeCode.hs
--- a/src/Text/Pandoc/Filter/IncludeCode.hs
+++ b/src/Text/Pandoc/Filter/IncludeCode.hs
@@ -27,7 +27,7 @@
 import           Text.Pandoc.JSON
 import           Text.Read                (readMaybe)
 
-import           Text.Pandoc.Filter.Range (Range, mkRange)
+import           Text.Pandoc.Filter.Range (Range, mkRange, rangeEnd, rangeStart)
 
 data InclusionSpec = InclusionSpec
   { include :: FilePath
@@ -91,9 +91,9 @@
 filterLineRange :: Lines -> Inclusion Lines
 filterLineRange ls =
   asks range >>= \case
-    Just (Range start end) ->
-      return (take (end - startIndex) (drop startIndex ls))
-      where startIndex = pred start
+    Just range ->
+      return (take (rangeEnd range - startIndex) (drop startIndex ls))
+      where startIndex = pred (rangeStart range)
     Nothing -> return ls
 
 isSnippetTag :: Text -> Text -> Text -> Bool
diff --git a/src/Text/Pandoc/Filter/Range.hs b/src/Text/Pandoc/Filter/Range.hs
--- a/src/Text/Pandoc/Filter/Range.hs
+++ b/src/Text/Pandoc/Filter/Range.hs
@@ -1,7 +1,14 @@
 -- | A range that cannot be constructed with incorrect bounds.
-module Text.Pandoc.Filter.Range (Range, mkRange) where
+module Text.Pandoc.Filter.Range
+  ( Range
+  , rangeStart
+  , rangeEnd
+  , mkRange
+  ) where
 
-data Range = Range Int Int
+data Range = Range { rangeStart :: Int
+                   , rangeEnd   :: Int
+                   }
 
 mkRange :: Int -> Int -> Maybe Range
 mkRange s e
