Skip to content

Commit

Permalink
🥤
Browse files Browse the repository at this point in the history
  • Loading branch information
AlephAlpha committed Jul 19, 2024
1 parent 84d1581 commit 6ccbc04
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ['9.0.2', '9.4.8', '9.6.5', '9.8.2']
ghc: ['9.0.2', '9.4.8', '9.6.6', '9.8.2']
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
Expand Down
8 changes: 6 additions & 2 deletions doc/Builtins.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ __Examples__:

### `andThen` (`¿`, `2 -> 1`)

Take two values,
Take two values, and return the first one if the second one doesn't fail.

and return the first one if the second one doesn't fail.
This is somewhat similar to the `seq` function in Haskell, which forces the first argument to be evaluated before the second.

__Examples__:

Expand Down Expand Up @@ -299,7 +299,9 @@ This function is automatically vectorized.
__Examples__:

- ```2`
- `3\2Ƶ``3/2`
- `` → Fail
- `1\2Ƶ` → Fail
- `` → Fail
- `1_Ƶ` → Fail
- `2_Ƶ``-2`
Expand All @@ -319,7 +321,9 @@ This function is automatically vectorized.
__Examples__:

- `` → Fail
- `3\2ƶ` → Fail
- ```1`
- `1\2ƶ``1/2`
- ```0`
- `1_ƶ``-1`
- `2_ƶ` → Fail
Expand Down
10 changes: 8 additions & 2 deletions src/Nekomata/Builtin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ builtins =
"andThen"
'¿'
andThen
"Take two values, \n\
\and return the first one if the second one doesn't fail."
"Take two values, and return the first one if the second one doesn't \
\fail. \n\
\This is somewhat similar to the `seq` function in Haskell, \
\which forces the first argument to be evaluated before the second."
[ ("1 2¿", all_ ["1"])
, ("1 !¿", all_ [])
]
Expand Down Expand Up @@ -340,7 +342,9 @@ builtins =
\it is converted to a number according to Nekomata's code page.\n\
\This function is automatically vectorized."
[ ("", all_ ["2"])
, ("3\\", all_ ["3/2"])
, ("", all_ [])
, ("1\\", all_ [])
, ("", all_ [])
, ("1_Ƶ", all_ [])
, ("2_Ƶ", all_ ["-2"])
Expand All @@ -356,7 +360,9 @@ builtins =
\it is converted to a number according to Nekomata's code page.\n\
\This function is automatically vectorized."
[ ("", all_ [])
, ("3\\", all_ [])
, ("", all_ ["1"])
, ("1\\", all_ ["1/2"])
, ("", all_ ["0"])
, ("1_ƶ", all_ ["-1"])
, ("2_ƶ", all_ [])
Expand Down

0 comments on commit 6ccbc04

Please sign in to comment.