From 41d7988972cf76d036d210b07c81d63396e4fc92 Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Sun, 6 Dec 2015 02:29:30 +0300 Subject: [PATCH] Use readMaybe from Language.Haskell.GhcMod.Read --- ghc-mod.cabal | 1 - src/GHCMod/Options/Commands.hs | 2 +- src/GHCMod/Options/GapUtils.hs | 12 ------------ 3 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 src/GHCMod/Options/GapUtils.hs diff --git a/ghc-mod.cabal b/ghc-mod.cabal index ded363f..ab5fe1a 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -192,7 +192,6 @@ Executable ghc-mod , GHCMod.Options.Commands , GHCMod.Version , GHCMod.Options.DocUtils - , GHCMod.Options.GapUtils GHC-Options: -Wall -fno-warn-deprecations -threaded Default-Extensions: ConstraintKinds, FlexibleContexts HS-Source-Dirs: src diff --git a/src/GHCMod/Options/Commands.hs b/src/GHCMod/Options/Commands.hs index e824d37..007ddec 100644 --- a/src/GHCMod/Options/Commands.hs +++ b/src/GHCMod/Options/Commands.hs @@ -4,7 +4,7 @@ import Options.Applicative import Options.Applicative.Types import Language.Haskell.GhcMod.Types import GHCMod.Options.DocUtils -import GHCMod.Options.GapUtils +import Language.Haskell.GhcMod.Read type Symbol = String type Expr = String diff --git a/src/GHCMod/Options/GapUtils.hs b/src/GHCMod/Options/GapUtils.hs deleted file mode 100644 index 7062892..0000000 --- a/src/GHCMod/Options/GapUtils.hs +++ /dev/null @@ -1,12 +0,0 @@ -{-# LANGUAGE CPP #-} - -module GHCMod.Options.GapUtils ( - readMaybe -) where - -#if __GLASGOW_HASKELL__ >= 706 -import Text.Read (readMaybe) -#else -readMaybe :: Read a => String -> Maybe a -readMaybe = Just . read -#endif