# Manual: caml_example for language extensions #939

Merged
merged 7 commits into from Nov 29, 2016

## Conversation

Projects
None yet
3 participants
Contributor

### Octachron commented Nov 28, 2016

 This PR proposes to use the caml_example pseudo-environment in the language extension section of the manual. This section already contains handwritten code example that mimics the output style of the caml_example pseudo-environment. Moreover, the protection against unexpected errors and warnings in #693 should make safer the use of these environment in this part of the documentation. The first commit in this PR simply add the possibility to use these environment in exten.etex. The second and third commit convert some examples that were already using handwritten \caml … \endcaml environment and related verbatim environment. The last commit is (probably) partially unrelated but fixes a missing font-family:monospace style declaration in the generated html − and removes an unneeded hack.
 Activate caml_example for refman/exten.etex 
 eae2b13 

Merged

Member

### gasche commented Nov 28, 2016

 This is very nice, and it's enough work that I think there should be a Change entry. One thing you could do is to merge it with the entry for #693.

Member

### gasche commented Nov 28, 2016

 (To clarify my thinking a bit, I think some software projects have or give the unfortunate impression that changes to the documentation are of lesser value than changes to the program code. We don't want to do that; in particular, we should not let the people that take some much-needed care of the manual self-censor themselves by downsizing the effort involved.)

### lavib reviewed Nov 29, 2016

manual/manual/refman/exten.etex
 \endcaml polymorphic: \begin{caml_example}[error] let id: 'a. 'a -> 'a = fun x -> x

#### lavib Nov 29, 2016

This should be keep fun x -> x+1

#### Octachron Nov 29, 2016

Contributor

Nice catch! Thanks.

As a side-note, the crucial error here was the missing ;; at the end of the caml_example
that circumvented the status detection for the caml_example. This is fixed in the new version
of the PR.

### Octachron added some commits Nov 9, 2016

 Inline css update for manual 
 68354a5 
 Convert handwritten code examples to caml_example 
 c627350 
 caml_example: convert example linked to verbatim 
 862e276 
 Delete \tq macro 
 20f1406 
 Detect missing ;; at the end of caml examples 
 ac8077c 
 GPR#939: Changes 
 a57a5d4 
Contributor

### Octachron commented Nov 29, 2016

 I have added an item to the Changelog in the manual section: I thought it will be better for readability to not group together changes with quite different objects; even if they share a common internal purpose. I have also added a missing double semi-colon detection logic for caml_example environments. Otherwise, such error could circumvent the output status check and lead to discarded code phrase.
Member

### gasche commented Nov 29, 2016

 @lavib if you wanted to be credited as a reviewer in the Changelog, which name would you prefer us to use? (Usually we use real-name-looking names, but some people have other preferences.) Did you review the whole PR, or just randomly peeked and saw this one issue?

### lavib commented Nov 29, 2016

 No needs to credit me, thanks. It was just a quick & incomplete review. 2016-11-29 19:42 GMT+01:00 Gabriel Scherer : … @lavib if you wanted to be credited as a reviewer in the Changelog, which name would you prefer us to use? (Usually we use real-name-looking names, but some people have other preferences.) Did you review the whole PR, or just randomly peeked and saw this one issue? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#939 (comment)>, or mute the thread .

### gasche merged commit 4c04dee into ocaml:trunk Nov 29, 2016 2 checks passed

#### 2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Member

### gasche commented Nov 29, 2016 • edited Edited 1 time gasche edited Nov 29, 2016 (most recent)

 Ok, I went ahead and merged then. Thanks for the nice work!

Open

### camlspotter pushed a commit to camlspotter/ocaml that referenced this pull request Oct 17, 2017

 Merge pull request #939 from Octachron/manual_camlexample_for_exten 
Manual: caml_example for language extensions
 d8c72a9