agda-spa/Main.agda
Danila Fedorin f0da9a9020 Move more code out of Sign and into Main
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-03-11 13:07:42 -07:00

26 lines
538 B
Agda
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Main where
open import Language
open import Analysis.Sign
open import Data.Vec using (Vec; _∷_; [])
open import IO
open import Level using (0)
testCode : Vec Stmt _
testCode =
("zero" (# 0))
("pos" ((` "zero") Expr.+ (# 1)))
("neg" ((` "zero") Expr.- (# 1)))
("unknown" ((` "pos") Expr.+ (` "neg")))
[]
testProgram : Program
testProgram = record
{ length = _
; stmts = testCode
}
open WithProg testProgram using (output)
main = run {0} (putStrLn output)