Skip to content

Commit f9a0e4e

Browse files
committed
Initial.
1 parent 4fda929 commit f9a0e4e

19 files changed

+517
-0
lines changed

LICENSE

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
Copyright (c) 2016, Christopher Meiklejohn
2+
All rights reserved.
3+
4+
5+
Apache License
6+
Version 2.0, January 2004
7+
http://www.apache.org/licenses/
8+
9+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10+
11+
1. Definitions.
12+
13+
"License" shall mean the terms and conditions for use, reproduction,
14+
and distribution as defined by Sections 1 through 9 of this document.
15+
16+
"Licensor" shall mean the copyright owner or entity authorized by
17+
the copyright owner that is granting the License.
18+
19+
"Legal Entity" shall mean the union of the acting entity and all
20+
other entities that control, are controlled by, or are under common
21+
control with that entity. For the purposes of this definition,
22+
"control" means (i) the power, direct or indirect, to cause the
23+
direction or management of such entity, whether by contract or
24+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
25+
outstanding shares, or (iii) beneficial ownership of such entity.
26+
27+
"You" (or "Your") shall mean an individual or Legal Entity
28+
exercising permissions granted by this License.
29+
30+
"Source" form shall mean the preferred form for making modifications,
31+
including but not limited to software source code, documentation
32+
source, and configuration files.
33+
34+
"Object" form shall mean any form resulting from mechanical
35+
transformation or translation of a Source form, including but
36+
not limited to compiled object code, generated documentation,
37+
and conversions to other media types.
38+
39+
"Work" shall mean the work of authorship, whether in Source or
40+
Object form, made available under the License, as indicated by a
41+
copyright notice that is included in or attached to the work
42+
(an example is provided in the Appendix below).
43+
44+
"Derivative Works" shall mean any work, whether in Source or Object
45+
form, that is based on (or derived from) the Work and for which the
46+
editorial revisions, annotations, elaborations, or other modifications
47+
represent, as a whole, an original work of authorship. For the purposes
48+
of this License, Derivative Works shall not include works that remain
49+
separable from, or merely link (or bind by name) to the interfaces of,
50+
the Work and Derivative Works thereof.
51+
52+
"Contribution" shall mean any work of authorship, including
53+
the original version of the Work and any modifications or additions
54+
to that Work or Derivative Works thereof, that is intentionally
55+
submitted to Licensor for inclusion in the Work by the copyright owner
56+
or by an individual or Legal Entity authorized to submit on behalf of
57+
the copyright owner. For the purposes of this definition, "submitted"
58+
means any form of electronic, verbal, or written communication sent
59+
to the Licensor or its representatives, including but not limited to
60+
communication on electronic mailing lists, source code control systems,
61+
and issue tracking systems that are managed by, or on behalf of, the
62+
Licensor for the purpose of discussing and improving the Work, but
63+
excluding communication that is conspicuously marked or otherwise
64+
designated in writing by the copyright owner as "Not a Contribution."
65+
66+
"Contributor" shall mean Licensor and any individual or Legal Entity
67+
on behalf of whom a Contribution has been received by Licensor and
68+
subsequently incorporated within the Work.
69+
70+
2. Grant of Copyright License. Subject to the terms and conditions of
71+
this License, each Contributor hereby grants to You a perpetual,
72+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73+
copyright license to reproduce, prepare Derivative Works of,
74+
publicly display, publicly perform, sublicense, and distribute the
75+
Work and such Derivative Works in Source or Object form.
76+
77+
3. Grant of Patent License. Subject to the terms and conditions of
78+
this License, each Contributor hereby grants to You a perpetual,
79+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80+
(except as stated in this section) patent license to make, have made,
81+
use, offer to sell, sell, import, and otherwise transfer the Work,
82+
where such license applies only to those patent claims licensable
83+
by such Contributor that are necessarily infringed by their
84+
Contribution(s) alone or by combination of their Contribution(s)
85+
with the Work to which such Contribution(s) was submitted. If You
86+
institute patent litigation against any entity (including a
87+
cross-claim or counterclaim in a lawsuit) alleging that the Work
88+
or a Contribution incorporated within the Work constitutes direct
89+
or contributory patent infringement, then any patent licenses
90+
granted to You under this License for that Work shall terminate
91+
as of the date such litigation is filed.
92+
93+
4. Redistribution. You may reproduce and distribute copies of the
94+
Work or Derivative Works thereof in any medium, with or without
95+
modifications, and in Source or Object form, provided that You
96+
meet the following conditions:
97+
98+
(a) You must give any other recipients of the Work or
99+
Derivative Works a copy of this License; and
100+
101+
(b) You must cause any modified files to carry prominent notices
102+
stating that You changed the files; and
103+
104+
(c) You must retain, in the Source form of any Derivative Works
105+
that You distribute, all copyright, patent, trademark, and
106+
attribution notices from the Source form of the Work,
107+
excluding those notices that do not pertain to any part of
108+
the Derivative Works; and
109+
110+
(d) If the Work includes a "NOTICE" text file as part of its
111+
distribution, then any Derivative Works that You distribute must
112+
include a readable copy of the attribution notices contained
113+
within such NOTICE file, excluding those notices that do not
114+
pertain to any part of the Derivative Works, in at least one
115+
of the following places: within a NOTICE text file distributed
116+
as part of the Derivative Works; within the Source form or
117+
documentation, if provided along with the Derivative Works; or,
118+
within a display generated by the Derivative Works, if and
119+
wherever such third-party notices normally appear. The contents
120+
of the NOTICE file are for informational purposes only and
121+
do not modify the License. You may add Your own attribution
122+
notices within Derivative Works that You distribute, alongside
123+
or as an addendum to the NOTICE text from the Work, provided
124+
that such additional attribution notices cannot be construed
125+
as modifying the License.
126+
127+
You may add Your own copyright statement to Your modifications and
128+
may provide additional or different license terms and conditions
129+
for use, reproduction, or distribution of Your modifications, or
130+
for any such Derivative Works as a whole, provided Your use,
131+
reproduction, and distribution of the Work otherwise complies with
132+
the conditions stated in this License.
133+
134+
5. Submission of Contributions. Unless You explicitly state otherwise,
135+
any Contribution intentionally submitted for inclusion in the Work
136+
by You to the Licensor shall be under the terms and conditions of
137+
this License, without any additional terms or conditions.
138+
Notwithstanding the above, nothing herein shall supersede or modify
139+
the terms of any separate license agreement you may have executed
140+
with Licensor regarding such Contributions.
141+
142+
6. Trademarks. This License does not grant permission to use the trade
143+
names, trademarks, service marks, or product names of the Licensor,
144+
except as required for reasonable and customary use in describing the
145+
origin of the Work and reproducing the content of the NOTICE file.
146+
147+
7. Disclaimer of Warranty. Unless required by applicable law or
148+
agreed to in writing, Licensor provides the Work (and each
149+
Contributor provides its Contributions) on an "AS IS" BASIS,
150+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151+
implied, including, without limitation, any warranties or conditions
152+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153+
PARTICULAR PURPOSE. You are solely responsible for determining the
154+
appropriateness of using or redistributing the Work and assume any
155+
risks associated with Your exercise of permissions under this License.
156+
157+
8. Limitation of Liability. In no event and under no legal theory,
158+
whether in tort (including negligence), contract, or otherwise,
159+
unless required by applicable law (such as deliberate and grossly
160+
negligent acts) or agreed to in writing, shall any Contributor be
161+
liable to You for damages, including any direct, indirect, special,
162+
incidental, or consequential damages of any character arising as a
163+
result of this License or out of the use or inability to use the
164+
Work (including but not limited to damages for loss of goodwill,
165+
work stoppage, computer failure or malfunction, or any and all
166+
other commercial damages or losses), even if such Contributor
167+
has been advised of the possibility of such damages.
168+
169+
9. Accepting Warranty or Additional Liability. While redistributing
170+
the Work or Derivative Works thereof, You may choose to offer,
171+
and charge a fee for, acceptance of support, warranty, indemnity,
172+
or other liability obligations and/or rights consistent with this
173+
License. However, in accepting such obligations, You may act only
174+
on Your own behalf and on Your sole responsibility, not on behalf
175+
of any other Contributor, and only if You agree to indemnify,
176+
defend, and hold each Contributor harmless for any liability
177+
incurred by, or claims asserted against, such Contributor by reason
178+
of your accepting any such warranty or additional liability.
179+
180+
END OF TERMS AND CONDITIONS
181+

