2024-04-14 09:48:43 -04:00
|
|
|
|
module Quox.Syntax.Builtin
|
|
|
|
|
|
|
|
|
|
import Derive.Prelude
|
|
|
|
|
import Quox.PrettyValExtra
|
|
|
|
|
import Quox.Pretty
|
|
|
|
|
import Quox.Syntax.Term
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%default total
|
|
|
|
|
%language ElabReflection
|
|
|
|
|
|
|
|
|
|
public export
|
|
|
|
|
data Builtin
|
|
|
|
|
= Main
|
|
|
|
|
%runElab derive "Builtin" [Eq, Ord, Show, PrettyVal]
|
|
|
|
|
|
|
|
|
|
public export
|
|
|
|
|
builtinDesc : Builtin -> String
|
|
|
|
|
builtinDesc Main = "a function declared as #[main]"
|
|
|
|
|
|
|
|
|
|
public export
|
|
|
|
|
builtinTypeDoc : {opts : LayoutOpts} -> Builtin -> Eff Pretty (Doc opts)
|
|
|
|
|
builtinTypeDoc Main =
|
2024-05-27 15:28:22 -04:00
|
|
|
|
prettyTerm empty $
|
|
|
|
|
Pi {q = 0} (one noLoc) (IOState noLoc)
|
2024-04-14 09:48:43 -04:00
|
|
|
|
(SN $ Sig (Enum (fromList [!(ifUnicode "𝑎" "a")]) noLoc)
|
|
|
|
|
(SN (IOState noLoc)) noLoc) noLoc
|