-
Notifications
You must be signed in to change notification settings - Fork 71
Ghc 45102 #529
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
Open
jappeace
wants to merge
2
commits into
haskellfoundation:main
Choose a base branch
from
jappeace:GHC-45102
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ghc 45102 #529
Changes from all commits
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
This file contains hidden or 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 @@ | ||
**/dist-newstyle/* |
3 changes: 3 additions & 0 deletions
3
message-index/messages/GHC-45102/example1/after/cabal.project
This file contains hidden or 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,3 @@ | ||
packages: fruits/ | ||
packages: vegatables/ | ||
packages: salad/ |
1 change: 1 addition & 0 deletions
1
message-index/messages/GHC-45102/example1/after/fruits/Tomatoes.hs
This file contains hidden or 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 @@ | ||
module Tomatoes where |
13 changes: 13 additions & 0 deletions
13
message-index/messages/GHC-45102/example1/after/fruits/fruits.cabal
This file contains hidden or 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 @@ | ||
cabal-version: 3.0 | ||
|
||
name: fruits | ||
version: 0.0.1 | ||
license: MIT | ||
author: Jappie | ||
maintainer: [email protected] | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Tomatoes | ||
build-depends: base | ||
default-language: Haskell2010 |
5 changes: 5 additions & 0 deletions
5
message-index/messages/GHC-45102/example1/after/salad/Salad.hs
This file contains hidden or 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,5 @@ | ||
{-# LANGUAGE PackageImports #-} | ||
|
||
module Salad where | ||
|
||
import "vegetables" Tomatoes |
13 changes: 13 additions & 0 deletions
13
message-index/messages/GHC-45102/example1/after/salad/salad.cabal
This file contains hidden or 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 @@ | ||
cabal-version: 3.0 | ||
|
||
name: salad | ||
version: 0.0.1 | ||
license: MIT | ||
author: Jappie | ||
maintainer: [email protected] | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Salad | ||
build-depends: base, fruits, vegetables | ||
default-language: Haskell2010 |
1 change: 1 addition & 0 deletions
1
message-index/messages/GHC-45102/example1/after/vegatables/Tomatoes.hs
This file contains hidden or 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 @@ | ||
module Tomatoes where |
13 changes: 13 additions & 0 deletions
13
message-index/messages/GHC-45102/example1/after/vegatables/vegetables.cabal
This file contains hidden or 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 @@ | ||
cabal-version: 3.0 | ||
|
||
name: vegetables | ||
version: 0.0.1 | ||
license: MIT | ||
author: Jappie | ||
maintainer: [email protected] | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Tomatoes | ||
build-depends: base | ||
default-language: Haskell2010 |
3 changes: 3 additions & 0 deletions
3
message-index/messages/GHC-45102/example1/before/cabal.project
This file contains hidden or 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,3 @@ | ||
packages: fruits/ | ||
packages: vegatables/ | ||
packages: salad/ |
1 change: 1 addition & 0 deletions
1
message-index/messages/GHC-45102/example1/before/fruits/Tomatoes.hs
This file contains hidden or 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 @@ | ||
module Tomatoes where |
13 changes: 13 additions & 0 deletions
13
message-index/messages/GHC-45102/example1/before/fruits/fruits.cabal
This file contains hidden or 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 @@ | ||
cabal-version: 3.0 | ||
|
||
name: fruits | ||
version: 0.0.1 | ||
license: MIT | ||
author: Jappie | ||
maintainer: [email protected] | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Tomatoes | ||
build-depends: base | ||
default-language: Haskell2010 |
3 changes: 3 additions & 0 deletions
3
message-index/messages/GHC-45102/example1/before/salad/Salad.hs
This file contains hidden or 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,3 @@ | ||
module Salad where | ||
|
||
import Tomatoes |
13 changes: 13 additions & 0 deletions
13
message-index/messages/GHC-45102/example1/before/salad/salad.cabal
This file contains hidden or 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 @@ | ||
cabal-version: 3.0 | ||
|
||
name: salad | ||
version: 0.0.1 | ||
license: MIT | ||
author: Jappie | ||
maintainer: [email protected] | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Salad | ||
build-depends: base, fruits, vegetables | ||
default-language: Haskell2010 |
1 change: 1 addition & 0 deletions
1
message-index/messages/GHC-45102/example1/before/vegatables/Tomatoes.hs
This file contains hidden or 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 @@ | ||
module Tomatoes where |
13 changes: 13 additions & 0 deletions
13
message-index/messages/GHC-45102/example1/before/vegatables/vegetables.cabal
This file contains hidden or 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 @@ | ||
cabal-version: 3.0 | ||
|
||
name: vegetables | ||
version: 0.0.1 | ||
license: MIT | ||
author: Jappie | ||
maintainer: [email protected] | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Tomatoes | ||
build-depends: base | ||
default-language: Haskell2010 |
This file contains hidden or 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 @@ | ||
--- | ||
title: Lambda syntax in `case` expression | ||
--- | ||
|
||
When pattern matching with a `case` expression, backslash (`\`) is not required before the pattern. | ||
|
||
## Error Message | ||
|
||
```haskell | ||
LambdaInCase.hs:6:5: error: [GHC-00482] | ||
Lambda-syntax in pattern. | ||
Pattern matching on functions is not possible. | ||
| | ||
6 | \a -> a | ||
| ^^^^^^^ | ||
``` |
This file contains hidden or 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,46 @@ | ||
--- | ||
title: Ambiguous module name from multiple packages | ||
summary: A module with the same name was exported from multiple packages | ||
severity: error | ||
introduced: 9.6.1 | ||
--- | ||
|
||
|
||
When two packages export a module of the same name, ghc doesn't know which you | ||
want to import. | ||
|
||
The solution is to use package import. | ||
|
||
So if we've two packages: | ||
|
||
+ package fruits exports tomatoes: | ||
```haskell | ||
module Tomatoes where | ||
``` | ||
|
||
+ and package vegetables exports tomatoes: | ||
|
||
```haskell | ||
module Tomatoes where | ||
``` | ||
|
||
then our package salad program will cause an error: | ||
|
||
``` | ||
module Salad where | ||
import Tomatoes | ||
``` | ||
|
||
The solution is to be specific with package imports: | ||
|
||
``` | ||
|
||
{-# LANGUAGE PackageImports #-} | ||
|
||
module Salad where | ||
|
||
import "vegetables" Tomatoes | ||
``` | ||
|
||
alternatively you could patch the upstream libraries, | ||
but package imports is usually easiest. |
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.
Is it related to GHC-45102? Seems like a rebase artifact.