package the project
This commit is contained in:
parent
e727a180ef
commit
c8ae9c20d2
|
@ -0,0 +1,18 @@
|
||||||
|
# ppx\_unicode
|
||||||
|
|
||||||
|
this is an opinionated unicode PPX for ocaml
|
||||||
|
|
||||||
|
features
|
||||||
|
- all bare string literals are enforced UTF-8, and normalized using NFC. this is similar to
|
||||||
|
<https://github.com/dbuenzli/ppx_utf8_lit>, however this PPX aims for a modern implementation
|
||||||
|
based on `ppxlib` and defaults to enforced and normalized UTF-8 on all strings
|
||||||
|
- `Uchar.t` literals:
|
||||||
|
```ocaml
|
||||||
|
# "å"[@uchar]
|
||||||
|
- : Uchar.t = <abstr>
|
||||||
|
```
|
||||||
|
- `bytes` literals
|
||||||
|
```ocaml
|
||||||
|
# "å"[@bytes]
|
||||||
|
- : bytes = Bytes.of_string "\195\165"
|
||||||
|
```
|
31
dune-project
31
dune-project
|
@ -1,26 +1,21 @@
|
||||||
(lang dune 3.15)
|
(lang dune 3.15)
|
||||||
|
|
||||||
(name ppx_unicode)
|
(name ppx_unicode)
|
||||||
|
(version 0.0.1)
|
||||||
|
|
||||||
(generate_opam_files true)
|
(generate_opam_files true)
|
||||||
|
|
||||||
(source
|
|
||||||
(github username/reponame))
|
|
||||||
|
|
||||||
(authors "Author Name")
|
|
||||||
|
|
||||||
(maintainers "Maintainer Name")
|
|
||||||
|
|
||||||
(license LICENSE)
|
|
||||||
|
|
||||||
(documentation https://url/to/documentation)
|
|
||||||
|
|
||||||
(package
|
(package
|
||||||
(name ppx_unicode)
|
(name ppx_unicode)
|
||||||
(synopsis "A short synopsis")
|
(synopsis "opinionated ppx for string literals")
|
||||||
(description "A longer description")
|
(description "ppx providing enforced and NFC normalized utf-8 on string literals, uchar literals, and bytes literals")
|
||||||
(depends ocaml dune)
|
(license "CC-BY-NC-SA-4.0")
|
||||||
(tags
|
(homepage "https://git.lain.faith/haskal/ppx_unicode")
|
||||||
(topics "to describe" your project)))
|
(bug_reports "https://git.lain.faith/haskal/ppx_unicode")
|
||||||
|
(authors "xenia <xenia@awoo.systems>")
|
||||||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
|
(maintainers "xenia <xenia@awoo.systems>")
|
||||||
|
(source
|
||||||
|
(uri "https://git.lain.faith/haskal/ppx_unicode.git"))
|
||||||
|
(depends ocaml dune
|
||||||
|
(ppxlib (>= 0.32))
|
||||||
|
(uunf (>= 15.1))))
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
mkShell,
|
||||||
|
|
||||||
|
buildDunePackage,
|
||||||
|
ppxlib,
|
||||||
|
uunf,
|
||||||
|
|
||||||
|
ocaml,
|
||||||
|
dune_3,
|
||||||
|
odoc,
|
||||||
|
utop,
|
||||||
|
|
||||||
|
enableShell ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
sourceRoot = ./.;
|
||||||
|
fs = lib.fileset;
|
||||||
|
sourceFiles = fs.difference
|
||||||
|
(fs.gitTracked sourceRoot)
|
||||||
|
(fs.fileFilter (file: file.hasExt "nix") sourceRoot);
|
||||||
|
sourceSet = fs.toSource { root = sourceRoot; fileset = sourceFiles; };
|
||||||
|
in buildDunePackage rec {
|
||||||
|
pname = "ppx_unicode";
|
||||||
|
version = "0.0.1";
|
||||||
|
src = sourceSet;
|
||||||
|
|
||||||
|
minimalOCamlVersion = "5.1";
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
buildInputs = [ ppxlib uunf ];
|
||||||
|
propagatedBuildInputs = [ ];
|
||||||
|
|
||||||
|
nativeBuildInputs = lib.optionals enableShell [
|
||||||
|
ocaml dune_3 odoc utop
|
||||||
|
];
|
||||||
|
}
|
2
ppx/dune
2
ppx/dune
|
@ -5,4 +5,4 @@
|
||||||
(preprocess
|
(preprocess
|
||||||
(pps ppxlib.metaquot))
|
(pps ppxlib.metaquot))
|
||||||
(libraries ppxlib uunf)
|
(libraries ppxlib uunf)
|
||||||
(kind ppx_deriver))
|
(kind ppx_rewriter))
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
# This file is generated by dune, edit dune-project instead
|
# This file is generated by dune, edit dune-project instead
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
synopsis: "A short synopsis"
|
version: "0.0.1"
|
||||||
description: "A longer description"
|
synopsis: "opinionated ppx for string literals"
|
||||||
maintainer: ["Maintainer Name"]
|
description:
|
||||||
authors: ["Author Name"]
|
"ppx providing enforced and NFC normalized utf-8 on string literals, uchar literals, and bytes literals"
|
||||||
license: "LICENSE"
|
maintainer: ["xenia <xenia@awoo.systems>"]
|
||||||
tags: ["topics" "to describe" "your" "project"]
|
authors: ["xenia <xenia@awoo.systems>"]
|
||||||
homepage: "https://github.com/username/reponame"
|
license: "LGPL-2.0-or-later"
|
||||||
doc: "https://url/to/documentation"
|
homepage: "https://git.lain.faith/haskal/ppx_unicode"
|
||||||
bug-reports: "https://github.com/username/reponame/issues"
|
bug-reports: "https://git.lain.faith/haskal/ppx_unicode"
|
||||||
depends: [
|
depends: [
|
||||||
"ocaml"
|
"ocaml"
|
||||||
"dune" {>= "3.15"}
|
"dune" {>= "3.15"}
|
||||||
|
"ppxlib" {>= "0.32"}
|
||||||
|
"uunf" {>= "15.1"}
|
||||||
"odoc" {with-doc}
|
"odoc" {with-doc}
|
||||||
]
|
]
|
||||||
build: [
|
build: [
|
||||||
|
@ -28,4 +30,4 @@ build: [
|
||||||
"@doc" {with-doc}
|
"@doc" {with-doc}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
dev-repo: "git+https://github.com/username/reponame.git"
|
dev-repo: "https://git.lain.faith/haskal/ppx_unicode.git"
|
||||||
|
|
Loading…
Reference in New Issue