Skip to content

Conversation

@josevalim
Copy link
Member

We also improve error messages to list all
available fields and introduce Module.Types.Of
module to hold shared functionality between Expr
and Pattern.

We also improve error messages to list all
available fields and introduce Module.Types.Of
module to hold shared functionality between Expr
and Pattern.
@ericmj ericmj changed the title Move struct handling from unity to AST Move struct handling from unify to AST Sep 11, 2020
Copy link
Member

@ericmj ericmj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! 💜

additional_pairs = [{:required, {:atom, :__struct__}, {:atom, module}}]
map_update(map, args, additional_pairs, stack, context)
with {:ok, struct, context} <- Of.struct(module, meta, context),
{:ok, update, context} <- of_expr(update, stack, context) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

target_required_pairs ++
source_optional_pairs ++
target_optional_pairs)
|> Enum.uniq()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the pipe?

@josevalim josevalim merged commit 8167bb6 into master Sep 11, 2020
@josevalim josevalim deleted the jv-of branch September 11, 2020 17:51
@josevalim
Copy link
Member Author

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants