export infix

This commit is contained in:
rhiannon morris 2024-05-05 19:41:06 +02:00
parent 01e16e20e5
commit 3e23929b5f
11 changed files with 14 additions and 16 deletions

View file

@ -3,8 +3,8 @@ module Quox.BoolExtra
import public Data.Bool import public Data.Bool
infixr 5 `andM` export infixr 5 `andM`
infixr 4 `orM` export infixr 4 `orM`
public export public export
andM, orM : Monad m => m Bool -> m Bool -> m Bool andM, orM : Monad m => m Bool -> m Bool -> m Bool

View file

@ -158,12 +158,12 @@ getWith : (forall from, to. tm from -> Shift from to -> tm to) ->
Context tm len -> Var len -> tm len Context tm len -> Var len -> tm len
getWith shft = getShiftWith shft SZ getWith shft = getShiftWith shft SZ
infixl 8 !! export infixl 8 !!
public export %inline public export %inline
(!!) : CanShift tm => Context tm len -> Var len -> tm len (!!) : CanShift tm => Context tm len -> Var len -> tm len
(!!) = getWith (//) (!!) = getWith (//)
infixl 8 !!! export infixl 8 !!!
public export %inline public export %inline
(!!!) : Context' tm len -> Var len -> tm (!!!) : Context' tm len -> Var len -> tm
(!!!) = getWith const (!!!) = getWith const
@ -206,7 +206,7 @@ parameters {auto _ : Applicative f}
traverse' : (a -> f b) -> Telescope' a from to -> f (Telescope' b from to) traverse' : (a -> f b) -> Telescope' a from to -> f (Telescope' b from to)
traverse' f = traverse f traverse' f = traverse f
infixl 3 `app` export infixl 3 `app`
||| like `(<*>)` but with effects ||| like `(<*>)` but with effects
export export
app : Telescope (\n => tm1 n -> f (tm2 n)) from to -> app : Telescope (\n => tm1 n -> f (tm2 n)) from to ->

View file

@ -108,7 +108,7 @@ extendL : Loc -> Loc -> Loc
extendL l1 l2 = l1 `extend'` l2.bounds extendL l1 l2 = l1 `extend'` l2.bounds
infixr 1 `or_`, `or` export infixr 1 `or_`, `or`
export %inline export %inline
or_ : Loc_ -> Loc_ -> Loc_ or_ : Loc_ -> Loc_ -> Loc_
or_ l1@(YesLoc {}) _ = l1 or_ l1@(YesLoc {}) _ = l1

View file

@ -163,7 +163,7 @@ record LogMsg where
level : Nat level : Nat
{auto 0 levelOk : IsLogLevel level} {auto 0 levelOk : IsLogLevel level}
message : Lazy LogDoc message : Lazy LogDoc
infix 0 :> export infix 0 :>
%name Log.LogMsg msg %name Log.LogMsg msg
public export public export

View file

@ -43,7 +43,7 @@ parameters {0 a, b : Bool}
noOr2 = snd . noOr noOr2 = snd . noOr
infixr 1 `orNo` export infixr 1 `orNo`
export %inline export %inline
orNo : No a -> No b -> No (a || b) orNo : No a -> No b -> No (a || b)
orNo Ah Ah = Ah orNo Ah Ah = Ah

View file

@ -123,7 +123,7 @@ equal ZeroIsOne p q = True
equal (C eqs) p q = get eqs p == get eqs q equal (C eqs) p q = get eqs p == get eqs q
infixl 7 :<? export infixl 7 :<?
export %inline export %inline
(:<?) : DimEq d -> Maybe (Dim d) -> DimEq (S d) (:<?) : DimEq d -> Maybe (Dim d) -> DimEq (S d)
ZeroIsOne :<? d = ZeroIsOne ZeroIsOne :<? d = ZeroIsOne

View file

@ -227,7 +227,7 @@ compViaNatCorrect by (SS bz) =
%transform "Shift.(.)" Shift.(.) = compViaNat %transform "Shift.(.)" Shift.(.) = compViaNat
infixl 8 // export infixl 8 //
public export public export
interface CanShift f where interface CanShift f where
(//) : f from -> Shift from to -> f to (//) : f from -> Shift from to -> f to

View file

@ -20,7 +20,7 @@ data Subst : (Nat -> Type) -> Nat -> Nat -> Type where
(:::) : (t : Lazy (env to)) -> Subst env from to -> Subst env (S from) to (:::) : (t : Lazy (env to)) -> Subst env from to -> Subst env (S from) to
%name Subst th, ph, ps %name Subst th, ph, ps
infixr 7 !::: export infixr 7 !:::
||| in case the automatic laziness insertion gets confused ||| in case the automatic laziness insertion gets confused
public export public export
(!:::) : env to -> Subst env from to -> Subst env (S from) to (!:::) : env to -> Subst env from to -> Subst env (S from) to
@ -42,7 +42,7 @@ export Ord (f to) => Ord (Subst f from to) where compare = compare `on` repr
export Show (f to) => Show (Subst f from to) where show = show . repr export Show (f to) => Show (Subst f from to) where show = show . repr
infixl 8 // export infixl 8 //
public export public export
interface FromVar term => CanSubstSelf term where interface FromVar term => CanSubstSelf term where
(//) : term from -> Lazy (Subst term from to) -> term to (//) : term from -> Lazy (Subst term from to) -> term to

View file

@ -47,8 +47,6 @@ TagVal : Type
TagVal = String TagVal = String
infixl 8 :#
infixl 9 :@, :%
mutual mutual
public export public export
TSubst : TSubstLike TSubst : TSubstLike

View file

@ -4,7 +4,7 @@ import Quox.Syntax
import Quox.Parser.Syntax import Quox.Parser.Syntax
import Quox.Typing.Context import Quox.Typing.Context
prefix 9 ^ export prefix 9 ^
public export public export
(^) : (Loc -> a) -> a (^) : (Loc -> a) -> a
(^) a = a noLoc (^) a = a noLoc

View file

@ -24,7 +24,7 @@ parameters (ds : BContext d) (ns : BContext n)
testPrettyE1 e str {label} = testPrettyT1 (E e) str {label} testPrettyE1 e str {label} = testPrettyT1 (E e) str {label}
prefix 9 ^ export prefix 9 ^
(^) : (Loc -> a) -> a (^) : (Loc -> a) -> a
(^) a = a noLoc (^) a = a noLoc