diff options
| author | Vito G. Graffagnino <vito@graffagnino.xyz> | 2022-08-28 12:24:01 +0100 |
|---|---|---|
| committer | Vito G. Graffagnino <vito@graffagnino.xyz> | 2022-08-28 12:24:01 +0100 |
| commit | 823302458ec6c53455a3f34674415c43ce6a3187 (patch) | |
| tree | 92168b44b01f5b2236b7cdf331e227c4790431ee /snippets/idris.snippets | |
| parent | 9ea6111717518625cbd28a020493ec06610ff01e (diff) | |
Added snippets directory
Diffstat (limited to 'snippets/idris.snippets')
| -rw-r--r-- | snippets/idris.snippets | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/snippets/idris.snippets b/snippets/idris.snippets new file mode 100644 index 0000000..abbedb6 --- /dev/null +++ b/snippets/idris.snippets @@ -0,0 +1,46 @@ +snippet mod + module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` + ${0} +snippet imp + import ${0:List} +snippet fn + ${1:fn} : ${2:a} -> ${3:a} + $1 ${4} = + ${0} +snippet fn1 + ${1:fn} : ${2:a} -> ${3:a} + $1 ${4} = + ${0} +snippet fn2 + ${1:fn} : ${2:a} -> ${3:a} -> ${4:a} + $1 ${5} = + ${0} +snippet fn3 + ${1:fn} : ${2:a} -> ${3:a} -> ${4:a} -> ${5:a} + $1 ${6} = + ${0} +snippet fn0 + ${1:fn} : ${2:a} + $1 = + ${0} +snippet case + case ${1} of + ${2} => + ${0} +snippet let + let + ${1} = + ${2} + in + ${0} +snippet wh + where + ${0} +snippet if + if ${1} then + ${2:${VISUAL}} + else + ${0} + ${0} +snippet \ "Lambda function (\x => ...)" + (\\${1:_} => ${0}) |
