The with-contexts Reference Manual

This is the with-contexts Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 18:17:45 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 with-contexts

The WITH-CONTEXT System.

A system providing a WITH macro and ’context’ualized objects handled by a ENTER/HANDLE/EXIT protocol in the spirit of Python’s WITH macro.

Only better, or, at a minimum different, of course.

Author

Marco Antoniotti <>

License

BSD

Source

with-contexts.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 with-contexts/library

Dependencies
Source

with-contexts.asd.

Parent Component

with-contexts (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 with-contexts/with-contexts.asd

Source

with-contexts.asd.

Parent Component

with-contexts (system).

ASDF Systems

with-contexts.


4.1.2 with-contexts/with-contexts-pkg.lisp

Source

with-contexts.asd.

Parent Component

with-contexts (system).

Packages

it.unimib.disco.ma.cl.ext.dacf.with-contexts.


4.1.3 with-contexts/contexts.lisp

Dependency

with-contexts-pkg.lisp (file).

Source

with-contexts.asd.

Parent Component

with-contexts (system).

Public Interface

4.1.4 with-contexts/with-cl.lisp

Dependencies
Source

with-contexts.asd.

Parent Component

with-contexts (system).

Public Interface

4.1.5 with-contexts/library/with-open-file.lisp

Source

with-contexts.asd.

Parent Component

library (module).

Public Interface

4.1.6 with-contexts/library/exit-stack-context.lisp

Source

with-contexts.asd.

Parent Component

library (module).

Public Interface
Internals

4.1.7 with-contexts/library/suppress-context.lisp

Source

with-contexts.asd.

Parent Component

library (module).

Public Interface
Internals

4.1.8 with-contexts/library/null-context.lisp

Source

with-contexts.asd.

Parent Component

library (module).

Public Interface
Internals

enter-result (reader method).


4.1.9 with-contexts/library/delegate-context.lisp

Source

with-contexts.asd.

Parent Component

library (module).

Public Interface
Internals

enter-result (reader method).


4.1.10 with-contexts/library/redirect-context.lisp

Source

with-contexts.asd.

Parent Component

library (module).

Public Interface
Internals

4.1.11 with-contexts/library/managed-resource-context.lisp

Source

with-contexts.asd.

Parent Component

library (module).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 it.unimib.disco.ma.cl.ext.dacf.with-contexts

The CL Contexts Package.

The package containing and exporting the names relating to the implementation of the WITH macro and ’contexts’ in Common Lisp.

Source

with-contexts-pkg.lisp.

Nicknames
  • cl-contexts
  • ctxts
Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Macros

Macro: with (&rest with-spec)

The WITH Macro.

The actual syntax of the WITH macro is the following:

with [VAR ’=’] CTXT-ITEM ’do’ CODE

Description:

The macro establishes a ’context’ based on the nature of CTXT-ITEM, which is the result of an evaluated expression. VAR, if supplied, is then bound to the result of ENTERing the context; i.e., VAR is bound to the (first) value of applying the generic function ENTER to CTXT-ITEM and it is available within CODE. If VAR is supplied, it ’escapes’ the with construct as if SETQed in the enclosind environment.

The WITH macro guarantees that the generic function EXIT is called as the cleanup form in an UNWIND-PROTECT before returning the values generated by CODE of after error conditions are signaled by it. EXIT is called with VAR

Errors generated by CODE are passed alogside VAR to the generic function HANDLE. This is done in a HANDLER-CASE within the UNWIND-PROTECT that wraps CODE and uses the EXIT generic function as cleanup form.

The value(s) returned by EXIT are effectively ignored.

Notes:

The inspiration for this macro comes from Python, which reinvented and expanded the concept from Common Lisp or Pascal or even somewhere else. Julia may have something similar with its ’do’ blocks.

Note that, unlike Python, Common Lisp does not have a "yield" statement or (delimited) continuations; therefore, the mapping with Python code cannot be one-to-one.

Exceptional Situations:

If an error occurs while evaluating CTXT-ITEM, then HANDLE is not called, while EXIT is called with NIL as argument.

See Also:

ENTER, HANDLE, EXIT, WITH-OPEN-FILE

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

with-cl.lisp.


6.1.2 Ordinary functions

Function: condition-ignoring-context-p (x)

Returns T if X is a CONDITION-IGNORING-CONTEXT, NIL otherwise.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

suppress-context.lisp.

Function: context-p (x)

Returns T if the argument X is a CONTEXT; NIL otherwise.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

contexts.lisp.

Function: delegate (&optional enter-result)

Creates a DELEGATE-CONTEXT stashing ENTER-RESULT for ENTER.

A subsequent call to ENTER on the instance will extract ENTER-RESULT and return it.

See Also:

ENTER, HANDLE, EXIT, WITH, DELEGATE-CONTEXT (Class)

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

delegate-context.lisp.

Function: delegate-context-p (x)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

delegate-context.lisp.

Function: error-output-redirection (stream)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Function: exit-stack ()

Constructor for an EXIT-STACK-CONTEXT.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Function: exit-stack-context-p (x)

Returns T when the argument X is and EXIT-CONTEXT; NIL otherwise.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Function: ignored (conditions &key subtypep &allow-other-keys)

Returns a CONDITION-IGNORING-CONTEXT.

The argument CONDITIONS is a list of CONDITION designators (or a single CONDITION designator) to be ingnored by the HANDLE method within a WITH context macro.

If SUBTYPEP is T any condition/error that is a subtype/subclass of any member in CONDITIOS will be ignored/suppressed by the HANDLE method, otherwse only instances of the exact CONDITIONS member will be ignored.

See Also:

ENTER, HANDLE, EXIT, SUPPRESSED

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

suppress-context.lisp.

Function: managed-resource (id &key &allow-other-keys)

Constructs a MANAGED-RESOURCE.

The only declared parameter, ID, should be a unique identified for the resource.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

managed-resource-context.lisp.

Function: managed-resource-context-p (x)

Returns T if the argument X is a MANAGED-RESOURCE-CONTEXT.

Notes:

This function is a synonim of IS-MANAGED-RESOURCE-CONTEXT.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

managed-resource-context.lisp.

Function: null-context (&optional enter-result)

Creates a NULL-CONTEXT stashing ENTER-RESULT for ENTER.

A subsequent call to ENTER on the instance will extract ENTER-RESULT and return it.

See Also:

ENTER, HANDLE, EXIT, WITH, NULL-CONTEXT (Class)

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

null-context.lisp.

Function: null-context-p (x)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

null-context.lisp.

Function: redirect-context-p (x)

Returns T if the argument X is a REDIRECT-CONTEXT.

Notes:

This is a synonym of IS-REDIRECT-CONTEXT.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Function: standard-input-redirection (stream)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Function: standard-output-redirection (stream)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Function: suppressed (conditions &key subtypep &allow-other-keys)

Returns a CONDITION-IGNORING-CONTEXT.

This constructor is a synonim for IGNORED.

See Also:

IGNORED, ENTER, HANDLE, EXIT

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

suppress-context.lisp.


6.1.3 Generic functions

Generic Function: acquire (mr &key)

Acquires a MANAGED-RESOURCE.

This generic function is the ’entry’ point of the ACQUIRE/RELEASE protocol.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

managed-resource-context.lisp.

Methods
Method: acquire ((mr managed-resource-context) &key)
Generic Function: callback (exit-stack function &rest args)

Adds a FUNCTION and its ARGS to an EXIT-STACK.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Methods
Method: callback ((es exit-stack-context) (f function) &rest args)
Generic Function: enter (context-item &key)

The ENTER Generic Function.

The methods of this function establish a ’context’ that can be used by the ENTER/HANDLE/EXIT protocol within the WITH context macro.

The main and simplest method is an identity operation which just returns the argument.

Exceptional Situations:

If this method generates an error, then HANDLE is not called and EXIT is called with NIL as an argument.

Notes:

Because of this "interpretation" of the ENTER method, NULL-CONTEXTS become a bit redundant, but they are provided for completeness.

See Also:

HANDLE, EXIT, NULL-CONTEXT

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

with-cl.lisp.

Methods
Method: enter ((mr managed-resource-context) &key)
Source

managed-resource-context.lisp.

Method: enter :after ((ric redirect-input-context) &key)
Source

redirect-context.lisp.

Method: enter :after ((reoc redirect-error-output-context) &key)
Source

redirect-context.lisp.

Method: enter :after ((rsoc redirect-standard-output-context) &key)
Source

redirect-context.lisp.

Method: enter ((nc delegate-context) &key)
Source

delegate-context.lisp.

Method: enter ((nc null-context) &key)
Source

null-context.lisp.

Method: enter ((ign condition-ignoring-context) &key)
Source

suppress-context.lisp.

Method: enter ((es exit-stack-context) &key)
Source

exit-stack-context.lisp.

Method: enter ((context-item stream) &key)
Source

with-open-file.lisp.

Method: enter (context-item &key)
Generic Function: enter-context (exit-stack context-manager)

Calls ENTER on a CONTEXT-MANAGER and pushes it on the EXIT-STACK callback stack.

If an error occurs while ENTERing the CONTEXT-MANAGER, then an
ERROR-CONTEXT is pushed on the EXIT-CONTEXT callback stack.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Methods
Method: enter-context ((es exit-stack-context) (cm context))
Generic Function: exit (context-item &key)

The EXIT Generic Function.

The methods of this function dispatch on a CONTEXT-ITEM and are always called as ’cleanup forms’ of an UNWIND-PROTECT. The values reurned by this generic function are therefore ignored.

The main method dispatching on NIL is called when ENTER generates errors.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

with-cl.lisp.

Methods
Method: exit ((mr managed-resource-context) &key)
Source

managed-resource-context.lisp.

Method: exit :after ((ric redirect-input-context) &key)
Source

redirect-context.lisp.

Method: exit :after ((reoc redirect-error-output-context) &key)
Source

redirect-context.lisp.

Method: exit :after ((rsoc redirect-standard-output-context) &key)
Source

redirect-context.lisp.

Method: exit ((nc delegate-context) &key)
Source

delegate-context.lisp.

Method: exit ((nc null-context) &key)
Source

null-context.lisp.

Method: exit ((ign condition-ignoring-context) &key)
Source

suppress-context.lisp.

Method: exit ((es exit-stack-context) &key)
Source

exit-stack-context.lisp.

Method: exit ((context-item stream) &key)
Source

with-open-file.lisp.

Method: exit (context-item &key)
Method: exit ((context-item null) &key)
Generic Function: handle (context-item condition &key)

The HANDLE Generic Function.

The methods of this function dispatch on a CONTEXT-ITEM and a CONDITION. In this way, within the confines of the the WITH macro, there is a decoupled way of handling different exceptions.

The main and simpler method of this generic function simply re-signals the condition.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

with-cl.lisp.

Methods
Method: handle ((mr managed-resource-context) (e error) &key)
Source

managed-resource-context.lisp.

Method: handle ((rc redirect-context) (e error) &key)
Source

redirect-context.lisp.

Method: handle ((nc delegate-context) (e error) &key)
Source

delegate-context.lisp.

Method: handle ((nc null-context) (e error) &key)
Source

null-context.lisp.

Method: handle ((ign condition-ignoring-context) (e error) &key)
Source

suppress-context.lisp.

Method: handle ((es exit-stack-context) (e error) &key)
Source

exit-stack-context.lisp.

Method: handle ((context-item stream) (e error) &key)
Source

with-open-file.lisp.

Method: handle (context-item (condition error) &key)
Generic Function: is-condition-ignoring-context (x)

Returns T if X is a CONDITION-IGNORING-CONTEXT, NIL otherwise.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

suppress-context.lisp.

Methods
Method: is-condition-ignoring-context ((x condition-ignoring-context))
Method: is-condition-ignoring-context (x)
Generic Function: is-context (x)

Returns T if the argument X is a CONTEXT; NIL otherwise.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

contexts.lisp.

Methods
Method: is-context ((c context))
Method: is-context (c)
Generic Function: is-delegate-context (x)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

delegate-context.lisp.

Methods
Method: is-delegate-context ((x delegate-context))
Method: is-delegate-context (x)
Generic Function: is-exit-stack-context (x)

Returns T when the argument X is and EXIT-CONTEXT; NIL otherwise.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Methods
Method: is-exit-stack-context ((x exit-stack-context))
Method: is-exit-stack-context (x)
Generic Function: is-managed-resource-context (x)

Returns T if the argument X is a MANAGED-RESOURCE-CONTEXT.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

managed-resource-context.lisp.

Methods
Method: is-managed-resource-context ((x managed-resource-context))
Method: is-managed-resource-context (x)
Generic Function: is-null-context (x)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

null-context.lisp.

Methods
Method: is-null-context ((x null-context))
Method: is-null-context (x)
Generic Function: is-redirect-context (x)

Returns T if the argument X is a REDIRECT-CONTEXT.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Methods
Method: is-redirect-context ((x redirect-context))
Method: is-redirect-context (x)
Generic Function: pop-all (exit-stack-context)

Creates a new EXIT-STACK-CONTEXT and transfers the callbacks to it.

The callbacks of the current exit stack are popped from it and moved to the new one.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Methods
Method: pop-all ((es exit-stack-context))
Generic Function: push-context (exit-stack context-manager)

Pushes a CONTEXT-MANAGER on the callback stack of EXIT-MANAGER.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Methods
Method: push-context ((es exit-stack-context) (cm context))
Generic Reader: redirection (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: redirection ((redirect-context redirect-context))

automatically generated reader method

Source

redirect-context.lisp.

Target Slot

stream.

Generic Function: release (mr &key)

Releases a MANAGED-RESOURCE.

This generic function is the ’exit’ point of the ACQUIRE/RELEASE protocol.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

managed-resource-context.lisp.

Methods
Method: release ((mr managed-resource-context) &key)
Generic Function: unwind (exit-stack)

The callback stack of the EXIT-STACK are popped and called.

Notes:

This is the method ’close()’ in Python. The name ’UNWIND’ was chosen to be more ’lispy’ and to avoid conclictsa with CL:CLOSE.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Methods
Method: unwind ((es exit-stack-context))

6.1.4 Standalone methods

Method: initialize-instance :before ((x redirect-input-context) &key stream)
Source

redirect-context.lisp.

Method: initialize-instance :before ((x redirect-output-context) &key stream)
Source

redirect-context.lisp.


6.1.5 Classes

Class: condition-ignoring-context

The Condition-ignoring Context Class.

Instances of this class are used to ignore/suppress errors within a WITH context macro.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

suppress-context.lisp.

Direct superclasses

context.

Direct methods
Direct Default Initargs
InitargValue
:subtypepnil
Direct slots
Slot: conditions
Initargs

:conditions

Readers

ignored-conditions.

Writers

This slot is read-only.

Slot: check-subtypep
Initargs

:subtypep

Readers

check-subtypep.

Writers

This slot is read-only.

Class: context

The Context Class.

A class that can be used in conjunction with the WITH macro. This class is the top of the hierarchy of "context" classes. It shuld not be directly instantiated.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

contexts.lisp.

Direct subclasses
Direct methods
Class: delegate-context

The Delegate Context Class.

A context that just wraps a value to which it delegates its behavior.

Notes:

This context it necessary in Common Lisp as the ENTER/HANDLE/EXIT protocol can be implemented indipendently of ’being a context’.

See Also:

ENTER, HANDLE, EXIT, WITH, DELEGATE-CONTEXT (Function)

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

delegate-context.lisp.

Direct superclasses

context.

Direct methods
Direct Default Initargs
InitargValue
:enter-resultnil
Direct slots
Slot: enter-result
Initargs

:enter-result

Readers

enter-result.

Writers

This slot is read-only.

Class: exit-stack-context

The Exit Stack Class.

A class that serves to collect and unwind code (callbacks) that are collected within a WITH macro body. The methods of this class provide more control over what happens with errors that may happen within ENTER calls in non-straightforward contexts.

Notes:

This class provides much of the functionalities displayed in the Python examples.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Direct superclasses

context.

Direct methods
Direct slots
Slot: callback-stack
Type

list

Readers

callback-stack.

Writers

set-callback-stack.

Class: managed-resource-context

The Managed Resource Context Class.

A placeholder class showing how to render, more or less, the Python examples in Common Lisp.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

managed-resource-context.lisp.

Direct superclasses

context.

Direct methods
Direct slots
Slot: resource
Initargs

:resource

Class: null-context

The Null Context Class.

A context that just wraps a value that it is then returned by ENTER.

See Also:

ENTER, HANDLE, EXIT, WITH, NULL-CONTEXT (Function)

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

null-context.lisp.

Direct superclasses

context.

Direct methods
Direct Default Initargs
InitargValue
:enter-resultnil
Direct slots
Slot: enter-result
Initargs

:enter-result

Readers

enter-result.

Writers

This slot is read-only.

Class: redirect-context

The Redirect Context Class.

This is the context superclass for redirecting I/O. The library creates instances of this class subclasses.

See Also:

REDIRECT-OUTPUT-CONTEXT, REDIRECT-INPUT-CONTEXT, REDIRECT-STANDARD-OUTPUT-CONTEXT, REDIRECT-ERROR-OUTPUT-CONTEXT, ENTER, HANDLE, EXIT, WITH

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Direct superclasses

context.

Direct subclasses
Direct methods
Direct slots
Slot: stream
Package

common-lisp.

Type

stream

Initargs

:stream

Readers

redirection.

Writers

This slot is read-only.

Slot: saved-stream
Type

stream

Readers

%%saved-stream.

Writers

(setf %%saved-stream).

Class: redirect-error-output-context
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Direct superclasses

redirect-output-context.

Direct methods
Class: redirect-input-context
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Direct superclasses

redirect-context.

Direct methods
Class: redirect-output-context
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Direct superclasses

redirect-context.

Direct subclasses
Direct methods

initialize-instance.

Class: redirect-standard-output-context
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

redirect-context.lisp.

Direct superclasses

redirect-output-context.

Direct methods

6.2 Internals


6.2.1 Ordinary functions

Function: error-context (item error)

Constructor for an EXIT-STACK-CONTEXT.

Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Function: error-context-p (x)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.


6.2.2 Generic functions

Generic Reader: %%saved-stream (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: %%saved-stream ((redirect-context redirect-context))

automatically generated reader method

Source

redirect-context.lisp.

Target Slot

saved-stream.

Generic Writer: (setf %%saved-stream) (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Writer Method: (setf %%saved-stream) ((redirect-context redirect-context))

automatically generated writer method

Source

redirect-context.lisp.

Target Slot

saved-stream.

Generic Reader: callback-stack (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: callback-stack ((exit-stack-context exit-stack-context))

automatically generated reader method

Source

exit-stack-context.lisp.

Target Slot

callback-stack.

Generic Reader: check-subtypep (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: check-subtypep ((condition-ignoring-context condition-ignoring-context))

automatically generated reader method

Source

suppress-context.lisp.

Target Slot

check-subtypep.

Generic Reader: enter-result (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: enter-result ((delegate-context delegate-context))

automatically generated reader method

Source

delegate-context.lisp.

Target Slot

enter-result.

Reader Method: enter-result ((null-context null-context))

automatically generated reader method

Source

null-context.lisp.

Target Slot

enter-result.

Generic Reader: error-context-condition (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: error-context-condition ((error-context error-context))

automatically generated reader method

Source

exit-stack-context.lisp.

Target Slot

cnd.

Generic Reader: error-context-item (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: error-context-item ((error-context error-context))

automatically generated reader method

Source

exit-stack-context.lisp.

Target Slot

ctx.

Generic Reader: ignored-conditions (object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Reader Method: ignored-conditions ((condition-ignoring-context condition-ignoring-context))

automatically generated reader method

Source

suppress-context.lisp.

Target Slot

conditions.

Generic Function: is-error-context (x)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Methods
Method: is-error-context ((x error-context))
Method: is-error-context (x)
Generic Writer: set-callback-stack (new-value object)
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Methods
Writer Method: set-callback-stack ((new-value exit-stack-context) exit-stack-context)

automatically generated writer method

Source

exit-stack-context.lisp.

Target Slot

callback-stack.


6.2.3 Classes

Class: error-context
Package

it.unimib.disco.ma.cl.ext.dacf.with-contexts.

Source

exit-stack-context.lisp.

Direct superclasses

context.

Direct methods
Direct slots
Slot: ctx
Initargs

:item

Readers

error-context-item.

Writers

This slot is read-only.

Slot: cnd
Initargs

:condition, :error

Readers

error-context-condition.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   H   I   M   N   P   R   S   U   W  
Index Entry  Section

%
%%saved-stream: Private generic functions
%%saved-stream: Private generic functions

(
(setf %%saved-stream): Private generic functions
(setf %%saved-stream): Private generic functions

A
acquire: Public generic functions
acquire: Public generic functions

C
callback: Public generic functions
callback: Public generic functions
callback-stack: Private generic functions
callback-stack: Private generic functions
check-subtypep: Private generic functions
check-subtypep: Private generic functions
condition-ignoring-context-p: Public ordinary functions
context-p: Public ordinary functions

D
delegate: Public ordinary functions
delegate-context-p: Public ordinary functions

E
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter: Public generic functions
enter-context: Public generic functions
enter-context: Public generic functions
enter-result: Private generic functions
enter-result: Private generic functions
enter-result: Private generic functions
error-context: Private ordinary functions
error-context-condition: Private generic functions
error-context-condition: Private generic functions
error-context-item: Private generic functions
error-context-item: Private generic functions
error-context-p: Private ordinary functions
error-output-redirection: Public ordinary functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit: Public generic functions
exit-stack: Public ordinary functions
exit-stack-context-p: Public ordinary functions

F
Function, condition-ignoring-context-p: Public ordinary functions
Function, context-p: Public ordinary functions
Function, delegate: Public ordinary functions
Function, delegate-context-p: Public ordinary functions
Function, error-context: Private ordinary functions
Function, error-context-p: Private ordinary functions
Function, error-output-redirection: Public ordinary functions
Function, exit-stack: Public ordinary functions
Function, exit-stack-context-p: Public ordinary functions
Function, ignored: Public ordinary functions
Function, managed-resource: Public ordinary functions
Function, managed-resource-context-p: Public ordinary functions
Function, null-context: Public ordinary functions
Function, null-context-p: Public ordinary functions
Function, redirect-context-p: Public ordinary functions
Function, standard-input-redirection: Public ordinary functions
Function, standard-output-redirection: Public ordinary functions
Function, suppressed: Public ordinary functions

G
Generic Function, %%saved-stream: Private generic functions
Generic Function, (setf %%saved-stream): Private generic functions
Generic Function, acquire: Public generic functions
Generic Function, callback: Public generic functions
Generic Function, callback-stack: Private generic functions
Generic Function, check-subtypep: Private generic functions
Generic Function, enter: Public generic functions
Generic Function, enter-context: Public generic functions
Generic Function, enter-result: Private generic functions
Generic Function, error-context-condition: Private generic functions
Generic Function, error-context-item: Private generic functions
Generic Function, exit: Public generic functions
Generic Function, handle: Public generic functions
Generic Function, ignored-conditions: Private generic functions
Generic Function, is-condition-ignoring-context: Public generic functions
Generic Function, is-context: Public generic functions
Generic Function, is-delegate-context: Public generic functions
Generic Function, is-error-context: Private generic functions
Generic Function, is-exit-stack-context: Public generic functions
Generic Function, is-managed-resource-context: Public generic functions
Generic Function, is-null-context: Public generic functions
Generic Function, is-redirect-context: Public generic functions
Generic Function, pop-all: Public generic functions
Generic Function, push-context: Public generic functions
Generic Function, redirection: Public generic functions
Generic Function, release: Public generic functions
Generic Function, set-callback-stack: Private generic functions
Generic Function, unwind: Public generic functions

H
handle: Public generic functions
handle: Public generic functions
handle: Public generic functions
handle: Public generic functions
handle: Public generic functions
handle: Public generic functions
handle: Public generic functions
handle: Public generic functions
handle: Public generic functions

I
ignored: Public ordinary functions
ignored-conditions: Private generic functions
ignored-conditions: Private generic functions
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
is-condition-ignoring-context: Public generic functions
is-condition-ignoring-context: Public generic functions
is-condition-ignoring-context: Public generic functions
is-context: Public generic functions
is-context: Public generic functions
is-context: Public generic functions
is-delegate-context: Public generic functions
is-delegate-context: Public generic functions
is-delegate-context: Public generic functions
is-error-context: Private generic functions
is-error-context: Private generic functions
is-error-context: Private generic functions
is-exit-stack-context: Public generic functions
is-exit-stack-context: Public generic functions
is-exit-stack-context: Public generic functions
is-managed-resource-context: Public generic functions
is-managed-resource-context: Public generic functions
is-managed-resource-context: Public generic functions
is-null-context: Public generic functions
is-null-context: Public generic functions
is-null-context: Public generic functions
is-redirect-context: Public generic functions
is-redirect-context: Public generic functions
is-redirect-context: Public generic functions

M
Macro, with: Public macros
managed-resource: Public ordinary functions
managed-resource-context-p: Public ordinary functions
Method, %%saved-stream: Private generic functions
Method, (setf %%saved-stream): Private generic functions
Method, acquire: Public generic functions
Method, callback: Public generic functions
Method, callback-stack: Private generic functions
Method, check-subtypep: Private generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter: Public generic functions
Method, enter-context: Public generic functions
Method, enter-result: Private generic functions
Method, enter-result: Private generic functions
Method, error-context-condition: Private generic functions
Method, error-context-item: Private generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, exit: Public generic functions
Method, handle: Public generic functions
Method, handle: Public generic functions
Method, handle: Public generic functions
Method, handle: Public generic functions
Method, handle: Public generic functions
Method, handle: Public generic functions
Method, handle: Public generic functions
Method, handle: Public generic functions
Method, ignored-conditions: Private generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, is-condition-ignoring-context: Public generic functions
Method, is-condition-ignoring-context: Public generic functions
Method, is-context: Public generic functions
Method, is-context: Public generic functions
Method, is-delegate-context: Public generic functions
Method, is-delegate-context: Public generic functions
Method, is-error-context: Private generic functions
Method, is-error-context: Private generic functions
Method, is-exit-stack-context: Public generic functions
Method, is-exit-stack-context: Public generic functions
Method, is-managed-resource-context: Public generic functions
Method, is-managed-resource-context: Public generic functions
Method, is-null-context: Public generic functions
Method, is-null-context: Public generic functions
Method, is-redirect-context: Public generic functions
Method, is-redirect-context: Public generic functions
Method, pop-all: Public generic functions
Method, push-context: Public generic functions
Method, redirection: Public generic functions
Method, release: Public generic functions
Method, set-callback-stack: Private generic functions
Method, unwind: Public generic functions

N
null-context: Public ordinary functions
null-context-p: Public ordinary functions

P
pop-all: Public generic functions
pop-all: Public generic functions
push-context: Public generic functions
push-context: Public generic functions

R
redirect-context-p: Public ordinary functions
redirection: Public generic functions
redirection: Public generic functions
release: Public generic functions
release: Public generic functions

S
set-callback-stack: Private generic functions
set-callback-stack: Private generic functions
standard-input-redirection: Public ordinary functions
standard-output-redirection: Public ordinary functions
suppressed: Public ordinary functions

U
unwind: Public generic functions
unwind: Public generic functions

W
with: Public macros


A.4 Data types

Jump to:   C   D   E   F   I   L   M   N   P   R   S   W  
Index Entry  Section

C
Class, condition-ignoring-context: Public classes
Class, context: Public classes
Class, delegate-context: Public classes
Class, error-context: Private classes
Class, exit-stack-context: Public classes
Class, managed-resource-context: Public classes
Class, null-context: Public classes
Class, redirect-context: Public classes
Class, redirect-error-output-context: Public classes
Class, redirect-input-context: Public classes
Class, redirect-output-context: Public classes
Class, redirect-standard-output-context: Public classes
condition-ignoring-context: Public classes
context: Public classes
contexts.lisp: The with-contexts/contexts․lisp file

D
delegate-context: Public classes
delegate-context.lisp: The with-contexts/library/delegate-context․lisp file

E
error-context: Private classes
exit-stack-context: Public classes
exit-stack-context.lisp: The with-contexts/library/exit-stack-context․lisp file

F
File, contexts.lisp: The with-contexts/contexts․lisp file
File, delegate-context.lisp: The with-contexts/library/delegate-context․lisp file
File, exit-stack-context.lisp: The with-contexts/library/exit-stack-context․lisp file
File, managed-resource-context.lisp: The with-contexts/library/managed-resource-context․lisp file
File, null-context.lisp: The with-contexts/library/null-context․lisp file
File, redirect-context.lisp: The with-contexts/library/redirect-context․lisp file
File, suppress-context.lisp: The with-contexts/library/suppress-context․lisp file
File, with-cl.lisp: The with-contexts/with-cl․lisp file
File, with-contexts-pkg.lisp: The with-contexts/with-contexts-pkg․lisp file
File, with-contexts.asd: The with-contexts/with-contexts․asd file
File, with-open-file.lisp: The with-contexts/library/with-open-file․lisp file

I
it.unimib.disco.ma.cl.ext.dacf.with-contexts: The it․unimib․disco․ma․cl․ext․dacf․with-contexts package

L
library: The with-contexts/library module

M
managed-resource-context: Public classes
managed-resource-context.lisp: The with-contexts/library/managed-resource-context․lisp file
Module, library: The with-contexts/library module

N
null-context: Public classes
null-context.lisp: The with-contexts/library/null-context․lisp file

P
Package, it.unimib.disco.ma.cl.ext.dacf.with-contexts: The it․unimib․disco․ma․cl․ext․dacf․with-contexts package

R
redirect-context: Public classes
redirect-context.lisp: The with-contexts/library/redirect-context․lisp file
redirect-error-output-context: Public classes
redirect-input-context: Public classes
redirect-output-context: Public classes
redirect-standard-output-context: Public classes

S
suppress-context.lisp: The with-contexts/library/suppress-context․lisp file
System, with-contexts: The with-contexts system

W
with-cl.lisp: The with-contexts/with-cl․lisp file
with-contexts: The with-contexts system
with-contexts-pkg.lisp: The with-contexts/with-contexts-pkg․lisp file
with-contexts.asd: The with-contexts/with-contexts․asd file
with-open-file.lisp: The with-contexts/library/with-open-file․lisp file