@@ -172,9 +172,15 @@ namespace purescript {
172172
173173} // namespace purescript
174174
175+#define DEFINE_FOREIGN_DICTIONARY_AND_ACCESSOR() \
176+ inline auto foreign() -> dict_t& {\
177+ static dict_t $dict$;\
178+ return $dict$;\
179+ }
180+
175181#define FOREIGN_BEGIN(NS) namespace NS {\
176182 using namespace purescript;\
177− auto foreign() -> dict_t&;\
183+ DEFINE_FOREIGN_DICTIONARY_AND_ACCESSOR()\
178184 static const auto& NS ## $foreign_init = []() {\
179185 dict_t& exports = foreign();
180186#define FOREIGN_END return exports; }(); }