GHC: Ticket Query
http://ghc.haskell.org/trac/ghc/query?status=!closed&version=6.8.1&desc=1&order=priority
The Glasgow Haskell Compileren-USGHChttp://ghc.haskell.org/trac/ghc/chrome/site/ghc_logo.png
http://ghc.haskell.org/trac/ghc/query?status=!closed&version=6.8.1&desc=1&order=priority
Trac 1.0.1
http://ghc.haskell.org/trac/ghc/ticket/1820
http://ghc.haskell.org/trac/ghc/ticket/1820#1820: Windows segfault-catching only works for the main threadThu, 01 Nov 2007 12:22:06 GMTsimonmar<p>
On Windows, the RTS tries to catch segmentation faults and divide-by-zero exceptions using structured exception handling in <tt>rts/Main.c</tt>. Unfortunately this only works for the main thread, so if the exception occurs in another thread it won't be caught. GHCi runs all its computations in a separate thread, hence <tt>derefnull(ghci)</tt> and <tt>divbyzero(ghci)</tt> are failing.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1820#changelog
http://ghc.haskell.org/trac/ghc/ticket/1853
http://ghc.haskell.org/trac/ghc/ticket/1853#1853: hpc mix files for Main modules overwrite each otherThu, 08 Nov 2007 03:08:12 GMTguest<p>
I have several programs, and hence several files that define Main modules, in the same directory. I build each one with a ghc --make -o Progname. When The hpc mix files describing the compiled modules are dumped in .hpc, the current Main.mix overwrites any previous Main.mix. As a result, I can only get an hpc report from Progname.tix if Progname was the most recent binary to be compiled.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1853#changelog
http://ghc.haskell.org/trac/ghc/ticket/1880
http://ghc.haskell.org/trac/ghc/ticket/1880#1880: Unify flag descriptions to generate both docs and codeMon, 12 Nov 2007 15:59:23 GMTsimonmar<p>
We want to specify all of GHC's flags in one place, and from there
</p>
<ul><li>Generate the flag reference section of the documentation
</li><li>Generate the code to parse the command-line
</li><li>Allow flags to be deprecated, generating a warning
</li><li>Have an option to list all the flags that GHC supports (see <a class="closed ticket" href="http://ghc.haskell.org/trac/ghc/ticket/1226" title="feature request: Add flags --full-flag-help and --print-docdir (closed: duplicate)">#1226</a>)
for use in command-line completion
</li><li>Generate the man page
</li><li>Completion in GHCi
</li></ul><p>
This ticket replaces part of <a class="closed ticket" href="http://ghc.haskell.org/trac/ghc/ticket/1226" title="feature request: Add flags --full-flag-help and --print-docdir (closed: duplicate)">#1226</a>.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1880#changelog
http://ghc.haskell.org/trac/ghc/ticket/1885
http://ghc.haskell.org/trac/ghc/ticket/1885#1885: Improve CPR analysisTue, 13 Nov 2007 12:49:04 GMTsimonpj<p>
When a function returns a <em>nested</em> data structure, GHC should expose that fact to the caller. This can make a very big difference in inner loops. A good example is the following message (from GHC users <a class="ext-link" href="http://www.haskell.org/pipermail/glasgow-haskell-users/2007-November/013454.html"><span class="icon"></span>http://www.haskell.org/pipermail/glasgow-haskell-users/2007-November/013454.html</a>).
</p>
<p>
Compile the attached files thus:
</p>
<pre class="wiki">ghc --make Unpacked.hs -O2 -cpp -DPOLY_SAME
</pre><p>
and similarly with <tt>DPOLY_OTHER</tt>. The <tt>POLY_OTHER</tt> case does a lot more allocation because a key function isn't inlined.
</p>
<pre class="wiki">$wa_r1Wb :: GHC.Prim.Addr#
-> GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld,
OtherP.C
GHC.Float.Double (OtherP.C GHC.Float.Double
(OtherP.C GHC.Float.Double ())) #)
[GlobalId]
[Arity 2
NoCafRefs
Str: DmdType LL]
$wa_r1Wb =
\ (ww_s1S5 :: GHC.Prim.Addr#) (w_s1S7 :: GHC.Prim.State# GHC.Prim.RealWorld) ->
case GHC.Prim.readDoubleOffAddr# @ GHC.Prim.RealWorld ww_s1S5 0 w_s1S7
of wild2_a1xI { (# s2_a1xK, x_a1xL #) ->
let {
ipv_XGd [Just L] :: GHC.Prim.Addr#
[Str: DmdType]
ipv_XGd = GHC.Prim.plusAddr# ww_s1S5 8 } in
case GHC.Prim.readDoubleOffAddr# @ GHC.Prim.RealWorld ipv_XGd 0 s2_a1xK
of wild21_X1yK { (# s21_X1yN, x1_X1yP #) ->
case GHC.Prim.readDoubleOffAddr#
@ GHC.Prim.RealWorld (GHC.Prim.plusAddr# ipv_XGd 8) 0 s21_X1yN
of wild22_X1yU { (# s22_X1yX, x2_X1yZ #) ->
(# s22_X1yX,
OtherP.C
@ GHC.Float.Double
@ (OtherP.C GHC.Float.Double (OtherP.C GHC.Float.Double ()))
(GHC.Float.D# x_a1xL)
(OtherP.C
@ GHC.Float.Double
@ (OtherP.C GHC.Float.Double ())
(GHC.Float.D# x1_X1yP)
(OtherP.C @ GHC.Float.Double @ ()
(GHC.Float.D# x2_X1yZ) GHC.Base.())) #)
} } }
</pre>Resultshttp://ghc.haskell.org/trac/ghc/ticket/1885#changelog
http://ghc.haskell.org/trac/ghc/ticket/1894
http://ghc.haskell.org/trac/ghc/ticket/1894#1894: Add a total order on type constructorsWed, 14 Nov 2007 19:22:11 GMTguest<p>
Several proposals for <a class="wiki" href="http://ghc.haskell.org/trac/ghc/wiki/ExtensibleRecords">ExtensibleRecords</a> can be implemented as libraries if type constructors can be ordered globally.
</p>
<p>
This proposal is to add built-in types:
</p>
<pre class="wiki">data LabelLT
data LabelEQ
data LabelGT
type family LabelCMP
</pre><p>
such that, for any two datatypes
</p>
<pre class="wiki">data N = N
data M = M
</pre><p>
the instance <tt>LabelCMP N M</tt> takes one of the values <tt>LabelLT, LabelEQ, LabelGT</tt> depending on the lexicographic ordering on the fully-qualified names of <tt>N</tt> and <tt>M</tt>.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1894#changelog
http://ghc.haskell.org/trac/ghc/ticket/2028
http://ghc.haskell.org/trac/ghc/ticket/2028#2028: STM slightly conservative on write-only transactionsWed, 09 Jan 2008 16:26:12 GMTJulesBean<p>
The STM appears to be slightly too conservative on write-only transactions.
</p>
<p>
It will store a copy of the current (that is, old) value on a writeTVar, even if it was never read from. This can cause a spurious retry.
</p>
<p>
E.g. <tt>atomically $ writeTVar tv 0</tt> really has no reason to ever retry. Neither, in fact, does <tt>atomically $ mapM (\tv -> writeTVar tv 0) [tv1,tv2,tv3,tv4]</tt>.
</p>
<p>
My suggestion is to instead indicate "no prior value" for that TVar, and then make no consistency checks on TVars marked as no prior value...
</p>
<p>
Jules
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/2028#changelog
http://ghc.haskell.org/trac/ghc/ticket/1928
http://ghc.haskell.org/trac/ghc/ticket/1928#1928: Confusing type error messageSun, 25 Nov 2007 14:44:33 GMTjosef<p>
The following code (which is part of a bigger module) needs scoped type variables to compile.
</p>
<pre class="wiki">run_state :: forall a s. State s a -> s -> (a,s)
run_state m s = observe_monad unit_op bind_op m where
unit_op v = (v,s)
bind_op :: BindOp (StateE s) a (a,s)
bind_op Get k = run_state (k s) s
bind_op (Put s1) k = run_state (k ()) s1
</pre><p>
However, forgetting to turn on scoped type variables will give a very confusing error message:
</p>
<pre class="wiki">Unimo.hs:56:36:
Couldn't match expected type `s1' against inferred type `s'
`s1' is a rigid type variable bound by
the type signature for `bind_op' at Unimo.hs:55:28
`s' is a rigid type variable bound by
the type signature for `run_state' at Unimo.hs:52:22
In the first argument of `k', namely `s'
In the first argument of `run_state', namely `(k s)'
In the expression: run_state (k s) s
</pre><p>
Line 52 is the type signature of run_state and line 55 is the type signature of bind_op. The error message talks about a type variable `s1' which isn't mentioned anywhere. I guess the reason for this is that we have name collision and this is ghc's way of trying to tell the two variables apart. I don't think it works that well though. But I'm afraid I don't have any suggestion on how to make it better.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1928#changelog
http://ghc.haskell.org/trac/ghc/ticket/1826
http://ghc.haskell.org/trac/ghc/ticket/1826#1826: unable to list source for <exception thrown> should never occurSun, 04 Nov 2007 13:34:43 GMTguest<p>
I get the very unhelpful "unable to list source for <exception thrown>". I would like to get one of the following two responses, the last one is best.
</p>
<pre class="wiki">Do this and that to list source
</pre><pre class="wiki">We currently cannot list source, because you did and that Do you still want to list source although it requires to do that and that(for example automatically recompiling and reexecuting it until the same program point) [Y/n]?
</pre>Resultshttp://ghc.haskell.org/trac/ghc/ticket/1826#changelog
http://ghc.haskell.org/trac/ghc/ticket/1830
http://ghc.haskell.org/trac/ghc/ticket/1830#1830: Automatic derivation of LiftSun, 04 Nov 2007 21:03:12 GMTguest<p>
This feature request was brought up in this template-haskell thread<a class="missing changeset" title="No changeset 1 in the repository">[1]</a>:
</p>
<p>
There are apparently two implementation alternatives:
</p>
<p>
1) Merge Ian's th-lift library<a class="missing changeset" title="No changeset 2 in the repository">[2]</a> with the mainstream template-haskell library
</p>
<p>
2) Implement "instance Data a => Lift a" (requires allowing undecidable and overlapping instances) in template-haskell. Since Data can be derived automatically by GHC, such an instance would imply automatic derivation of Lift as well.
</p>
<p>
<a class="missing changeset" title="No changeset 1 in the repository">[1]</a> <a class="ext-link" href="http://www.haskell.org/pipermail/template-haskell/2007-October/000635.html"><span class="icon"></span>http://www.haskell.org/pipermail/template-haskell/2007-October/000635.html</a>
<a class="missing changeset" title="No changeset 2 in the repository">[2]</a> <a class="ext-link" href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/th-lift-0.2"><span class="icon"></span>http://hackage.haskell.org/cgi-bin/hackage-scripts/package/th-lift-0.2</a>
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1830#changelog
http://ghc.haskell.org/trac/ghc/ticket/1831
http://ghc.haskell.org/trac/ghc/ticket/1831#1831: reify never provides the declaration of variablesSun, 04 Nov 2007 22:32:32 GMTguest<p>
The information returned by reify when provided a variable Name is
</p>
<pre class="wiki">VarI Name Type (Maybe Dec) Fixity
</pre><p>
The Dec part, due to be nested in Maybe, is clearly optional. In fact, according to Language.Haskell.TH.Syntax:
</p>
<pre class="wiki">-- Nothing for lambda-bound variables, and
-- for anything else TH can't figure out
-- E.g. [| let x = 1 in $(do { d <- reify 'x; .. }) |]
</pre><p>
However, the typechecker (<a class="missing wiki">TcSplice?</a> module) always returns Nothing. So it's simply not implemented.
</p>
<p>
I suggest either implementing the feature or removing the Dec part of VarI. Either way, the type should be consistent with the features offered in TH.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1831#changelog
http://ghc.haskell.org/trac/ghc/ticket/1921
http://ghc.haskell.org/trac/ghc/ticket/1921#1921: change default to support extensions that involve a change of syntaxFri, 23 Nov 2007 20:09:23 GMTalex<p>
Use of a lot of extensions is obvious from the non-haskell-98 syntax they require.
</p>
<p>
GHC should default to supporting these extenions with a flag to tell the use what extensions are in use.
</p>
<p>
GHC should require that extensions that change the meaning of an already valid haskell-98 file should appear in pragmas in the source file.
</p>
<p>
More radical: GHC should not allow extenions flags on the command line.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1921#changelog
http://ghc.haskell.org/trac/ghc/ticket/1965
http://ghc.haskell.org/trac/ghc/ticket/1965#1965: Allow unconstrained existential contexts in newtypesSat, 08 Dec 2007 21:02:05 GMTguest<p>
Declarations like
</p>
<pre class="wiki">newtype Bar = forall a. Bar (Foo a)
</pre><p>
ought to be allowed so long as no typeclass constraints are added. Right now, this requires data rather than newtype.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1965#changelog
http://ghc.haskell.org/trac/ghc/ticket/1974
http://ghc.haskell.org/trac/ghc/ticket/1974#1974: length "foo" doesn't work with -XOverloadedStringsWed, 12 Dec 2007 12:00:04 GMTganesh<p>
The extensions to the defaulting rule for -XOverloadedStrings aren't sufficient to make <tt>length "foo"</tt> typecheck without an annotation. The reason is that we end up with a constraint <tt>IsString [a]</tt>, and we would somehow have to decide to instantiate a to Char to get the hoped-for behaviour.
</p>
<p>
It would be nice if this could be made to work (perhaps just with -XExtendedDefaultRules), if a solution can be found without too much hacking.
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/1974#changelog