tvl-depot/users/aspen/emacs/snippets/haskell-mode/lens.field

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
377 B
Text
Raw Normal View History

# -*- mode: snippet -*-
# name: lens.field
# key: lens
# expand-env: ((yas-indent-line 'fixed))
# --
${1:field} :: Lens' ${2:Source} ${3:Target}
$1 = lens _${4:sourceField} $ \\${2:$(-> yas-text s-word-initials s-downcase)} ${4:$(-> yas-text s-word-initials s-downcase)} -> ${2:$(-> yas-text s-word-initials s-downcase)} { _$4 = ${4:$(-> yas-text s-word-initials s-downcase)} }