pseudo-functors in mlb files
<[email protected]> Fri, 12 Aug 2016 06:40:26 +0000
| Newsgroups | gmane.comp.lang.ml.mlton.user |
|---|---|
| Message-ID | <[email protected]> |
I have a project where the “naïve” solution is to have two mlb files:
Variation1.sml
Subsequent1.sml
Subsequent2.sml
And
Variation2.sml
Subsequent1.sml
Subsequent2.sml
The Subsequent files depend on bindings made in Variation1 and 2. Clearly, the “right” way to do this would be to have some sort of massive functor that abstracted the Variation signature and generated the Subsequent files. (Alternatively, one functor per Subsequent file, I suppose.)
Given the history of my project, there are lots of Subsequent files (not just 2) and I don’t fancy trying to wrap a functor around them all. (Perhaps this is not as bad as I am thinking; feel free to tell me I should just do this.)
I first thought that I might be able to have a Subsequent.mlb file that was
Subsequent1.sml
Subsequent2.sml
And that I could then have variation1.mlb:
Variation1.sml
Subsequent.mlb
And variation2.mlb:
Variation2.sml
Subsequent.mlb
But this doesn’t work, and for good reason (Subsequent.mlb is elaborated/checked in isolation).
Is there any good way to get the effect I want? (In particular, having to repeat Subsequent1.sml .. Subsequent2.sml in both files is yucky.)
Michael
--
You received this message because you are subscribed to the Google Groups "MLton-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
MLton-user mailing list
[email protected]; [email protected]
https://lists.sourceforge.net/lists/listinfo/mlton-user