Comments (2)
When I try to bundle it with webpack, got ReferenceError: Collectable is not defined
from elixirscript.
I'm tying to fix ReferenceError: Collectable is not defined
, but really don't know where I should start.
This is the source:
defmodule ElixirGame do
@moduledoc """
Documentation for ElixirGame.
"""
def start(_, _) do
for n <- 1..10 do
n
end
# Enum.map(1..10, fn n ->
# ElixirGame.Helpers.log(n)
# end)
end
end
and this is the result:
'use strict';
import ElixirScript from './ElixirScript.Core.js';
import $Range$ from './Elixir.Range.js';
function __info__(kind) {
const __info__map__ = new Map([[Symbol.for('functions'), [new ElixirScript.Core.Tuple(Symbol.for('start'), 2)]], [Symbol.for('macros'), []], [Symbol.for('attributes'), [new ElixirScript.Core.Tuple(Symbol.for('vsn'), [289843188494319781641132842991731571301])]], [Symbol.for('compile'), [new ElixirScript.Core.Tuple(Symbol.for('version'), [55, 46, 51, 46, 50]), new ElixirScript.Core.Tuple(Symbol.for('options'), [Symbol.for('dialyzer'), Symbol.for('no_spawn_compiler_process'), Symbol.for('from_core'), Symbol.for('no_auto_import')]), new ElixirScript.Core.Tuple(Symbol.for('source'), '/Users/fazibear/dev/elixir_game/lib/elixir_game.ex')]], [Symbol.for('md5'), new ElixirScript.Core.BitString(ElixirScript.Core.BitString.integer(218), ElixirScript.Core.BitString.integer(13), ElixirScript.Core.BitString.integer(196), ElixirScript.Core.BitString.integer(128), ElixirScript.Core.BitString.integer(195), ElixirScript.Core.BitString.integer(174), ElixirScript.Core.BitString.integer(25), ElixirScript.Core.BitString.integer(160), ElixirScript.Core.BitString.integer(239), ElixirScript.Core.BitString.integer(197), ElixirScript.Core.BitString.integer(117), ElixirScript.Core.BitString.integer(37), ElixirScript.Core.BitString.integer(227), ElixirScript.Core.BitString.integer(147), ElixirScript.Core.BitString.integer(122), ElixirScript.Core.BitString.integer(101))], [Symbol.for('module'), Symbol.for('Elixir.ElixirGame')]]);
const value = __info__map__.get(kind);
if (value !== null) {
return value;
}
throw new ElixirScript.Core.Patterns.MatchError(kind);
}
function start(...__function_args__) {
function recur(...__function_args__) {
let __arg_matches__ = null;
let __intermediate__ = null;
if ((__arg_matches__ = ElixirScript.Core.Patterns.match_or_default([ElixirScript.Core.Patterns.variable('_'), ElixirScript.Core.Patterns.variable('_')], __function_args__, () => {
return true;
})) !== null) {
let [] = __arg_matches__;
return ElixirScript.Core.SpecialForms._for(ElixirScript.Core.Patterns.clause([ElixirScript.Core.Patterns.variable('n')], (n0) => {
return n;
}, () => {
return true;
}), [ElixirScript.Core.Patterns.list_generator(ElixirScript.Core.Patterns.variable('n'), new Map([[Symbol.for('__struct__'), $Range$], [Symbol.for('first'), 1], [Symbol.for('last'), 10]]))], Collectable, []);
}
throw new ElixirScript.Core.Patterns.MatchError(__function_args__);
}
return ElixirScript.Core.Functions.trampoline(new ElixirScript.Core.Functions.Recurse(recur.bind(null, ...__function_args__)));
}
export default {
start,
__MODULE__: Symbol.for('Elixir.ElixirGame'),
__info__
};
I'm wondering what's wrong? Why there import for collectable is missing? The problem is with code generation or maybe the problem is where compiler adding imports? Need a little help with that :)
from elixirscript.
Related Issues (20)
- Track the modules a module uses
- Build failure with macOS 10.13 and Xcode 9 HOT 2
- ElixirScript Test Assertions HOT 1
- Create compiler manifest HOT 2
- Create manifests function in Mix compiler
- Create clean function in mix compiler HOT 1
- Use manifest to see if a module should be compiled or not HOT 1
- Regex functions throw errors HOT 3
- Is it possible to compile quoted or string? HOT 3
- comprehensions/generators HOT 1
- in-browser Elixir parser / interpreter HOT 3
- Beginner Tutorial HOT 2
- FFI - Support npm modules directly
- Elixir + Wasm HOT 9
- Pragmatic question: working with JS Object HOT 3
- Elixir Script as ClientLibrary Framework to Interface with Elixir/Phoenix
- Still alive? HOT 2
- String.slice(str, 0, -1) raises FunctionClauseError HOT 1
- Inactive project HOT 4
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 elixirscript.