fix typos

This commit is contained in:
André Videla 2024-02-24 12:21:24 +00:00
parent 8ea1a092e0
commit 7c70762f25

View File

@ -151,7 +151,7 @@ looks like
main = do print (a &&& b) -- won't work main = do print (a &&& b) -- won't work
print ((&&&) a b) -- ok print ((&&&) a b) -- ok
In what follows we have two examples of programs that benefit from In what follows, we have two examples of programs that benefit from
declaring a fixity ``private`` rather than ``export``. declaring a fixity ``private`` rather than ``export``.
Private record fixity pattern Private record fixity pattern
@ -181,7 +181,7 @@ as a binary infix operator impossible, since it now has 3 arguments.
natRel : Nat -> Nat -> Type natRel : Nat -> Nat -> Type
natRel x y = (<@>) lteRel x y natRel x y = (<@>) lteRel x y
What we really want to write is ``natRel x y = <@> x y`` but What we really want to write is ``natRel x y = (<@>) x y`` but
``(<@>)`` now has type ``SomeRelation a -> a -> a -> Type``. ``(<@>)`` now has type ``SomeRelation a -> a -> a -> Type``.
The solution is to define a private field with a private fixity The solution is to define a private field with a private fixity
@ -291,8 +291,8 @@ Autobind Operators
Typebind operators allow to bind a *type* on the left side of an operator, so that is can Typebind operators allow to bind a *type* on the left side of an operator, so that is can
be used as the index of the second argument. But sometimes, there is no dependency be used as the index of the second argument. But sometimes, there is no dependency
between the first and second argument, yet we still want to use binding sytnax. For those between the first and second argument, yet we still want to use binding syntax. For those
case, we use ``autobind``. cases, we use ``autobind``.
An example of this is a DSL for a dependently-typed programming language An example of this is a DSL for a dependently-typed programming language
where the constructor for ``Pi`` takes terms on the left and lambdas on the right: where the constructor for ``Pi`` takes terms on the left and lambdas on the right:
@ -326,7 +326,7 @@ For this we use ``:=`` instead of ``:``:
(sndTy := (_ := fstTy) =>> VStar) =>> (sndTy := (_ := fstTy) =>> VStar) =>>
(val1 := fstTy) =>> (val1 := fstTy) =>>
(val2 := sndTy `vapp` val1) =>> (val2 := sndTy `vapp` val1) =>>
VSgima fstTy sndTy VSigma fstTy sndTy
This new syntax is much closer to what the code is meant to look like for users This new syntax is much closer to what the code is meant to look like for users
accustomed to dependently-typed programming languages. accustomed to dependently-typed programming languages.