Commit Graph

797 Commits

Author SHA1 Message Date
Scott Olsen
d8d3669a16
feat: add 'when' functions for Maybe and Result (#1180)
* feat: add 'when' functions for Maybe and Result

These functions enable users to execute some side-effecting function
(one that returns unit and take no arguments) based on the contents of a
Maybe or Result.

`when-success`: Executes a side-effect when given a `Result.Success`
`when-error`: Executes a side-effect when given a `Result.Error`
`when-just`: Executes a side-effect when given a `Maybe.Just`
`when-nothing`: Executes a side-effect when given a `Maybe.Nothing`

* docs: add Control to core lib doc generation
2021-03-15 09:53:22 +01:00
Scott Olsen
1458bf4031
feat: Add support for emitting literal C (#1178) 2021-03-04 07:29:52 +01: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
Erik Svedäng
ee54291646 docs: Change the order of the actions in the release checklist 2021-02-01 19:24:15 +01:00
Veit Heller
d20414e87d
feat: Add drop interface (#1088)
* add sketch for drop

* add drop example

* correct drop ordering

* fix: simplify drop and add to deleter

* docs: add drop docs

* fix: use a sound lifetime var
2021-01-31 21:15:10 +01:00
Veit Heller
384c41909d
feat: add deprecation meta (#1136)
* feat: add deprecation meta

* refactor: print only deprecated

* refactor: add argument to deprecated

* fix: make deprecated work early on
2021-01-26 13:22:50 +01:00
Veit Heller
144b114cda
docs: don’t confuse liquid (#1152) 2021-01-26 13:21:20 +01:00
Veit Heller
8c1999d656
feat: add fstr (#1142)
* feat: add fstr

* test: add fstr test

* fix: memory error in test

* fix: fix backslash parser

* feat: add octal escape literals
2021-01-26 06:18:16 +01:00
Veit Heller
9cfde34fbc
docs: add Introspect and Unit (#1147) 2021-01-24 22:44:47 +01:00
Veit Heller
2023c93d62
feat: Quasiquotation (#1129)
* feat: quasiquotation

* test: add tests for quasiquotation

* fix: fix typo in call to doc

* fix: do not evaluate quasiquote too eagerly

* test: pull quasiquote test into macro

* docs: fix unquote example with better constant

* feat: add quasiquote literals

* refactor: simplify reader macros
2021-01-15 10:50:04 +01:00
Veit Heller
02936cc74c
feat: Derive (#1120)
* core: add derive

* fix: fix errors with set!

Notably, don't type check dynamic bindings (which can be set to
whatever) and eliminate a hang that resulted from not handling an error
at the end of the `set!` call. Also refactors some of the code in
efforts to make it a bit cleaner.

Also adds an error when `set!` can't find the variable one calls set!
on.

* feat: better derive

* test: add error test for derive

* document derive

* add derive to core documentation to generate

* core: add derive

* fix: fix errors with set!

Notably, don't type check dynamic bindings (which can be set to
whatever) and eliminate a hang that resulted from not handling an error
at the end of the `set!` call. Also refactors some of the code in
efforts to make it a bit cleaner.

Also adds an error when `set!` can't find the variable one calls set!
on.

* feat: better derive

* document derive

* feat: first completely working version of derive

* feat: make name of derivable customizable (thanks @scolsen)

* refactor: implement doc edits provided by @scolsen

* feat: change argument order for derive

* fix: change deriver error test

* test: add derive tests

* fix: change order of derive back

* docs: fix typo in derive document

Co-authored-by: scottolsen <scg.olsen@gmail.com>
2021-01-15 10:48:34 +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
5999f58347
docs: Typo 2020-12-23 10:02:18 +01:00
Erik Svedäng
8336e5354f docs: Basic information about match-ref 2020-12-23 09:55:31 +01:00
Erik Svedäng
817887672f fix: Remove misleading docs regarding config.carp, closes issue #1080 2020-12-23 09:46:11 +01:00
Veit Heller
5f6f29016b
docs: document delete (#1087) 2020-12-22 10:30:37 +01:00
Efi
7d4db3df06
Fix link to Memory.md in patterns.md (#1073) 2020-12-16 10:09:00 +01:00
Tim Dévé
1863c82559
chore: Creates pre-commit hook to format Haskell code (#1047)
* chore: moves git hook into own folder

This is is done in preparation of having other git hooks

* chore: Creates script to run formatter

* chore: Checks that ormolu is installed before running it

* chore: Adds pre-commit hook to format Haskell files

* chore: Ensures the ormolu instruction are outputted when running hook

* chore: Prints formatted files on newlines
2020-12-05 14:26:28 +01:00
Tim Dévé
0bd5fa4cb6
chore: Creates git hook to enforce Conventional Commits (#1041)
* chore: Adds Conventional Commits commit-msg hook

* docs: Adds section about git hooks in Contributing Guide

& fixes the headers hierarchy
2020-12-01 14:38:45 +01:00
Tim Dévé
ac4231d005
docs: Expands docs around C function pointers (#1038)
* docs: Generates HTML docs for Function core module

* docs: Adds lifetime information in Function module

* docs: Adds callback section to C Interop

* docs: Corrects typos in Function docs
2020-12-01 10:44:03 +01:00
Erik Svedäng
9edce5a356 docs: One more step to ReleaseChecklist.md 2020-11-30 16:13:29 +01:00
Scott Olsen
541630569c
Docs: Make ref-let pattern a bit clearer (#1016) 2020-11-24 19:28:15 +01:00
Erik Svedäng
d888c8c9cd
docs: Better credits and contribution guide (#1010)
* docs: Cleaned up the "credits" section a fair bit

* docs: Unified list of maintainers

* Update README.md

Co-authored-by: Erik Svedang <erik@Eriks-iMac.local>
2020-11-24 16:47:44 +01:00
Erik Svedäng
7bd1b122bf docs: Clarifications 2020-11-24 06:45:51 +01:00
Erik Svedäng
ada8cd9b48
docs: A document about running code (#1013)
* docs: A document about running code

* fix: Tweaks

* docs: More information about running code

Co-authored-by: Erik Svedang <erik@Eriks-iMac.local>
2020-11-24 06:40:31 +01:00
Erik Svedäng
793bf19ede
docs: Remove a lot of duplicated information and refer to webpages instead (#988)
* docs: Remove a lot of duplicated information and refer to webpages instead

* fix: Remove line about (help), it does not make sense anymore

* fix: Add open-browser to nix config

Co-authored-by: Erik Svedang <erik@Eriks-iMac.local>
2020-11-23 09:58:06 +01:00
Erik Svedäng
26ed4b7b52
docs: Release checklist (#999)
Co-authored-by: Erik Svedang <erik@Eriks-iMac.local>
2020-11-22 22:24:04 +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
Erik Svedäng
041d929fc6 fix: Level of heading 2020-11-20 08:25:20 +01:00
Erik Svedäng
a2c4e34e1a feat: Multimedia.md 2020-11-20 08:24:36 +01:00
Erik Svedäng
3192d54ae9
refactor: Move emacs-mode to separate repo (#981) 2020-11-20 07:48:21 +01:00
Erik Svedang
a270365553 fix: Sort modules alphabetically (manually, for now) 2020-11-20 00:46:52 +01:00
Erik Svedang
2df93a0275 fix: One more link 2020-11-19 21:45:33 +01:00
Erik Svedang
9530bff9ab fix: Correct links 2020-11-19 21:44:49 +01:00
Erik Svedang
0fd7c8828f chore: Remove SDL docs 2020-11-19 21:43:02 +01:00
Erik Svedang
3df10e997c feat: Better docs structure 2020-11-19 21:24:34 +01:00
Erik Svedang
7932fc8612 fix: Regarding CARP_DIR 2020-11-19 21:12:17 +01:00
Erik Svedang
78645d0579 fix: Clean-up and clarifications regarding libraries 2020-11-19 21:10:40 +01:00
Erik Svedang
885830b15e docs: Playing around with slightly different link style 2020-11-19 20:53:46 +01:00
Erik Svedäng
e08a69c9aa fix: Update doc links 2020-11-18 22:12:19 +01:00
Erik Svedang
93b1d97f69 fix: Remove auto-generated (core) docs 2020-11-18 09:34:38 +01:00
Erik Svedäng
fe9b07927a feat: Bring back the original (problematic) function 2020-11-11 06:58:41 +01:00
Tim Dévé
9a3870afe4 Adds unsafe-raw to StaticArray module 2020-11-07 17:49:41 +00:00
hellerve
acce3a471c register-type: fix for void 2020-11-05 16:49:32 +01:00
hellerve
a3dd41ee25 docs: fix typo in Quadruple docs 2020-10-15 15:16:37 +02:00
Erik Svedäng
cd175511fa
Merge pull request #933 from hellerve/veit/doc-typo-fix
macros: fix typo in curry* docs
2020-10-12 20:42:12 +02:00
Jorge Acereda
58a61dd42e Add support for cross-compilation. 2020-10-10 20:01:18 +02:00
hellerve
21c2043e3e macros: fix typo in curry* docs 2020-10-06 21:44:15 +02:00
scottolsen
1206ad2309 Update 2020-10-02 18:03:34 -04: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