diff options
author | Marvin Borner | 2022-03-03 15:56:53 +0100 |
---|---|---|
committer | Marvin Borner | 2022-03-03 15:56:53 +0100 |
commit | 4d5aa27a4636abcf58afeec83e598118eb02fb5c (patch) | |
tree | ead37ffe2b89e2f692a71672c4ec1fab00487b06 /src/Fun/Compiler.hs | |
parent | 65293eedaf3469bb0f4a0b174cd53bb89c762ff5 (diff) |
Tree
Diffstat (limited to 'src/Fun/Compiler.hs')
-rw-r--r-- | src/Fun/Compiler.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fun/Compiler.hs b/src/Fun/Compiler.hs index b53ff73..46cfe13 100644 --- a/src/Fun/Compiler.hs +++ b/src/Fun/Compiler.hs @@ -23,8 +23,8 @@ traceTree c ts = foldr join "" (map (traceBranch c) ts) genTrace :: [Trace] -> String genTrace ts = "Trace of expectance:\n" ++ traceTree 0 ts -parse :: String -> Either String Program -- TODO: Should be tree -parse file = case program file of +parse :: String -> Either String Tree +parse file = case tree file of Left a -> Left $ "Parse fault!\n" ++ case a of State [] Nothing -> "No context available" State t Nothing -> genTrace t |