#2688: GHC 6.10.0.20081007 hangs instead of giving error about missing type
class
constraint
--------------------------+-------------------------------------------------
Reporter: PVerswyvelen | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version:
Severity: major | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: Windows |
--------------------------+-------------------------------------------------
Changes (by igloo):
* difficulty: => Unknown
Old description:
> The following code hangs GHC 6.10.0.20081007 on Windows
>
> {-# OPTIONS_GHC -XFunctionalDependencies -XMultiParamTypeClasses #-}
>
> class VectorSpace v s | v -> s where
> (*^) :: s -> v -> v
> (^/) :: v -> s -> v
> v ^/ s = v *^ (1/s)
>
> it should give an error instead (1/s implies a constraint on s which I
> did not give)
New description:
The following code hangs GHC 6.10.0.20081007 on Windows
{{{
{-# OPTIONS_GHC -XFunctionalDependencies -XMultiParamTypeClasses #-}
class VectorSpace v s | v -> s where
(*^) :: s -> v -> v
(^/) :: v -> s -> v
v ^/ s = v *^ (1/s)
}}}
it should give an error instead (1/s implies a constraint on s which I did
not give)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2688#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs