Rafael Weinstein
6c3239a1d0
Collections no longer need a ChunkStore on creation
2016-02-02 13:39:26 -08:00
Rafael Weinstein
7caa08bc5c
Complex Types embed a ChunkStore
2015-12-01 10:40:47 -08:00
Rafael Weinstein
e75f5097c7
Allow Map & Set to order by natural ordering of element type if available.
2015-11-16 14:30:30 -08:00
Erik Arvidsson
a72ce41a1d
Go: TypeRef -> Type
...
Remaining identifiers
2015-11-13 17:54:53 -05:00
Chris Masone
eda9b92870
Rename types.TypeRef to types.Type
...
There are probably still a lot of variable names and comments to fix,
but this updates all the Go code.
Towards #441
2015-11-09 08:26:32 -08:00
Aaron Boodman
69a86f3036
Rewrite walk() to walk value tree instead of chunks
...
Also fix quad_tree to take advantage of that to be generic again.
Fixes #445 , #497
2015-11-05 16:12:02 -08:00
Chris Masone
b54fd91c82
Add Filter() to List
...
And update collection templates to be backed by the untyped
Filter() implementations.
Fixes #578
2015-11-05 15:15:46 -08:00
Chris Masone
d66151b4c1
Add IterAllP() to all typed Lists and Sets
...
Also added IterAllP() to types.Set so it could be used by generated
set code.
Towards #564
2015-11-05 08:42:22 -08:00
Erik Arvidsson
9ba1c4a508
Remove InternalImplementation() from List, Map & Set
...
Instead register a function to extract the internal backing store.
2015-11-04 18:57:36 -05:00
Erik Arvidsson
756b893e8f
Remove FromVal functions
...
The generated objects are all type.Values now so FromVal is not needed
2015-11-04 12:13:55 -05:00
Erik Arvidsson
30cc7d518f
Make Equals compare by Ref (after comparing TypeRef)
...
This changes equal to compare by ref. Since computing the ref can be
expensive we first check that the type refs are equal.
Fixes #532
2015-10-30 16:50:49 -04:00
Aaron Boodman
a9bc416a2f
Change Chunks() to return []ref.Ref
2015-10-30 09:24:58 -07:00
Erik Arvidsson
91e7ffb8e1
NomDL Codegen: Parameterize the types package
...
This allows us to use the codegen from types/ without manual touchups
2015-10-23 11:04:30 -04:00
Erik Arvidsson
3a5bb571fb
NomDL: Remove NomsValue()
2015-10-22 10:47:14 -04:00
Erik Arvidsson
16353f38f8
NomDL: Make the new serialization default
...
This makes the new typed serialization the default (the old
serialization is not used but the code has not been cleaned up yet).
Some things are no working in the new world:
Chunking - The compound list is not working correctly any more. The
Chunks method is having issues because it assumed things based on the
old implicit chunking.
Commit - uses a `Set(Commit)` which means that the parent commit is
embedded. We need to change that to be `Set(Ref(Commit))` so that the
parent commit is referenced instead.
2015-10-21 19:04:22 -04:00
Erik Arvidsson
8565f175ee
Make sure Chunks includes type.Refs and the TypeRef
...
Chunks shold return the futures for types.Ref values.
For typed values that have a TypeRef which has a package ref, also
include that.
2015-10-13 11:00:51 -04:00
Erik Arvidsson
9cb7596409
NomDL: Make NomsValue a Value
...
This means that when we ReadValue we can now return a NomsValue
Towards #281
2015-10-06 16:38:11 -07:00
Erik Arvidsson
096ac4a224
Add index to List Iter, IterAll, Map, MapP
...
Fixes #376
2015-10-01 17:53:21 -04:00
Erik Arvidsson
8c2caa3b27
NomDL Codegen: Add TypeRef method to typed objects
2015-09-30 17:48:32 -04:00
Erik Arvidsson
d17dc67a73
NomDL CodeGen: Rename self
2015-09-25 17:17:12 -04:00
Erik Arvidsson
2769353a55
NomDL Codegen: Do not create a Def if non comparable
...
Due to limitations in Go we cannot create a Def for a Map or Set that
has a key that is a Map, Set or a List. This is because the key if a Go
map needs to be a comparable and maps and slices are not comparable.
2015-09-21 19:04:53 -04:00
Erik Arvidsson
175cc7ccc1
NomDL: Codegen for Set extras
...
This adds Iter, IterAll and Filter to Sets
Issue #303
2015-09-17 16:49:22 -04:00
Erik Arvidsson
5a83b23f29
NomDL: Codegen for List extras
...
Adds Iter, IterAll and Filter to the List(T) types
Depends on PR #298
Issue #303
2015-09-17 14:24:36 -04:00
Erik Arvidsson
e10e6224b0
Codegen for NomDL
...
This adds a new codegen that reads .noms files and generates Go
API for these types
Issue #304
2015-09-17 14:01:49 -04:00