Skip to content

Commit

Permalink
make .nimble file parse on older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Jan 19, 2022
1 parent cc4e1d2 commit 54de427
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ doAssert @[1, 2, 3, 4, 5].map(x !=> x * 2) == @[2, 4, 6, 8, 10]
doAssert @[1, 2, 3, 4, 5].map(x \=> x * 2) == @[2, 4, 6, 8, 10]
```

See tests for more example uses of this library. Tests are ran and docs are built with [nimbleutils](https://github.com/metagn/nimbleutils).
See tests for more example uses of this library. Tests are ran for multiple backends.

Note: Since `Applicate` is implemented as `distinct ApplicateKey` and is also usually used as `static Applicate` (for which `ApplicateArg` is an alias), this library fairly pushes Nim's type system, so annotating applicates with types can be difficult. Nim macro errors in general are also not great.
6 changes: 4 additions & 2 deletions applicates.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ requires "nim >= 0.20.0"

import os

when (compiles do: import nimbleutils):
import nimbleutils
when (NimMajor, NimMinor) >= (1, 4):
when (compiles do: import nimbleutils):
import nimbleutils
# https://github.com/metagn/nimbleutils

task docs, "build docs for all modules":
when declared(buildDocs):
Expand Down

0 comments on commit 54de427

Please sign in to comment.