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