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
|
2023-01-08 14:44:25 -05:00
|
|
|
|
import public Quox.Syntax.Qty.Three
|
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
|
|
|
|
|
[#" ___,-´⎠ "#,
|
|
|
|
|
#"(·`──´ ◡ -´⎠"#,
|
2023-02-26 04:58:47 -05:00
|
|
|
|
#" \/\/──´⎞/`──´ "#,
|
|
|
|
|
#" ⎜⎟───,-₎ ⎞ "#,
|
|
|
|
|
#" ⎝⎠ (‾‾) ⎟ "#,
|
2022-04-11 08:09:37 -04:00
|
|
|
|
#" (‾‾‾) ⎟ "#]
|
|
|
|
|
else
|
|
|
|
|
[#" ___,-´/ "#,
|
|
|
|
|
#"(.`--´ u -´/"#,
|
|
|
|
|
#" \/\/--´|/`--´ "#,
|
2023-02-26 04:58:47 -05:00
|
|
|
|
#" ||---,-, \ "#,
|
|
|
|
|
#" `´ (--) | "#,
|
2022-04-11 08:09:37 -04:00
|
|
|
|
#" (---) | "#]
|
|
|
|
|
|
|
|
|
|
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
|
2023-01-08 14:44:25 -05:00
|
|
|
|
tm : Term Three 1 2
|
2021-07-20 16:05:19 -04:00
|
|
|
|
tm =
|
2023-02-26 04:58:22 -05:00
|
|
|
|
(Pi_ One "a" (BVT 0) (E (F "F" :@@ [BVT 0, FT "w"]))
|
2021-12-23 09:52:56 -05:00
|
|
|
|
`DCloT` (K One ::: id))
|
2023-03-13 22:22:26 -04:00
|
|
|
|
`CloT` (F "y" ::: TYPE 1 :# TYPE 2 ::: id)
|
2021-07-20 16:05:19 -04:00
|
|
|
|
|
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
|
2023-03-15 10:42:28 -04:00
|
|
|
|
prettyIODef @{TermSubst True} tm
|
|
|
|
|
prettyIODef @{TermSubst True} $ fst $ pushSubsts tm
|
|
|
|
|
prettyIODef tm
|