* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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>
* 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>
* 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
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.