Re: Cmm code of `id` function referring to `breakpoint`?

2019-02-05 Thread Ömer Sinan Ağacan
That's because of the CSE (common subexpression elimination) pass. Here's an example: module Lib where foo :: a -> a foo x = x bar :: a -> a bar x = x Build with -O -ddump-stg and you'll see something like: Lib.foo :: forall a. a -> a [GblId, Arity=1,

Cmm code of `id` function referring to `breakpoint`?

2019-02-05 Thread Shao, Cheng
Hi devs, I just found that the Cmm code of `GHC.Base.id` refers to `breakpoint` in the same module, however, in the Haskell source of `GHC.Base`, the definition of `id` and `breakpoint` are totally unrelated: ``` id :: a -> a id x= x breakpoint :: a ->