quox/lib/Quox/Syntax/Universe.idr

24 lines
516 B
Idris
Raw Normal View History

2021-07-20 16:05:19 -04:00
module Quox.Syntax.Universe
import Quox.Pretty
import Data.Fin
2022-05-02 16:40:28 -04:00
import Generics.Derive
2021-07-20 16:05:19 -04:00
%default total
2022-05-02 16:40:28 -04:00
%language ElabReflection
2021-07-20 16:05:19 -04:00
||| `UAny` doesn't show up in programs, but when checking something is
||| just some type (e.g. in a signature) it's checked against `Star UAny`
public export
data Universe = U Nat | UAny
%name Universe l
2022-05-02 16:40:28 -04:00
%runElab derive "Universe" [Generic, Meta, Eq, Ord, DecEq, Show]
2021-07-20 16:05:19 -04:00
export
PrettyHL Universe where
prettyM UAny = pure $ hl Delim "_"
prettyM (U l) = pure $ hl Free $ pretty l