Couldn't match type `Id (Id Char)' with `Char'
'foo' is expected to type check given that 'bar' and 'qux' type check.
ghc_bug.hs:21:7:
Couldn't match type `Id (Id Char)' with `Char'
Expected type: (:.:) Id Id Char
Actual type: Char
In the expression: 'x'
In an equation for `foo': foo = 'x'
{-# LANGUAGE TypeOperators, TypeFamilies #-}
module Main where
type family (:.:) g f a where
(:.:) g f a = g (f a)
--
type family Id x where
Id x = x
--
-- Type checks
bar :: Id (Id Char)
bar = 'x'
-- Type checks
qux = 'x' :: (Id :.: Id) Char
-- Couldn't match type `Id (Id Char)' with `Char'
foo :: (Id :.: Id) Char
foo = 'x'
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |