Skip to content

Commit dd7c926

Browse files
committed
More improvements
1 parent 884dfe3 commit dd7c926

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

message-index/messages/GHC-69158/example/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Greeting.hs:3:5: error: [GHC-69158]
2020

2121
## Explanation
2222

23-
This examples defines the modules `World` and `Universe`, both of which export
23+
This example defines the modules `World` and `Universe`, both of which export
2424
an identifier named `greeting`. The `Greeting` module then imports `World` and
2525
`Universe` qualified, meaning it can use both identifiers named `greeting` in
2626
the body of `bothGreetings` without any ambiguity. However, the export of both

message-index/messages/GHC-69925/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ severity: error
55
introduced: 9.6.1
66
---
77

8-
When pattern matching, unboxed string literals (with the [MagicHash](https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/magic_hash.html?highlight=magichash) postfix) are not allowed. Unboxed string literals are essentially C strings allocated outside of the Haskell heap, and they evaluate to pointers to the resulting strings. Thus,`"foo"#` is of type `Addr#`. While `eqAddr#` can be used to compare these pointers, two identically-written unboxed string literals typically do not point the same address.
8+
When pattern matching, unboxed string literals (with the [MagicHash](https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/magic_hash.html?highlight=magichash) postfix) are not allowed. Unboxed string literals are essentially C strings allocated outside of the Haskell heap, and they evaluate to pointers to the resulting strings. Thus,`"foo"#` is of type `Addr#`. While `eqAddr#` can be used to compare these pointers, two identically-written unboxed string literals typically do not point to the same address.
99

message-index/messages/GHC-70712/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ severity: error
55
introduced: 9.6.1
66
---
77

8-
The double-dot syntax, which is part of the `RecordWildCards` extension, is not allowed as part of a record update, whether the extension is turned on or not.
8+
The double-dot syntax, which is part of the [`RecordWildCards`](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/record_wildcards.html) extension, is not allowed as part of a record update, whether the extension is turned on or not.

message-index/messages/GHC-76037/example3/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Data constructor not imported
33
---
44

5-
The import statement `import Foo (Bar)` imports the `Bar` data type, but no its constructor `MkBar`.
5+
The import statement `import Foo (Bar)` imports the `Bar` data type, but not its constructor `MkBar`.
66
As such, the constructor is not in scope.
77

88
## Error Message

message-index/messages/GHC-90177/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ When writing an instance for a typeclass, the ideal situation is that this insta
1010

1111
If the instances are defined in a separate module, it becomes possible that the typeclass and the datatype are brought into scope but the *instance for that datatype* is not, leading to unexpected `No instance of Foo for type Bar`.
1212

13-
Whilst this is not always avoidable, it is best practice to place the instance in the module that defines either the typeclass or the datatype. Another option is to wrap the type in `newtype`, and then define an instance of the class for the *newtype* in the same module.
13+
Whilst this is not always avoidable, it is best practice to place the instance in the module that defines either the typeclass or the datatype. However that solution is not always possible (for example in cases where both the typeclass and the data type are declared in 3rd party libraries). In such cases we can wrap the datatype in `newtype`, and then define an instance of the class for the *newtype* in the same module.

0 commit comments

Comments
 (0)