emacs-module-0.2.1.1: Utilities to write Emacs dynamic modules
Copyright(c) Sergey Vinokurov 2018
LicenseApache-2.0 (see LICENSE)
Maintainerserg.foo@gmail.com
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Emacs.Module.SymbolName

Description

 
Synopsis

Documentation

mkSymbolNameUnsafe :: Addr# -> SymbolName Source #

Should be applied to unboxed string literals like this

mkSymbolNameUnsafe "foo"#

Can be safely applied to non-literals (e.g. arbitrary pointers) if it's guaranteed that address points to a null-terminated strings. Otherwise behaviour is undefined.

The string literal must only contain ASCII symbols. This condition is required by the Emacs API and results in undefined behaviour if violated.

reifySymbol :: WithCallStack => Env -> SymbolName -> (RawValue 'Regular -> a) -> (RawValue 'Pinned -> a) -> IO a Source #