[GHC] #6051: Parsing type constraints in GHC 7.4.1
#6051: Parsing type constraints in GHC 7.4.1 ---+ Reporter: leepike| Owner: Type: bug| Status: new Priority: normal | Component: Compiler Version: 7.4.1 | Keywords: Os: Linux | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Testcase: Blockedby: | Blocking: Related: | ---+ This appears to be a parsing bug, or at least a bad error message, for a *malformed* type constraint: Given the following malformed program, I get the following output loading it with ghci (GHC 7.4.1): {{{ module Test where data Foo a = Foo a -- Malformed! instance Ord a = Eq a = Show (Foo a) where show (Foo a) = undefined }}} - {{{ $ ghci Test.hs GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Test ( Test.hs, interpreted ) *** Exception: compiler/rename/RnSource.lhs:429:14-81: Irrefutable pattern failed for pattern Data.Maybe.Just (inst_tyvars, _, SrcLoc.L _ cls, _) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6051 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5970: Type checker hangs
#5970: Type checker hangs +--- Reporter: Lemming | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.4.1 Keywords: | Os: Linux Architecture: x86 | Failure: Compile-time performance bug Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Comment(by simonpj): I think that most of our most recent on improving the performance of type checking is not in the 7.4 branch, but only on HEAD. You should be able to pick up development snapshots here http://www.haskell.org/ghc/dist/current/dist/?C=M;O=D Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5970#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6015: No instance when using PolyKinds/DataKinds/FunDeps/Undecidable
#6015: No instance when using PolyKinds/DataKinds/FunDeps/Undecidable -+-- Reporter: atnnn | Owner: Type: feature request | Status: new Priority: normal| Milestone: Component: Compiler | Version: 7.4.1 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by simonpj): * difficulty: = Unknown Comment: That's odd. Even with `PolyKinds` on the program typechecks for me. Are you using the latest HEAD? But still there's a bug in 6015, and I think I know what it is. I'll try to fix it today. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6015#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas
#6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas -+-- Reporter: asr | Owner: pcapriotti Type: bug | Status: new Priority: normal| Milestone: Component: Documentation | Version: 7.4.1 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by pcapriotti): * owner: = pcapriotti * difficulty: = Unknown Comment: Thanks for the report. I think we should follow what the doc says here and disable `-fwarn- unrecognised-pragmas` by default. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6050#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6049: Kind variable generalization error in GADTs
#6049: Kind variable generalization error in GADTs +--- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.5 Keywords: PolyKinds| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Changes (by simonpj): * cc: dimitris@…, dreixel, sweirich@… (added) * difficulty: = Unknown Comment: Interesting. The issue turns out to be this. Consider {{{ data T a where MkT :: forall b. (b Int) - T b }}} Then we expect to infer the kind `T :: (* - *) - *` for T. How did we do this? We gave T a kind unification variable, and kind-checked the MkT signature. All good. Just like for polymorphic functions, we can infer polymorphic kinds too: {{{ data T a b where MkT :: forall a b. a b - T a b }}} We give T a kind unification variable, kind-check, and generalise, to get {{{ T :: forall k. (k-*) - k - * }}} BUT if T is used at different kinds in its definition, as in the return types of `SMaybe` and `SNothing` above, then we are hosed. This is really polymorphic recursion. The solution for polymorphic recursion is to give a type signature -- and you have done just that for `SMaybe`. So when there is a kind signature we want to '''ignore''' the data constructor definitions, and instead take the kind signature as giving the kind of the tycon. Annoyingly at the moment GHC allows a mixed economy. You can say {{{ data T a :: * - * where ... }}} so there is half a kind signature, as it were. I don't think anyone uses this though. Alternatively, and I think I like this more, we could say that '''for kind inference we look at the constructors only in H98-style definitions'''. So, consider {{{ data S1 a = MkS1 (a b) data S2 a b where MkS2 :: forall a b. a b - S a b }}} For `S1` we look at the constructor. For for `S2`, we look only at the `data S2 a b where...`, and ignore the constructors. So we infer these kinds: {{{ S1 :: forall k. (k-*) - k - * S2 :: * - * - * }}} Then when we later type-check the constructors for S2 we'll get a kind error. I like this because it is simple: if you use GADT syntax, and you want a higher kind, you must give a signature. Does that seem OK? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6049#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6015: No instance when using PolyKinds/DataKinds/FunDeps/Undecidable
#6015: No instance when using PolyKinds/DataKinds/FunDeps/Undecidable -+-- Reporter: atnnn | Owner: Type: feature request | Status: new Priority: normal| Milestone: Component: Compiler | Version: 7.4.1 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by atnnn): Replying to [comment:2 simonpj]: That's odd. Even with `PolyKinds` on the program typechecks for me. Are you using the latest HEAD? I tried again with the latest HEAD. As before, the code compiles fine and the `No instance` error appears only when trying to evaluate `foo`. Also, I forgot to add the required `FlexibleContexts`. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6015#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas
#6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas -+-- Reporter: asr | Owner: pcapriotti Type: bug | Status: new Priority: normal| Milestone: Component: Documentation | Version: 7.4.1 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by p.capriotti@…): commit 44098b3dab032a83cc869855de67377f41d82384 {{{ Author: Paolo Capriotti p.caprio...@gmail.com Date: Fri Apr 27 09:40:40 2012 +0100 Flags documentation: -fwarn-unrecognized-pragmas is enabled by -Wall (#6050) docs/users_guide/using.xml |1 - 1 files changed, 0 insertions(+), 1 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6050#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #4817: Missing new flags description in the user guide
#4817: Missing new flags description in the user guide ---+ Reporter: andressr | Owner: Type: bug | Status: new Priority: normal| Milestone: 7.2.1 Component: Documentation |Version: 7.4.1 Resolution:| Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Testcase:| Blockedby: Blocking:|Related: ---+ Comment(by p.capriotti@…): commit 18c2a2f71e38fad5e677b8f448f6135e5a691868 {{{ Author: Paolo Capriotti p.caprio...@gmail.com Date: Fri Apr 27 09:46:06 2012 +0100 Doc: updated list of warnings not enabled by -Wall (#4817) docs/users_guide/using.xml |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4817#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas
#6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas ---+ Reporter: asr | Owner: pcapriotti Type: bug | Status: closed Priority: normal| Milestone: Component: Documentation |Version: 7.4.1 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase:| Blockedby: Blocking:|Related: ---+ Changes (by pcapriotti): * status: new = closed * resolution: = fixed Comment: The documentation for `-fwarn-unrecognised-pragmas` correctly reports that it is enabled by default, so I kept the current behavior and just fixed the inconsistency in the documentation. Merged as dd20b2f3e1871cc71bfd9fe07aadf60e71c35905. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6050#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas
#6050: Documentation for option -Wall and warning -fwarn-unrecognised-pragmas +--- Reporter: asr| Owner: pcapriotti Type: bug| Status: closed Priority: normal | Milestone: 7.4.2 Component: Documentation |Version: 7.4.1 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Documentation bug | Difficulty: Unknown Testcase: | Blockedby: Blocking: |Related: +--- Changes (by pcapriotti): * failure: None/Unknown = Documentation bug * milestone: = 7.4.2 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6050#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #4817: Missing new flags description in the user guide
#4817: Missing new flags description in the user guide +--- Reporter: andressr | Owner: Type: bug| Status: closed Priority: normal | Milestone: 7.4.2 Component: Documentation |Version: 7.4.1 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Documentation bug | Difficulty: Unknown Testcase: | Blockedby: Blocking: |Related: +--- Changes (by pcapriotti): * status: new = closed * difficulty: = Unknown * milestone: 7.2.1 = 7.4.2 * resolution: = fixed * failure: None/Unknown = Documentation bug Comment: Merged as 07d78daff97129d634ffdef6a92c7d649c3557cd. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4817#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6041: Program hangs when run under Ubuntu Precise
#6041: Program hangs when run under Ubuntu Precise -+-- Reporter: dsf | Owner: Type: bug | Status: infoneeded Priority: high | Milestone: 7.4.2 Component: Compiler | Version: 7.4.1 Keywords:| Os: Linux Architecture: Unknown/Multiple | Failure: Runtime crash Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by simonmar): * status: new = infoneeded Comment: I can't seem to reproduce the bug. Here's my session with the things I've tried: {{{ simonmar@x220:~$ ghc Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... simonmar@x220:~$ ./Main hello simonmar@x220:~$ uname -a Linux x220 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux simonmar@x220:~$ ghci Main.hs GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Ok, modules loaded: Main. Prelude Main main Loading package transformers-0.3.0.0 ... linking ... done. Loading package mtl-2.1.1 ... linking ... done. Loading package array-0.4.0.0 ... linking ... done. Loading package stm-2.3 ... linking ... done. hello Prelude Main Leaving GHCi. simonmar@x220:~$ ghc -O Main.hs simonmar@x220:~$ ghc -O Main.hs -fforce-recomp [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... simonmar@x220:~$ ./Main hello simonmar@x220:~$ ghc -O2 Main.hs -fforce-recomp [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... simonmar@x220:~$ ./Main hello simonmar@x220:~$ ghc -O2 -threaded Main.hs -fforce-recomp [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... simonmar@x220:~$ ./Main hello }}} Could you try with the `simonmar` account on that machine and see if you can reproduce it? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6041#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5929: Exciting arity warning when compiling with optimizations
#5929: Exciting arity warning when compiling with optimizations -+-- Reporter: passalaqua| Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler | Version: 7.4.1 Keywords: Exciting arity| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Incorrect warning at compile-time Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by simonmar): * difficulty: = Unknown Comment: What we normally do is put calls to `pprTrace` inside `#ifdef DEBUG`, that would be an easy fix here. The point of `-dno-debug-output` is so that the testsuite still works with a DEBUG compiler. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5929#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5914: armhf build fails in Ubuntu (7.4.1)
#5914: armhf build fails in Ubuntu (7.4.1) +--- Reporter: jani@… | Owner: simonmar Type: bug | Status: new Priority: high | Milestone: 7.6.1 Component: Compiler (LLVM) | Version: 7.4.1 Keywords: | Os: Linux Architecture: arm | Failure: Building GHC failed Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Changes (by simonmar): * owner: kgardas = simonmar * difficulty: = Unknown * priority: normal = high * milestone: = 7.6.1 Comment: I'll test and apply, thanks. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5914#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5910: Holes with other constraints
#5910: Holes with other constraints +--- Reporter: xnyhps | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.5 Keywords: holes| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Other Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Changes (by spl): * failure: Incorrect warning at compile-time = Other Comment: If {{{-XHoles}}} is set, we want the following: * The program should be type-checked as if every hole {{{_?h}}} is replaced by {{{undefined}}}, except: * If type-checking would fail due to unsolved constraints that could be solved by giving a type to a hole. * If the program is well-typed, then: * The types of all holes should be reported. * Reporting the hole types should not cause type-checking (or compiling in general) to stop (in error). * (optional) If the program is ill-typed, then: * The types of all holes should be reported. The above should hold true with and without the monomorphism restriction. In particular, if an {{{undefined}}} somewhere in a program type-checked with the monomorphism restriction would cause type-checking to fail, then a hole in that same position should also cause type-checking to fail. The type of a hole should be the resolved type with minimum constraints. That is, the type of a hole should only have constraints that have not be solved but are either inferred from the context (e.g. {{{show _?h}}}) or given in a type annotation/signature (e.g. {{{_?h :: Show a = a}}}. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5910#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5910: Holes with other constraints
#5910: Holes with other constraints +--- Reporter: xnyhps | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.5 Keywords: holes| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Other Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Comment(by simonpj): I have transferred your proposed design to the Wiki page [wiki:Holes]. But can you clarify? Under (2), are you saying that if I write {{{ f x = _?foo }}} then you want the program to typecheck and run, even though it is incomplete? Isn't that what `-fdefer-type-errors` is for? About the monomorphism restriction, can you give an example? Ideally answer the questions by amplifying the spec on [wiki:Holes], and adding examples to illustrate. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5910#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #6052: type-level - PAP object entered
#6052: type-level - PAP object entered --+- Reporter: Lemming | Owner: Type: bug | Status: new Priority: normal| Component: Compiler Version: 7.5 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby:| Blocking: Related:| --+- When compiling type-level-0.2.4 with GHC-7.5.20120426 I get: {{{ Configuring type-level-0.2.4... Preprocessing library type-level-0.2.4... Building type-level-0.2.4... [1 of 8] Compiling Data.TypeLevel.Num.Reps ( src/Data/TypeLevel/Num/Reps.hs, dist/build/Data/TypeLevel/Num/Reps.o ) [2 of 8] Compiling Data.TypeLevel.Num.Sets ( src/Data/TypeLevel/Num/Sets.hs, dist/build/Data/TypeLevel/Num/Sets.o ) [3 of 8] Compiling Data.TypeLevel.Num.Aliases.TH ( src/Data/TypeLevel/Num/Aliases/TH.hs, dist/build/Data/TypeLevel/Num/Aliases/TH.o ) [4 of 8] Compiling Data.TypeLevel.Num.Aliases ( src/Data/TypeLevel/Num/Aliases.hs, dist/build/Data/TypeLevel/Num/Aliases.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.3.0.3 ... linking ... done. Loading package deepseq-1.2.0.1 ... linking ... done. Loading package containers-0.4.2.1 ... linking ... done. Loading package pretty-1.1.1.0 ... linking ... done. Loading package template-haskell ... linking ... done. Loading package syb-0.3.6.1 ... linking ... done. ghc: internal error: PAP object entered! (GHC version 7.5.20120426 for i386_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6052 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #6053: packages in GHC should have different versions from hackage if the packages differ
#6053: packages in GHC should have different versions from hackage if the packages differ --+- Reporter: Lemming | Owner: Type: bug | Status: new Priority: normal| Component: libraries/unix Version: 7.5 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby:| Blocking: Related:| --+- I try to compile a package with many dependencies using GHC-7.5.20120426 in order to check whether #5970 is resolved. This turns out to be difficult because this temporary GHC version seems to use packages with the same version as their counterparts on Hackage but different content. For example GHC-7.5.20120426 is bundled with unix-2.5.1.0 and bytestring-0.10.0.0. However the unix-2.5.1.0 on Hackage excludes bytestring-0.10.0.0. Thus cabal-install refuses to install something that depends on unix-2.5.1.0. Another example: Both GHC-7.4.1 and GHC-7.5.20120426 are bundled with base-4.5.0.0. However in GHC-7.5, Num is no longer superclass of Bits. I think such a change requires a version bump to base-4.6. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6053 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6052: type-level - PAP object entered
#6052: type-level - PAP object entered -+-- Reporter: Lemming |Owner: Type: bug | Status: closed Priority: normal|Component: Compiler Version: 7.5 | Resolution: fixed Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Testcase:|Blockedby: Blocking:| Related: -+-- Changes (by Lemming): * status: new = closed * resolution: = fixed Comment: Now the error has gone. Maybe since I have managed to force cabal-install to not reinstall packages locally that are already installed globally. I think template-haskell package was also affected by this. See #6053. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6052#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #4363: openFile sharing permissions are inconsistent across platforms
#4363: openFile sharing permissions are inconsistent across platforms -+-- Reporter: jystic| Owner: Type: bug | Status: patch Priority: high | Milestone: 7.6.1 Component: libraries/base| Version: 6.12.3 Keywords:| Os: Windows Architecture: Unknown/Multiple | Failure: Incorrect result at runtime Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by pcapriotti): * status: new = patch * difficulty: = Unknown Comment: I attached patches to enable in-process file locking on Windows (thanks jystic for the example code). This doesn't change the behavior significantly, only makes it consistent with POSIX platforms. Does it need a new library proposal? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4363#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6006: hs_init(NULL, NULL) segfaults on latest snapshot
#6006: hs_init(NULL, NULL) segfaults on latest snapshot ---+ Reporter: ezyang | Owner: simonmar Type: bug | Status: new Priority: high| Milestone: 7.6.1 Component: Runtime System | Version: 7.5 Keywords: | Os: Linux Architecture: x86 | Failure: Runtime crash Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | ---+ Comment(by marlowsd@…): commit 4ca281829c70331571291ed3dcf813a6028cc904 {{{ Author: Simon Marlow marlo...@gmail.com Date: Fri Apr 27 13:20:56 2012 +0100 hs_init(): cope with argc and/or argv being NULL (#6006) rts/RtsStartup.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6006#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5879: mkWeak# has a very dangerous type
#5879: mkWeak# has a very dangerous type -+-- Reporter: simonpj | Owner: simonmar Type: bug | Status: new Priority: high | Milestone: 7.6.1 Component: Compiler | Version: 7.4.1 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by marlowsd@…): commit 1ed0193c707a6694d242848527927f3904d1b79a {{{ Author: Simon Marlow marlo...@gmail.com Date: Fri Apr 27 11:12:38 2012 +0100 Add a new primop mkWeakNoFinalizer (#5879) compiler/prelude/primops.txt.pp |6 ++ includes/stg/MiscClosures.h |1 + rts/Linker.c|1 + rts/PrimOps.cmm | 16 +++- 4 files changed, 19 insertions(+), 5 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5879#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5914: armhf build fails in Ubuntu (7.4.1)
#5914: armhf build fails in Ubuntu (7.4.1) +--- Reporter: jani@… | Owner: simonmar Type: bug | Status: new Priority: high | Milestone: 7.6.1 Component: Compiler (LLVM) | Version: 7.4.1 Keywords: | Os: Linux Architecture: arm | Failure: Building GHC failed Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Comment(by karel.gardas@…): commit 3144f85661da176e3d80f28d652b42245becde09 {{{ Author: Karel Gardas karel.gar...@centrum.cz Date: Wed Apr 25 09:04:50 2012 +0200 add support for ARM hard-float ABI (fixes #5914) This patch enhances Platform's ArchARM to include ARM ABI value. It also tweaks configure machinery to detect hard-float ABI and to set it wherever needed. Finally when hard-float ABI is in use, pass appropriate compiler option to the LLVM's llc. Fixes #5914. aclocal.m4 |2 +- compiler/main/DriverPipeline.hs| 16 +- compiler/nativeGen/AsmCodeGen.lhs |2 +- compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs | 56 ++-- compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs | 14 +- compiler/nativeGen/RegAlloc/Linear/Main.hs | 14 +- compiler/nativeGen/TargetReg.hs| 70 ++-- compiler/utils/Platform.hs | 12 +- config.guess | 482 ++-- configure.ac | 14 + 10 files changed, 345 insertions(+), 337 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5914#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6007: ghci: Importing specific non-existent names from a module breaks later imports
#6007: ghci: Importing specific non-existent names from a module breaks later imports -+-- Reporter: josh | Owner: simonmar Type: bug | Status: new Priority: normal| Milestone: 7.6.1 Component: GHCi | Version: 7.4.1 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by marlowsd@…): commit b6e28266cf29bfdf07fe08e894df77b400da8a04 {{{ Author: Simon Marlow marlo...@gmail.com Date: Fri Apr 27 13:07:50 2012 +0100 Catch illegal imports earlier (#6007) ghc/InteractiveUI.hs | 44 +++- 1 files changed, 39 insertions(+), 5 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6007#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6006: hs_init(NULL, NULL) segfaults on latest snapshot
#6006: hs_init(NULL, NULL) segfaults on latest snapshot ---+ Reporter: ezyang | Owner: simonmar Type: bug | Status: merge Priority: high| Milestone: 7.4.2 Component: Runtime System | Version: 7.5 Keywords: | Os: Linux Architecture: x86 | Failure: Runtime crash Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | ---+ Changes (by simonmar): * status: new = merge * milestone: 7.6.1 = 7.4.2 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6006#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5914: armhf build fails in Ubuntu (7.4.1)
#5914: armhf build fails in Ubuntu (7.4.1) --+- Reporter: jani@… | Owner: simonmar Type: bug | Status: closed Priority: high | Milestone: 7.6.1 Component: Compiler (LLVM) |Version: 7.4.1 Resolution: fixed| Keywords: Os: Linux| Architecture: arm Failure: Building GHC failed | Difficulty: Unknown Testcase: | Blockedby: Blocking: |Related: --+- Changes (by simonmar): * status: new = closed * resolution: = fixed Comment: Optimistically closing the ticket, please re-open if there's still a problem. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5914#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5879: mkWeak# has a very dangerous type
#5879: mkWeak# has a very dangerous type ---+ Reporter: simonpj | Owner: simonmar Type: bug | Status: closed Priority: high | Milestone: 7.6.1 Component: Compiler |Version: 7.4.1 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase:| Blockedby: Blocking:|Related: ---+ Changes (by simonmar): * status: new = closed * resolution: = fixed -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5879#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6007: ghci: Importing specific non-existent names from a module breaks later imports
#6007: ghci: Importing specific non-existent names from a module breaks later imports -+-- Reporter: josh | Owner: simonmar Type: bug | Status: merge Priority: normal| Milestone: 7.4.2 Component: GHCi | Version: 7.4.1 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by simonmar): * status: new = merge * milestone: 7.6.1 = 7.4.2 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6007#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #6054: Couldn't match kind `BOX' against `*' when using SOURCE import
#6054: Couldn't match kind `BOX' against `*' when using SOURCE import --+- Reporter: atnnn | Owner: Type: bug | Status: new Priority: normal| Component: Compiler Version: 7.4.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby:| Blocking: Related:| --+- When this module has a (useless) SOURCE import, using its typeclass gives an error. {{{ module Bar where import {-# SOURCE #-} Foo class Bar a (p :: Bool) | a - p data Proxy a = Proxy }}} With the interpreter, the error appears when using the class: {{{ Prelude :l Bar *Bar :set -XFlexibleContexts -XDataKinds *Bar Proxy :: Bar '() a = Proxy a Couldn't match kind `BOX' against `*' Kind incompatibility when matching types: k0 :: BOX Bool :: * }}} When compiling, the error appears the *second* run. {{{ $ ghc Main.hs No instance for (Bar () '() a0) $ ghc Main.hs Couldn't match kind `BOX' against `*' }}} Tested with 7.4.1 and HEAD -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6054 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5075: CPR optimisation for sum types if only one constructor is used
#5075: CPR optimisation for sum types if only one constructor is used -+-- Reporter: batterseapower| Owner: simonpj Type: feature request | Status: patch Priority: normal| Milestone: 7.6.1 Component: Compiler | Version: 7.0.3 Keywords:| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by simonpj): * difficulty: = Unknown Comment: All this is on the `cpr-sum-types` branch. Awaiting attention from Simon! -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5075#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #6055: panic: ctFlavId: derived constraint cannot have id
#6055: panic: ctFlavId: derived constraint cannot have id +--- Reporter: Lemming | Owner: Type: bug | Status: new Priority: normal | Component: Compiler (Type checker) Version: 7.5 | Keywords: Os: Unknown/Multiple| Architecture: Unknown/Multiple Failure: Compile-time crash | Testcase: Blockedby: | Blocking: Related: | +--- When trying to check, whether GHC-7.5 still suffers from #5970 I found another bug: When I compile the attached module I get the type error: {{{ ghc: panic! (the 'impossible' happened) (GHC version 7.5.20120426 for i386-unknown-linux): ctFlavId: derived constraint cannot have id pty = llvm-extra-0.4:LLVM.Extra.Extension.X86.Add'{tc rj} llvm-extra-0.4:LLVM.Extra.Extension.X86.D1{tc ri} llvm-extra-0.4:LLVM.Extra.Extension.X86.D1{tc ri} llvm-extra-0.4:LLVM.Extra.Extension.X86.D2{tc rh} Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} I tried hard to simplify the example and to remove all dependencies (llvm, type-level), but the test case is still rather involved. Unfortunately it is again a problem with functional dependencies and I want to get rid of them anyway, but instead switching to type families and then to type level natural numbers I prefer to switch to type level numbers immediately. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6055 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6049: Kind variable generalization error in GADTs
#6049: Kind variable generalization error in GADTs +--- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.5 Keywords: PolyKinds| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Comment(by goldfire): Actually, I think you've over-generalized the problem. As I see it, the kinds for {{{SMaybe}}} in both constructors are the same (modulo kind variables --- but maybe that's the issue). In any case, the error still comes up when I omit the {{{SJust}}} constructor. Fortunately, in both this case and in my original, larger case, the problem goes away when I avoid GADT syntax, so this isn't holding me up any longer. As for your description above, I don't fully understand why the treatment of the two syntax forms have to be different. In the original {{{SMaybe}}} case, I propose this: Read {{{SMaybe}}}'s kind from the user-supplied signature, and then infer {{{SMaybe}}}'s kind from the constructor definitions. Notice that all three kinds are the same, modulo names of kind variables, so we unify the variables and are done. Is there some detail I'm missing here? Does kind variable unification in that way not exist yet? I recognize that the case above is very simple, in that the kinds to be compared are all structurally identical and that the general case may require matching one kind variable against some structural component, possibly containing other variables, in another kind. However, my intuition is that this manner of unification must already exist somewhere. Am I wrong? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6049#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5929: Exciting arity warning when compiling with optimizations
#5929: Exciting arity warning when compiling with optimizations -+-- Reporter: passalaqua| Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler | Version: 7.4.1 Keywords: Exciting arity| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Incorrect warning at compile-time Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by simonpj): I'll action this. Thanks for the analysis Michael. You are right.. but in the end we thought that even folk who don't build with `-DDEBUG` might want to use `pprTrace`, so we'll use SimonM's plan, which is the way we handle it elsewhere. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5929#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6041: Program hangs when run under Ubuntu Precise
#6041: Program hangs when run under Ubuntu Precise -+-- Reporter: dsf | Owner: Type: bug | Status: infoneeded Priority: high | Milestone: 7.4.2 Component: Compiler | Version: 7.4.1 Keywords:| Os: Linux Architecture: Unknown/Multiple | Failure: Runtime crash Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by dsf): Now I can't reproduce it anywhere. I do have one binary that still exhibits the behavior, I've placed it in your home directory. I dist-upgraded the machine yesterday before I created your account. I figured if this bug was caused by something in libc6 we would want to know that. So that might have made it go away. On the other hand, that should make it go away in the binary that is still exhibiting the bug. Bad decision on my part? Maybe. I have been routinely dist-upgrading the precise install as we approached the final release. I could try reinstalling the beta iso if we want to pursue it, but if its caused by nastyness in libc I'm not sure its worth it. Let me know if you want me to try this. Otherwise I may not get to it for a few days. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6041#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5929: Exciting arity warning when compiling with optimizations
#5929: Exciting arity warning when compiling with optimizations -+-- Reporter: passalaqua| Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler | Version: 7.4.1 Keywords: Exciting arity| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Incorrect warning at compile-time Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by simonpj@…): commit 95fb4b1da70a9df50a42449b19ff6350181a38db {{{ Author: Simon Peyton Jones simo...@microsoft.com Date: Fri Apr 27 17:42:22 2012 +0100 Comment out a pprTrace unless DEBUG is on (fix Trac #5929) compiler/simplCore/SimplUtils.lhs |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5929#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5929: Exciting arity warning when compiling with optimizations
#5929: Exciting arity warning when compiling with optimizations +--- Reporter: passalaqua | Owner: Type: bug| Status: closed Priority: normal | Milestone: Component: Compiler |Version: 7.4.1 Resolution: fixed | Keywords: Exciting arity Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Difficulty: Unknown Testcase: | Blockedby: Blocking: |Related: +--- Changes (by simonpj): * status: new = closed * resolution: = fixed -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5929#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6049: Kind variable generalization error in GADTs
#6049: Kind variable generalization error in GADTs +--- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.5 Keywords: PolyKinds| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Comment(by simonpj): I was wrong in detail but I think right in principle. Consider {{{ data Maybe a where Nothing :: Maybe a }}} The two `a`'s have nothing to do with each other. We could equally well write {{{ data Maybe a where Nothing :: Maybe b or data Maybe a where Nothing :: forall b. Maybe b or data Maybe :: * - * where Nothing :: Maybe a }}} Now consider your exmaple: {{{ data SMaybe :: (k - *) - Maybe k - * where SNothing :: forall (s :: k - *). SMaybe s Nothing }}} The `k` in the `SNothing` is nothing to do with the `k` in the header, just like the `Maybe` case above. So we could also write {{{ data SMaybe :: (k - *) - Maybe k - * where SNothing :: forall (s :: kk - *). SMaybe s Nothing or data SMaybe :: (k - *) - Maybe k - * where SNothing :: forall kk. forall (s :: kk - *). SMaybe s Nothing }}} Actually we can't write the latter because we don't yet support explicit kind foralls, but morally we could. When kind-checking `SMaybe`, if we initially give it the ''monomorphic'' kind {{{ SMaybe :: (kappa - *) - Maybe kappa - * }}} where `kappa` is a kind unification variable, then if we kind-check the type of `SNothing` we'll have a problem because `SMaybe` is insufficiently polymorphic to kind-check the type {{{ forall kk. forall (s::kk - *). SMaybe s Nothing }}} We could hack our way round this, perhpas by (in effect) not kind- genrealising the type of `SNothing`. But it seems smelly. I'd be interested in what Stephanie and Dimitrios think. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6049#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #6049: Kind variable generalization error in GADTs
#6049: Kind variable generalization error in GADTs +--- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.5 Keywords: PolyKinds| Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | +--- Comment(by simonpj): Actually I think it's harder than I thought to hack around. Suppose we had {{{ data SMaybe :: (k - *) - Maybe k - * where SNothing :: Int - (forall kk. forall (ss :: kk - *). SMaybe ss Nothing) - SMaybe s a }}} I have used a nested forall, so now really impossible (without lots of hackery) to make this work with a kind-monomorphic `SMaybe`. This can't really happen unless we have explicit kind-foralls, but sooner or later we will. I think the simplest path is to say that for GADT-style syntax you must give the kind of the type constructor in the header; and if you don't you'll get `* - * - *`, ie not even higher kinds. This would mean that some existing programs would need a kind signature. {{{ data T a b where MkT :: a b - T a b }}} would need signatures, thus {{{ data T (a : * - *) b where MkT :: a b - T a b or data T :: (* - *) - * - * where MkT :: a b - T a b or data T :: (k - *) - k - * where MkT :: a b - T a b }}} But it would enforce good practice (put those kind signatures in! And I suppose that this new behaviour could be enabled by `-XPolyKinds`. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/6049#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs