summaryrefslogtreecommitdiff
path: root/compiler/GHC/Data/StringBuffer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Data/StringBuffer.hs')
-rw-r--r--compiler/GHC/Data/StringBuffer.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC/Data/StringBuffer.hs b/compiler/GHC/Data/StringBuffer.hs
index 0de4b007ba..0932397ae5 100644
--- a/compiler/GHC/Data/StringBuffer.hs
+++ b/compiler/GHC/Data/StringBuffer.hs
@@ -56,7 +56,6 @@ import GHC.Data.FastString
import GHC.Utils.Encoding
import GHC.Utils.IO.Unsafe
import GHC.Utils.Panic.Plain
-import GHC.Utils.Misc
import GHC.Utils.Exception ( bracket_ )
import Data.Maybe
@@ -150,7 +149,7 @@ skipBOM h size offset =
if size > 0 && offset == 0
then do
-- Validate assumption that handle is in binary mode.
- ASSERTM( hGetEncoding h >>= return . isNothing )
+ assertM (hGetEncoding h >>= return . isNothing)
-- Temporarily select utf8 encoding with error ignoring,
-- to make `hLookAhead` and `hGetChar` return full Unicode characters.
bracket_ (hSetEncoding h safeEncoding) (hSetBinaryMode h True) $ do