I am trying to understand why does this proc may have side-effects:
import times
const gigasecond = 1_000_000_000.seconds
proc addGigasecond*(moment: DateTime): DateTime =
    moment + gigasecond
Error: 'addGigasecond' can have side effects
I tried using the effects pragma like this:
import times
const gigasecond = 1_000_000_000.seconds
proc addGigasecond*(moment: DateTime): DateTime =
    result = moment + gigasecond
    {.effects.}
but I see nothing in the output when compiling the file. Am I using the pragma correctly?
The .effects pragma only lists exceptions and "tag" effects.
import times
const gigasecond = 1_000_000_000.seconds
proc g() {.tags: [RootEffect].} = discard
proc addGigasecond*(moment: DateTime): DateTime =
    result = moment + gigasecond
    g()
    {.effects.}
(I'm not sure why either but that's how it is.)