marconilanna / REPLesent

A neat little tool to build presentations using the Scala REPL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: compatibility with ammonite

msinton opened this issue · comments

It would be great if REPLesent could be used inside an ammonite repl - which offers greater features, not least better syntax highlighting when writing code into the session, and not so easy to accidentally quit the session!

I had a quick go at trying to do this - I attempted to rename to REPLesent.sc and import into the session but got errors. Maybe someone can help?

REPLesent.sc:120: type mismatch;
found : String("\u001B[0m")
required: ?{def last: ?}
Note that implicit conversions are not applicable because they are ambiguous:
both method StringPath in package ops of type (s: String)ammonite.ops.package.RelPath
and method augmentString in object Predef of type (x: String)scala.collection.immutable.StringOps
are possible conversion functions from String("\u001B[0m") to ?{def last: ?}
private val ansiEnd = RESET.last
^
REPLesent.sc:120: value last is not a member of String
private val ansiEnd = RESET.last
^
REPLesent.sc:267: object Source is not a member of package io
val emoji = io.Source.fromFile("emoji.txt").getLines
^
REPLesent.sc:414: object Source is not a member of package io
.flatMap { name => io.Source.fromFile(new File(pathFile, name)).getLines }
^
REPLesent.sc:415: value toIterator is not a member of Array[Nothing]
possible cause: maybe a semicolon is missing before `value toIterator'?
.toIterator
^
REPLesent.sc:417: object Source is not a member of package io
io.Source.fromFile(path).getLines