2022-04-27 14:04:03 -04:00
|
|
|
|
module Main
|
2021-07-07 07:11:39 -04:00
|
|
|
|
|
2022-02-26 20:18:16 -05:00
|
|
|
|
import public Quox.Name
|
2021-09-09 17:51:00 -04:00
|
|
|
|
import public Quox.Syntax
|
2022-02-26 20:18:16 -05:00
|
|
|
|
import public Quox.Equal
|
2021-07-20 16:05:19 -04:00
|
|
|
|
import public Quox.Pretty
|
2022-04-23 18:21:30 -04:00
|
|
|
|
import public Quox.Typechecker
|
2021-07-20 16:05:19 -04:00
|
|
|
|
|
|
|
|
|
import Data.Nat
|
|
|
|
|
import Data.Vect
|
2022-05-04 11:09:49 -04:00
|
|
|
|
import Data.List
|
2022-04-11 08:09:37 -04:00
|
|
|
|
import Control.ANSI
|
2021-07-20 16:05:19 -04:00
|
|
|
|
|
|
|
|
|
|
2022-04-11 08:09:37 -04:00
|
|
|
|
private
|
2022-04-11 15:58:33 -04:00
|
|
|
|
text : PrettyOpts -> List String
|
2022-04-11 08:09:37 -04:00
|
|
|
|
text _ =
|
|
|
|
|
["",
|
|
|
|
|
#" ___ ___ _____ __ __"#,
|
|
|
|
|
#"/ _ `/ // / _ \\ \ /"#,
|
|
|
|
|
#"\_, /\_,_/\___/_\_\"#,
|
|
|
|
|
#" /_/"#,
|
|
|
|
|
""]
|
2022-03-06 19:19:26 -05:00
|
|
|
|
|
2022-04-11 08:09:37 -04:00
|
|
|
|
private
|
2022-04-11 15:58:33 -04:00
|
|
|
|
qtuwu : PrettyOpts -> List String
|
2022-04-11 08:09:37 -04:00
|
|
|
|
qtuwu opts =
|
|
|
|
|
if opts.unicode then
|
|
|
|
|
[#" ___,-´⎠ "#,
|
|
|
|
|
#"(·`──´ ◡ -´⎠"#,
|
|
|
|
|
#" \⋀/───´⎞/`──´ "#,
|
|
|
|
|
#" ⋃────,-₎ ⎞ "#,
|
|
|
|
|
#" (‾‾) ⎟ "#,
|
|
|
|
|
#" (‾‾‾) ⎟ "#]
|
|
|
|
|
else
|
|
|
|
|
[#" ___,-´/ "#,
|
|
|
|
|
#"(.`--´ u -´/"#,
|
|
|
|
|
#" \/\/--´|/`--´ "#,
|
|
|
|
|
#" U----,-, \ "#,
|
|
|
|
|
#" (--) | "#,
|
|
|
|
|
#" (---) | "#]
|
|
|
|
|
|
|
|
|
|
private
|
2022-04-11 15:58:33 -04:00
|
|
|
|
join1 : PrettyOpts -> String -> String -> String
|
2022-04-11 08:09:37 -04:00
|
|
|
|
join1 opts l r =
|
|
|
|
|
if opts.color then
|
|
|
|
|
" " <+> show (colored Green l) <+> " " <+> show (colored Magenta r)
|
|
|
|
|
else
|
|
|
|
|
" " <+> l <+> " " <+> r
|
|
|
|
|
|
|
|
|
|
export
|
2022-04-11 15:58:33 -04:00
|
|
|
|
banner : PrettyOpts -> String
|
2022-04-11 08:09:37 -04:00
|
|
|
|
banner opts = unlines $ zipWith (join1 opts) (qtuwu opts) (text opts)
|
2022-03-06 19:19:26 -05:00
|
|
|
|
|
2021-07-20 16:05:19 -04:00
|
|
|
|
export
|
|
|
|
|
tm : Term 1 2
|
|
|
|
|
tm =
|
2022-05-01 11:11:13 -04:00
|
|
|
|
(Pi One "a" (BVT 0) (TUsed $ E (F "F" :@@ [BVT 0, FT "w"]))
|
2021-12-23 09:52:56 -05:00
|
|
|
|
`DCloT` (K One ::: id))
|
2021-07-20 16:05:19 -04:00
|
|
|
|
`CloT` (F "y" ::: TYPE (U 1) :# TYPE (U 2) ::: id)
|
|
|
|
|
|
2021-07-07 07:11:39 -04:00
|
|
|
|
main : IO Unit
|
2021-07-20 16:05:19 -04:00
|
|
|
|
main = do
|
2022-04-11 15:58:33 -04:00
|
|
|
|
putStrLn $ banner defPrettyOpts
|
|
|
|
|
prettyTermDef tm
|
|
|
|
|
prettyTermDef $ pushSubstsT tm
|