diff --git a/graphtype.cabal b/graphtype.cabal
--- a/graphtype.cabal
+++ b/graphtype.cabal
@@ -1,6 +1,6 @@
 Name:                graphtype
-Version:             0.1.2
-copyright:           (c) 2009 Dmitry Astapov
+Version:             0.2.0
+copyright:           (c) 2009,2010 Dmitry Astapov
 Synopsis:            A simple tool to illustrate dependencies between Haskell types
 Description:         This tools produces diagrams of Haskell type interdependencies in the given source.
                      Actual drawing is done by graphviz tools (dot).
diff --git a/src/GraphType.hs b/src/GraphType.hs
--- a/src/GraphType.hs
+++ b/src/GraphType.hs
@@ -17,8 +17,8 @@
 import Control.Monad
 
 main = do
-  (Mode output trim, root, files) <- getOpts
-  types <- parseFiles files
+  (Mode output trim exts, root, files) <- getOpts
+  types <- parseFiles exts files
   let trimmed = if trim 
                 then doTrim types
                 else types
diff --git a/src/OptionParser.hs b/src/OptionParser.hs
--- a/src/OptionParser.hs
+++ b/src/OptionParser.hs
@@ -10,31 +10,36 @@
 import System.Console.GetOpt
 import Data.Maybe ( fromMaybe )
 import Control.Monad (when)
+import Language.Haskell.Exts (Extension)
 
 -- | Mode of operation
 data Mode = Mode { output :: String -- ^ Name of the output file
                  , trim :: Bool -- ^ Trim trivial types/newtypes or not
+                 , exts :: Maybe [Extension]
                  }
 
 -- | Default mode: output to "output.dot", dont trim trivial types
-defaultMode = Mode "output.dot" False
-
+defaultMode = Mode {output="output.dot", trim=False, exts=Nothing}
 
 data Flag 
-     = Output FilePath | Trim | Help
+     = Output FilePath | Trim | Help | Extensions [Extension]
        deriving (Eq,Show)
 
 options :: [OptDescr Flag]
 options =
   [ Option ['o']        ["output"]  (OptArg getOutput "file") "Name of the output file (default: output.dot)",
     Option ['t']        ["trim"]    (NoArg Trim)    "Trim types/newtype that do not have references to other user-defined types",
+    Option ['e']        ["exts"]    (ReqArg getExts "extensions") "Comma-separated list of extensions to enable when parsing sources",
     Option []           ["help"]    (NoArg Help)    "Show this help" ]
 
 getOutput Nothing = Output "output.dot"
 getOutput (Just s) = Output s
 
-update (Output f) m = m { output = f }
-update Trim m       = m { trim = True }
+getExts exts = Extensions $ read $ "[" ++ exts ++ "]"
+
+update (Output f) m      = m { output = f }
+update Trim m            = m { trim = True }
+update (Extensions es) m = m { exts = Just es }
 
 getOpts :: IO (Mode, String, [FilePath])
 getOpts = getArgs >>= \argv ->
diff --git a/src/Parse.hs b/src/Parse.hs
--- a/src/Parse.hs
+++ b/src/Parse.hs
@@ -6,11 +6,15 @@
 import Control.Monad (liftM)
 import System.Exit (exitFailure)
 
-parseFiles :: [FilePath] -> IO [Decl]
-parseFiles = liftM concat . mapM parseFile'
+parseFiles :: Maybe [Extension] -> [FilePath] -> IO [Decl]
+parseFiles exts = liftM concat . mapM parseFile'
   where
+    parser = case exts of
+      Nothing -> parseFile
+      Just es -> \f -> parseFileWithMode defaultParseMode{ parseFilename = f, extensions = es} f
+      
     parseFile' fname = do
-      res <- parseFile fname
+      res <- parser fname
       case res of
         ParseOk m -> return $ collectDeclarations m
         ParseFailed srcLoc message -> do
