Skip to content

Commit

Permalink
fix vector-list
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWhiting committed Oct 9, 2024
1 parent 48fbeac commit 72ddb24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions std/data/vector-list.kk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 72ddb24

Please sign in to comment.