blob: eb24d52b68c632f24bd3f268e113a4adc220c16d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
module Obs.Main
import Obs.Abstract
import Obs.NormalForm
import Obs.Parser
import Obs.Syntax
import Obs.Term
import Obs.Typing
import System
import Text.PrettyPrint.Prettyprinter
import Text.PrettyPrint.Prettyprinter.Render.Terminal
%default total
usage : IO ()
usage = do
() <- putStrLn "usage: obs <file>"
exitFailure
partial
main : IO ()
main = do
[_, file] <- getArgs
| _ => usage
defs <- parseFile file
blk <- Abstract.printErr $ abstractBlock defs
ctx <- Typing.printErr $ checkBlock blk
putDoc $ pretty blk
|