Makefile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
PACKAGE ?= types
2+
VERSION ?= $(shell git describe --tags)
3+
BASE_DIR = $(shell pwd)
4+
ERLANG_BIN = $(shell dirname $(shell which erl))
5+
REBAR = $(shell pwd)/rebar3
6+
MAKE = make
7+
8+
.PHONY: rel deps test eqc plots
9+
10+
all: compile
11+
12+
##
13+
## Compilation targets
14+
##
15+
16+
compile:
17+
$(REBAR) compile
18+
19+
clean: packageclean
20+
$(REBAR) clean
21+
22+
packageclean:
23+
rm -fr *.deb
24+
rm -fr *.tar.gz
25+
26+
##
27+
## Test targets
28+
##
29+
30+
check: test xref dialyzer lint
31+
32+
test: ct eunit
33+
34+
lint:
35+
${REBAR} as lint lint
36+
37+
eqc:
38+
${REBAR} as test eqc
39+
40+
eunit:
41+
${REBAR} as test eunit
42+
43+
ct:
44+
${REBAR} as test ct
45+
46+
shell:
47+
${REBAR} shell --apps types
48+
49+
DIALYZER_APPS = kernel stdlib erts sasl eunit syntax_tools compiler crypto
50+
51+
include tools.mk

_build/default/lib/lager

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit b2cb2735713e3021e0761623ff595d53a545438e

