diff --git a/hlint.cabal b/hlint.cabal
--- a/hlint.cabal
+++ b/hlint.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.6
 build-type:         Simple
 name:               hlint
-version:            1.8.16
+version:            1.8.17
 -- license is GPL v2 only
 license:            GPL
 license-file:       LICENSE
diff --git a/src/CmdLine.hs b/src/CmdLine.hs
--- a/src/CmdLine.hs
+++ b/src/CmdLine.hs
@@ -169,6 +169,7 @@
 
 
 getFile :: [String] -> FilePath -> IO [FilePath]
+getFile _ "-" = return ["-"]
 getFile exts file = do
     b <- doesDirectoryExist file
     if b then do
@@ -181,6 +182,7 @@
 
 
 getHintFile :: FilePath -> FilePath -> IO FilePath
+getHintFile _ "-" = return "-"
 getHintFile dataDir x = do
         let poss = nub $ concat [x : [x <.> "hs" | takeExtension x /= ".hs"] | x <- [x,dataDir </> x]]
         f poss poss
diff --git a/src/Util.hs b/src/Util.hs
--- a/src/Util.hs
+++ b/src/Util.hs
@@ -129,10 +129,10 @@
 
 
 readFileEncoding :: Encoding -> FilePath -> IO String
-readFileEncoding (Encoding_Internal x) = case x of
-    Nothing -> readFile
-    Just set -> \file -> do
-        h <- openFile file ReadMode
+readFileEncoding (Encoding_Internal x) file = case x of
+    Nothing -> if file == "-" then getContents else readFile file
+    Just set -> do
+        h <- if file == "-" then return stdin else openFile file ReadMode
         set h
         hGetContents h
 
