diff options
Diffstat (limited to 'src/Main.hs')
| -rw-r--r-- | src/Main.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs new file mode 100644 index 0000000..bb8be4c --- /dev/null +++ b/src/Main.hs @@ -0,0 +1,13 @@ +module Main where + +import Language.Elna.Parser (programP) +import Text.Megaparsec (runParser, errorBundlePretty) +import qualified Data.Text.IO as Text + +main :: IO () +main = Text.getContents + >>= withParseResult . runParser programP "" + where + withParseResult (Right _) = pure () + withParseResult (Left errorBundle) = + putStr $ errorBundlePretty errorBundle |
