-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSettings.hs
37 lines (29 loc) · 1.16 KB
/
Settings.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{-# LANGUAGE DeriveDataTypeable #-} --needed for cmdargs
module Settings where
import qualified Data.Map as Map
import System.Console.CmdArgs
import Control.Concurrent.MVar
import Expression
type Environment = Map.Map String Expression
data InteractivityMode = Full | Steps | Interactive
data Arguments = Arguments { filename :: [String]
} deriving (Data, Typeable, Show)
defaultArguments :: Arguments
defaultArguments = Arguments { filename = []
}
data Settings = Settings
{ interactivityMode :: InteractivityMode
, knowNumbers :: Bool
, environment :: Environment
, succName :: String
, clargs :: Arguments
, interruption :: MVar Bool
}
defaultSettings :: Settings
defaultSettings = Settings { interactivityMode = Steps
, knowNumbers = True
, environment = Map.empty
, succName = "SUCC"
, clargs = defaultArguments
--, TODO: interruption not initialized
}