Making a core app with a function having context in core2core plugin?

Magesh B magesh85 at gmail.com
Thu Feb 11 07:41:10 UTC 2016


Hi GHC Devs,

Is it possible to make a core app with a function having contexts?
For example, let us take

showable :: P.Show a => a -> String
showable = P.show

Say, I would like to app showable with (Just 'a') in the core, which
requires the following code

showable
    @ (Maybe Char)
    *($fShowMaybe @ Char $fShowChar)*
    (Just @ Char (C# 'a'))

But I couldn't find a way to construct the dictionary required by showable
function myself in the core.
Is there any ghc api using which I can get the required dictionary for a
particular type (in the above case, Dictionary for Show instance of Maybe
Char).

Regards,
Magesh B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160211/3222b82e/attachment.html>


More information about the ghc-devs mailing list