Skip to content
Browse files

Restore erroneously pruned encoders

  • Loading branch information...
1 parent 7c22f68 commit e110bd236410d1a6453c4b6674864721bc949ff7 Yurii Rashkovskii committed Oct 12, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 lib/encoder.ex
View
20 lib/encoder.ex
@@ -34,6 +34,26 @@ defimpl Exn.Encoder, for: Reference do
def encode(term), do: raise Exn.EncodeError, value: term
end
+defimpl Exn.Encoder, for: Atom do
+ def encode(term), do: inspect(term)
+end
+
+defimpl Exn.Encoder, for: List do
+ def encode(term), do: inspect(term)
+end
+
+defimpl Exn.Encoder, for: BitString do
+ def encode(term), do: inspect(term)
+end
+
+defimpl Exn.Encoder, for: Number do
+ def encode(term), do: inspect(term)
+end
+
+defimpl Exn.Encoder, for: Function do
+ def encode(term), do: inspect(term)
+end
+
defimpl Exn.Encoder, for: Any do
def encode(term), do: inspect(term, raw: true)
end

0 comments on commit e110bd2

Please sign in to comment.
Something went wrong with that request. Please try again.