Compare commits
2 commits
14f7539bef
...
b40650cd6b
Author | SHA1 | Date | |
---|---|---|---|
Kiana Sheibani | b40650cd6b | ||
Kiana Sheibani | 94448ca2f5 |
15
src/Main.idr
15
src/Main.idr
|
@ -2,9 +2,8 @@ module Main
|
||||||
|
|
||||||
import Data.SortedMap
|
import Data.SortedMap
|
||||||
import Data.Problem
|
import Data.Problem
|
||||||
import Utils
|
|
||||||
|
|
||||||
import Language.Reflection
|
import Language.Reflection
|
||||||
|
import System
|
||||||
|
|
||||||
import AllDays
|
import AllDays
|
||||||
|
|
||||||
|
@ -32,11 +31,13 @@ getInput = go ""
|
||||||
|
|
||||||
main : IO ()
|
main : IO ()
|
||||||
main = do
|
main = do
|
||||||
putStr "Solution: "
|
sol <- case !getArgs of
|
||||||
Just pr <- parseProblem <$> getLine
|
[_, s] => pure s
|
||||||
| Nothing => putStrLn "Invalid solution ID"
|
_ => putStr "Solution: " >> getLine
|
||||||
let Just func = lookup pr solMap
|
let Just pr = parseProblem sol
|
||||||
| Nothing => putStrLn "This part is not implemented yet!"
|
| Nothing => putStrLn "ERROR: Invalid solution"
|
||||||
|
Just func = lookup pr solMap
|
||||||
|
| Nothing => putStrLn "ERROR: This part is not implemented yet!"
|
||||||
|
|
||||||
putStrLn "Input (end with \\):"
|
putStrLn "Input (end with \\):"
|
||||||
input <- trim <$> getInput
|
input <- trim <$> getInput
|
||||||
|
|
Loading…
Reference in a new issue