Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Copying and pasting code into REPL results in cryptic Deltron 3030 error #164

Open
Widdershin opened this issue Mar 16, 2018 · 1 comment

Comments

@Widdershin
Copy link

Widdershin commented Mar 16, 2018

Hello,

I have encountered a strange piece of behaviour using elm-repl.

Steps to reproduce:

  1. Copy the following two lines:
import List
a = []
  1. Open elm-repl, and paste the contents of your clipboard.

Expected result:

> import List
> a = []
[] : List a

Actual result:

 λ elm-repl
---- elm-repl 0.18.0 -----------------------------------------------------------
 :help for help, :exit to exit, more at <https://github.com/elm-lang/elm-repl>
--------------------------------------------------------------------------------
> import List

> a = []

/Users/nickj/Projects/<redacted>/repl-temp-000.js:6
 = d_e_l_t_r_o_n_3_0_3_0
 ^
SyntaxError: Unexpected token =
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)

Strangely enough, this behaviour is only apparent when copying and pasting multiple lines of code, not when typing the lines out by hand.

Additionally, it doesn't seem to matter which library we import (List is purely an example here).

OS: macOS Sierra 10.12.6
elm version: 0.18
node version: v6.10.3

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants