Use readMaybe from Language.Haskell.GhcMod.Read

This commit is contained in:
Nikolay Yakimov 2015-12-06 02:29:30 +03:00
parent 3665026fbf
commit 41d7988972
3 changed files with 1 additions and 14 deletions

View File

@ -192,7 +192,6 @@ Executable ghc-mod
, GHCMod.Options.Commands , GHCMod.Options.Commands
, GHCMod.Version , GHCMod.Version
, GHCMod.Options.DocUtils , GHCMod.Options.DocUtils
, GHCMod.Options.GapUtils
GHC-Options: -Wall -fno-warn-deprecations -threaded GHC-Options: -Wall -fno-warn-deprecations -threaded
Default-Extensions: ConstraintKinds, FlexibleContexts Default-Extensions: ConstraintKinds, FlexibleContexts
HS-Source-Dirs: src HS-Source-Dirs: src

View File

@ -4,7 +4,7 @@ import Options.Applicative
import Options.Applicative.Types import Options.Applicative.Types
import Language.Haskell.GhcMod.Types import Language.Haskell.GhcMod.Types
import GHCMod.Options.DocUtils import GHCMod.Options.DocUtils
import GHCMod.Options.GapUtils import Language.Haskell.GhcMod.Read
type Symbol = String type Symbol = String
type Expr = String type Expr = String

View File

@ -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