[GHC] #10589: Core Lint error with LambdaCase
GHC
ghc-devs at haskell.org
Mon Jun 29 23:49:05 UTC 2015
#10589: Core Lint error with LambdaCase
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
(Type checker) | Operating System: Unknown/Multiple
Keywords: | Type of failure: None/Unknown
Architecture: | Blocked By:
Unknown/Multiple | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
When I say
{{{
{-# LANGUAGE LambdaCase, TypeFamilies #-}
type family F a where
F a = Bool -> a
foo = (\case True -> 5
False -> 6) :: F Int
}}}
`-dcore-lint` tells me
{{{
*** Core Lint errors : in result of Desugar (after optimization) ***
/Users/rae/temp/Bug.hs:6:1: Warning:
[RHS of foo :: Bool -> Int]
From-type of Cast differs from type of enclosed expression
...
}}}
The problem is a missing `mkTcSymCo` in the relevant bit of `tcExpr`.
Will fix in ongoing work.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10589>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list