summaryrefslogtreecommitdiff
path: root/src/Main.hs
blob: bb8be4cf3ba627f516b73510e62567c75a035aba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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