From 8f44572b595d85284ac21befbb58db9178edb48b Mon Sep 17 00:00:00 2001 From: Andy White Date: Mon, 26 Aug 2019 23:35:06 -0600 Subject: [PATCH] Fix a few typos --- docs/Conventions.md | 2 +- docs/FAQ.md | 10 +++++----- docs/index.html | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/Conventions.md b/docs/Conventions.md index 4c1adf88..d6d120d1 100644 --- a/docs/Conventions.md +++ b/docs/Conventions.md @@ -36,7 +36,7 @@ This pattern of defining typeclasses instances and then including the correspond ## First-class modules -ReasonML/OCaml does not support implement typeclass isntance 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. +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. 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`. diff --git a/docs/FAQ.md b/docs/FAQ.md index 74b5181f..8219378a 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -6,8 +6,8 @@ There are some issues open for exploring the possibility of compiling on the native OCaml environment. - - [bs-abstract native compilation issue](https://github.com/Risto-Stevcev/bs-abstract/issues/13) - - [Relude native compilation issue](https://github.com/reazen/relude/issues/133) +- [bs-abstract native compilation issue](https://github.com/Risto-Stevcev/bs-abstract/issues/13) +- [Relude native compilation issue](https://github.com/reazen/relude/issues/133) ## Why does `Relude` use peer dependencies for everything, rather than hard production dependencies? @@ -32,10 +32,10 @@ If you are trying to compile and get an error like: This has type array(t) but somewhere wanted BsAbstract.Array.Foldable.t(string)` ``` -you likely need to add `bs-abstract` to your `bs-dependencies` in your `bsconfig.json` file. This error occurs because BuckleScript is not able to find the types defined in the `BsAbstract` module, so it can't determine that `array(t)` is the same type as `BsAbstract.Array.Foldabe.t(string)`. +you likely need to add `bs-abstract` to your `bs-dependencies` in your `bsconfig.json` file. This error occurs because BuckleScript is not able to find the types defined in the `BsAbstract` module, so it can't determine that `array(t)` is the same type as `BsAbstract.Array.Foldable.t(string)`. -Since we are not using .rei interface files, we are not able to abstract these types away for functions that get included into our implementation modules. (See .rei topic below). +Because we are not using .rei interface files, we are not able to abstract these types away for functions that get included into our implementation modules. (See .rei topic below). ## Why doesn't `Relude` have interface (.rei) files? -`Relude` relies heavily on the module [include](https://reasonml.github.io/docs/en/module#extending-modules) capability of ReasonML/OCaml. Many of the typeclasses in `Relude` have extension modules that can be `include`d into your module to add a variety of useful utility functions, operators, and extension modules to your host module "for free," simply because you've taken the time to create an instance of a given typeclass. Since there are lots of functions automatically added to many modules, it becomes difficult to maintain good .rei files which include documentation and more specialized type annotations. Until we have a maintainable solution to this challenge, we are avoiding the use of .rei files. +e`Relude` relies heavily on the module [include](https://reasonml.github.io/docs/en/module#extending-modules) capability of ReasonML/OCaml. Many of the typeclasses in `Relude` have extension modules that can be `include`'d into your module to add a variety of useful utility functions, operators, and extension modules to your host module "for free," simply because you've taken the time to create an instance of a given typeclass. Because there are lots of functions automatically added to many modules, it becomes difficult to maintain good .rei files which expose all of these automatically added functions, while at the same time including documentation and more specialized type annotations. Until we have a maintainable solution for this challenge, we are avoiding the use of .rei files. diff --git a/docs/index.html b/docs/index.html index 544232a8..0534ae07 100644 --- a/docs/index.html +++ b/docs/index.html @@ -33,6 +33,9 @@ autoHeader: true, subMaxLevel: 2, + // Auto scroll + auto2top: true, + // Plugins plugins: [ ]