Skip to content

Commit 8a90d27

Browse files
committed
put in broken test of hlint dynflags
1 parent 524ef15 commit 8a90d27

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

plugins/hls-hlint-plugin/test/Main.hs

+6
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ suggestionsTests =
222222
waitForAllProgressDone
223223
-- hlint will report a parse error if PatternSynonyms is enabled
224224
expectNoMoreDiagnostics 3 doc "hlint"
225+
, testCase "hlint should not enable ForeignFunctionInterface if it is disabled" $ runHlintSession "labelkeyword" $ do
226+
doc <- openDoc "LabelKeyword.hs" "haskell"
227+
228+
waitForAllProgressDone
229+
-- hlint will report a parse error if ForeignFunctionInterface is enabled
230+
expectNoMoreDiagnostics 3 doc "hlint"
225231
, testCase "hlint should not warn about redundant irrefutable pattern with LANGUAGE Strict" $ runHlintSession "" $ do
226232
doc <- openDoc "StrictData.hs" "haskell"
227233

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{-# LANGUAGE DuplicateRecordFields #-}
2+
{-# LANGUAGE OverloadedRecordDot #-}
3+
module Foo (Node(..)) where
4+
5+
data Node = Node
6+
{
7+
label :: ()
8+
}
9+
10+
instance Semigroup Node where
11+
n1 <> n2 = Node
12+
{ label = n1.label <> n2.label
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cradle:
2+
direct:
3+
arguments:
4+
- "-XNoForeignFunctionInterface"
5+
- "LabelKeyword"

0 commit comments

Comments
 (0)