Building dictionary terms in Core?

Oleg Grenrus oleg.grenrus at iki.fi
Mon Jan 7 08:00:27 UTC 2019


Hi Ömer,

I cannot answer you precisely, but when I was working on my type-checker
plugin, I used functions `classTyCon` and `tyConSingleDataCon`,
https://github.com/phadej/kleene-type/blob/cb7332b98ae229e162c12186fd4d7fccb06ab62f/plugin/KleenePlugin/TcPlugin.hs#L331-L336;
i.e. shouldn't be much different than constructing a record.

Hopefully those help you find out the right functions.

- Oleg

On 7.1.2019 8.56, Ömer Sinan Ağacan wrote:
> Hi,
>
> In #15646 (recent discussion in Gitlab MR 55) we need dictionary arguments in
> Core (in desugarer) to apply to functions like `fromRational :: Fractional a =>
> Rational -> a`, but we don't know how to build the dictionary term (`Fractional
> a`) in Core. Can anyone who know help us in the MR?
>
> Thanks,
>
> Ömer
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20190107/7f2201c4/attachment.sig>


More information about the ghc-devs mailing list