Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught At 0 expected: ( found: b #223

Open
CodingCellist opened this issue Jan 3, 2019 · 1 comment
Open

Uncaught At 0 expected: ( found: b #223

CodingCellist opened this issue Jan 3, 2019 · 1 comment
Labels

Comments

@CodingCellist
Copy link

How to reproduce:

  1. Open a .idr file in Atom, it should contain an executable function, e.g. (from the book):
    module Main
    
    import System
    
    countdown : (secs : Nat) -> IO ()
    countdown Z = putStrLn "Lift off!"
    countdown (S secs) = do putStrLn (show (S secs))
                                            usleep 1000000
                                            countdown secs
    
  2. Open the REPL (through Ctrl+Alt+Enter).
  3. Erroneously attempt to run the function (due to misremembering :exec as having a single-letter
    command :x): :x countdown 10. The Idris plugin crashes and Atom has to be restarted for it to
    work again.

Atom: 1.33.1 x64
Electron: 3.0.13
OS: linux 4.19.12-arch1-1-ARCH
Thrown From: language-idris package 0.5.0

Stack Trace

Uncaught At 0 expected: ( found: b

At ~/.atom/packages/language-idris/node_modules/bennu/dist_node/parse.js:756

At undefined undefined
    at /packages/language-idris/node_modules/bennu/dist_node/parse.js:141:25)
    at /packages/language-idris/node_modules/bennu/dist_node/parse.js:858:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
    at Function.Module._load (internal/modules/cjs/loader.js:551:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at /packages/language-idris/node_modules/bennu/index.js:2:14)
    at /packages/language-idris/node_modules/bennu/index.js:7:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
    at Function.Module._load (internal/modules/cjs/loader.js:551:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at /packages/language-idris/lib/utils/parse.coffee:1:25)
    at /packages/language-idris/lib/utils/parse.coffee:1:1)
    at /packages/language-idris/lib/utils/parse.coffee:1:1)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .coffee] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
    at Function.Module._load (internal/modules/cjs/loader.js:551:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at /packages/language-idris/lib/idris-ide-mode.coffee:3:9)
    at /packages/language-idris/lib/idris-ide-mode.coffee:1:1)

Commands

     -0:24.2.0 language-idris:open-repl (input.hidden-input)

Non-Core Packages

language-idris 0.5.0 
@justjoheinz
Copy link
Contributor

Hmm, in the actual REPL I get the error that idris_usleep cannot be found

:x countdown 10
10
Symbol "idris_usleep" not found
user error (Could not call foreign function "idris_usleep" with args [1000000])
*Replicate> 

I will need to investigate if these error messages actually are being send via the ide protocol over the socket. Thanks for the report.

@justjoheinz justjoheinz added the bug label Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants