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

Compilation failure when creating spire.math.Interval #140

Closed
rklaehn opened this issue Aug 5, 2015 · 2 comments
Closed

Compilation failure when creating spire.math.Interval #140

rklaehn opened this issue Aug 5, 2015 · 2 comments

Comments

@rklaehn
Copy link

rklaehn commented Aug 5, 2015

Using ammonite

@ load.ivy("org.spire-math" %% "spire" % "0.10.1")
@ import spire.implicits._
@ import spire.math._
@ Interval(0, 10)
Compilation Failed
Main.scala:659: type mismatch;
 found   : (Int, Int, Int)
 required: (Int, Int, Int, spire.algebra.Order[Int])
        def $main() = { ammonite.repl.frontend.ReplBridge.repl.Internal.combinePrints(ammonite.repl.frontend.ReplBridge.repl.Internal.print(res3, res3, "res3", None)) }

Using the standard scala REPL (sbt coreJVM/console in the spire project root):

scala> import spire.math._
scala> import spire.implicits._
scala> Interval(0, 10)
res0: spire.math.Interval[Int] = [0, 10]
@lihaoyi lihaoyi closed this as completed in bcc8745 Aug 6, 2015
@lihaoyi
Copy link
Member

lihaoyi commented Aug 6, 2015

Fixed in master, will publish a version 0.4.3 for you to try out. I doubt this is the last we'll see of this sort of problem, but hopefully there won't be too many edge cases...

@lihaoyi
Copy link
Member

lihaoyi commented Aug 6, 2015

I published 0.4.3 with the fix

haoyi-mbp:~ haoyi$ curl -L -o amm http://git.io/vOdoc; chmod +x amm; ./amm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0   406    0     0    181      0 --:--:--  0:00:02 --:--:--   457
100 29.3M  100 29.3M    0     0   577k      0  0:00:52  0:00:52 --:--:-- 1009k
Loading Ammonite Repl...

@ load.ivy("org.spire-math" %% "spire" % "0.10.1")

@ import spire.implicits._
import spire.implicits._
@  import spire.math._
import spire.math._
@ Interval(0, 10)
res3: Interval[Int] = [0, 10]

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

No branches or pull requests

2 participants