# std/effecttraits

Dark Mode

- Manual
- Standard library
- Index
- Compiler docs
- Fusion docs
- devel, stable

Search:
Source Edit

This module provides access to the inferred .raises effects for Nim's macro system. Since: Version 1.4.

One can test for the existence of this standard module via `defined(nimHasEffectTraitsModule)`.

# Imports

macros

# Procs

    proc getRaisesList(fn: NimNode): NimNode {....raises: [], tags: [].}

  Extracts the `.raises` list of the func/proc/etc `fn`. `fn` has to be a resolved symbol of kind `nnkSym`. This implies that the macro that calls this proc should accept `typed` arguments and not `untyped` arguments. Source Edit

    proc getTagsList(fn: NimNode): NimNode {....raises: [], tags: [].}

  Extracts the `.tags` list of the func/proc/etc `fn`. `fn` has to be a resolved symbol of kind `nnkSym`. This implies that the macro that calls this proc should accept `typed` arguments and not `untyped` arguments. Source Edit

    proc hasNoSideEffects(fn: NimNode): bool {....raises: [], tags: [].}

  Return true if the func/proc/etc `fn` has `noSideEffect`. `fn` has to be a resolved symbol of kind `nnkSym`. This implies that the macro that calls this proc should accept `typed` arguments and not `untyped` arguments. Source Edit

    proc isGcSafe(fn: NimNode): bool {....raises: [], tags: [].}

  Return true if the func/proc/etc `fn` is `gcsafe`. `fn` has to be a resolved symbol of kind `nnkSym`. This implies that the macro that calls this proc should accept `typed` arguments and not `untyped` arguments. Source Edit