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

Morphir Core and IR work #91

Merged
merged 4 commits into from
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rollback un-needed changes
  • Loading branch information
DamianReeves committed Feb 14, 2021
commit 0bb15b690f417e7f53ee83725eb86ed52baaf18a
4 changes: 2 additions & 2 deletions morphir/ir/src/morphir/ir/codec/patternCodecs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ object patternCodecs {
implicit def readWriter[A: ReadWriter]: ReadWriter[Pattern.TuplePattern[A]] =
readwriter[ujson.Value].bimap(pat => ujson.Arr(ujson.Str(Tag), writeJs(pat.attributes)), _ => ???)
// readwriter[(String, A, List[Pattern[A]])].bimap(
// pat => (Tag, pat.annotate, pat.elementPatterns), {
// case (tag, annotate, elementPatterns) if tag == Tag => Pattern.TuplePattern(annotate, elementPatterns)
// pat => (Tag, pat.attributes, pat.elementPatterns), {
// case (tag, attributes, elementPatterns) if tag == Tag => Pattern.TuplePattern(attributes, elementPatterns)
// case (tag, _, _) => throw DecodeError.unexpectedTag(tag, Tag)
// }
// )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object LiteralSpec extends DefaultRunnableSpec with JsonSpec {
}
),
suite("JSON decoding")(
test("Decoding a literal with no annotate") {
test("Decoding a literal with no attributes") {
val json = """["literal", {}, ["bool_literal", true]]""".stripMargin
val result = decodeString[Literal[scala.Unit]](json)

Expand Down