Functional Pearl: Weaving a web

Suppose, you want to implement a structured editor for some term type, so that the user can navigate through a given term and perform edit actions on subterms. In this case you are immediately faced with the problem of how to keep track of the cursor movements and the user's edits in a reasonab...

Full description

Bibliographic Details
Main Authors: Hinze, R, Jeuring, J
Format: Journal article
Published: 2001
_version_ 1826258147290906624
author Hinze, R
Jeuring, J
author_facet Hinze, R
Jeuring, J
author_sort Hinze, R
collection OXFORD
description Suppose, you want to implement a structured editor for some term type, so that the user can navigate through a given term and perform edit actions on subterms. In this case you are immediately faced with the problem of how to keep track of the cursor movements and the user's edits in a reasonably efficient manner. In a previous pearl G. Huet introduced a simple data structure, the Zipper, that addresses this problem. A drawback of the Zipper is that the type of cursor locations depends on the structure of the term type, that is, each term type gives rise to a different type of locations (unless you are working in an untyped environment). In this pearl we present an alternative data structure, the Web, that serves the same purpose but that is parametric in the underlying term type.
first_indexed 2024-03-06T18:29:26Z
format Journal article
id oxford-uuid:09221eb0-c4b3-472d-9c3d-a361b7392dec
institution University of Oxford
last_indexed 2024-03-06T18:29:26Z
publishDate 2001
record_format dspace
spelling oxford-uuid:09221eb0-c4b3-472d-9c3d-a361b7392dec2022-03-26T09:16:37ZFunctional Pearl: Weaving a webJournal articlehttp://purl.org/coar/resource_type/c_dcae04bcuuid:09221eb0-c4b3-472d-9c3d-a361b7392decDepartment of Computer Science2001Hinze, RJeuring, JSuppose, you want to implement a structured editor for some term type, so that the user can navigate through a given term and perform edit actions on subterms. In this case you are immediately faced with the problem of how to keep track of the cursor movements and the user's edits in a reasonably efficient manner. In a previous pearl G. Huet introduced a simple data structure, the Zipper, that addresses this problem. A drawback of the Zipper is that the type of cursor locations depends on the structure of the term type, that is, each term type gives rise to a different type of locations (unless you are working in an untyped environment). In this pearl we present an alternative data structure, the Web, that serves the same purpose but that is parametric in the underlying term type.
spellingShingle Hinze, R
Jeuring, J
Functional Pearl: Weaving a web
title Functional Pearl: Weaving a web
title_full Functional Pearl: Weaving a web
title_fullStr Functional Pearl: Weaving a web
title_full_unstemmed Functional Pearl: Weaving a web
title_short Functional Pearl: Weaving a web
title_sort functional pearl weaving a web
work_keys_str_mv AT hinzer functionalpearlweavingaweb
AT jeuringj functionalpearlweavingaweb