Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 8273596

Browse files
committed
Fix hlint test for GHC 8.2.1, using older hlint
1 parent 6564a66 commit 8273596

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/unit/ApplyRefactPluginSpec.hs

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DuplicateRecordFields #-}
23
{-# LANGUAGE OverloadedStrings #-}
34
module ApplyRefactPluginSpec where
@@ -97,13 +98,23 @@ applyRefactSpec = do
9798
PublishDiagnosticsParams
9899
{ _uri = filePath
99100
, _diagnostics = List
101+
#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,2,2,0)))
100102
[Diagnostic {_range = Range { _start = Position {_line = 13, _character = 0}
101103
, _end = Position {_line = 13, _character = 100000}}
102104
, _severity = Just DsInfo
103105
, _code = Just "parser"
104106
, _source = Just "hlint"
105107
, _message = "Parse error: virtual }\n data instance Sing (z :: (a :~: b)) where\n SRefl :: Sing Refl +\n> \n\n"
106108
, _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
107118
testCommand testPlugins act "applyrefact" "lint" arg res
108119

109120
-- ---------------------------------

0 commit comments

Comments
 (0)