From be4957ee599e7e14c934e61f3d91354760b38acd Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 21 Jul 2024 16:15:17 +0200 Subject: Initial commit --- src/Main.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/Main.hs (limited to 'src/Main.hs') 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 -- cgit v1.2.3