Broken REPL number parsing
jlowenz opened this issue · 6 comments
Description
Expected Behavior
I enter a real number, and see the same number repeated back to me
Actual Behavior
I enter a real number, and some other number is repeated back to me
Possible Fix
Have no idea. Could it be the Java version? If it is, how could it possibly go so wrong (haven't looked at the source, yet).
Steps to Reproduce
See the copy/paste from my terminal below!
user@xps ~/dev/src $ git clone https://github.com/typelead/eta-init eta-new
Cloning into 'eta-new'...
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 97 (delta 2), reused 9 (delta 1), pack-reused 87
Unpacking objects: 100% (97/97), done.
user@xps ~/dev/src $ cd eta-new
user@xps ~/dev/src/eta-new (master) $ ./gradlew run
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :run
The 101st prime is 547
BUILD SUCCESSFUL in 12s
5 actionable tasks: 4 executed, 1 up-to-date
user@xps ~/dev/src/eta-new (master) $ ./gradlew repl --no-daemon --console plain -q
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/home/jlowens/.gradle/wrapper/dists/gradle-4.9-bin/e9cinqnqvph59rr7g70qubb4t/gradle-4.9/lib/gradle-base-services-4.9.jar) to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
╭─── Welcome to Eta REPL v0.8.6b2! ────────────────────────╮
│ │
│ :help for help │
│ :exit to exit │
│ :type [expr] for type of expression │
│ :kind [type] for kind of type │
│ :kind! [type] for kind of simplified type │
│ │
│ it refers to the last expression │
│ │
│ For more details, check out https://eta-lang.org │
│ │
╰──────────────────────────────────────────────────────────╯
Prelude> 3.14
4.90625
it0 :: Fractional a => a
Prelude> 2.5
2.5
it1 :: Fractional a => a
Prelude> 2.1
2.625
it2 :: Fractional a => a
Prelude> 2.0
2.0
it3 :: Fractional a => a
Context
Just trying to play around at the REPL - going through a Haskell tutorial online.
Your Environment
user@xps ~ $ java -version
java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)
- Did you install an older version of Eta/Etlas before?
No - Current Eta & Etlas version:
master from 2019-02-01. gradle install/setup method (see above) - Operating System and version:
Ubuntu 18.04 on an XPS 13 (9360)
This bug has been fixed in the latest Eta v0.8.6b4. Please update:
etlas update && etlas select latest
Ok.... that sounds good, but there is no obvious way to do that from the gradle installation. The docs say it installs etlas - but I could not find it (immediately). Searching my home directory (not the git working dir) has it in the ~/.gradle/caches/etlas/1.5.0.0
directory, which is not completely obvious (maybe b/c I'm not familiar with gradle). Either way, some additional docs on this might be nice. I'll try the update now.
This does not work for the gradle
install. I ran it both from the cache directory and the git working dir. While etlas
says that 0.8.6b4 is selected, running gradlew repl --no-daemon --console plain -q
still loads 0.8.6b2. So there must be some bad state on my system, or etlas
and gradle
are not playing well together?
@jlowenz You specify in the build.gradle
file which Eta version you want to use.
eta {
version = '0.8.6b4'
etlasVersion = '1.5.0.0'
}
Where did you get your template project from? Perhaps it needs to be updated.
Hi, I did a git clone
of the eta-init
repository as suggested in the installation instructions. It still has 0.8.6b2 specified in the build.gradle
.
Thanks for letting us know - I've bumped up the version in the template project.