[GHC] #9897: Couldn't match type `Id (Id Char)' with `Char'

#9897: Couldn't match type `Id (Id Char)' with `Char' -------------------------------------+------------------------------------- Reporter: erisco | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.8.3 checker) | Operating System: Windows Keywords: | Type of failure: GHC Architecture: x86_64 (amd64) | rejects valid program Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- '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' }}} {{{#!hs {-# 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' }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9897 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9897: Couldn't match type `Id (Id Char)' with `Char' -------------------------------------+------------------------------------- Reporter: erisco | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 (Type checker) | Keywords: Resolution: duplicate | Architecture: x86_64 (amd64) Operating System: Windows | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => duplicate Comment: Same as #9898 I'm afraid. HEAD says {{{ T9897.hs:20:8: Type family ‘Id’ should have 1 argument, but has been given none In the type signature for ‘foo’: foo :: (Id :.: Id) Char }}} So I'll close this as a dup of #9898. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9897#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC