Commit Graph

94 Commits

Author SHA1 Message Date
Tom Harding
286b7c16c4 Bump version
This is just a patch, no change to the interface (other than fixing a
bug), so it's a minor bump :)
2019-06-06 10:36:31 +01:00
Tom Harding
2f5c1a9bbf Fix baddDicts constraint-passing
Previously, the constraint for `baddDicts` got lost in the machinery,
and would be ambiguous in the `K1` instance. This commit copies the
Barbies default implementation almost verbatim, and seems to fix the
issue.
2019-06-06 10:29:02 +01:00
Tom Harding
ade772a64b
Merge pull request #6 from timsears/master
fix typos in README.md
2019-06-06 09:18:54 +01:00
Tim Sears
9291fe3521
fix typos in README.md 2019-06-04 12:02:25 -07:00
Tom Harding
84c0ea308d Relax Tuple instance constraints
I think I must have left in some dodgy code... weird. Anyway, this
commit means that you don't have to satisfy some arbitrary `Arbitrary`
constraints to use an HKD as a monoid.
2019-05-20 10:10:07 +01:00
Tom Harding
cf65bf23f3 Documentation updates
Updating the README to support the new `Build` work.
2019-05-14 18:44:49 +01:00
Tom Harding
1950c65dff Add the Build function
With this function, we can construct HKD structures for non-monoidal
types, without jumping through many weird hoops as we go. I'll push a
release soon!
2019-05-14 18:16:59 +01:00
Tom Harding
3add3b33e2
Merge pull request #2 from gilligan/update-dep-versions
Loosen dependency constraints: use lts-13.17 versions
2019-04-17 11:37:30 +01:00
tobias pflug
6e333f8f95 Loosen dependency constraints: use lts-13.17 versions 2019-04-16 23:38:54 +02:00
Tom Harding
021ffb5d05 Hide some imports, fix some documentation
Nothing major - just a few bumps with Hackage.
2019-04-14 08:04:19 +01:00
Tom Harding
e1b89c1dd1 Finishing touches
Prepping for hackage :)
2019-04-13 00:59:33 +01:00
Tom Harding
b02220c9ea
Merge pull request #1 from kcsongor/patch-1
Fix typo in README
2019-04-12 16:07:04 +01:00
Tom Harding
17b8786547 Tighten package constraints
Before Hackage, we should probably pick some actual library versions to
depend on. This commit does that, and removes the lens dependency, which
should make installation much faster.
2019-04-12 14:17:13 +01:00
Tom Harding
4a9113b127 README tweaks
Thanks to some keen eyes :)
2019-04-12 10:48:40 +01:00
Csongor Kiss
1fbc455b63
Fix typo in README 2019-04-11 21:02:34 +01:00
Tom Harding
57fb0b2913
Missed a comma
Forgive me, padre
2019-04-11 18:56:21 +01:00
Tom Harding
e401fb2f53 Update README
The README is now hopefully pretty comprehensive. I think we're ready to
go :)
2019-04-11 18:44:40 +01:00
Tom Harding
a52a9ef3ec Add Labels functions
We can do some cool stuff with the barbies library and a pinch of
generics. Here's an example.
2019-04-11 11:13:29 +01:00
Tom Harding
2e433c944b Start overhauling README
Nowhere near done, but it's at least more accurate now.
2019-04-11 09:05:50 +01:00
Tom Harding
68a0c1c6e0 Documentation and tests
Now that we support barbies, we need to re-jig a lot of the type
parameters. This commit does said jiggery.
2019-04-11 00:35:51 +01:00
Tom Harding
1d668675bb Add Barbies interface
The generic HKD now implements the full Barbies API.
2019-04-10 23:56:25 +01:00
Tom Harding
5e4a05c9e8 Fixed position lens
OMG it all works!
2019-04-10 21:27:47 +01:00
Tom Harding
25ee5c414c Fix "field" issues.
Invalid field names now report friendly generic-lens errors!
2019-04-10 20:42:11 +01:00
Tom Harding
1b41b1e354 [Broken] Generic lens / generic HKD
Quite a giant refactor:

- The partial type has been generalised to `HKD f` for some
  parameter-wrapping functor `f`.

- The internals of `field` and `position` are now handled by
  `generic-lens`. It doesn't work yet, though.
2019-04-10 20:16:36 +01:00
Tom Harding
5fa70bb0e2 Use profunctor encoding
A la generic lens, we dimap either side of the glens and ravel the whole
thing at the end. This might even optimise better, though I should
check. Still some weird issues with the predicate, but we'll get to that
shortly.
2019-04-09 16:17:15 +01:00
Tom Harding
99a9585284 Use generic-lens for position and field lenses
Why get a dog and bark yourself? This commit uses the generic-lens
internal functions to create the lenses, which means the error messages
will be substantially better.
2019-04-09 15:38:05 +01:00
Tom Harding
b1313d91d2 --wip-- [skip ci] 2019-04-09 13:54:05 +01:00
Tom Harding
1dfd59dbab Add check for field population
Another little example using the lenses to see if a particular piece of
data is present.
2019-04-09 09:28:02 +01:00
Tom Harding
ccb3d9e46a Comprehensive README and renamed defaults
`withDefaults` is more sensible, I think. The README now contains a
bunch more examples along with their output!
2019-04-09 09:03:58 +01:00
Tom Harding
669ba4f712 [README] Dump an example
Again, unsatisfactory, but it will at least show the concept for now.
2019-04-08 23:06:35 +01:00
Tom Harding
fa2771be48 [WIP] README
Not done yet, but committing progress so far.
2019-04-08 22:51:58 +01:00
Tom Harding
b12e955d08 Module headers
Getting that sweet 100% public API documentation.
2019-04-08 22:38:55 +01:00
Tom Harding
a5dd551fe4 Types
Just adding a couple small chunks of documentation.
2019-04-08 22:31:46 +01:00
Tom Harding
a84269ab5f Last and Position
Refactoring `position` with a proper error message. Tidied up a /lot/ of
the instances using the tuple isomorphism and a change from 'Maybe' to
'Last'.
2019-04-08 22:24:21 +01:00
Tom Harding
3693467412 Documentation and type errors [Field]
There's now a custom type error, and more useful examples in the code.
2019-04-08 21:33:44 +01:00
Tom Harding
77aec38fbb Documentation [Build/Default]
Going to add these as I complete them. Useful documentation and some
small examples.
2019-04-08 20:46:35 +01:00
Tom Harding
aa8c83e404 Refactor
Split the code out into different files. Everything still compiles and
the tests pass!
2019-04-08 20:20:33 +01:00
Tom Harding
91c872986d Remove properties from comments
Now they're all in the tests module, they don't need to be in the module
until they're documentation :)
2019-04-08 18:21:52 +01:00
Tom Harding
69d63a7147 Add lens tests
Out of the doctests, into the suite. The lens tests have been added, and
everything /seems/ to be working. There are certainly 4800 tests that
seem to think so.
2019-04-08 18:18:38 +01:00
Tom Harding
90405e662e [WIP] Add actual tests
Before, they were all doctests. This commit adds actual tests, and
comments out the now-broken doctests. I mean, they all still work
/morally/ - their demonstrated behaviour is still fine if you have the
types set up and in scope.
2019-04-08 13:31:24 +01:00
Tom Harding
879d393766 Remove unnecessary extensions
Housekeeping.
2019-04-08 00:42:22 +01:00
Tom Harding
ed6685b3cb Documentation and positional lens
There are now some words in the code. Also, you can lens into partial
structures without named fields. Neat.
2019-04-08 00:34:49 +01:00
Tom Harding
fd050d2cf3 Better test coverage
Now quickchecking most things. It's not necessarily rigorous, but
everything seems to work :)
2019-04-07 23:15:10 +01:00
Tom Harding
68ffeadfe7 Initial commit
Nowhere near done, but I should commit more than I do.
2019-04-07 22:29:54 +01:00