on master help sign in
Merge branch 'master' of github.com:edwinb/Idris-dev
commit3b15bf7162559e006adc094fc72a633dcd8e2b8f authorEdwin Brady <ecb10@st-andrews.ac.uk> dateFri 19 Jul 2013, 11:46 (13 years ago) parentb543b2989caf4f
2 files changed+48−1
contribs/tool-support/vim/syntax_checkers/idris/idris.vim+46 src/Idris/Completion.hs+2−1
contribs/tool-support/vim/syntax_checkers/idris/idris.vimnew file+46
@@ -0,0 +1,46 @@
1+"============================================================================
2+"File: idris.vim
3+"Description: Syntax checking plugin for syntastic.vim
4+"Maintainer: raichoo <raichoo at googlemail dot com>
5+"License: This program is free software. It comes without any warranty,
6+" to the extent permitted by applicable law. You can redistribute
7+" it and/or modify it under the terms of the Do What The Fuck You
8+" Want To Public License, Version 2, as published by Sam Hocevar.
9+" See http://sam.zoy.org/wtfpl/COPYING for more details.
10+"
11+"============================================================================
12+
13+if exists("g:loaded_syntastic_idris_idris_checker")
14+ finish
15+endif
16+let g:loaded_syntastic_idris_idris_checker=1
17+
18+function! SyntaxCheckers_idris_idris_IsAvailable()
19+ return executable("idris")
20+endfunction
21+
22+if !exists("g:syntastic_idris_options")
23+ let g:syntastic_idris_options = " "
24+endif
25+
26+
27+function! SyntaxCheckers_idris_idris_GetLocList()
28+ let makeprg = syntastic#makeprg#build({
29+ \ 'exe': 'idris',
30+ \ 'args': '--check '. g:syntastic_idris_options,
31+ \ 'filetype': 'idris',
32+ \ 'subchecker': 'idris' })
33+
34+ let errorformat =
35+ \ '"%f" (line %l\, column %c\):,' .
36+ \ '%f\:%l\:%m,' .
37+ \ 'user error (%f\:%l\:%m\)'
38+
39+ return SyntasticMake({
40+ \ 'makeprg': makeprg,
41+ \ 'errorformat': errorformat })
42+endfunction
43+
44+call g:SyntasticRegistry.CreateAndRegisterChecker({
45+ \ 'filetype': 'idris',
46+ \ 'name': 'idris'})
src/Idris/Completion.hs+2−1
@@ -63,7 +63,8 @@ names = do i <- get
6363 mapMaybe (nameString . fst) (ctxtAlist ctxt) ++
6464 -- Explicitly add primitive types, as these are special-cased in the parser
6565 ["Int", "Integer", "Float", "Char", "String", "Type",
66− "Ptr", "Bits8", "Bits16", "Bits32", "Bits64"]
66+ "Ptr", "Bits8", "Bits16", "Bits32", "Bits64",
67+ "Bits8x16", "Bits16x8", "Bits32x4", "Bits64x2"]
6768
6869metavars :: Idris [String]
6970metavars = do i <- get