Comments (5)
I'd like to give this a try!
from gleam.
Please include the code that doesn't optimise 🙏
from gleam.
Ooh sorry I thought I did 😅 Edited the original message to include the code
from gleam.
This is due to the function capture being used. If you run the formatter it would be removed and the resulting code would be optimised. It would be nice to optimise for the captures too though.
from gleam.
Yeah I think this optimisation would be really nice to have, it bit me with glam
because in the pretty printing loop I did a lot of this:
list.map(docs, fn(doc) { #(indent, mode, doc) })
|> list.append(rest)
|> do_to_string(acc, max_width, current_width, _)
Thinking the do_to_string
function would be optimised and never noticed until someone built a really big document 😂
from gleam.
Related Issues (20)
- Allow `gleam add` to take a version specifier HOT 4
- Markdown support in the `@deprecated` message. HOT 1
- `gleam deps why packagename` command to explain requirements for package version HOT 4
- Unable to refetch a release when release is replaced on hex HOT 1
- LSP module auto-import: handle module name collisions
- Convert LS completion tests to use snapshots HOT 2
- LSP: When auto adding import, if it's the first import, a blank line should follow it HOT 2
- Compiler crash when checking exhaustiveness against duplicate type constructors HOT 5
- Surface diagnostic errors for import cycles HOT 9
- Horizontal scrolling in code blocks in built docs for lines 79-80 characters long HOT 2
- `gleam remove` always reports a removal, even if the package did not exist in `gleam.toml` HOT 3
- Add `gleam/set.{map}` HOT 1
- Say "I was not expecting this keyword" in error when there is an unexpected keyword HOT 4
- Bit array int & float options on JavaScript HOT 1
- Compiler panics when a custom type variant doesn't exist HOT 2
- LSP: Inlay hints for multiline pipelines HOT 1
- Imports renamed with `as` then used in consts generate invalid JavaScript code HOT 1
- LSP code action: fill case arms HOT 2
- LSP: sort complete suggestions after a pipe based on types HOT 4
- LSP: Suggestion on record accessors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gleam.