#15294: Unused "foralls" prevent types from being Coercible
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Keywords: Roles | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Just a quick question, do these have the same representation?
{{{#!hs
newtype A where
A :: (Int -> Bool) -> A
newtype B where
B :: (forall (a::Type). Int -> Bool) -> B
}}}
I'm wondering because they aren't `Coercible`
{{{
> :t coerce :: A -> B
<interactive>:1:1: error:
• Couldn't match representation of type ‘forall a. Int -> Bool’
with that of ‘Int -> Bool’
arising from a use of ‘coerce’
• In the expression: coerce :: A -> B
}}}
What about a new type `C`, that isn't `Coercible` to `B` either
{{{#!hs
newtype C where
C :: (forall k (a :: k). Int -> Bool) -> C
}}}
Some is true when it's just the order of variables
{{{#!hs
-- D is not Coercible to E, "can't match type ‘Bool’ with ‘Ordering’"
newtype D where
D :: (forall (a::Bool) (b::Ordering). Int -> Bool) -> D
newtype E where
E :: (forall (a::Ordering) (b::Bool). Int -> Bool) -> E
}}}
My question is is this intended?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15294>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7411: Exceptions are optimized away in certain situations
-------------------------------------+-------------------------------------
Reporter: SimonHengel | Owner: tdammers
Type: bug | Status: new
Priority: high | Milestone: 8.8.1
Component: Compiler | Version: 7.6.1
Resolution: | Keywords: seq, deepseq,
| evaluate, exceptions
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: Incorrect result | Test Case:
at runtime | simplCore/should_fail/T7411
Blocked By: | Blocking:
Related Tickets: #5129 #15225 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tdammers):
OK, so it turns out that make clean doesn't actually clean things up
thoroughly enough. I did another test run, building both GHC and nofib
from a fresh checkout for each run, and now everything works just fine. So
it seems that the core dumps I got earlier were somehow caused by
artifacts from a previous build still being in the build tree somewhere;
clearly if you link things together in ways they weren't meant to, strange
behavior is to be expected.
Now armed with that, and a fixed `fasta` implementation from #15225, I
managed to do six nofib runs; the interesting ones are:
- Both GHC and nofib compiled with the state hack in place - this is the
current situation (`nofibrun-gs_ns2.log`)
- GHC with the state hack, nofib compiled with `-fno-state-hack`
(`nofibrun-gs-nn2.log`
- Both GHC and nofib compiled with `-fno-state-hack` (`nofibrun-
gn_nn2.log`)
Results from nofib-analyse attached; key takeaway however is that the
difference overall is small and slightly in favor of removing the state
hack. A few interesting deviations that stand out:
- GHC compiled with `-fno-state-hack` consistently produces larger
binaries, by about 5%
- Programs compiled with a GHC compiled with `-fno-state-hack` run faster
by 3.2% on average, but there is a lot of deviation
- Most of the above improvements seem to be from more efficient GC
- Compile times differ drastically; vanilla GHC compiling programs with
`-fno-state-hack` is 23.6% faster on average than the same compiler with
the state hack; compiling GHC itself with `-fno-state-hack` and then
compiling the nofib suite also with `-fno-state-hack` is almost 50% faster
than compiling everything normally. The difference in allocations is even
more whopping, with 35.5% and 58.3% respectively.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7411#comment:43>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#15098: Missing instances for Down
-------------------------------------+-------------------------------------
Reporter: ekmett | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone: 8.6.1
Component: Core | Version: 8.2.2
Libraries |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
`Down` in `Data.Ord` is missing the instances for `Monad`, `MonadFix`,
`MonadZip`, `Eq1`, `Ord1`, `Show1`, `Read1`, `Data`, `Generic`,
`Generic1`, `Foldable`, `Traversable`.
We added a bunch of common sense 'only one definition' instances over the
last few GHC releases, but apparently we missed `Data.Ord.Down`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15098>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#14023: Split up glasgow_exts.rst
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone: 8.4.1
Component: Documentation | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The `docs/users-guide/glasgow_exts.rst` is crazy large. This makes it
difficult to navigate both while editing and reading. It should probably
be split up into multiple files along the top-level headings.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14023>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#15291: Incorrect SCC name parsing according to user manual
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.5
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The user manual says this about SCC names:
> The syntax of a cost centre annotation for expressions is
>
> {-# SCC "name" #-} <expression>
>
> where "name" is an arbitrary string, that will become the name of your
cost centre as it appears in the profiling output, and <expression> is any
Haskell expression.
However GHC is actually more strict about SCC strings, for example, it
doesn't accept spaces:
{{{
$ cat test.hs
main = {-# SCC "test test" #-} return ()
$ ghc test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
test.hs:1:16: error: Spaces are not allowed in SCCs
|
1 | main = {-# SCC "test test" #-} return ()
| ^^^^^^^^^^^
}}}
It's also possible that GHC is right and user manual is wrong.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15291>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7741: Add SIMD support to x86/x86_64 NCG
-------------------------------------+-------------------------------------
Reporter: shelarcy | Owner: abhir00p
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler (NCG) | Version: 7.7
Resolution: | Keywords: SIMD
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #3557 | Differential Rev(s):
Wiki Page: wiki:SIMD |
-------------------------------------+-------------------------------------
Comment (by carter):
I'm supervising abhirr00p on this, theres a bunch of stuff still to do for
even rudimentary portable SIMD support. Theres a few gotchas that will be
clear from sharp edges in this first iteration
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7741#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7411: Exceptions are optimized away in certain situations
-------------------------------------+-------------------------------------
Reporter: SimonHengel | Owner: tdammers
Type: bug | Status: new
Priority: high | Milestone: 8.8.1
Component: Compiler | Version: 7.6.1
Resolution: | Keywords: seq, deepseq,
| evaluate, exceptions
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: Incorrect result | Test Case:
at runtime | simplCore/should_fail/T7411
Blocked By: | Blocking:
Related Tickets: #5129 #15225 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tdammers):
Additional runs:
- stage1 GHC without state hack and nofib without state hack -> succeeds
- stage2 GHC without state hack and nofib with state hack -> succeeds
So either there is something strange going on with the combination GHC +
libs with state hack, nofib without state hack; or my testing leaves
artifacts somehow.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7411#comment:42>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7411: Exceptions are optimized away in certain situations
-------------------------------------+-------------------------------------
Reporter: SimonHengel | Owner: tdammers
Type: bug | Status: new
Priority: high | Milestone: 8.8.1
Component: Compiler | Version: 7.6.1
Resolution: | Keywords: seq, deepseq,
| evaluate, exceptions
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: Incorrect result | Test Case:
at runtime | simplCore/should_fail/T7411
Blocked By: | Blocking:
Related Tickets: #5129 #15225 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tdammers):
Did 4 full runs of compiling GHC from scratch and then compiling and
running nofib, with different configurations. Here's what happened.
1. "vanilla": compile everything normally (the `prof` build that comes
with GHC). Everything works as expected.
2. "nsh": compile everything with `-fno-state-hack` (GHC itself,
libraries, nofib). Everything works as expected.
3. "stage1": compile GHC normally, nofib with `-fno-state-hack`, but use
stage1 compiler instead of stage2. Everything works as expected.
4. "nofib-nsh": compile GHC normally, nofib with `-fno-state-hack`. GHC
segfaults while compiling `Main.hs` from the bernouilli program (which
simply happens to be the first one it encounters). Despite passing
`-dcore-lint`, I get no linter output.
Here's the log:
{{{
------------------------------------------------------------------------
== Recursively making `all' in runstdtest nofib-analyse imaginary spectral
real shootout ...
PWD = /home/tobias/well-typed/devel/ghc/HEAD/nofib
------------------------------------------------------------------------
------------------------------------------------------------------------
== make all ;
in /home/tobias/well-typed/devel/ghc/HEAD/nofib/runstdtest
------------------------------------------------------------------------
rm -f -f runstdtest
echo '#!/usr/bin/perl' >> runstdtest
echo '$RM = "rm -f";' >> runstdtest
echo '$CONTEXT_DIFF = "diff -U 1";' >> runstdtest
cat runstdtest.prl >> runstdtest
chmod +x runstdtest
Finished making all in runstdtest: 0
------------------------------------------------------------------------
== make all ;
in /home/tobias/well-typed/devel/ghc/HEAD/nofib/nofib-analyse
------------------------------------------------------------------------
make[1]: Nothing to be done for 'all'.
Finished making all in nofib-analyse: 0
------------------------------------------------------------------------
== make all ;
in /home/tobias/well-typed/devel/ghc/HEAD/nofib/imaginary
------------------------------------------------------------------------
------------------------------------------------------------------------
== Recursively making `all' in bernouilli digits-of-e1 digits-of-e2 exp3_8
gen_regexps integrate paraffins primes queens rfib tak wheel-sieve1 wheel-
sieve2 x2n1 kahan ...
PWD = /home/tobias/well-typed/devel/ghc/HEAD/nofib/imaginary
------------------------------------------------------------------------
------------------------------------------------------------------------
== make all --no-print-directory;
in /home/tobias/well-typed/devel/ghc/HEAD/nofib/imaginary/bernouilli
------------------------------------------------------------------------
HC = /home/tobias/well-typed/devel/ghc/HEAD/inplace/bin/ghc-stage2
HC_OPTS = -O2 -Rghc-timing -H32m -hisuf hi -fno-state-hack -O2 -dcore-lint
-rtsopts
RUNTEST_OPTS = -ghc-timing
==nofib== bernouilli: time to compile Main follows...
/home/tobias/well-typed/devel/ghc/HEAD/inplace/bin/ghc-stage2 -O2 -Rghc-
timing -H32m -hisuf hi -fno-state-hack -O2 -dcore-lint -rtsopts -c Main.hs
-o Main.o
../../mk/suffix.mk:23: recipe for target 'Main.o' failed
make[2]: *** [Main.o] Segmentation fault (core dumped)
Failed making all in bernouilli: 1
../mk/ghc-recurse.mk:65: recipe for target 'all' failed
make[1]: *** [all] Error 1
Failed making all in imaginary: 1
mk/ghc-recurse.mk:65: recipe for target 'all' failed
make: *** [all] Error 1
}}}
Unfortunately I hadn't done a run with GHC stage1 compiled with `-fno-
state-hack`; I'll do that next.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7411#comment:41>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#14502: Build Alpine Linux binary distributions
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: bgamari
Type: task | Status: new
Priority: normal | Milestone: 8.4.1
Component: Continuous | Version: 8.2.1
Integration |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By: 14057
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
At least three people have come to me asking for Alpine Linux bindists.
Given that Alpine is a fair bit different from most other distributions
and can be useful in containers, this seems fairly reasonable to me.
Terrorjack has some useful-looking automation at
https://github.com/TerrorJack/meikyu.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14502>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler