-
Notifications
You must be signed in to change notification settings - Fork 3
/
mmzk-typeid.cabal
188 lines (182 loc) · 4.7 KB
/
mmzk-typeid.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
cabal-version: 2.4
name: mmzk-typeid
version: 0.7.0.1
synopsis: A TypeID and UUIDv7 implementation for Haskell
description:
'TypeID' is a type-safe, K-sortable, globally unique identifier inspired by Stripe IDs.
.
The specification is available at https://github.com/jetpack-io/typeid.
.
This library supports generating and parsing speç-conforming 'TypeID's, with the following additional features:
.
- Batch generating 'TypeID's with the same UUIDv7 timestamp
.
- Encode prefixes at type-level for better type-safety
.
It also serves as a (temporary) UUIDv7 implementation in Haskell, since there are no official ones yet.
.
Please enable the following extensions if working with 'KindID':
.
> {-# LANGUAGE DataKinds #-}
> {-# LANGUAGE PolyKinds #-}
> {-# LANGUAGE TypeApplications #-}
> {-# LANGUAGE TypeFamilies #-}
.
While the following is not required, it is quite convenient to have
.
> {-# LANGUAGE OverloadedStrings #-}
.
homepage: https://github.com/MMZK1526/mmzk-typeid
bug-reports: https://github.com/MMZK1526/mmzk-typeid/issues
license: MIT
author: Yitang Chen <mmzk1526@outlook.com>
maintainer: Yitang Chen <mmzk1526@outlook.com>
category: Data, UUID, UUIDv7, TypeID
tested-with:
GHC == 9.4.8
GHC == 9.6.4
GHC == 9.8.2
extra-source-files:
CHANGELOG.md
LICENSE
README.md
test/invalid.json
test/valid.json
library
exposed-modules:
Data.KindID,
Data.KindID.Class,
Data.KindID.Unsafe,
Data.KindID.V1,
Data.KindID.V1.Unsafe,
Data.KindID.V4,
Data.KindID.V4.Unsafe,
Data.KindID.V5,
Data.KindID.V5.Unsafe,
Data.KindID.V7,
Data.KindID.V7.Unsafe,
Data.TypeID,
Data.TypeID.Class,
Data.TypeID.Error,
Data.TypeID.Unsafe,
Data.TypeID.V1,
Data.TypeID.V1.Unsafe,
Data.TypeID.V4,
Data.TypeID.V4.Unsafe,
Data.TypeID.V5,
Data.TypeID.V5.Unsafe,
Data.TypeID.V7,
Data.TypeID.V7.Unsafe,
Data.UUID.V7,
Data.UUID.Versions
other-modules:
Data.KindID.Error,
Data.KindID.Internal,
Data.TypeID.Internal
default-extensions:
BlockArguments
ConstraintKinds
DataKinds
DeriveAnyClass
DeriveDataTypeable
DeriveGeneric
FlexibleContexts
FlexibleInstances
InstanceSigs
MultiWayIf
OverloadedStrings
PolyKinds
ScopedTypeVariables
TupleSections
TypeApplications
TypeFamilies
TypeOperators
build-depends:
base >=4.16 && <5,
aeson >=2.1 && <3,
array ^>=0.5,
binary >=0.8.5 && <0.9,
bytestring >=0.11 && < 0.13,
entropy ^>=0.4,
hashable ^>=1.4,
random ^>=1.2,
text ^>=2.1,
time >=1.11 && <1.13,
uuid ^>=1.3,
uuid-types ^>=1.0,
ghc-options:
-Wall
hs-source-dirs: src
default-language: Haskell2010
test-suite test
main-is: Spec.hs
type: exitcode-stdio-1.0
other-modules:
Data.KindID,
Data.KindID.Class,
Data.KindID.Error,
Data.KindID.Internal,
Data.KindID.Unsafe,
Data.KindID.V1,
Data.KindID.V1.Unsafe,
Data.KindID.V4,
Data.KindID.V4.Unsafe,
Data.KindID.V5,
Data.KindID.V5.Unsafe,
Data.KindID.V7,
Data.KindID.V7.Unsafe,
Data.TypeID,
Data.TypeID.Class,
Data.TypeID.Error,
Data.TypeID.Internal,
Data.TypeID.Unsafe,
Data.TypeID.V1,
Data.TypeID.V1.Unsafe,
Data.TypeID.V4,
Data.TypeID.V4.Unsafe,
Data.TypeID.V5,
Data.TypeID.V5.Unsafe,
Data.TypeID.V7,
Data.TypeID.V7.Unsafe,
Data.UUID.V7,
Data.UUID.Versions
default-extensions:
BlockArguments
ConstraintKinds
DataKinds
DeriveAnyClass
DeriveDataTypeable
DeriveGeneric
FlexibleContexts
FlexibleInstances
InstanceSigs
MultiWayIf
OverloadedStrings
PolyKinds
ScopedTypeVariables
TupleSections
TypeApplications
TypeFamilies
TypeOperators
build-depends:
base,
aeson,
array,
binary,
bytestring,
containers ^>=0.6,
entropy,
hashable,
hint ^>=0.9,
hspec ^>=2.11,
random,
text,
time,
uuid,
uuid-types,
ghc-options:
-Wall
hs-source-dirs:
src
test
default-language: Haskell2010