|
| 1 | +{-# LANGUAGE CPP #-} |
1 | 2 | {-# LANGUAGE DuplicateRecordFields #-}
|
2 | 3 | {-# LANGUAGE OverloadedStrings #-}
|
3 | 4 | module ApplyRefactPluginSpec where
|
@@ -96,14 +97,24 @@ applyRefactSpec = do
|
96 | 97 | res = IdeResultOk
|
97 | 98 | PublishDiagnosticsParams
|
98 | 99 | { _uri = filePath
|
99 |
| - , _diagnostics = List $ |
| 100 | + , _diagnostics = List |
| 101 | +#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,2,2,0))) |
| 102 | + [Diagnostic {_range = Range { _start = Position {_line = 13, _character = 0} |
| 103 | + , _end = Position {_line = 13, _character = 100000}} |
| 104 | + , _severity = Just DsInfo |
| 105 | + , _code = Just "parser" |
| 106 | + , _source = Just "hlint" |
| 107 | + , _message = "Parse error: virtual }\n data instance Sing (z :: (a :~: b)) where\n SRefl :: Sing Refl +\n> \n\n" |
| 108 | + , _relatedInformation = Nothing }]} |
| 109 | +#else |
100 | 110 | [Diagnostic {_range = Range { _start = Position {_line = 11, _character = 28}
|
101 | 111 | , _end = Position {_line = 11, _character = 100000}}
|
102 | 112 | , _severity = Just DsInfo
|
103 | 113 | , _code = Just "parser"
|
104 | 114 | , _source = Just "hlint"
|
105 |
| - , _message = "Parse error: :~:\n import Data.Type.Equality ((:~:) (..), (:~~:) (..))\n \n> data instance Sing (z :: (a :~: b)) where\n SRefl :: Sing Refl\n\n" |
| 115 | + , _message = "Parse error: :~:\n import Data.Type.Equality ((:~:) (..), (:~~:) (..))\n \n> data instance Sing (z :: (a :~: b)) where\n SRefl :: Sing Refl +\n\n" |
106 | 116 | , _relatedInformation = Nothing }]}
|
| 117 | +#endif |
107 | 118 | testCommand testPlugins act "applyrefact" "lint" arg res
|
108 | 119 |
|
109 | 120 | -- ---------------------------------
|
|
0 commit comments