Skip to content

Commit 59eb14e

Browse files
committed
Update stack yamls, add RecordWildcard test
1 parent f81ab41 commit 59eb14e

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tests = testGroup "Rename"
2525
[ goldenWithRename "Data constructor" "DataConstructor" $ \doc ->
2626
rename doc (Position 0 15) "Op"
2727
, goldenWithRename "Data constructor with fields" "DataConstructorWithFields" $ \doc ->
28-
rename doc (Position 1 13) "FooRenamed"
28+
rename doc (Position 2 13) "FooRenamed"
2929
, goldenWithRename "Exported function" "ExportedFunction" $ \doc ->
3030
rename doc (Position 2 1) "quux"
3131
, goldenWithRename "Field Puns" "FieldPuns" $ \doc ->

plugins/hls-rename-plugin/test/testdata/DataConstructorWithFields.expected.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE NamedFieldPuns #-}
2-
data Foo = FooRenamed { FooRenamed :: Int, FooRenamed :: Bool }
2+
{-# LANGUAGE RecordWildCards #-}
3+
data Foo = FooRenamed { a :: Int, b :: Bool }
34

45
foo1 :: Foo
56
foo1 = FooRenamed { a = 1, b = True }
@@ -11,4 +12,7 @@ fun1 :: Foo -> Int
1112
fun1 FooRenamed {a} = a
1213

1314
fun2 :: Foo -> Int
14-
fun2 FooRenamed {a = i} = i
15+
fun2 FooRenamed {a = i} = i
16+
17+
fun3 :: Foo -> Int
18+
fun3 FooRenamed {..} = a

plugins/hls-rename-plugin/test/testdata/DataConstructorWithFields.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE NamedFieldPuns #-}
2+
{-# LANGUAGE RecordWildCards #-}
23
data Foo = Foo { a :: Int, b :: Bool }
34

45
foo1 :: Foo
@@ -11,4 +12,7 @@ fun1 :: Foo -> Int
1112
fun1 Foo {a} = a
1213

1314
fun2 :: Foo -> Int
14-
fun2 Foo {a = i} = i
15+
fun2 Foo {a = i} = i
16+
17+
fun3 :: Foo -> Int
18+
fun3 Foo {..} = a

stack-lts22.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ allow-newer-deps:
2121
extra-deps:
2222
- Diff-0.5
2323
- floskell-0.11.1
24-
- hiedb-0.6.0.2
24+
- hiedb-0.7.0.0
2525
- hie-bios-0.15.0
2626
- implicit-hie-0.1.4.0
2727
- lsp-2.7.0.0

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ allow-newer-deps:
2222

2323
extra-deps:
2424
- floskell-0.11.1
25-
- hiedb-0.6.0.2
25+
- hiedb-0.7.0.0
2626
- implicit-hie-0.1.4.0
2727
- hie-bios-0.15.0
2828
- hw-fingertree-0.1.2.1

0 commit comments

Comments
 (0)