-
-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add known broken tests for import placement #2425
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
ghcide/test/data/import-placement/MultiLinePragma.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{-# OPTIONS_GHC -Wall #-} | ||
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE RecordWildCards, | ||
OverloadedStrings #-} | ||
{-# OPTIONS_GHC -Wall, | ||
-Wno-unused-imports #-} | ||
import Data.Monoid | ||
|
||
|
||
-- some comment | ||
class Semigroup a => SomeData a | ||
|
||
instance SomeData All |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{-# OPTIONS_GHC -Wall #-} | ||
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE RecordWildCards, | ||
OverloadedStrings #-} | ||
{-# OPTIONS_GHC -Wall, | ||
-Wno-unused-imports #-} | ||
|
||
|
||
-- some comment | ||
class Semigroup a => SomeData a | ||
|
||
instance SomeData All |
16 changes: 16 additions & 0 deletions
16
ghcide/test/data/import-placement/OptionsNotAtTopWithSpaces.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
|
||
{-# LANGUAGE TupleSections #-} | ||
import Data.Monoid | ||
|
||
|
||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
15 changes: 15 additions & 0 deletions
15
ghcide/test/data/import-placement/OptionsNotAtTopWithSpaces.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
|
||
{-# LANGUAGE TupleSections #-} | ||
|
||
|
||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
8 changes: 8 additions & 0 deletions
8
ghcide/test/data/import-placement/OptionsPragmaNotAtTop.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Data.Monoid | ||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
23 changes: 23 additions & 0 deletions
23
ghcide/test/data/import-placement/PragmaNotAtTopMultipleComments.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
{-# OPTIONS_GHC -Wall, | ||
OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
-- another comment | ||
-- oh | ||
{- multi line | ||
comment | ||
-} | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
import Data.Monoid | ||
{- some comment -} | ||
|
||
-- again | ||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
22 changes: 22 additions & 0 deletions
22
ghcide/test/data/import-placement/PragmaNotAtTopMultipleComments.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
{-# OPTIONS_GHC -Wall, | ||
OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
-- another comment | ||
-- oh | ||
{- multi line | ||
comment | ||
-} | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
{- some comment -} | ||
|
||
-- again | ||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
18 changes: 18 additions & 0 deletions
18
ghcide/test/data/import-placement/PragmaNotAtTopWithCommentsAtTop.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
{-# OPTIONS_GHC -Wall #-} | ||
-- another comment | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
import Data.Monoid | ||
{- some comment -} | ||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
17 changes: 17 additions & 0 deletions
17
ghcide/test/data/import-placement/PragmaNotAtTopWithCommentsAtTop.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
{-# OPTIONS_GHC -Wall #-} | ||
-- another comment | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
{- some comment -} | ||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
19 changes: 19 additions & 0 deletions
19
ghcide/test/data/import-placement/PragmaNotAtTopWithImports.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
{-# OPTIONS_GHC -Wall #-} | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
module Test | ||
( SomeData(..) | ||
) where | ||
import Data.Text | ||
import Data.Monoid | ||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
18 changes: 18 additions & 0 deletions
18
ghcide/test/data/import-placement/PragmaNotAtTopWithImports.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
{-# OPTIONS_GHC -Wall #-} | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
module Test | ||
( SomeData(..) | ||
) where | ||
import Data.Text | ||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
22 changes: 22 additions & 0 deletions
22
ghcide/test/data/import-placement/PragmaNotAtTopWithModuleDecl.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
|
||
{-# OPTIONS_GHC -Wall #-} | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
module Test | ||
( SomeData(..) | ||
) where | ||
import Data.Monoid | ||
|
||
|
||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
21 changes: 21 additions & 0 deletions
21
ghcide/test/data/import-placement/PragmaNotAtTopWithModuleDecl.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
|
||
{-# OPTIONS_GHC -Wall #-} | ||
|
||
{-# LANGUAGE TupleSections #-} | ||
module Test | ||
( SomeData(..) | ||
) where | ||
|
||
|
||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
10 changes: 10 additions & 0 deletions
10
ghcide/test/data/import-placement/ShebangNotAtTop.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
import Data.Monoid | ||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
|
||
f :: Int -> Int | ||
f x = x * x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
|
||
f :: Int -> Int | ||
f x = x * x |
8 changes: 8 additions & 0 deletions
8
ghcide/test/data/import-placement/ShebangNotAtTopNoSpace.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Data.Monoid | ||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
|
||
f :: Int -> Int | ||
f x = x * x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
|
||
f :: Int -> Int | ||
f x = x * x |
21 changes: 21 additions & 0 deletions
21
ghcide/test/data/import-placement/ShebangNotAtTopWithSpaces.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
|
||
{-# OPTIONS_GHC -Wall #-} | ||
|
||
|
||
|
||
{-# LANGUAGE TupleSections #-} | ||
import Data.Monoid | ||
|
||
|
||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
20 changes: 20 additions & 0 deletions
20
ghcide/test/data/import-placement/ShebangNotAtTopWithSpaces.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
|
||
{-# OPTIONS_GHC -Wall #-} | ||
|
||
|
||
|
||
{-# LANGUAGE TupleSections #-} | ||
|
||
|
||
|
||
|
||
class Semigroup a => SomeData a | ||
instance SomeData All | ||
|
||
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])" | ||
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | ||
|
||
addOne :: Int -> Int | ||
addOne x = x + 1 |
18 changes: 18 additions & 0 deletions
18
ghcide/test/data/import-placement/WhereDeclLowerInFile.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Asdf | ||
(f | ||
, where') | ||
|
||
where | ||
import Data.Int | ||
|
||
|
||
|
||
f :: Int64 -> Int64 | ||
f = id' | ||
where id' = id | ||
|
||
g :: Int -> Int | ||
g = id | ||
|
||
where' :: Int -> Int | ||
where' = id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module Asdf | ||
(f | ||
, where') | ||
|
||
where | ||
|
||
|
||
|
||
f :: Int64 -> Int64 | ||
f = id' | ||
where id' = id | ||
|
||
g :: Int -> Int | ||
g = id | ||
|
||
where' :: Int -> Int | ||
where' = id |
16 changes: 16 additions & 0 deletions
16
ghcide/test/data/import-placement/WhereKeywordLowerInFileNoExports.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Asdf | ||
|
||
|
||
where | ||
import Data.Int | ||
|
||
|
||
f :: Int64 -> Int64 | ||
f = id' | ||
where id' = id | ||
|
||
g :: Int -> Int | ||
g = id | ||
|
||
where' :: Int -> Int | ||
where' = id |
15 changes: 15 additions & 0 deletions
15
ghcide/test/data/import-placement/WhereKeywordLowerInFileNoExports.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Asdf | ||
|
||
|
||
where | ||
|
||
|
||
f :: Int64 -> Int64 | ||
f = id' | ||
where id' = id | ||
|
||
g :: Int -> Int | ||
g = id | ||
|
||
where' :: Int -> Int | ||
where' = id |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected version of this test doesn't have the
OPTIONS_GHC -Wno-unrecognized-pragmas
line. I think the expected version of the test should have this line unless the test does more than add an import.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no you're right, that's updated now.