Ticket #4401 (closed bug: fixed)
Functional dependencies regression
| Reported by: | rl | Owned by: | simonpj |
|---|---|---|---|
| Priority: | highest | Milestone: | 7.0.1 |
| Component: | Compiler | Version: | 7.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | T4401 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
Testcase:
{-# LANGUAGE FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, FunctionalDependencies #-}
module Foo where
class Mul x y z | x y -> z
class IsType a
class IsType a => IsSized a s | a -> s
data Array n a = Array
instance IsSized a s => IsType (Array n a)
instance (IsSized a s, Mul n s ns) => IsSized (Array n a) ns
ghc-7.0.0.20101014 rejects this with:
Couldn't match type `s' with `s1'
because this skolem type variable would escape: `s1'
This skolem is bound by the instance declaration
In the instance declaration for `IsSized (Array n a) ns'
ghc-7.0.0.20101005 and all previous versions accept it. This is from the llvm package, so is fairly critical.
Change History
Note: See
TracTickets for help on using
tickets.
