GHC doesn’t specialize functions with implicit parameters
As discussed on the ghc-devs list, GHC does not specialize functions with implicit parameters. It is no surprise that GHC does not specialize the implicit parameters themselves, but given a function with a type like
foo :: (?foo :: Bool, Show a) => a -> String
there is no reason not to specialize on the
This is an easy fix—the specializer can just treat implicit parameters the same was as ordinary function arguments—so I’ll open an MR with a patch.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information