Scott Olsen

Results 76 issues of Scott Olsen

When the object stored in the map does not implement `zero`, calling `Map.get` will produce a segfault. Instead, we should throw an error about `zero` not being implemented when the...

Currently we mangle names "in-place" when defining templates and C code emission. This is fine, but it leads to several places in the compiler where one can emit invalid C...

haskell

This PR is a WIP implementation of recursive data type support in Carp. At the moment, it only supports recursive product types, which are backed by structs with fields that...

To reproduce: implement `drop` for a polymorphic type. The emitted C code will lack a declaration for the concretized drop function: ```clojure (deftype (Poly a) [p (Ptr a)]) (defmodule Poly...

bug

This is a regression from pr #1340 -- we now expand module names to `.init` too eagerly. This can cause naming conflicts. The following example illustrates this: ```clojure 鲤 (defmodule...

bug

I'm still trying to find a simple example that triggers the issue, but when one have a complex enough usage of types nested inside a module `(defmodule Foo (deftype Bar))`...

bug

Given: ```clojure (match () _ ()) ``` Carp emits: ```c if(true) { void _83_temp = ; void wildcard_84 = _83_temp; /* () */ } ``` Which is invalid C. We...

bug

When `Array.range-or-default` is passed a zero `step` value, the resulting c code can contain an out of bounds error even though in carp this function returns an empty array on...

bug
beginner
core-libs

This commit contains a minimal refactor of the AssignTypes module: - Add an export list. - Use the xobj patterns defined in the Forms module. - Break out local functions...

This PR adds initial support for `Protocols`, a sort of lightweight form of typeclasses. Given a collection of interfaces, protocols allow users to enforce type restrictions around the implementation of...