Skip to content

Commit 9bf613b

Browse files
committed
Merge branch 'master' into experimental
2 parents 7554f5a + 68eb743 commit 9bf613b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

fix-whitespace.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ included-dirs:
33
- README
44

55
included-files:
6-
- "**.agda"
7-
- "**.md"
6+
- "*.agda"
7+
- "*.md"
88
- ".travis.yml"
99

1010
excluded-files:

src/Function/Base.agda

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ _∘_ : ∀ {A : Set a} {B : A → Set b} {C : {x : A} → B x → Set c} →
4949
( {x} (y : B x) C y) (g : (x : A) B x)
5050
((x : A) C (g x))
5151
f ∘ g = λ x f (g x)
52+
{-# INLINE _∘_ #-}
5253

5354
-- Flipping order of arguments
5455

5556
flip : {A : Set a} {B : Set b} {C : A B Set c}
5657
((x : A) (y : B) C x y) ((y : B) (x : A) C x y)
5758
flip f = λ y x f x y
59+
{-# INLINE flip #-}
5860

5961
-- Application - note that _$_ is right associative, as in Haskell.
6062
-- If you want a left associative infix application operator, use
@@ -63,6 +65,7 @@ flip f = λ y x → f x y
6365
_$_ : {A : Set a} {B : A Set b}
6466
((x : A) B x) ((x : A) B x)
6567
f $ x = f x
68+
{-# INLINE _$_ #-}
6669

6770
-- Strict (call-by-value) application
6871

@@ -75,6 +78,7 @@ _$!_ = flip force
7578
_|>_ : {A : Set a} {B : A Set b}
7679
(a : A) ( a B a) B a
7780
_|>_ = flip _$_
81+
{-# INLINE _|>_ #-}
7882

7983
-- The S combinator - written infix as in Conor McBride's paper
8084
-- "Outrageous but Meaningful Coincidences: Dependent type-safe syntax
@@ -85,21 +89,25 @@ _ˢ_ : ∀ {A : Set a} {B : A → Set b} {C : (x : A) → B x → Set c} →
8589
(g : (x : A) B x)
8690
((x : A) C x (g x))
8791
f ˢ g = λ x f x (g x)
92+
{-# INLINE _ˢ_ #-}
8893

8994
-- Converting between implicit and explicit function spaces.
9095

9196
_$- : {A : Set a} {B : A Set b} ((x : A) B x) ({x : A} B x)
9297
f $- = f _
98+
{-# INLINE _$- #-}
9399

94100
λ- : {A : Set a} {B : A Set b} ({x : A} B x) ((x : A) B x)
95101
λ- f = λ x f
102+
{-# INLINE λ- #-}
96103

97104
-- Case expressions (to be used with pattern-matching lambdas, see
98105
-- README.Case).
99106

100107
case_return_of_ : {A : Set a} (x : A) (B : A Set b)
101108
((x : A) B x) B x
102109
case x return B of f = f x
110+
{-# INLINE case_return_of_ #-}
103111

104112
------------------------------------------------------------------------
105113
-- Non-dependent versions of dependent operations
@@ -140,6 +148,7 @@ _|>′_ = _|>_
140148

141149
case_of_ : A (A B) B
142150
case x of f = case x return _ of f
151+
{-# INLINE case_of_ #-}
143152

144153
------------------------------------------------------------------------
145154
-- Operations that are only defined for non-dependent functions

0 commit comments

Comments
 (0)