equal
deleted
inserted
replaced
276 fun print _ (space, locs, _) = |
276 fun print _ (space, locs, _) = |
277 Pretty.strs ("locales:" :: map #1 (NameSpace.extern_table (space, locs))) |
277 Pretty.strs ("locales:" :: map #1 (NameSpace.extern_table (space, locs))) |
278 |> Pretty.writeln; |
278 |> Pretty.writeln; |
279 end); |
279 end); |
280 |
280 |
281 val _ = Context.add_setup [GlobalLocalesData.init]; |
281 val _ = Context.add_setup GlobalLocalesData.init; |
282 |
282 |
283 |
283 |
284 |
284 |
285 (** context data **) |
285 (** context data **) |
286 |
286 |
291 (* registrations, indexed by locale name *) |
291 (* registrations, indexed by locale name *) |
292 fun init _ = Symtab.empty; |
292 fun init _ = Symtab.empty; |
293 fun print _ _ = (); |
293 fun print _ _ = (); |
294 end); |
294 end); |
295 |
295 |
296 val _ = Context.add_setup [LocalLocalesData.init]; |
296 val _ = Context.add_setup LocalLocalesData.init; |
297 |
297 |
298 |
298 |
299 (* access locales *) |
299 (* access locales *) |
300 |
300 |
301 val print_locales = GlobalLocalesData.print; |
301 val print_locales = GlobalLocalesData.print; |
1716 fun add_locale_i b = #2 oooo add_locale_context_i b; |
1716 fun add_locale_i b = #2 oooo add_locale_context_i b; |
1717 |
1717 |
1718 end; |
1718 end; |
1719 |
1719 |
1720 val _ = Context.add_setup |
1720 val _ = Context.add_setup |
1721 [add_locale_i true "var" empty [Fixes [(Syntax.internal "x", NONE, NoSyn)]], |
1721 (add_locale_i true "var" empty [Fixes [(Syntax.internal "x", NONE, NoSyn)]] #> |
1722 add_locale_i true "struct" empty [Fixes [(Syntax.internal "S", NONE, Structure)]]]; |
1722 add_locale_i true "struct" empty [Fixes [(Syntax.internal "S", NONE, Structure)]]); |
1723 |
1723 |
1724 |
1724 |
1725 |
1725 |
1726 (** locale goals **) |
1726 (** locale goals **) |
1727 |
1727 |