tvl-depot/snippets/haskell-mode/lens.field
2018-03-29 18:10:07 -04:00

7 lines
No EOL
377 B
Text

# -*- 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)} }