Viewing desugared classes and instances

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Viewing desugared classes and instances

Patrick Browne
In the Haskell litrature desugaring of type clases to a data type is  mentioned.
For example:
class Foo a where
    quux :: a -> Int
    muux :: a -> Bool
Desugared to
data FooD a = FooD          -- class Foo a where
    { quuxD :: a -> Int     --    quux :: a -> Int
    , muuxD :: a -> Bool    --    muux :: a -> Bool

Is there any way using core dumps to actuall view the desugring of classes, sub-classes, and instances, in my own code?
I have tried:
ghc -c -ddump-ds Foo.hs
But I cannot understand the output.


This email originated from DIT. If you received this email in error, please delete it from your system. Please note that if you are not the named addressee, disclosing, copying, distributing or taking any action based on the contents of this email or attachments is prohibited.

Is ó ITBÁC a tháinig an ríomhphost seo. Má fuair tú an ríomhphost seo trí earráid, scrios de do chóras é le do thoil. Tabhair ar aird, mura tú an seolaí ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon chóipeáil, aon dáileadh nó ar aon ghníomh a dhéanfar bunaithe ar an ábhar atá sa ríomhphost nó sna hiatáin seo.

Tá ITBÁC ag aistriú go Gráinseach Ghormáin – DIT is on the move to Grangegorman

Beginners mailing list
[hidden email]