/ test / handler / test_ghc_mod_handler.vader
test_ghc_mod_handler.vader
 1  Execute(HandleGhcFormat should handle ghc-mod problems):
 2    call ale#test#SetFilename('check2.hs')
 3  
 4    AssertEqual
 5    \ [
 6    \   {
 7    \     'lnum': 2,
 8    \     'col': 1,
 9    \     'type': 'E',
10    \     'text': 'Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.',
11    \   },
12    \   {
13    \     'lnum': 2,
14    \     'col': 1,
15    \     'type': 'E',
16    \     'text': 'Suggestion: Use camelCaseFound:  my_variable = ...Why not:  myVariable = ...',
17    \   },
18    \   {
19    \     'lnum': 6,
20    \     'col': 1,
21    \     'type': 'W',
22    \     'text': 'Eta reduceFound:  myFunc x = succ xWhy not:  myFunc = succ',
23    \   },
24    \   {
25    \     'lnum': 28,
26    \     'col': 28,
27    \     'type': 'W',
28    \     'text': 'Defaulting the following constraints to type ‘Integer’ (Num a0) arising from the literal ‘3’ at check2.hs:28:28 (Eq a0) arising from a use of ‘lookup’ at check2.hs:28:21-28 • In the first argument of ‘lookup’, namely ‘3’ In the expression: lookup 3 In the second argument of ‘fmap’, namely ‘(lookup 3 $ zip [1, 2, 3] [4, 5, 6])''’'
29    \   },
30    \ ],
31    \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
32    \   'check2.hs:2:1:Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.',
33    \   'check2.hs:2:1: Suggestion: Use camelCaseFound:  my_variable = ...Why not:  myVariable = ...',
34    \   'check2.hs:6:1: Warning: Eta reduceFound:  myFunc x = succ xWhy not:  myFunc = succ',
35    \   'xxx.hs:6:1: Warning: Eta reduceFound:  myFunc x = succ xWhy not:  myFunc = succ',
36    \   printf("check2.hs:28:28: Warning: Defaulting the following constraints to type ‘Integer’ (Num a0) arising from the literal ‘3’ at %s/check2.hs:28:28 (Eq a0) arising from a use of ‘lookup’ at %s/check2.hs:28:21-28 • In the first argument of ‘lookup’, namely ‘3’ In the expression: lookup 3 In the second argument of ‘fmap’, namely ‘(lookup 3 $ zip [1, 2, 3] [4, 5, 6])'’", tempname(), tempname()),
37    \ ])