Diagrams.Trail

# Type definitions

## Lines and loops

data Trail' l v

glueLine

closeLine

cutLoop

## Generic trails

data Trail v

wrapTrail

wrapLine

wrapLoop

onTrail

onLine

glueTrail

closeTrail

cutTrail

# Constructing trails

emptyLine

emptyTrail

lineFromVertices

trailFromVertices

lineFromOffsets

trailFromOffsets

lineFromSegments

trailFromSegments

# Eliminating trails

withTrail'

withTrail

withLine

isLineEmpty

isTrailEmpty

isLine

isLoop

trailSegments

lineSegments

loopSegments

onLineSegments

trailOffsets

trailOffset

lineOffsets

lineOffset

loopOffsets

trailVertices

lineVertices

loopVertices

fixTrail

# Modifying trails

reverseTrail

reverseLocTrail

reverseLine

reverseLocLine

reverseLoop

reverseLocLoop

# Internals

## Type tags

data Line

data Loop

## Segment trees

data SegTree v

trailMeasure

numSegs

offset