creating a challenge continued, fixed a typo
This commit is contained in:
parent
0892b8b0a3
commit
f6abc0f485
@ -16,6 +16,7 @@ cabal-version: >=1.10
|
|||||||
library
|
library
|
||||||
hs-source-dirs: src
|
hs-source-dirs: src
|
||||||
exposed-modules: GEval.Core
|
exposed-modules: GEval.Core
|
||||||
|
GEval.CreateChallenge
|
||||||
, GEval.OptionsParser
|
, GEval.OptionsParser
|
||||||
build-depends: base >= 4.7 && < 5
|
build-depends: base >= 4.7 && < 5
|
||||||
, cond
|
, cond
|
||||||
|
10
src/GEval/CreateChallenge.hs
Normal file
10
src/GEval/CreateChallenge.hs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{-# LANGUAGE QuasiQuotes #-}
|
||||||
|
|
||||||
|
module GEval.CreateChallenge
|
||||||
|
(createChallenge)
|
||||||
|
where
|
||||||
|
|
||||||
|
import GEval.Core
|
||||||
|
|
||||||
|
createChallenge :: FilePath -> GEvalSpecification -> IO ()
|
||||||
|
createChallenge expectedDirectory spec = putStrLn "creating challange..."
|
@ -13,6 +13,7 @@ import System.IO
|
|||||||
import Data.String.Here
|
import Data.String.Here
|
||||||
|
|
||||||
import GEval.Core
|
import GEval.Core
|
||||||
|
import GEval.CreateChallenge
|
||||||
|
|
||||||
fullOptionsParser = info (helper <*> optionsParser)
|
fullOptionsParser = info (helper <*> optionsParser)
|
||||||
(fullDesc
|
(fullDesc
|
||||||
@ -108,16 +109,16 @@ runGEval''' False spec = do
|
|||||||
initChallange :: GEvalSpecification -> IO ()
|
initChallange :: GEvalSpecification -> IO ()
|
||||||
initChallange spec = case gesExpectedDirectory spec of
|
initChallange spec = case gesExpectedDirectory spec of
|
||||||
Nothing -> showInitInstructions
|
Nothing -> showInitInstructions
|
||||||
Just expectedDirectory -> initChallange' expectedDirectory spec
|
Just expectedDirectory -> createChallenge expectedDirectory spec
|
||||||
|
|
||||||
initChallange' :: FilePath -> GEvalSpecification -> IO ()
|
|
||||||
initChallange' expectedDirectory spec = putStrLn "init running..."
|
|
||||||
|
|
||||||
showInitInstructions = do
|
showInitInstructions = do
|
||||||
putStrLn [here|
|
putStrLn [here|
|
||||||
Run:
|
Run:
|
||||||
geval --init --expected-directory CHALLANGE
|
geval --init --expected-directory CHALLANGE
|
||||||
to create a directory CHALLANGE representing a Gonito challange.
|
to create a directory CHALLANGE representing a Gonito challange.
|
||||||
|
|
||||||
|
You can specify a metric with `--metric METRIC-NAME` option.
|
||||||
|
|
||||||
(Note that `--out-directory` option is not taken into account with `--init` option.)
|
(Note that `--out-directory` option is not taken into account with `--init` option.)
|
||||||
|]
|
|]
|
||||||
exitFailure
|
exitFailure
|
||||||
|
Loading…
Reference in New Issue
Block a user