Comments (2)
Semi optimal codegen won't be that trivial.
Calls to wrap and unwrap a newtype should be elided from the ast. Except that calls to wrapping and unwrapping can be captured as a parameter.
Also we probably want a peephole optimizer to look for calls like this
(define xs (map unNewtype ys))
And rewrite them as the following
(define xs ys)
from coalton.
Wrapping would just be the identity function, which can be declared inline.
Unwrapping would be special codegen on MATCH, since there's no way to unwrap otherwise.
Eliding use of high-order functions is a bit harder, but the above would be a great first step.
from coalton.
Related Issues (20)
- print package name of symbols in "unknown method" errors
- subclass constraints and fundeps not checking right?
- Another installation issue with Eclector HOT 5
- `A token consisting solely of multiple dots is illegal.` when `*print-length*` is a small integer
- fix Allegro in CI HOT 1
- document (repr :enum) in lisp interop doc
- add Allegro 11 to CI for testing HOT 2
- Coalton Citation File HOT 1
- Big-Float: `impl-mpfr` instances of `to-fraction` and `into fraction` should use the same method HOT 1
- Using `index-unsafe` on an empty vector errors with `should be a non-negative integer below 0` (SBCL)
- multi-value match without Tuples HOT 1
- In repl `coalton:Coalton` macro: Single-Float automatically converts to Double-Float HOT 1
- Generate types for match bindings in codegen
- (potentially?) broken DO notation HOT 1
- Using Type name instead of constructor returns opaque `unknown variable` error HOT 1
- `Do` syntax can't handle wrapped `let` forms HOT 6
- Deduplicate code in with-pprint-variable-scope
- `Into (Vector :a) (List :a)` triggers stack overflows at large vector sizes
- Add documentation support for type class methods HOT 1
- Add documentation support for struct accessors, maybe type constructors HOT 1
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 coalton.