Custom Query (7482 matches)


Show under each result:

Results (13 - 15 of 7482)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ticket Resolution Summary Owner Reporter
#2044 fixed "Can't unify" error in debugger igloo r6144

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

[haskell]$ ghci
GHCi, version 6.8.2:  :? 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- ... linking ... done.
Loading package old-locale- ... linking ... done.
Loading package old-time- ... linking ... done.
Loading package random- ... 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:

[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.

#4246 fixed "Conflicting family instance declarations" error mentions code I did not write TillmannRendel

I get an error message mentioning code that I did not write but results from desugaring when compiling the following program:

{-# LANGUAGE TypeFamilies, FlexibleInstances, OverlappingInstances #-}

class Stupid a where
  type F a

instance Stupid a where
  type F a = a

instance Stupid Int where
  type F Int = Bool

The error I get is:

    Conflicting family instance declarations:
      type instance F a -- Defined at families.hs:7:7
      type instance F Int -- Defined at families.hs:10:7

The error mentions "type instance F a", but it should say "type F a", because that is what I wrote in the source file. Or maybe "type F a in instance Stupid a" to make it clear that it's an instance declaration.

#6020 fixed "Couldn't match kind" with free type variables and PolyKinds atnnn

In the following code, I was hoping that GHC could infer the more specific kind of the free variable y and the class Id in the head of the instance for Test.

Also, the error message is confusing:

  • It says that 'True has kind k0 (maybe it's an impredicative kind?)
  • It refers to k0 as a type variable
{-# LANGUAGE DataKinds, FunctionalDependencies, FlexibleInstances,
             UndecidableInstances, PolyKinds, KindSignatures,
             ConstraintKinds, FlexibleContexts #-}

import GHC.Prim (Constraint)

class Id (a :: k) (b :: k) | a -> b
instance Id a a

class Test (x :: a) (y :: a) | x -> y
instance (Id x y, Id y z) => Test x z

test :: Test True True => ()
test = ()
>>> test
    Couldn't match kind `k0' with `Bool'
      `k0' is an unknown type variable
    Kind incompatibility when matching types:
      'True :: k0
      'True :: Bool
    When using functional dependencies to combine
      Id k0 a a,
        arising from the dependency `a -> b'
        in the instance declaration at /home/atnnn/code/type-prelude/testfoldl.hs:8:10
      Id Bool 'True 'True,
        arising from a use of `test' at <interactive>:54:1-4
    In the expression: test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note: See TracQuery for help on using queries.