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.Name

Contents

Description

Internal declarations for Lean names together with typeclass instances for Name.

Synopsis

Documentation

anonymousName :: Name Source

The root "anonymous" name

nameAppend :: Name -> String -> Name Source

Append a string to a name.

nameAppendIndex :: Name -> Word32 -> Name Source

Append a numeric index to a name.

data NameView Source

A view of head of a lean name.

Constructors

AnonymousName

The anonymous name.

StringName Name String

A name with a string appended.

IndexName Name Word32

A name with a numeric value appended.

Instances

nameView :: Name -> NameView Source

View the head of a Lean name.

nameToString :: Name -> String Source

Return a name as a string with subnames separated by periods.

Internal declarations

type NamePtr = Ptr Name Source

Haskell type for lean_name FFI parameters.

type OutNamePtr = Ptr NamePtr Source

Haskell type for lean_name* FFI parameters.

withName :: Name -> (Ptr Name -> IO a) -> IO a Source

Function c2hs uses to pass Name values to Lean

type ListName = List Name Source

Synonym for List Expr that can be used in c2hs bindings.

type ListNamePtr = Ptr ListName Source

A list of Lean universe levels.

Haskell type for lean_list_name FFI parameters.

type OutListNamePtr = Ptr ListNamePtr Source

Haskell type for lean_list_name* FFI parameters.

withListName :: ListName -> (Ptr ListName -> IO a) -> IO a Source

Function c2hs uses to pass ListName values to Lean