Created
July 24, 2009 05:43
-
-
Save moonpolysoft/153871 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fromErlang(x: OtpErlangTuple) : Thingie = { | |
x.elements match { | |
case Array(Atom("set"), id : OtpErlangLong, list : OtpErlangList) => | |
... | |
trait OtpConversions { | |
implicit def erlangLongToInteger(erl : OtpErlangLong) : Int = erl.intValue | |
implicit def erlangAtomToString(erl : OtpErlangAtom) : String = erl.atomValue | |
} | |
object Atom extends OtpConversions { | |
def unapply(v : OtpErlangAtom) : Option[String] = { | |
Some(v) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment