Alex Rice
13cc0d3d48
feat: add n-ary either
2019-09-19 15:56:39 +01:00
Michael Fellinger
7b1e389c66
Add path type
2019-09-17 15:29:39 +01:00
Vincent Ambo
afd2fd5058
docs(README): Add usage information to README
...
This fixes #2 .
2019-09-14 13:09:37 +01:00
Vincent Ambo
9622ed36a1
Merge pull request #1 from tazjin/feat/travis-builds
...
Add build configuration and various other repo setup chores
2019-08-29 13:10:15 +01:00
Vincent Ambo
565a00254b
fix: Bump Nix in CI setup to 2.2.2
...
Yants does not seem to work with older versions of Nix and I have not
yet figured out why.
2019-08-29 13:06:12 +01:00
Vincent Ambo
f3c66e172c
chore: Add contribution & code of conduct information
2019-08-28 15:06:43 +01:00
Vincent Ambo
10a93400f8
chore: Add Apache License 2.0
2019-08-28 15:03:17 +01:00
Vincent Ambo
d53f7f134b
docs: Add build status to README
2019-08-28 15:02:39 +01:00
Vincent Ambo
0c1a6b88dd
feat: Add Travis CI configuration
2019-08-28 14:55:56 +01:00
Vincent Ambo
6468845255
chore: Change file layout to match repository instead of gist
2019-08-28 14:55:53 +01:00
Vincent Ambo
34a5917981
test: Add test for pattern matching on sum types
2019-08-28 14:37:00 +01:00
Vincent Ambo
cb45536124
test: Add a test to check that all types match the 'type'-type
2019-08-28 14:37:00 +01:00
Vincent Ambo
b622bcef7d
feat: Introduce composable type errors and type parameter checking
...
This refactoring moves the type definitions into a recursively
evaluated attribute set, which makes it possibe to refer to types in
the definitions of other types.
This functionality is used to type-check some of the type parameters
passed in to other types. This is not yet done for all higher-order
types because the evaluation semantics of Nix make it less useful for
some cases.
Further the definition of a type itself is now a stricter
representation that works for all types except typed functions, which
allows for composable error messages.
2019-08-28 14:36:58 +01:00
Vincent Ambo
f6635fec98
feat: Add rough initial version of sum types
...
Sum types are represented as attribute sets with a single key in them.
2019-08-28 14:36:55 +01:00
Vincent Ambo
ef4ded7b98
docs: Add defun to README
2019-08-28 14:36:50 +01:00
Vincent Ambo
5949663fcd
feat: Implement support for typing functions
...
The defun helper takes a type signature and a function and makes a
typed version. Because we can.
2019-08-28 14:36:47 +01:00
Vincent Ambo
1da22249bd
test: Add some simple tests for type-checks
...
Does not currently test check failures, which makes it sort of not as
useful as you'd think.
2019-08-28 14:36:43 +01:00
Vincent Ambo
08116dbf51
chore: Add Google's copyright header
2019-08-28 14:36:39 +01:00
Vincent Ambo
bc130254bc
docs: Update struct screenshot in README
2019-08-28 14:36:36 +01:00
Vincent Ambo
ca0cf11ca9
feat: Improved error message for missing struct fields
2019-08-28 14:36:33 +01:00
Vincent Ambo
4ebc069a3f
docs: Add enum screenshot to README
2019-08-28 14:36:29 +01:00
Vincent Ambo
661e09daac
feat: Add enum support
2019-08-28 14:36:25 +01:00
Vincent Ambo
2e576e10ab
refactor: Gain back a few more lines
2019-08-28 14:36:20 +01:00
Vincent Ambo
2acdbb5009
refactor: Drop back to below 100 lines :)
2019-08-28 14:36:14 +01:00
Vincent Ambo
76f9b1638c
feat: Add function type
...
It's not currently possible to check arguments for curried functions,
but there might be something on the horizon for attribute set
functions.
2019-08-28 14:36:11 +01:00
Vincent Ambo
103e0b4d25
feat: Add derivation type
2019-08-28 14:36:08 +01:00
Vincent Ambo
cb0d07fa30
docs: Fix image links (relative is not supported in gists)
2019-08-28 14:36:00 +01:00
Vincent Ambo
199254ba7a
chore: Move screenshots into the gist
2019-08-28 14:35:56 +01:00
Vincent Ambo
040b719570
feat: Support better error messages for list/attrs element checks
2019-08-28 14:35:53 +01:00
Vincent Ambo
fe33a82a07
feat: Initial check-in of type system sketch
2019-08-28 14:35:41 +01:00