cursor-0.3.2.0: Purely Functional Cursors
Safe HaskellNone
LanguageHaskell2010

Cursor.Text

Synopsis

Documentation

newtype TextCursor Source #

A cursor for single-line texts

Constructors

TextCursor 

Instances

Instances details
Eq TextCursor Source # 
Instance details

Defined in Cursor.Text

Show TextCursor Source # 
Instance details

Defined in Cursor.Text

Generic TextCursor Source # 
Instance details

Defined in Cursor.Text

Associated Types

type Rep TextCursor :: Type -> Type #

NFData TextCursor Source # 
Instance details

Defined in Cursor.Text

Methods

rnf :: TextCursor -> () #

Validity TextCursor Source # 
Instance details

Defined in Cursor.Text

type Rep TextCursor Source # 
Instance details

Defined in Cursor.Text

type Rep TextCursor = D1 ('MetaData "TextCursor" "Cursor.Text" "cursor-0.3.2.0-Ch3lJwc3yY89mrJgbt03T" 'True) (C1 ('MetaCons "TextCursor" 'PrefixI 'True) (S1 ('MetaSel ('Just "textCursorList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListCursor Char))))

textCursorSelectBeginWord :: TextCursor -> TextCursor Source #

Move to the beginning of the word

  • "hell|o" -> "|hello"
  • "hello | world" -> "|hello world"
  • "hello |world" -> "hello |world"
  • "| hello" -> "| hello"

textCursorSelectEndWord :: TextCursor -> TextCursor Source #

Move to the end of the word

  • "hell|o" -> "hello|"
  • "hello | world" -> "hello world|"
  • "hello| world" -> "hello| world"
  • "hello |" -> "hello |"

textCursorSelectNextWord :: TextCursor -> TextCursor Source #

Move to the beginning of the next word

  • "|hello" -> "hello|"
  • "hell|o world" -> "hello |world"
  • "hello| world" -> "hello |world"
  • "hello |" -> "hello |"

textCursorSelectPrevWord :: TextCursor -> TextCursor Source #

Move to the end of the previous word

  • "hello|" -> "|hello"
  • "hello w|orld" -> "hello| world"
  • "hello |world" -> "hello| world"
  • " h|ello" -> "| hello"