_build/default/lib/lasp_support

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit f5b72230e04a16a511f30cef22cdda1204cd7585

_build/default/lib/mochiweb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit c3fb6aed018d47a9c313daa966657a157d88dbc6

_build/default/lib/ranch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit a5d2efcde9a34ad38ab89a26d98ea5335e88625a

_build/default/lib/riak_dt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 16ba975ca6980ddf76e3c3202411f29ba37c0329

_build/default/lib/time_compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 6007f68892104ebb6fa2366cebf9d928d8856273

include/.gitkeep

Whitespace-only changes.

priv/.gitkeep

Whitespace-only changes.

rebar.config

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{deps, [
2+
{time_compat, {git, "https://github.com/lasp-lang/time_compat", {tag, "0.0.2"}}},
3+
{lasp_support, {git, "https://github.com/lasp-lang/lasp_support", {tag, "0.0.2"}}},
4+
{ranch, {git, "https://github.com/extend/ranch.git", {tag, "1.2.1"}}},
5+
{lager, {git, "https://github.com/basho/lager", {tag, "3.1.0"}}},
6+
{mochiweb, {git, "https://github.com/mochi/mochiweb.git", {tag, "v2.12.2"}}},
7+
{riak_dt, ".*", {git, "https://github.com/basho/riak_dt", {tag, "develop"}}}
8+
]}.
9+
10+
{dialyzer_base_plt_apps, [kernel, stdlib, erts, sasl, eunit, syntax_tools, compiler, crypto]}.
11+
{xref_checks, [undefined_function_calls]}.
12+
{erl_opts, [debug_info,
13+
warnings_as_errors,
14+
{platform_define, "^[0-9]+", namespaced_types},
15+
{parse_transform, lager_transform}]}.
16+
{cover_enabled, true}.
17+
{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.
18+
{edoc_opts, [{preprocess, true}]}.
19+
20+
{profiles, [
21+
{test, [
22+
{plugins, [{rebar3_eqc, {git, "https://github.com/kellymclaughlin/rebar3-eqc-plugin.git", {branch, "master"}}}]}
23+
]},
24+
{lint, [
25+
{plugins, [{rebar3_lint, {git, "https://github.com/project-fifo/rebar3_lint.git", {tag, "0.1.2"}}}]}
26+
]},
27+
{docs, [
28+
{deps, [{edown, ".*", {git, "https://github.com/uwiger/edown.git", {branch, "master"}}}]}
29+
]}
30+
]}.
31+
32+
{elvis,
33+
[#{dirs => ["src"],
34+
filter => "*.erl",
35+
rules => [
36+
%% {elvis_style, line_length,
37+
%% #{ignore => [],
38+
%% limit => 80,
39+
%% skip_comments => false}},
40+
{elvis_style, no_tabs},
41+
{elvis_style, no_trailing_whitespace},
42+
{elvis_style, macro_names, #{ignore => []}},
43+
%% {elvis_style, macro_module_names},
44+
{elvis_style, operator_spaces, #{rules => [{right, ","},
45+
{right, "++"},
46+
{left, "++"}]}},
47+
%% {elvis_style, nesting_level, #{level => 3}},
48+
{elvis_style, god_modules,
49+
#{limit => 25,
50+
ignore => []}},
51+
{elvis_style, no_if_expression},
52+
%% {elvis_style, invalid_dynamic_call, #{ignore => []}},
53+
{elvis_style, used_ignored_variable},
54+
{elvis_style, no_behavior_info},
55+
{
56+
elvis_style,
57+
module_naming_convention,
58+
#{regex => "^[a-z]([a-z0-9]*_?)*(_SUITE)?$",
59+
ignore => []}
60+
},
61+
{
62+
elvis_style,
63+
function_naming_convention,
64+
#{regex => "^([a-z][a-z0-9]*_?)*$"}
65+
},
66+
{elvis_style, state_record_and_type},
67+
{elvis_style, no_spec_with_records}
68+
%% {elvis_style, dont_repeat_yourself, #{min_complexity => 10}}
69+
%% {elvis_style, no_debug_call, #{ignore => []}}
70+
]
71+
},
72+
#{dirs => ["."],
73+
filter => "Makefile",
74+
rules => [{elvis_project, no_deps_master_erlang_mk, #{ignore => []}},
75+
{elvis_project, protocol_for_deps_erlang_mk, #{ignore => []}}]
76+
},
77+
#{dirs => ["."],
78+
filter => "rebar.config",
79+
rules => [{elvis_project, no_deps_master_rebar, #{ignore => []}},
80+
{elvis_project, protocol_for_deps_rebar, #{ignore => []}}]
81+
}
82+
]
83+
}.
84+
85+
{dialyzer, [
86+
{warnings, [no_return,
87+
no_unused,
88+
no_improper_lists,
89+
no_fun_app,
90+
no_match,
91+
no_opaque,
92+
no_fail_call,
93+
no_contracts,
94+
no_behaviours,
95+
no_undefined_callbacks,
96+
%% unmatched_returns,
97+
error_handling,
98+
race_conditions
99+
%% overspecs,
100+
%% underspecs,
101+
%% specdiffs
102+
]}]}.

rebar3

776 KB
Binary file not shown.

relx.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{release, {types, "0.0.1"}, [types]}.
2+
{extended_start_script, true}.
3+
{overlay, [{mkdir, "data"}]}.

src/types.app.src

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{application, types,
2+
[
3+
{description, "Conflict-free Replicated Data Types"},
4+
{vsn, "0.0.1"},
5+
{registered, []},
6+
{applications, [
7+
kernel,
8+
stdlib,
9+
crypto,
10+
lager
11+
]},
12+
{mod, {types, []}},
13+
{modules, []},
14+
{env, [{types, "data"}]}
15+
]}.

0 commit comments

Comments
 (0)