%inline, etc
This commit is contained in:
parent
46b29b8e72
commit
13b173322b
1 changed files with 8 additions and 9 deletions
|
@ -40,8 +40,8 @@ hlRepr Qty = 6
|
||||||
hlRepr Free = 7
|
hlRepr Free = 7
|
||||||
hlRepr Syntax = 8
|
hlRepr Syntax = 8
|
||||||
|
|
||||||
export Eq HL where (==) = (==) `on` hlRepr
|
export %inline Eq HL where (==) = (==) `on` hlRepr
|
||||||
export Ord HL where compare = compare `on` hlRepr
|
export %inline Ord HL where compare = compare `on` hlRepr
|
||||||
|
|
||||||
|
|
||||||
public export
|
public export
|
||||||
|
@ -52,7 +52,7 @@ data PPrec
|
||||||
-- ...
|
-- ...
|
||||||
| App -- term/dimension application
|
| App -- term/dimension application
|
||||||
| SApp -- substitution application
|
| SApp -- substitution application
|
||||||
| Arg
|
| Arg -- argument to nonfix function
|
||||||
|
|
||||||
private PrecRepr : Type
|
private PrecRepr : Type
|
||||||
PrecRepr = Nat
|
PrecRepr = Nat
|
||||||
|
@ -66,8 +66,8 @@ precRepr App = 98
|
||||||
precRepr SApp = 99
|
precRepr SApp = 99
|
||||||
precRepr Arg = 100
|
precRepr Arg = 100
|
||||||
|
|
||||||
export Eq PPrec where (==) = (==) `on` precRepr
|
export %inline Eq PPrec where (==) = (==) `on` precRepr
|
||||||
export Ord PPrec where compare = compare `on` precRepr
|
export %inline Ord PPrec where compare = compare `on` precRepr
|
||||||
|
|
||||||
|
|
||||||
export %inline
|
export %inline
|
||||||
|
@ -128,7 +128,7 @@ record PrettyEnv where
|
||||||
||| surrounding precedence level
|
||| surrounding precedence level
|
||||||
prec : PPrec
|
prec : PPrec
|
||||||
|
|
||||||
public export %inline HasEnv : (Type -> Type) -> Type
|
public export HasEnv : (Type -> Type) -> Type
|
||||||
HasEnv = MonadReader PrettyEnv
|
HasEnv = MonadReader PrettyEnv
|
||||||
|
|
||||||
export %inline
|
export %inline
|
||||||
|
@ -147,9 +147,8 @@ public export data BinderSort = T | D
|
||||||
|
|
||||||
export %inline
|
export %inline
|
||||||
under : HasEnv m => BinderSort -> Name -> m a -> m a
|
under : HasEnv m => BinderSort -> Name -> m a -> m a
|
||||||
under s x = local $
|
under T x = local {prec := Outer, tnames $= (x ::)}
|
||||||
{prec := Outer} .
|
under D x = local {prec := Outer, dnames $= (x ::)}
|
||||||
(case s of T => {tnames $= (x ::)}; D => {dnames $= (x ::)})
|
|
||||||
|
|
||||||
|
|
||||||
public export
|
public export
|
||||||
|
|
Loading…
Reference in a new issue