Use readMaybe from Language.Haskell.GhcMod.Read
This commit is contained in:
parent
3665026fbf
commit
41d7988972
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user