Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
a9616b68
Commit
a9616b68
authored
2 months ago
by
Maxime Jacquemin
Browse files
Options
Downloads
Patches
Plain Diff
[Kernel] Typos
Credit to Virgile Prevosto
parent
188bee07
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/libraries/monads/monad.mli
+5
-5
5 additions, 5 deletions
src/libraries/monads/monad.mli
with
5 additions
and
5 deletions
src/libraries/monads/monad.mli
+
5
−
5
View file @
a9616b68
...
@@ -203,7 +203,7 @@ end
...
@@ -203,7 +203,7 @@ end
Those functors provide a way to extend a minimal signature into a full
Those functors provide a way to extend a minimal signature into a full
monad that satisfies the signatures defined above. This is possible
monad that satisfies the signatures defined above. This is possible
because one can define
s
operations from one monadic definition
because one can define operations from one monadic definition
using the operations required by the others. Indeed :
using the operations required by the others. Indeed :
1. ∀m:('a t), ∀f:('a -> 'b), [map f m ≣ bind (fun x -> return (f x)) m]
1. ∀m:('a t), ∀f:('a -> 'b), [map f m ≣ bind (fun x -> return (f x)) m]
...
@@ -236,7 +236,7 @@ module Make_based_on_map_with_product (M : Based_on_map_with_product) :
...
@@ -236,7 +236,7 @@ module Make_based_on_map_with_product (M : Based_on_map_with_product) :
(** {3 Detailled explanations and category theory}
(** {3 Detailled explanations and category theory}
To be pedantic, the map based approach defines a monad as a categoric
To be pedantic, the map based approach defines a monad as a categoric
functor equipped with two natural transformations. This does sound
s
functor equipped with two natural transformations. This does sound
frightening but this breaks down to rather simple concepts.
frightening but this breaks down to rather simple concepts.
Let's start at the beginning. A category is just a collection of objets
Let's start at the beginning. A category is just a collection of objets
...
@@ -252,13 +252,13 @@ module Make_based_on_map_with_product (M : Based_on_map_with_product) :
...
@@ -252,13 +252,13 @@ module Make_based_on_map_with_product (M : Based_on_map_with_product) :
between the objets ['a] and ['b]. As functions are naturally associative
between the objets ['a] and ['b]. As functions are naturally associative
and, for any type ['a], one can trivially defines the identity function
and, for any type ['a], one can trivially defines the identity function
['a -> 'a], one can conclude that types along with all functions of
['a -> 'a], one can conclude that types along with all functions of
arit
h
y one forms a category.
arity one forms a category.
Next, there is the idea of functors. In the category theory, a functor
Next, there is the idea of functors. In the category theory, a functor
is a mapping between categories. That means that, given two categories
is a mapping between categories. That means that, given two categories
[A] and [B], a functor maps all objects of [A] to an object of [B] and
[A] and [B], a functor maps all objects of [A] to an object of [B] and
maps a
ll
morphism
s
of [A] into a morphi
m
s of [B]. But, not all mappings
maps a
ny
morphism of [A] into a morphis
m
of [B]. But, not all mappings
are functors. Indeed, to be a valid functor, one as to preserve the
are functors. Indeed, to be a valid functor, one
h
as to preserve the
identity morphisms and the composition of morphims.
identity morphisms and the composition of morphims.
The idea of functors can also be seen in a type systems. At least, the
The idea of functors can also be seen in a type systems. At least, the
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment