Move GhcModError to Types.hs

This commit is contained in:
Daniel Gröber 2014-08-12 18:08:28 +02:00
parent dcadd5c7ba
commit c0652c0321
2 changed files with 15 additions and 10 deletions

View File

@ -122,16 +122,6 @@ data CompilerMode = Simple | Intelligent deriving (Eq,Show,Read)
defaultState :: GhcModState
defaultState = GhcModState Simple
data GhcModError = GMENoMsg
| GMEString String
| GMECabal
| GMEGhc
deriving (Eq,Show,Read)
instance Error GhcModError where
noMsg = GMENoMsg
strMsg = GMEString
----------------------------------------------------------------
-- | A constraint alias (-XConstraintKinds) to make functions dealing with

View File

@ -2,9 +2,24 @@ module Language.Haskell.GhcMod.Types where
import Data.List (intercalate)
import qualified Data.Map as M
import Control.Monad.Error (Error(..))
import PackageConfig (PackageConfig)
-- |
data GhcModError = GMENoMsg
-- ^ Unknown error
| GMEString String
-- ^ Some Error with a message. These are produced mostly by
-- 'fail' calls on GhcModT.
| GMECabal String
| GMEGhc
deriving (Eq,Show,Read)
instance Error GhcModError where
noMsg = GMENoMsg
strMsg = GMEString
-- | Output style.
data OutputStyle = LispStyle -- ^ S expression style.
| PlainStyle -- ^ Plain textstyle.