GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2021-01-22T23:50:33Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/17098Document how to write a pattern synonym that uses a view pattern2021-01-22T23:50:33ZSimon JakobiDocument how to write a pattern synonym that uses a view patternIt took me a bit to figure out how to apply a function to the expression that I want to pattern match on – turns out you can use `ViewPatterns`, as for example `containers`' `Seq` does:
```
pattern (:<|) :: a -> Seq a -> Seq a
pattern x...It took me a bit to figure out how to apply a function to the expression that I want to pattern match on – turns out you can use `ViewPatterns`, as for example `containers`' `Seq` does:
```
pattern (:<|) :: a -> Seq a -> Seq a
pattern x :<| xs <- (viewl -> x :< xs)
where
x :<| xs = x <| xs
```
I think this should be documented in [the user's guide](https://gitlab.haskell.org/ghc/ghc/blob/5e40356f65bc2d62c73be8015c759899f072ac9a/docs/users_guide/glasgow_exts.rst#L5433).9.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/15646ghci takes super long time to find the type of large fractional number2023-03-23T19:15:49ZJohannkokosghci takes super long time to find the type of large fractional number```
:t 1e123456789
```
takes more than 3 seconds to get the type info.
```
:t 1e1234111111111111111111111
```
shows a warning/error,
```
GNU MP: Cannot allocate memory (size=93978265)
```
<details><summary>Trac metadata</summary>
|...```
:t 1e123456789
```
takes more than 3 seconds to get the type info.
```
:t 1e1234111111111111111111111
```
shows a warning/error,
```
GNU MP: Cannot allocate memory (size=93978265)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghci takes super long time to find the type of large fractional number","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"8.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.3","keywords":["type"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"\r\n{{{\r\n:t 1e123456789\r\n}}}\r\n\r\n\r\ntakes more than 3 seconds to get the type info.\r\n\r\n{{{\r\n\r\n:t 1e1234111111111111111111111\r\n}}}\r\n\r\nshows a warning/error,\r\n\r\n\r\n{{{\r\nGNU MP: Cannot allocate memory (size=93978265)\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->9.2.1Andreas KlebingerAndreas Klebingerhttps://gitlab.haskell.org/ghc/ghc/-/issues/13795:kind! is not expanding type synonyms anymore2020-11-03T12:17:31ZHjulle:kind! is not expanding type synonyms anymoreGiven
```hs
type A = ()
:kind! A
```
Expected result:
```hs
A :: *
= ()
```
Actual result:
```hs
A :: *
= A
```
----
Some IRC conversation on the topic (on \#ghc):
```
23:37 < hjulle> :kind! does not seem to expand type synonyms ...Given
```hs
type A = ()
:kind! A
```
Expected result:
```hs
A :: *
= ()
```
Actual result:
```hs
A :: *
= A
```
----
Some IRC conversation on the topic (on \#ghc):
```
23:37 < hjulle> :kind! does not seem to expand type synonyms for me (in GHC 8.0.2), it just prints them
verbatim. Does anyone else have this problem? Example: "type A = ()" ":kind! A" will print out "A :: * = A" (which is not very helpful).
23:40 < hjulle> Is this a bug? The documentation
(https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#ghci-cmd-:kind)
explicitly states that :kind! should expand type synonyms, so I think yes?
23:57 < RyanGlScott> hjulle: That's absolute a bug. File a ticket!
23:57 < RyanGlScott> *absolutely
23:58 < RyanGlScott> Moreover, I know why that's happening
23:59 < RyanGlScott> Internally, :kind! uses the normalise_type function to reduce type families:
http://git.haskell.org/ghc.git/blob/e77b9a2069bca9018f989d7c4f54da099e3ab215:/compiler/types/FamInstEnv.hs#l1408
23:59 < RyanGlScott> But see the comment there
Day changed to 07 jun 2017
00:00 < RyanGlScott> -- Try to not to disturb type synonyms if possible
00:01 < RyanGlScott> So fixing this would just be a matter of calling coreView afterwards (which expands
type synonyms)
00:02 < RyanGlScott> er, actually, expandTypeSynonyms is even better:
http://git.haskell.org/ghc.git/blob/e77b9a2069bca9018f989d7c4f54da099e3ab215:/compiler/types/Type.hs#l364
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.0.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Linux |
| Architecture | x86_64 (amd64) |
</details>
<!-- {"blocked_by":[],"summary":":kind! is not expanding type synonyms anymore","status":"New","operating_system":"Linux","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.2","keywords":[],"differentials":[],"test_case":"","architecture":"x86_64 (amd64)","cc":[""],"type":"Bug","description":"Given\r\n{{{#!hs\r\ntype A = ()\r\n:kind! A\r\n}}}\r\n\r\nExpected result:\r\n{{{#!hs\r\nA :: *\r\n= ()\r\n}}}\r\n\r\nActual result:\r\n{{{#!hs\r\nA :: *\r\n= A\r\n}}}\r\n\r\n----\r\n\r\nSome IRC conversation on the topic (on #ghc):\r\n{{{\r\n23:37 < hjulle> :kind! does not seem to expand type synonyms for me (in GHC 8.0.2), it just prints them\r\n verbatim. Does anyone else have this problem? Example: \"type A = ()\" \":kind! A\" will print out \"A :: * = A\" (which is not very helpful).\r\n23:40 < hjulle> Is this a bug? The documentation\r\n (https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#ghci-cmd-:kind)\r\n explicitly states that :kind! should expand type synonyms, so I think yes?\r\n23:57 < RyanGlScott> hjulle: That's absolute a bug. File a ticket!\r\n23:57 < RyanGlScott> *absolutely\r\n23:58 < RyanGlScott> Moreover, I know why that's happening\r\n23:59 < RyanGlScott> Internally, :kind! uses the normalise_type function to reduce type families:\r\nhttp://git.haskell.org/ghc.git/blob/e77b9a2069bca9018f989d7c4f54da099e3ab215:/compiler/types/FamInstEnv.hs#l1408\r\n23:59 < RyanGlScott> But see the comment there\r\nDay changed to 07 jun 2017\r\n00:00 < RyanGlScott> -- Try to not to disturb type synonyms if possible\r\n00:01 < RyanGlScott> So fixing this would just be a matter of calling coreView afterwards (which expands\r\n type synonyms)\r\n00:02 < RyanGlScott> er, actually, expandTypeSynonyms is even better:\r\nhttp://git.haskell.org/ghc.git/blob/e77b9a2069bca9018f989d7c4f54da099e3ab215:/compiler/types/Type.hs#l364\r\n\r\n}}}\r\n\r\n\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->9.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/12576Large Address space is not supported on Windows2021-01-25T12:33:28ZTamar ChristinaLarge Address space is not supported on Windows`USE_LARGE_ADDRESS_SPACE` is disabled for Windows, as the `--enable-large-address-space` flag is only respected on Darwin.
The general case now depends on the presence of MADV_FREE to enable large address space support. Which means all ...`USE_LARGE_ADDRESS_SPACE` is disabled for Windows, as the `--enable-large-address-space` flag is only respected on Darwin.
The general case now depends on the presence of MADV_FREE to enable large address space support. Which means all possibility of enabling this feature on Windows have been removed.
The reason for it being disabled is described in the configure.ac file:
```
Windows has VirtualAlloc MEM_RESERVE/MEM_COMMIT, however
it counts page-table space as committed memory, and so quickly
runs out of paging file when we have multiple processes reserving
1TB of address space, we get the following error:
VirtualAlloc MEM_RESERVE 1099512676352 bytes failed: The paging file is too small for this operation to complete.
```9.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/12178Allow inline pragmas on pattern synonyms2021-02-01T16:15:11ZMatthew PickeringAllow inline pragmas on pattern synonymsRichard observes that it might be useful to allow inline pragmas to refer to pattern synonyms to ensure that
the matcher is inlined.
The main question to resolve is whether `{-# INLINE P #-}` means to inline just the matcher, just the b...Richard observes that it might be useful to allow inline pragmas to refer to pattern synonyms to ensure that
the matcher is inlined.
The main question to resolve is whether `{-# INLINE P #-}` means to inline just the matcher, just the builder
or both. It seems that without more fine grained control then the pragma should cause both the matcher and builder to be inline but I am not certain about this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.0.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Allow inline pragmas on pattern synonyms","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":["PatternSynonyms"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Richard observes that it might be useful to allow inline pragmas to refer to pattern synonyms to ensure that\r\nthe matcher is inlined. \r\n\r\nThe main question to resolve is whether `{-# INLINE P #-}` means to inline just the matcher, just the builder\r\nor both. It seems that without more fine grained control then the pragma should cause both the matcher and builder to be inline but I am not certain about this. ","type_of_failure":"OtherFailure","blocking":[]} -->9.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/7275Give more detailed information about PINNED data in a heap profile2021-05-12T16:42:48Zedsko@edsko.netGive more detailed information about PINNED data in a heap profileThis is particularly useful when tracking down memory leaks due to retaining (sub)bytestrings which themselves retain larger bytestrings. At the moment, all the profile tells us is that this memory is "PINNED" but it doesn't give us any ...This is particularly useful when tracking down memory leaks due to retaining (sub)bytestrings which themselves retain larger bytestrings. At the moment, all the profile tells us is that this memory is "PINNED" but it doesn't give us any info at all as to where the memory was allocated.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.6.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Give more detailed information about PINNED data in a heap profile","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"This is particularly useful when tracking down memory leaks due to retaining (sub)bytestrings which themselves retain larger bytestrings. At the moment, all the profile tells us is that this memory is \"PINNED\" but it doesn't give us any info at all as to where the memory was allocated.","type_of_failure":"OtherFailure","blocking":[]} -->9.2.1