27 lines
625 B
Idris
27 lines
625 B
Idris
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 =
|
||
prettyTerm [<] [<] $
|
||
Pi One (IOState noLoc)
|
||
(SN $ Sig (Enum (fromList [!(ifUnicode "𝑎" "a")]) noLoc)
|
||
(SN (IOState noLoc)) noLoc) noLoc
|