Skip to content

Commit

Permalink
Make setSim default to simulate.
Browse files Browse the repository at this point in the history
  • Loading branch information
leepike committed Feb 4, 2011
1 parent 0246037 commit a739b3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Language/Copilot/Help.hs
Expand Up @@ -120,12 +120,12 @@ helpStr =
, " For exmple, pre-code might include 'includes'. Post-code might include"
, " a custom main() function."
, ""
, " setSim :: Bool (c)"
, " setSim :: Options -> Options (c)"
, " default: False"
, " When true, generates a main() function in the generated C file that"
, " When used, generates a main() function in the generated C file that"
, " includes a driver to call the scheduler to simulate the function and"
, " print the reults to standard out. Additionally, we attempt to compile"
, " the code when setSim is given True."
, " the code when setSim is used."
, ""
, " setArrs :: [(String,Int)] -> Options -> Options (c)"
, " default: Nothing"
Expand Down
6 changes: 3 additions & 3 deletions Language/Copilot/Interface.hs
Expand Up @@ -83,7 +83,7 @@ baseOpts = Options {

test :: Int -> Options -> IO ()
test n opts =
interface $ setC "-Wall" $ setI $ setN n $ setV OnlyErrors $ setSim True opts
interface $ setC "-Wall" $ setI $ setN n $ setV OnlyErrors $ setSim opts

interpret :: Streams -> Int -> Options -> IO ()
interpret streams n opts =
Expand Down Expand Up @@ -198,8 +198,8 @@ setCode :: (Maybe String, Maybe String) -> Options -> Options
setCode pp opts = opts {optPrePostCode = pp}

-- | Include simulation driver code (in a main() loop)?
setSim :: Bool -> Options -> Options
setSim b opts = opts {optSimulate = b}
setSim :: Options -> Options
setSim opts = opts {optSimulate = True}

-- | The "main" function that dispatches.
interface :: Options -> IO ()
Expand Down

0 comments on commit a739b3a

Please sign in to comment.