Skip to content

Commit

Permalink
Add new README and md files (#1904)
Browse files Browse the repository at this point in the history
In this PR, I have updated the README file to reflect the new goals of
the project and highlight related products to Juvix. The ORG files have
been replaced with Markdown for better readability and maintainability.
Additionally, I have added a couple of files to fine-tune the mdbook
settings. These changes, I believe, will make it easier for users to
understand and contribute to the project.🤞

- Closes #1878
- New pre-commit hook to format md, yaml, js, CSS files.

To check the website generation, I have deployed the result here:
Work in progress.

- https://jonaprieto.github.io/juvix
- https://github.com/jonaprieto/juvix

---------

Co-authored-by: Paul Cadman <[email protected]>
Co-authored-by: Christopher Goes <[email protected]>
Co-authored-by: Jan Mas Rovira <[email protected]>
  • Loading branch information
4 people authored Mar 21, 2023
1 parent 6a53802 commit 22ba8f1
Show file tree
Hide file tree
Showing 99 changed files with 6,525 additions and 4,249 deletions.
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug, pending-review
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Juvix Version [e.g. 22]

- OS: [e.g. iOS]
- Juvix Version [e.g. 22]

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement, pending-review
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: The Juvix compiler CI
'on':
"on":
workflow_dispatch:
inputs:
ref:
Expand All @@ -18,20 +18,19 @@ name: The Juvix compiler CI
- synchronize
- ready_for_review
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}'
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true
env:
SKIP: ormolu

jobs:

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: "3.11"
- uses: pre-commit/[email protected]

clang-format:
Expand All @@ -40,7 +39,7 @@ jobs:
- uses: actions/checkout@v3
- uses: jidicula/[email protected]
with:
clang-format-version: '15'
clang-format-version: "15"
check-path: runtime/src

ormolu:
Expand Down Expand Up @@ -71,13 +70,13 @@ jobs:
path: |
C:/Program Files/LLVM
./llvm
key: '${{ runner.os }}-llvm-13'
key: "${{ runner.os }}-llvm-13"

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: '13.0'
cached: '${{ steps.cache-llvm.outputs.cache-hit }}'
version: "13.0"
cached: "${{ steps.cache-llvm.outputs.cache-hit }}"

- name: Download and extract wasi-sysroot
run: >
Expand Down Expand Up @@ -191,13 +190,13 @@ jobs:
path: |
C:/Program Files/LLVM
./llvm
key: '${{ runner.os }}-llvm-13'
key: "${{ runner.os }}-llvm-13"

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: '13.0'
cached: '${{ steps.cache-llvm.outputs.cache-hit }}'
version: "13.0"
cached: "${{ steps.cache-llvm.outputs.cache-hit }}"

- name: Build the mdbook
run: |
Expand Down Expand Up @@ -227,7 +226,7 @@ jobs:
- name: Deploy HTML to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: '${{ secrets.GITHUB_TOKEN }}'
github_token: "${{ secrets.GITHUB_TOKEN }}"
publish_dir: main/book/html
enable_jekyll: false
cname: docs.juvix.org
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-static-binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
ref:
description: 'the repository ref to build'
description: "the repository ref to build"
required: true
default: 'main'
default: "main"

