Skip to content

Commit

Permalink
Make it more compat!
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Apr 4, 2023
1 parent 999a5e3 commit 05caeef
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 21 deletions.
1 change: 1 addition & 0 deletions compat/camomileDefaultConfig.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include Camomile.DefaultConfig
1 change: 1 addition & 0 deletions compat/camomileDefaultConfig__.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module InstallConfig = CamomileDefaultConfig__InstallConfig
1 change: 1 addition & 0 deletions compat/camomileDefaultConfig__InstallConfig.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let share_dir = Filename.dirname Camomile.DefaultConfig.datadir
15 changes: 15 additions & 0 deletions compat/camomileLibrary.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[@@@ocaml.deprecated
"this module is deprecated, please update to the most recent camomile API"]

include Camomile
module CharEncoding = CamomileLib.CharEncoding
module UCharInfo = CamomileLib.UCharInfo
module UNF = CamomileLib.UNF
module UCol = CamomileLib.UCol
module CaseMap = CamomileLib.CaseMap
module UReStr = CamomileLib.UReStr
module StringPrep = CamomileLib.StringPrep

module ConfigInt = struct
module type Type = CamomileLib.Config.Type
end
2 changes: 2 additions & 0 deletions compat/camomileLibraryDefault.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module Config = CamomileDefaultConfig
module Camomile = Camomile
1 change: 1 addition & 0 deletions compat/camomileLibraryDyn.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include CamomileLibraryDefault
10 changes: 10 additions & 0 deletions compat/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(env
(dev
(flags
(:standard -w -3))))

(library
(name camomileCompat)
(public_name camomile-compat)
(libraries camomile camomile.lib)
(wrapped false))
14 changes: 0 additions & 14 deletions src/camomileCompat.ml

This file was deleted.

8 changes: 1 addition & 7 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,10 @@
(name camomileLib)
(public_name camomile.lib)
(libraries dune-site bigarray camlp-streams)
(modules :standard \ camomile camomileCompat))
(modules :standard \ camomile))

(library
(name camomile)
(public_name camomile)
(libraries camomileLib)
(modules camomile))

(library
(name camomileCompat)
(public_name camomile-compat)
(libraries camomile)
(modules camomileCompat))

0 comments on commit 05caeef

Please sign in to comment.