Question about HsWrapper for constructors

Kai-Oliver Prott stu126209 at
Wed Nov 18 16:01:12 UTC 2020

Hi all,

I've tried a development snapshot of GHC's master branch from the 
beginning of this month and I am curious about the reason for a specific 
change. I noticed that a simple program like

idNil :: [a] -> [a]
idNil [] = []

is internally represented (after type checking) as:

AbsBinds [] []
   {Exports: [idNil <= idNil2]
    Exported types: idNil :: forall a. [a] -> [a]
    Binds: idNil2 [] = (/\(@a2). [] @a2) @a

Can someone point me to a reason why the right side of idNil2 is not 
represented as [] @ a, like it was in GHC 8.10.1? I have not tried it 
with GHC 9.0. It is interesting to have a type lambda that is 
immediately followed by a type application.



More information about the ghc-devs mailing list