lean-bindings-0.1: Haskell bindings to the Lean Theorem Prover.

Copyright(c) Galois Inc, 2015
LicenseApache-2
Maintainerjhendrix@galois.com, lcasburn@galois.com
Safe HaskellTrustworthy
LanguageHaskell98

Language.Lean.Internal.String

Description

This module exports functions for marshalling strings across the Lean FFI.

Synopsis

Documentation

mkLeanString :: IO CString -> IO String Source

This calls a function that allocates a Lean string, parses it as a Text value, and frees the string.

mkLeanText :: IO CString -> IO Text Source

This calls a function that allocates a Lean string, parses it as a Text value, and frees the string.

getLeanString :: CString -> IO String Source

This calls a function that allocates a Lean string, parses it as a Text value, and frees the string.

decodeLeanString :: CString -> IO String Source

This decodes a CString as Lean text

withLeanStringPtr :: String -> (CString -> IO a) -> IO a Source

Use the string as a Lean string

withLeanTextPtr :: Text -> (CString -> IO a) -> IO a Source

Use the text as a Lean string