Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Update documentation #268

Open
chrisnevers opened this issue Jan 31, 2020 · 4 comments
Open

Update documentation #268

chrisnevers opened this issue Jan 31, 2020 · 4 comments
Assignees
Labels
enhancement Infra Infrastructure issues. question

Comments

@chrisnevers
Copy link
Contributor

Looking through the Getting Started docs and noticed there needs some updates.

One

This example doesn't compile:

let _ = print "hello, world!"

It gives the following error:

main.ml[3:5 ..3:5]: error (E2018)
  No instance for show string arising in the binding
  │ 
3 │ let _ = print "hello, world!"
  │     ^
  • Note: this constraint can not be quantified over
    because it is impossible to quantify over pattern bindings

The following message has a detailed explanation: 2018.
Try 'amc explain 2018' to see it.
make: *** [build] Error 1

Two

The example doesn't compile:

$ amc mod2.ml mod1.ml main.ml -o main.lua

The compile option needs to be specified:

$ amc compile mod2.ml mod1.ml main.ml -o main.lua

Other

Could you please add more docs for the std library and include more examples in the Everything You Need To Know To Write Amulet for example how to create/use exceptions.

Thanks for interesting project, I look forward to using it!

@SquidDev SquidDev added enhancement Infra Infrastructure issues. question labels Jan 31, 2020
@SquidDev SquidDev self-assigned this Jan 31, 2020
@SquidDev

This comment has been minimized.

SquidDev added a commit to amuletml/website that referenced this issue Feb 3, 2020
 - Update amc usage:
   - repl instead of --repl
   - As we have a module system, we no longer take multiple files.
 - Suggest using let () = instead of let _`=. Petty, but good practice.
 - Use put_line instead of print.
 - Note that we require a `rec` keyword.
 - Update monad syntax

See amuletml/amulet#268
@tacoberu
Copy link

Hi.
I would like to contribute to the documentation.
I am currently using Amulet intensively on one project. So I have many aha moments that could be used.
On the other hand, sometimes I don't quite understand some constructions. (I'm more of a Haskellist.)
What if we opened a Wiki in this repository? I could add different fragments there. Which could act as inspiration for official documentation.

@SquidDev
Copy link
Member

@tacoberu Yep, that's a good idea. I've enabled it and hopefully set the permissions so anyone can add/edit it.

@tacoberu
Copy link

works +1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Infra Infrastructure issues. question
Projects
None yet
Development

No branches or pull requests

3 participants