module Earthling where

import qualified Data.Text.IO as T
import qualified Text.Show.Pretty as Pretty

import qualified Earthling.Parser as Earthling
import qualified Earthling.Eval as Earthling

main :: IO ()
main = do
  cs <- T.getContents
  let decls = Earthling.parseDecls cs
  case decls of
    Left err -> print err
    Right ds -> Earthling.eval ds
