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)
|
||||
|
||||
(name ppx_unicode)
|
||||
(version 0.0.1)
|
||||
|
||||
(generate_opam_files true)
|
||||
|
||||
(source
|
||||
(github username/reponame))
|
||||
|
||||
(authors "Author Name")
|
||||
|
||||
(maintainers "Maintainer Name")
|
||||
|
||||
(license LICENSE)
|
||||
|
||||
(documentation https://url/to/documentation)
|
||||
|
||||
(package
|
||||
(name ppx_unicode)
|
||||
(synopsis "A short synopsis")
|
||||
(description "A longer description")
|
||||
(depends ocaml dune)
|
||||
(tags
|
||||
(topics "to describe" your project)))
|
||||
|
||||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
|
||||
(synopsis "opinionated ppx for string literals")
|
||||
(description "ppx providing enforced and NFC normalized utf-8 on string literals, uchar literals, and bytes literals")
|
||||
(license "CC-BY-NC-SA-4.0")
|
||||
(homepage "https://git.lain.faith/haskal/ppx_unicode")
|
||||
(bug_reports "https://git.lain.faith/haskal/ppx_unicode")
|
||||
(authors "xenia <xenia@awoo.systems>")
|
||||
(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
|
||||
(pps ppxlib.metaquot))
|
||||
(libraries ppxlib uunf)
|
||||
(kind ppx_deriver))
|
||||
(kind ppx_rewriter))
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
synopsis: "A short synopsis"
|
||||
description: "A longer description"
|
||||
maintainer: ["Maintainer Name"]
|
||||
authors: ["Author Name"]
|
||||
license: "LICENSE"
|
||||
tags: ["topics" "to describe" "your" "project"]
|
||||
homepage: "https://github.com/username/reponame"
|
||||
doc: "https://url/to/documentation"
|
||||
bug-reports: "https://github.com/username/reponame/issues"
|
||||
version: "0.0.1"
|
||||
synopsis: "opinionated ppx for string literals"
|
||||
description:
|
||||
"ppx providing enforced and NFC normalized utf-8 on string literals, uchar literals, and bytes literals"
|
||||
maintainer: ["xenia <xenia@awoo.systems>"]
|
||||
authors: ["xenia <xenia@awoo.systems>"]
|
||||
license: "LGPL-2.0-or-later"
|
||||
homepage: "https://git.lain.faith/haskal/ppx_unicode"
|
||||
bug-reports: "https://git.lain.faith/haskal/ppx_unicode"
|
||||
depends: [
|
||||
"ocaml"
|
||||
"dune" {>= "3.15"}
|
||||
"ppxlib" {>= "0.32"}
|
||||
"uunf" {>= "15.1"}
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
|
@ -28,4 +30,4 @@ build: [
|
|||
"@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