- Check out rtfeldman/elm-css
- guida make
Runs out of heap space due to concatenated strings.
Snippet contains the offending strings, formet by slicing the source code into snippets:
https://github.com/guida-lang/compiler/blob/master/src/Compiler/Parse/Primitives.elm#L228-L235
Instead of slicing the String up-front and putting it in the Snippet, just put in the whole unsliced String which will be a reference so only take up 1 pointer of memory. Then when code needs just the slice, apply the slice operation on demand, I have found String.slice in Elm to perform pretty well.
This is a Flyweight Pattern to share the String memory and use describe each snippet as a range into it.
Potentially the slice can be cached also, depends if all slices are materialized or only a small number are ever needed.