Skip to content

Commit 390aa85

Browse files
committed
Fix broken documentation links (fixes #352)
- Fix Relude_Globals link in src/Relude.re from '../Relude_Globals' to './Relude_Globals' - Update Real World OCaml link in docs/Conventions.md from v1 to current dev version
1 parent 1a1f41b commit 390aa85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/Conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This pattern of defining typeclasses instances and then including the correspond
3838

3939
ReasonML/OCaml does not support implicit typeclass resolution like Haskell, Purescript, and Scala. This is a bummer, because it puts some roadblocks in the way of seamlessly using the typeclass infrastructure that is provided by `Relude`. For example, in `Haskell`, you can use the `>>=` (`bind`) operator anywhere you want, as long as the compiler can find a `Monad` instance for the type in question somewhere in scope. In ReasonML/OCaml, there is no ad-hoc polymorphism, so you can't just use operators and functions from typeclasses like you can in Haskell and Purescript.
4040

41-
Instead, ReasonML/OCaml provides the concept of [first-class modules](https://v1.realworldocaml.org/v1/en/html/first-class-modules.html). This allows you to pass actual OCaml modules into functions, which gives you the same power of abstraction as typeclasses, but without the implicit (automatic) resolution. "First-class modules" can be a bit brain-bending at first, but it becomes more clear when demonstrated with simpler typeclasses like `SHOW` or `EQ`.
41+
Instead, ReasonML/OCaml provides the concept of [first-class modules](https://dev.realworldocaml.org/first-class-modules.html). This allows you to pass actual OCaml modules into functions, which gives you the same power of abstraction as typeclasses, but without the implicit (automatic) resolution. "First-class modules" can be a bit brain-bending at first, but it becomes more clear when demonstrated with simpler typeclasses like `SHOW` or `EQ`.
4242

4343
## `*By` functions as an alternative to first-class modules
4444

src/Relude.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ the [Array] module provided by the OCaml stdlib.
1313
In many cases, however, you {e will} want to shadow the existing stdlib modules
1414
with their Relude equivalents. In this case, you could [open Relude;] but doing
1515
so may shadow more than you want (e.g. the [Js] module provided by Melange will
16-
also be shadowed). See {{: Relude_Globals} [Relude.Globals]} for a better
16+
also be shadowed). See {{: ./Relude_Globals} [Relude.Globals]} for a better
1717
solution.
1818
|}
1919
];

0 commit comments

Comments
 (0)