Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update, correct, and expand documentation #747

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

In-Veritas
Copy link
Contributor

Summary of Changes

This pull request includes the following updates and improvements:

Documentation Updates

  • Guide.md and Features.md:

    • Updated and clarified information to ensure accuracy and better readability.
    • Expanded sections that were previously incomplete or unclear.
    • Added new examples to better illustrate key concepts.
  • Docs Folder:

    • Reviewed and revised most files in the docs folder for consistency and clarity.
    • Addressed gaps in explanations and improved structure for easier navigation.

Code Examples

  • Corrected example code snippets that previously failed to execute correctly.
  • Verified and tested all examples to ensure they work as intended.

Inline Comments

  • Added inline comments when describing built-in functions.
    • These comments provide detailed explanations of the purpose and usage of each function.

Type Declarations

  • Declared types for every function in the documentation.

Additional Notes

These changes aim to make the documentation more comprehensive, easier to understand, and practical for both new and experienced users. Feedback and suggestions for further improvements are welcome

FEATURES.md Outdated Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
docs/syntax.md Outdated Show resolved Hide resolved
docs/syntax.md Outdated Show resolved Hide resolved
docs/syntax.md Outdated Show resolved Hide resolved
docs/syntax.md Outdated Show resolved Hide resolved
docs/syntax.md Outdated Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
FEATURES.md Show resolved Hide resolved
FEATURES.md Outdated Show resolved Hide resolved
GUIDE.md Outdated Show resolved Hide resolved
docs/cli-arguments.md Outdated Show resolved Hide resolved
docs/native-numbers.md Outdated Show resolved Hide resolved
docs/pattern-matching.md Outdated Show resolved Hide resolved
docs/pattern-matching.md Outdated Show resolved Hide resolved
docs/builtins.md Outdated Show resolved Hide resolved
docs/builtins.md Outdated Show resolved Hide resolved
docs/compiler-options.md Outdated Show resolved Hide resolved
docs/ffi.md Outdated Show resolved Hide resolved
docs/native-numbers.md Show resolved Hide resolved
docs/pattern-matching.md Outdated Show resolved Hide resolved
src/fun/builtins.bend Outdated Show resolved Hide resolved
docs/pattern-matching.md Outdated Show resolved Hide resolved
src/fun/builtins.bend Outdated Show resolved Hide resolved
src/fun/builtins.bend Outdated Show resolved Hide resolved
src/fun/builtins.bend Outdated Show resolved Hide resolved
(Foo__C5) = λa switch a { 0: λ* Baz; _: Foo__C4; } # Foo.case_0.bool_true
(Foo__C4) = λ* λa (a Foo__C3) # Foo.case_0.bool_false
(Foo__C3) = λa switch a { 0: Baz; _: Foo__C2; } # Foo.case_0.bool_false.case_cons1
(Foo__C2) = λ* λa λb (b Foo__C1 a) # Foo.case_0.bool_false.case_cons1.handle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a consistent naming scheme for these cases, this is really confusing.

Either num_0/num_+ bool_false/bool_true etc
Or case_0/case_+ case_false/case_true etc.

What do you mean by route and handle?

0
0 true
0 false
0 false cons
0 false cons cons
0 false cons nil
0 false nil
+
+ false
+ true

these should be the cases.

@@ -60,20 +60,20 @@ They offer more advanced pattern matching capabilities and also take care linear
Pattern matching equations are transformed into a tree of `match` and `switch` terms from left to right.
```py
# These two are equivalent
(Foo 0 false (Cons h1 (Cons h2 t))) = (A h1 h2 t)
(Foo 0 * *) = B
(Foo 0 false (Cons h1 (Cons h2 t))) = (Bar h1 h2 t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syntax for constructors in this file is wrong everywhere, should be Bool/False, List/Cons, Maybe/Some, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants