judge-0.1.2.0: Tableau-based theorem prover.

Copyright(c) 2017 2018 N Steenbergen
LicenseGPL-3
Maintainerns@slak.ws
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Logic.Judge.PointedList

Description

Re-export PointedList with convenience functions.

Synopsis

Documentation

asList :: PointedList a -> [a] Source #

Turn a PointedList into a non-pointed list, assuming no particular ordering.

toList :: Foldable t => forall a. t a -> [a] #

List of elements of a structure, from left to right.

current :: PointedList a -> a Source #

Get the current focus of a PointedList.

insertAll :: Traversable t => t a -> Maybe (PointedList a) -> Maybe (PointedList a) Source #

Add a number of entries to a possibly empty PointedList.

focus :: PointedList a -> [PointedList a] Source #

Create a list of variations of the provided PointedList, one for each element to take focus.

This function is a bit sloppy. It assumes no particular order. Note that using toList instead can cause longer (or shorter?) running times.

modify :: PointedList a -> (a -> Maybe a) -> Maybe (PointedList a) Source #

Update the focused element of a PointedList using a function that returns Just the new value, or Nothing for deletion.

update :: PointedList a -> Maybe a -> Maybe (PointedList a) Source #

Update the focused element of a PointedList with the value of the Just, or delete the element if that value is Nothing.