-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add known broken tests for import placement
- Loading branch information
1 parent
0b74792
commit 3762375
Showing
25 changed files
with
395 additions
and
1 deletion.
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.