These are chat archives for fthomas/refined

30th
Jul 2015
Stevan Andjelkovic
@stevana
Jul 30 2015 10:16
hi, i'm getting a macro expansion exception when trying to use refineMT on a custom predicate (refineT works fine). is this a known limitation or am i missing something? cheers.
Frank S. Thomas
@fthomas
Jul 30 2015 10:35
@stevana refineMT in combination with custom predicates should work in principle. can you post the whole exception with stack trace and your predicate code so that I can reproduce this? If you like you can also open an issue on GitHub
Stevan Andjelkovic
@stevana
Jul 30 2015 11:12
that first part is just sbt console from the repo, copy pasting from the point custom predicate example. it seems to give a different error from when loading a file containing the same content (second part of the paste).
Frank S. Thomas
@fthomas
Jul 30 2015 11:18
it should give the same error in both cases... strange
I guess your file contains object Test { ...; val y: Point @@ Quadrant1 = refineMT[Quadrant1](Point(1, 3)) }?
Frank S. Thomas
@fthomas
Jul 30 2015 11:26
the whole file and how you compile and execute it, would be helpful too
Stevan Andjelkovic
@stevana
Jul 30 2015 12:34
fthomas: here's the whole file: http://lpaste.net/8314103447129423872 , i simply :load it from sbt console from the repo.
Frank S. Thomas
@fthomas
Jul 30 2015 13:42
interesting. I'm trying to reproduce this now
ok, it fails for me too...
Frank S. Thomas
@fthomas
Jul 30 2015 13:59
@stevana the problem was that refineMT was used in the same compilation unit as the predicate. I guess Test was not fully initialized as the macro was called and the macro tried to evaluate parts of a not fully initialized object.
I assume that this is not only a problem in the REPL. I'll investigate further and update the custom predicate example with my findings.
thanks for reporting this! :-)
Stevan Andjelkovic
@stevana
Jul 30 2015 14:04
ah i see, that makes sense...
thanks for your quick help :-)