zero-functional / zero-functional

A library providing zero-cost chaining for functional abstractions in Nim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extending with DSL results in undeclared identifier error.

ZoomRmc opened this issue · comments

commented

Nim 1.4.2
Using the example from Readme:

zfInline filter(cond: bool):
  loop:
    if cond:
      yield it # add the current iterator to the resulting collection

Results in:
zero_functional.nim(959, 24) Error: undeclared identifier: 'newIdentNode'

you could add
import macros

commented

Thanks, this was not clear from the docs.
Also, the note about registering the extension with zfCreateExtension should probably be moved to the top of the section and not omitted from at least the first example.

would have been an opportunity to do a PR - but well...
@ZoomRmc updated documentation - closing this one

commented

Sorry, I'm to new to the library to be aware of any consequences of messing with the docs/the code yet.