diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-07-21 16:15:17 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-07-21 16:15:17 +0200 |
| commit | be4957ee599e7e14c934e61f3d91354760b38acd (patch) | |
| tree | f8506ff75b5a4f1a502489e39f51a267d51ac69f /src/Main.hs | |
| download | elna-be4957ee599e7e14c934e61f3d91354760b38acd.tar.gz | |
Initial commit
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 |
