on master help sign in
don't use a field in IOption and a field in IState, only one of them
commitc96561b31bba410629e2a6853009eab848cc066b authorHannes Mehnert <hannes@mehnert.org> dateFri 10 May 2013, 19:44 (13 years ago) parentd2e1c8c
2 files changed+6−8
src/Idris/AbsSyntax.hs+5−6 src/Idris/AbsSyntaxTree.hs+1−2
src/Idris/AbsSyntax.hs+5−6
@@ -312,12 +312,6 @@ setQuiet q = do i <- getIState
312312 let opt' = opts { opt_quiet = q }
313313 putIState $ i { idris_options = opt' }
314314
315−setIdeSlave :: Bool -> Idris ()
316−setIdeSlave s = do i <- getIState
317− let opts = idris_options i
318− let opt' = opts { opt_ideslave = s }
319− putIState $ i { idris_options = opt' }
320−
321315setTarget :: Target -> Idris ()
322316setTarget t = do i <- getIState
323317 let opts = idris_options i
@@ -338,6 +332,11 @@ outputTy :: Idris OutputType
338332outputTy = do i <- getIState
339333 return $ opt_outputTy $ idris_options i
340334
335+setIdeSlave :: Bool -> Idris ()
336+setIdeSlave True = do i <- getIState
337+ putIState $ i { idris_outputmode = (IdeSlave 0) }
338+setIdeSlave False = return ()
339+
341340verbose :: Idris Bool
342341verbose = do i <- getIState
343342 return (opt_verbose (idris_options i))
src/Idris/AbsSyntaxTree.hs+1−2
@@ -33,7 +33,6 @@ data IOption = IOption { opt_logLevel :: Int,
3333 opt_repl :: Bool,
3434 opt_verbose :: Bool,
3535 opt_quiet :: Bool,
36− opt_ideslave :: Bool,
3736 opt_target :: Target,
3837 opt_outputTy :: OutputType,
3938 opt_ibcsubdir :: FilePath,
@@ -42,7 +41,7 @@ data IOption = IOption { opt_logLevel :: Int,
4241 }
4342 deriving (Show, Eq)
4443
45−defaultOpts = IOption 0 False False True False False True True False False ViaC Executable "" [] []
44+defaultOpts = IOption 0 False False True False False True True False ViaC Executable "" [] []
4645
4746data LanguageExt = TypeProviders deriving (Show, Eq, Read, Ord)
4847