123456789101112131415161718192021222324252627282930313233343536373839404142434445464748open!Coretypelazy_loading_optimization=(* Run CSS graph traversal and lazily instantiate the styles *)|Lazy_graph(* Eagerly adds all CSS to the page *)|Eager(* The user has not explicitly set the value. Will do whatever the default is (currently
Eager) *)|Defaulttypet={dont_hash_prefixes:String.Set.t;dont_hash:String.Set.t;lazy_loading_optimization:lazy_loading_optimization}letsingleton=ref{dont_hash_prefixes=String.Set.empty;dont_hash=String.Set.empty;lazy_loading_optimization=Eager};;letget()=!singletonletadd~get~setnew_=singleton:=set!singleton(Set.add(get!singleton)new_)letadd_dont_hashnew_=add~get:(funt->t.dont_hash)~set:(funtdont_hash->{twithdont_hash})new_;;letadd_dont_hash_prefixesnew_=add~get:(funt->t.dont_hash_prefixes)~set:(funtdont_hash_prefixes->{twithdont_hash_prefixes})new_;;letset_lazy_loading_optimizationvalue=letoptimization_value=matchvaluewith|Sometrue->Lazy_graph|Somefalse->Eager|None->Defaultinsingleton:={!singletonwithlazy_loading_optimization=optimization_value};;