jobs:
build:
Expand Down
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,24 @@ agda2hs/
docs/*.html
*.cabal
/src/Juvix/Utils/OldParser.hs
CHANGELOG.md
UPDATES-FOR-CHANGELOG.org
docs/CHANGELOG.md
docs/CONTRIBUTING.md
docs/LICENSE.md
docs/README.md
.juvix-build

# C Code generation
*.out.c
*.s
*.wasm
*.exe
docs/md/
_docs
docs/**/*.md
book/*
**/html/*

*.cmi
*.cmx
*.cmo
.history
docs/org/README.org
# Binary files (produced by `make check`)
examples/milestone/HelloWorld/HelloWorld
hie.yaml
Expand Down
106 changes: 55 additions & 51 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,48 @@
# ------------------------------------------------------------------------------

- extensions:
- default: false
- name:
- ApplicativeDo
- DataKinds
- DerivingStrategies
- GADTs
- ImportQualifiedPost
- LambdaCase
- NoImplicitPrelude
- OverloadedStrings
- QuasiQuotes
- RecordWildCards
- StandaloneKindSignatures
- TemplateHaskell
- TypeFamilyDependencies
- UndecidableInstances
- UnicodeSyntax
- GeneralizedNewtypeDeriving
- default: false
- name:
- ApplicativeDo
- DataKinds
- DerivingStrategies
- GADTs
- ImportQualifiedPost
- LambdaCase
- NoImplicitPrelude
- OverloadedStrings
- QuasiQuotes
- RecordWildCards
- StandaloneKindSignatures
- TemplateHaskell
- TypeFamilyDependencies
- UndecidableInstances
- UnicodeSyntax
- GeneralizedNewtypeDeriving

- flags:
- default: false
- name:
- -Wall
- -Wcompat
- -Wderiving-defaults
- -Widentities
- -Wincomplete-patterns
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-deriving-strategies
- -Wredundant-constraints
- -O2 -flate-specialise -fspecialise-aggressively
- default: false
- name:
- -Wall
- -Wcompat
- -Wderiving-defaults
- -Widentities
- -Wincomplete-patterns
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-deriving-strategies
- -Wredundant-constraints
- -O2 -flate-specialise -fspecialise-aggressively

- modules:
# if you import Data.Set qualified, it must be as 'Set'
- {name: [Data.Set, Data.HashSet], as: Set}
- {name: [Data.Map, Data.HashMap.Strict, Data.HashMap.Lazy], as: Map}
# if you import Data.Set qualified, it must be as 'Set'
- { name: [Data.Set, Data.HashSet], as: Set }
- { name: [Data.Map, Data.HashMap.Strict, Data.HashMap.Lazy], as: Map }
# - {name: Control.Arrow, within: []} # Certain modules are banned entirely

- functions:
- {name: Data.List.NonEmpty.nub, within: []}
- {name: Data.List.NonEmpty.nubBy, within: []}
- { name: Data.List.NonEmpty.nub, within: [] }
- { name: Data.List.NonEmpty.nubBy, within: [] }

# ------------------------------------------------------------------------------
# OTHER HINTS
Expand All @@ -60,25 +60,29 @@
# HINTS
# ------------------------------------------------------------------------------

- error: {lhs: idea Warning, rhs: warn}
- error: {lhs: idea Suggestion, rhs: suggest}
- error: {lhs: ideaN Warning, rhs: warnN}
- error: {lhs: ideaN Suggestion, rhs: suggestN}
- error: { lhs: idea Warning, rhs: warn }
- error: { lhs: idea Suggestion, rhs: suggest }
- error: { lhs: ideaN Warning, rhs: warnN }
- error: { lhs: ideaN Suggestion, rhs: suggestN }

- error: {lhs: occNameString (occName (unLoc x)), rhs: rdrNameStr x}
- error: {lhs: occNameString (occName x), rhs: occNameStr x}
- error: {lhs: noLoc (HsVar noExtField (noLoc (mkRdrUnqual (mkVarOcc x)))), rhs: strToVar x}
- error: { lhs: occNameString (occName (unLoc x)), rhs: rdrNameStr x }
- error: { lhs: occNameString (occName x), rhs: occNameStr x }
- error:
{
lhs: noLoc (HsVar noExtField (noLoc (mkRdrUnqual (mkVarOcc x)))),
rhs: strToVar x,
}

# ------------------------------------------------------------------------------
# IGNORES
# ------------------------------------------------------------------------------

- ignore: {name: Use let, within: [Test.All]}
- ignore: {name: Use String}
- ignore: {name: Avoid restricted qualification}
- ignore: {name: Redundant multi-way if}
- ignore: {name: Redundant bracket}
- ignore: {name: Eta reduce}
- ignore: {name: Avoid restricted alias}
- ignore: {name: Use tuple-section}
- ignore: {name: Use map with tuple-section}
- ignore: { name: Use let, within: [Test.All] }
- ignore: { name: Use String }
- ignore: { name: Avoid restricted qualification }
- ignore: { name: Redundant multi-way if }
- ignore: { name: Redundant bracket }
- ignore: { name: Eta reduce }
- ignore: { name: Avoid restricted alias }
- ignore: { name: Use tuple-section }
- ignore: { name: Use map with tuple-section }
25 changes: 16 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: trailing-whitespace
exclude: tests/
- id: end-of-file-fixer
- id: end-of-file-fixer
exclude: tests/|assets/
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: mixed-line-ending
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: mixed-line-ending
exclude: tests/

- repo: https://github.com/anoma/juvix
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.6
hooks:
- id: prettier
types_or: [css, javascript, markdown, yaml, toml]
exclude: examples/|tests/|assets/

- repo: https://github.com/anoma/juvix
rev: v0.2.9
hooks:
- id: ormolu
- id: ormolu
10 changes: 5 additions & 5 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- id: ormolu
name: ormolu
description: Run Ormolu linter
entry: make check-ormolu
language: system
- id: ormolu
name: ormolu
description: Run Ormolu linter
entry: make check-ormolu
language: system
Loading

0 comments on commit 22ba8f1

Please sign in to comment.