22 lines
480 B
Haskell
22 lines
480 B
Haskell
module Main where
|
|
|
|
import Utils (askChoice)
|
|
import qualified FactorizationUI
|
|
import qualified ModularSquareRootUI
|
|
import qualified PrimesUI
|
|
|
|
main :: IO ()
|
|
main = do
|
|
putStrLn "Haskell Math Toolkit"
|
|
putStrLn "1) Factorization"
|
|
putStrLn "2) Modular square root"
|
|
putStrLn "3) Primality tests"
|
|
|
|
choice <- askChoice 3
|
|
|
|
case choice of
|
|
1 -> FactorizationUI.run
|
|
2 -> ModularSquareRootUI.run
|
|
3 -> PrimesUI.run
|
|
_ -> error "Impossible"
|