
#11444: 8.0 rc1 panics in applyTypeToArgs -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:6 simonpj]:
Can you make a small test case so I can see?
Based on your investigation, I've constructed a small test case: {{{#!hs {-# LANGUAGE MagicHash, BangPatterns #-} module PtrEqTest where import GHC.Exts (reallyUnsafePtrEquality#, Int (..)) ptrEq :: a -> a -> Bool ptrEq !x !y = I# (reallyUnsafePtrEquality# x y) == 1 }}} This produces the following error: {{{ *** Core Lint errors : in result of Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False}) *** <no location info>: warning: In the expression: I# (reallyUnsafePtrEquality# @ a x_a2Pv y_a2Pw) This argument does not satisfy the let/app invariant: reallyUnsafePtrEquality# @ a x_a2Pv y_a2Pw *** Offending Program *** lvl_s3Ub :: Int [LclId] lvl_s3Ub = I# 1# ptrEq :: forall a. a -> a -> Bool [LclIdX, Arity=2] ptrEq = \ (@ a_a3ID) (x_a2Pv :: a) (y_a2Pw :: a) -> case x_a2Pv of x_X2Pz { __DEFAULT -> case y_a2Pw of y_X2PB { __DEFAULT -> eqInt (I# (reallyUnsafePtrEquality# @ a x_a2Pv y_a2Pw)) lvl_s3Ub } } $trModule_s3U7 :: TrName [LclId] $trModule_s3U7 = TrNameS "main"# $trModule_s3U8 :: TrName [LclId] $trModule_s3U8 = TrNameS "PtrEqTest"# $trModule :: Module [LclIdX] $trModule = Module $trModule_s3U7 $trModule_s3U8 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11444#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler