From 72ddb2467a8d0f5871e0d863639a4289a97f0337 Mon Sep 17 00:00:00 2001 From: Tim Whiting <tim@whitings.org> Date: Tue, 8 Oct 2024 20:17:27 -0600 Subject: [PATCH] fix vector-list --- LICENSE | 5 ++--- std/data/vector-list.kk | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index 7611f41..b2afa76 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,5 @@ +MIT License + Copyright 2024, Koka-Community Authors Koka-Community libraries are free software; You can redistribute it and/or modify it under the terms of this license. @@ -6,7 +8,6 @@ The files licensed under MIT are therefore freely available to be used in Koka a Some of this is licensed under Apache 2 - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -15,7 +16,6 @@ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR I END LICENSE - The following files are licensed under Apache 2, as they are translated from the corresponding files in the Koka compiler - std/data/pretty/pprint.kk - std/data/pretty/printer.ki @@ -25,7 +25,6 @@ Copyright 2024, Microsoft Research, Daan Leijen. Tim Whiting Koka is free software; You can redistribute it and/or modify it under the terms of this license. - Apache License, Version 2.0 Apache License Version 2.0, January 2004 diff --git a/std/data/vector-list.kk b/std/data/vector-list.kk index 4ba87f0..fc5124c 100644 --- a/std/data/vector-list.kk +++ b/std/data/vector-list.kk @@ -11,7 +11,7 @@ import std/core-extras import std/test import std/core/unsafe import std/num/int64 -import std/data/hash/hash +import std/data/hash /* todo list/vector-list @@ -20,7 +20,7 @@ import std/data/hash/hash vector */ extern import - c file "hash/inline/hash" + c file "inline/hash" pub alias vlist<a> = vector-list<a> @@ -163,10 +163,10 @@ inline extern hash-vector-int64( v : vector<int64>, seed : int64 ) : int pub fun vlist/hash( v : vector-list<a>, ?hasher: (a, int64) -> int, ?seed : int64 ) : int val vec = unsafe-vector( v.size.ssize_t ) for( v.size ) fn (i) - vec.unsafe-assign( i.ssize_t, hasher( v.data.unsafe-idx( i.ssize_t ), seed ).int64 ) - hash-vector-int64( vec, seed ) + vec.unsafe-assign( i.ssize_t, hasher( v.data.unsafe-idx( i.ssize_t ), ?seed ).int64 ) + hash-vector-int64( vec, ?seed ) -ref struct something {i: int} +reference struct something {i: int} fun test-vlist() basic/test("vlist push") val vec = unit/vector-list()