Help needed: exporting pattern synonyms

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

Help needed: exporting pattern synonyms

Dr. ERDI Gergo

As you can see in,
my implementation of pattern synonyms is now feature complete for the
first two sections of, namely, simple
pattern synonyms and pattern-only synonyms. Bidirectional pattern synonyms
using 'where' will also be easy to add and will be part of my initial
submission. The current version of my code is at

However, the one part I am struggling with is implementing exporting of
pattern synonyms. The pipeline is pretty clear to get the pattern synonym
definitions to the ModGuts, but I get lost there. Since they are a
completely compile-time thing, there's nothing to put in the CgGuts (well,
I guess the wrapper (i.e. the patsyn-in-an-expression-context) should be
put there). However, when I look at existing stuff in ModIface/ModDetails,
I don't really see a pattern for storing actual definitions there.

Could someone help me with this part please? Would it make sense to put
something like 
in the interface? Or put the "psPatDef" and the "fmap snd psWrapper" parts
in the CgGuts and the rest in the interface?



   .--= ULLA! =-----------------.
    \   \
     `---= gergo at =-------'