Commit Graph

71 Commits

Author SHA1 Message Date
Stig Brautaset
4c24c9eca7
docs: Fix typo in language guide (#1426) 2022-08-14 09:46:41 +02:00
Veit Heller
0188264463
feat: add compiler error on maximum sumtype constructors (#1319) 2021-09-18 08:49:19 +02:00
Veit Heller
39b1e8e5fa
docs: add pattern limitations (#1268)
* docs: add pattern limitations

* docs: incorporate feedback by @guberathome into pattern limitations
2021-07-02 10:41:49 +02:00
guberathome
e9537a8ba9
PR: additional local documentation as html (#1229)
* docs: implemented python script to convert local documentation from .md files to .html files

* docs: filled index.md; reviewed all references in .md files

* docs: updated Embedded.md and resized carp_on_arduboy.jpg to sensible width

* docs: copy sub folders (./docs/core and ./docs/sdl) to ./docs-html/ and refer docu to it

* docs: phrased requirements more clearly

* docs: generate docs for Standard libraries before converting .md docs to .html

* docs: change index to markdown lists

* docs: index.md worked around limitation in md converter

* docs: removed modules count from Libraries.md

Co-authored-by: guberatsie <gunnar.bernhardt@siemens.com>
2021-05-31 10:15:09 +02:00
Erik Svedäng
889f55fe8f
feat: Remove address (#1223)
* chore: Abuse deftemplate to get rid of Address

* chore: Avoid semicolon at end of define

* fix: address should be useable as an argument to a HOF

* chore: adapt examples to new address signature

* fix: Remove Address from typeOf

* fix: Remove more uses of Address

* fix: Remove more mentions of address in the Haskell code

* fix: Remove test that ensure you can't take the address of non-symbols

* refactor: Moved `address` to Pointer.carp

* refactor: Move address into Pointer module

Co-authored-by: Jorge Acereda <jacereda@gmail.com>
2021-05-27 22:04:46 +02:00
Tim Dévé
19c1a4c557
feat: Adds defn- and def- macros (#1174)
* refactor: Groups Dynamic together in Macros.carp

* fix: Fixes doc for `hidden` referring to the wrong symbol

* feat: Adds defn- & def- macros

Adding these macros as a shortand for declaring a def or defn and making
them `hidden` and `private`, useful to keep things internal to a module.

* test: Adds expected error output tests for def- & defn-

* refactor: Changes position of Module and Interface section in LanguageGuide

Trying to introduce concepts in the same order they are referred to in
the examples: structs > modules > interfaces.

* docs: Adds private & hidden section in the LanguageGuide
2021-03-03 08:57:36 +01:00
Efi
eb1e060f54
Documentation on Structs (#1110)
* Update LanguageGuide.md

Clarify Struct instantiation and usage.

* Update LanguageGuide.md

* Update LanguageGuide.md

* Update docs/LanguageGuide.md
2021-01-03 13:24:00 +01:00
Erik Svedäng
8336e5354f docs: Basic information about match-ref 2020-12-23 09:55:31 +01:00
Tim Dévé
6593a64a19
Adding more documentation around C Interop (#984)
* Adds C Interop documentation for Strings

* Replaces usage of triple backticks with single when used in a paragraph

* Adds link to new C Interop docs in the Language Guide

* Small tweaks to wording in C Interop doc

* Adds Array section to C Interop doc

* Adds deftemplate examples in C interop doc

* Small copy change in C interop doc

* Adds identifiers section in C interop doc
2020-11-21 21:28:42 +01:00
scottolsen
af62b6f1b8 Add docs on interfaces and implements
Interfaces are now explicitly implemented using the `implements` key
word (in the past, implementation of an interface was implicit based on
matching names and function signatures).

This commit updates the language guide to account for this change and
includes an illustrative example to provide guidance on using
interfaces.
2020-09-21 15:59:13 -04:00
xd1le
d1da7af2bc docs: fix some typos and minor grammatical errors 2020-07-26 08:30:37 +10:00
hellerve
357d28a167 core: update doc of cond 2020-05-26 21:50:26 +02:00
Bhawna Patnaik
a4950a83a3
update the examples 2020-05-26 19:38:36 +05:30
Bhawna Patnaik
22adeba664
docstring for cond 2020-05-24 23:37:10 +05:30
Bhawna Patnaik
797133e950
update cond with eg 2020-05-24 21:14:56 +05:30
Bhawna Patnaik
8bf129daa7
update cond 2020-05-24 20:11:23 +05:30
Bhawna Patnaik
e1cc0a563d
update with cond 2020-05-24 19:51:40 +05:30
Scott Olsen
40cac423aa Add small note on polymorphic constructor syntax 2020-05-10 23:46:57 -04:00
Erik Svedäng
fadfa151ba Documentation for renaming types with register-type. 2020-05-06 11:53:37 +02:00
Erik Svedäng
f9ab7df2da Byte literal explanation. 2020-04-06 08:37:43 +02:00
Erik Svedäng
3e3652ab71 Doc for Byte type. 2020-04-06 08:36:35 +02:00
GrayJack
315f419437 Docs: LanguageGuide: Add use special form 2019-11-04 06:47:42 -03:00
GrayJack
8c2c02a0be Docs; LanguageGuide: Add with special form 2019-11-04 06:23:14 -03:00
GrayJack
f7e5f4442b Docs: LanguageGuide: Show example os simplified enumeration sumtype 2019-11-04 06:13:24 -03:00
GrayJack
a4c59adfdd Docs: LanguageGuide: change match comment 2019-11-04 04:14:36 -03:00
GrayJack
6d69c6252c Docs: LanguageGuide: Fix some errors noticed by reviewer 2019-11-04 03:19:40 -03:00
GrayJack
adc131787f Docs: LanguageGuide: defdynamic, match form, algebraic types, pattern literal fix 2019-11-03 21:38:47 -03:00
Spencer King
2ee8fd4889 Fix typo in LanguageGuide
“annoted” should be “annotated”
2019-10-17 18:40:53 -05:00
Scott Olsen
65c845531b
Update with examples in Language Guide
I've updated the example code included in the `with` section to better match the style of other sample code throughout the document. Big thanks to @hellerve for pointing this out!
2019-09-11 14:15:12 -04:00
Tim Dévé
9bfaa052c2
Clarifies usage of relative-include in guide 2019-09-11 18:22:35 +01:00
Tim Dévé
a9af4becbf
Updates docs to reflect removal of local-include
Replaces reference to local-include with relative-include in the language guide

local-include was removed in https://github.com/carp-lang/Carp/pull/543
2019-09-11 10:04:18 +01:00
Scott Olsen
df75c23e2a
Document with
Added a few short sentences and samples to document the `with` form. I don't have especially robust knowledge of the form or its implementation, so please correct this/augment as necessary!
2019-09-09 16:23:30 -04:00
hellerve
e9fcf87ff5 core: remove stringcopy.append 2019-05-27 18:05:44 +02:00
Erik Svedäng
d01743e5aa
Merge pull request #435 from hellerve/fix-pattern-docs
Fix pattern docs
2019-05-16 09:42:49 +02:00
Erik Svedäng
b00816a454 Mention the in-place mutation lens generated for each struct. 2019-05-13 22:39:30 +02:00
hellerve
e7b09f8c76 docs: fix typos in language guide 2019-05-04 09:36:30 +02:00
Erik Svedäng
be1575a2b1 Mention 'fn' in language guide. 2019-03-18 09:48:10 +01:00
Christopher Nascone
4313cf1387
Change "defdynamic" to "defndynamic" in guide
Based on the docs, I expected that `defdynamic` would allow me to define and use a function at the REPL. Instead I got the following error:

```
> (defdynamic square [x]
     (* x x))
Invalid args to `defdynamic`: (defdynamic square [x] (* x x)) (did you try to define a dynamic function - use 'defndynamic' instead) at REPL:1:1.
```

Definitely props on the helpfulness of the error message, which makes this an easily overcome issue. However, I'd like to propose this change to the guide so that any other newcomers don't hit a bump the first time they try something.
2019-03-17 13:28:48 -04:00
Erik Svedäng
d48df1fd1f Example of ´the´ 2019-03-07 14:16:31 +01:00
Erik Svedäng
d09fb4d0dc English. 2019-03-07 14:14:43 +01:00
hellerve
986517097b language guide: add section on patterns 2018-12-15 15:19:36 +01:00
hellerve
f0e11fd7fe docs: add map to std types 2018-08-30 12:21:45 -07:00
Chris Hall
7c1dd210d7 Renaming: String.count -> String.length, Array.count -> Array.length
Issue #236
2018-05-23 10:03:42 +10:00
Chris Hall
b46b2a39e8 String.append is now by reference, StringCopy.append is by copy/linear
Adding memory leak tests to String.append and StringCopy.append

Issue #94
2018-05-20 14:16:10 +10:00
hellerve
5c736fd224 core: rename regex to pattern, as @RyanSquared suggested in #192 2018-03-02 15:31:26 +01:00
hellerve
f5ebade4e8 core: add regex to language guide 2018-03-01 19:21:14 +01:00
Erik Svedäng
9d243997e5 Can register a different name to use in emitted C code. 2018-02-26 19:53:23 +01:00
Erik Svedäng
35967c3d4f Docs. 2017-12-23 06:38:45 +01:00
Erik Svedäng
3b2c07fcc3 Reorganised the language guide a bit. 2017-12-22 15:09:53 +01:00
Erik Svedäng
660a0c4269 Show 'register-type' in language guide. 2017-12-22 15:01:00 +01:00