export infix
This commit is contained in:
parent
01e16e20e5
commit
3e23929b5f
11 changed files with 14 additions and 16 deletions
|
@ -3,8 +3,8 @@ module Quox.BoolExtra
|
|||
import public Data.Bool
|
||||
|
||||
|
||||
infixr 5 `andM`
|
||||
infixr 4 `orM`
|
||||
export infixr 5 `andM`
|
||||
export infixr 4 `orM`
|
||||
|
||||
public export
|
||||
andM, orM : Monad m => m Bool -> m Bool -> m Bool
|
||||
|
|
|
@ -158,12 +158,12 @@ getWith : (forall from, to. tm from -> Shift from to -> tm to) ->
|
|||
Context tm len -> Var len -> tm len
|
||||
getWith shft = getShiftWith shft SZ
|
||||
|
||||
infixl 8 !!
|
||||
export infixl 8 !!
|
||||
public export %inline
|
||||
(!!) : CanShift tm => Context tm len -> Var len -> tm len
|
||||
(!!) = getWith (//)
|
||||
|
||||
infixl 8 !!!
|
||||
export infixl 8 !!!
|
||||
public export %inline
|
||||
(!!!) : Context' tm len -> Var len -> tm
|
||||
(!!!) = getWith const
|
||||
|
@ -206,7 +206,7 @@ parameters {auto _ : Applicative f}
|
|||
traverse' : (a -> f b) -> Telescope' a from to -> f (Telescope' b from to)
|
||||
traverse' f = traverse f
|
||||
|
||||
infixl 3 `app`
|
||||
export infixl 3 `app`
|
||||
||| like `(<*>)` but with effects
|
||||
export
|
||||
app : Telescope (\n => tm1 n -> f (tm2 n)) from to ->
|
||||
|
|
|
@ -108,7 +108,7 @@ extendL : Loc -> Loc -> Loc
|
|||
extendL l1 l2 = l1 `extend'` l2.bounds
|
||||
|
||||
|
||||
infixr 1 `or_`, `or`
|
||||
export infixr 1 `or_`, `or`
|
||||
export %inline
|
||||
or_ : Loc_ -> Loc_ -> Loc_
|
||||
or_ l1@(YesLoc {}) _ = l1
|
||||
|
|
|
@ -163,7 +163,7 @@ record LogMsg where
|
|||
level : Nat
|
||||
{auto 0 levelOk : IsLogLevel level}
|
||||
message : Lazy LogDoc
|
||||
infix 0 :>
|
||||
export infix 0 :>
|
||||
%name Log.LogMsg msg
|
||||
|
||||
public export
|
||||
|
|
|
@ -43,7 +43,7 @@ parameters {0 a, b : Bool}
|
|||
noOr2 = snd . noOr
|
||||
|
||||
|
||||
infixr 1 `orNo`
|
||||
export infixr 1 `orNo`
|
||||
export %inline
|
||||
orNo : No a -> No b -> No (a || b)
|
||||
orNo Ah Ah = Ah
|
||||
|
|
|
@ -123,7 +123,7 @@ equal ZeroIsOne p q = True
|
|||
equal (C eqs) p q = get eqs p == get eqs q
|
||||
|
||||
|
||||
infixl 7 :<?
|
||||
export infixl 7 :<?
|
||||
export %inline
|
||||
(:<?) : DimEq d -> Maybe (Dim d) -> DimEq (S d)
|
||||
ZeroIsOne :<? d = ZeroIsOne
|
||||
|
|
|
@ -227,7 +227,7 @@ compViaNatCorrect by (SS bz) =
|
|||
%transform "Shift.(.)" Shift.(.) = compViaNat
|
||||
|
||||
|
||||
infixl 8 //
|
||||
export infixl 8 //
|
||||
public export
|
||||
interface CanShift f where
|
||||
(//) : f from -> Shift from to -> f to
|
||||
|
|
|
@ -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
|
||||
%name Subst th, ph, ps
|
||||
|
||||
infixr 7 !:::
|
||||
export infixr 7 !:::
|
||||
||| in case the automatic laziness insertion gets confused
|
||||
public export
|
||||
(!:::) : 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
|
||||
|
||||
|
||||
infixl 8 //
|
||||
export infixl 8 //
|
||||
public export
|
||||
interface FromVar term => CanSubstSelf term where
|
||||
(//) : term from -> Lazy (Subst term from to) -> term to
|
||||
|
|
|
@ -47,8 +47,6 @@ TagVal : Type
|
|||
TagVal = String
|
||||
|
||||
|
||||
infixl 8 :#
|
||||
infixl 9 :@, :%
|
||||
mutual
|
||||
public export
|
||||
TSubst : TSubstLike
|
||||
|
|
|
@ -4,7 +4,7 @@ import Quox.Syntax
|
|||
import Quox.Parser.Syntax
|
||||
import Quox.Typing.Context
|
||||
|
||||
prefix 9 ^
|
||||
export prefix 9 ^
|
||||
public export
|
||||
(^) : (Loc -> a) -> a
|
||||
(^) a = a noLoc
|
||||
|
|
|
@ -24,7 +24,7 @@ parameters (ds : BContext d) (ns : BContext n)
|
|||
testPrettyE1 e str {label} = testPrettyT1 (E e) str {label}
|
||||
|
||||
|
||||
prefix 9 ^
|
||||
export prefix 9 ^
|
||||
(^) : (Loc -> a) -> a
|
||||
(^) a = a noLoc
|
||||
|
||||
|
|
Loading…
Reference in a new issue