hint icon indicating copy to clipboard operation
hint copied to clipboard

use RequiredTypeArguments for annotations

Open yaitskov opened this issue 7 months ago • 2 comments

and warning fixes.

Original code storing annotations in record fields can be rewritten with:

reqTyAr :: forall a b .  (a -> b) -> (forall b2 -> b2) -> b 
reqTyAr _ f =  f b

yaitskov avatar Aug 05 '25 23:08 yaitskov

Huh, I never had to touch this part of the code since I became the maintainer... What's an annotation? 🤔

gelisam avatar Aug 05 '25 23:08 gelisam

Yep the feature is not popular one. I discovered it myself recently and use for passing DocStrings and Interactivity from Haskell function to Emacs Lisp ones.

https://github.com/yaitskov/hamacs/blob/96be2a8d9f114a2c1f864db23521cd571c014987/packages/hapack/HaPack.hs#L13

yaitskov avatar Aug 05 '25 23:08 yaitskov