Custom Query (6599 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (10 - 12 of 6599)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#2935 wontfix "A lazy (~) pattern cannot bind existential type variables" happens for non-existential GADTs ganesh
Description

This program:

{-# LANGUAGE GADTs #-}
module Foo where

data Foo a where
   Foo :: a -> Foo (a, Int)

foo :: Foo (a, Int) -> a
foo ~(Foo a) = a

causes this error:

Foo.hs:8:4:
    A lazy (~) pattern cannot bind existential type variables
      `a' is a rigid type variable bound by
          the constructor `Foo' at Foo.hs:8:6
    In the pattern: ~(Foo a)
    In the definition of `foo': foo ~(Foo a) = a

This doesn't seem like an existential, as there aren't any type variables in the arguments to Foo that aren't in the result type.

If easy it would be nice if the restriction were relaxed to allow for this case, otherwise I think the error message should be improved.

Tested with ghc 6.10.1.20081209 and ghc 6.11.20090107.

#1206 duplicate "Bad interface file: System/IO.hi" in ghci when ./System/IO.hs exists jyasskin
Description

I ran into this when trying to ghci a module in the base library (from http://darcs.haskell.org/packages/base), but it seems that ghci just gets confused if System/IO.hs exists under the current directory. For my purposes, it's easy enough to work around by copying the module I actually want to work on out to another directory.

jyasskin-mac:~/Temp/bug jyasskin$ mkdir System
jyasskin-mac:~/Temp/bug jyasskin$ touch System/IO.hs
jyasskin-mac:~/Temp/bug jyasskin$ cp ~/src/ghc/HEAD/ghc/libraries/base/Data/Monoid.hs .
jyasskin-mac:~/Temp/bug jyasskin$ mkdir Data
jyasskin-mac:~/Temp/bug jyasskin$ mv Monoid.hs Data/
jyasskin-mac:~/Temp/bug jyasskin$ ghci Data/Monoid.hs 
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.

<interactive>:1:22:
    Bad interface file: System/IO.hi
        System/IO.hi: openBinaryFile: does not exist (No such file or directory)
ghc-6.6: panic! (the 'impossible' happened)
  (GHC version 6.6 for powerpc-apple-darwin):
        interactiveUI:setBuffering

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

jyasskin-mac:~/Temp/bug jyasskin$ find .
.
./Data
./Data/Monoid.hs
./System
./System/IO.hs
jyasskin-mac:~/Temp/bug jyasskin$ 
#2044 fixed "Can't unify" error in debugger igloo r6144
Description

Debugging the attached array1.hs under GHCi gives the following error:

[haskell]$ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> :load array1.hs 
[1 of 1] Compiling Main             ( array1.hs, interpreted )
Ok, modules loaded: Main.
*Main> :break rsRandomArray 
Breakpoint 0 activated at array1.hs:(31,0)-(42,79)
*Main> main
Loading package array-0.1.0.0 ... linking ... done.
Loading package old-locale-1.0.0.0 ... linking ... done.
Loading package old-time-1.0.0.0 ... linking ... done.
Loading package random-1.0.0.0 ... linking ... done.
Array 1: array Stopped at array1.hs:(31,0)-(42,79)
_result :: ST s (UArray Idx Double) = _
[array1.hs:(31,0)-(42,79)] *Main> :step
Stopped at array1.hs:31:21-53
ghc-6.8.2: panic! (the 'impossible' happened)
  (GHC version 6.8.2 for i386-unknown-linux):
        Can't unify

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

[array1.hs:31:21-53] *Main> :quit
Leaving GHCi.

I'm running Fedora 8 with gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) and ghc-6.8.2-2.fc8.

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Note: See TracQuery for help on using queries.