code: function mainToProgram(moduleName, wrappedMain)
  {
  	var main = wrappedMain.main;
  
  	if (typeof main.init === 'undefined')
  	{
  		var emptyBag = batch(_elm_lang$core$Native_List.Nil);
  		var noChange = _elm_lang$core$Native_Utils.Tuple2(
  			_elm_lang$core$Native_Utils.Tuple0,
  			emptyBag
  		);
  
  		return _elm_lang$virtual_dom$VirtualDom$programWithFlags({
  			init: function() { return noChange; },
  			view: function() { return main; },
  			update: F2(function() { return noChange; }),
  			subscriptions: function () { return emptyBag; }
  		});
  	}
  
  	var flags = wrappedMain.flags;
  	var init = flags
  		? initWithFlags(moduleName, main.init, flags)
  		: initWithoutFlags(moduleName, main.init);
  
  	return _elm_lang$virtual_dom$VirtualDom$programWithFlags({
  		init: init,
  		view: main.view,
  		update: main.update,
  		subscriptions: main.subscriptions,
  	});
  }
docs: MAIN TO PROGRAM