diff options
author | Marvin Borner | 2023-09-15 16:29:55 +0200 |
---|---|---|
committer | Marvin Borner | 2023-09-15 16:29:55 +0200 |
commit | 3adf8eced77b4513ef3f93343e385565dfa514d0 (patch) | |
tree | 57f0f744e131e414408bfa1c2af1cc1d9eee3f71 /app | |
parent | 1ec6f5b8e86ce9265b7bdcd1d5a9e1b4ca29afd5 (diff) |
Started transpiler
Diffstat (limited to 'app')
-rw-r--r-- | app/Main.hs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/app/Main.hs b/app/Main.hs index 6e1c43f..004d079 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -4,10 +4,21 @@ module Main import Lib import System.Environment ( getArgs ) +import Term +import Transpile -main :: IO () --- main = mapM_ (bruteForce "...") [1 .. 10] -main = do +transpile :: IO () +transpile = do + args <- getArgs + file <- readFile (head args) + let term = fromBLC file + putStrLn $ "input: " ++ show term + let ski = transpileSKI term + putStrLn $ "transpiled: " ++ show ski + return () + +reduce :: IO () +reduce = do args <- getArgs file <- readFile (head args) let termified = fromBirbs file @@ -17,3 +28,7 @@ main = do let retermified = fromTerm normalBirbs putStrLn $ "reduced: " ++ retermified return () + +main :: IO () +main = transpile +-- main = mapM_ (bruteForce "...") [1 .. 10] |