1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556(* Copyright (C) 2022--2024 Petter A. Urkedal <paurkedal@gmail.com>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version, with the LGPL-3.0 Linking Exception.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* and the LGPL-3.0 Linking Exception along with this library. If not, see
* <http://www.gnu.org/licenses/> and <https://spdx.org>, respectively.
*)moduletypeDRIVER_FUNCTOR=functor(System:Caqti_platform.System_sig.S)->functor(_:System_sig.Swithtype'afiber:='aSystem.Fiber.tandtypestdenv:=System.stdenv)->Caqti_platform.Driver_loader.DRIVERwithtype'afiber:='aSystem.Fiber.tandtype('a,'err)stream:=('a,'err)System.Stream.tandtypeswitch:=System.Switch.tandtypestdenv:=System.stdenvletdrivers=Hashtbl.create5letregisterschemep=Hashtbl.adddriversschemepmoduleMake(System:Caqti_platform.System_sig.S)(System_unix:System_sig.Swithtype'afiber:='aSystem.Fiber.tandtypestdenv:=System.stdenv)=structmoduleCore_loader=Caqti_platform.Driver_loader.Make(System)moduletypeDRIVER=Core_loader.DRIVERmoduletypeCONNECTION=Core_loader.CONNECTIONletprovides_unix=trueletfind_and_apply'scheme=(matchHashtbl.find_optdriversschemewith|None->None|Some(moduleF:DRIVER_FUNCTOR)->letmoduleDriver=F(System)(System_unix)inSome(moduleDriver:DRIVER))letfind_and_applyscheme=(matchCore_loader.find_and_applyschemewith|Some_asr->r|None->find_and_apply'scheme)end