mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
has -> implements in comments
This commit is contained in:
parent
d97d0c5483
commit
33c2b9dfdd
5 changed files with 9 additions and 9 deletions
|
@ -15,7 +15,7 @@ use crate::util::Env;
|
|||
pub(crate) fn decoder(env: &mut Env<'_>, _def_symbol: Symbol) -> (Expr, Variable) {
|
||||
// Build
|
||||
//
|
||||
// def_symbol : Decoder (List elem) fmt | elem has Decoding, fmt implements DecoderFormatting
|
||||
// def_symbol : Decoder (List elem) fmt | elem implements Decoding, fmt implements DecoderFormatting
|
||||
// def_symbol = Decode.custom \bytes, fmt -> Decode.decodeWith bytes (Decode.list Decode.decoder) fmt
|
||||
//
|
||||
// NB: reduction to `Decode.list Decode.decoder` is not possible to the HRR.
|
||||
|
@ -27,10 +27,10 @@ pub(crate) fn decoder(env: &mut Env<'_>, _def_symbol: Symbol) -> (Expr, Variable
|
|||
// List elem
|
||||
let elem_var = env.subs.fresh_unnamed_flex_var();
|
||||
|
||||
// Decode.decoder : Decoder elem fmt | elem has Decoding, fmt implements EncoderFormatting
|
||||
// Decode.decoder : Decoder elem fmt | elem implements Decoding, fmt implements EncoderFormatting
|
||||
let (elem_decoder, elem_decoder_var) = {
|
||||
// build `Decode.decoder : Decoder elem fmt` type
|
||||
// Decoder val fmt | val has Decoding, fmt implements EncoderFormatting
|
||||
// Decoder val fmt | val implements Decoding, fmt implements EncoderFormatting
|
||||
let elem_decoder_var = env.import_builtin_symbol_var(Symbol::DECODE_DECODER);
|
||||
|
||||
// set val ~ elem
|
||||
|
|
|
@ -462,7 +462,7 @@ fn call_hash_ability_member(
|
|||
|
||||
// build `member ...` function type. `member` here is `Hash.hash` or `Hash.addU16`.
|
||||
//
|
||||
// hasher, val -[uls]-> hasher | hasher has Hasher, val implements Hash
|
||||
// hasher, val -[uls]-> hasher | hasher implements Hasher, val implements Hash
|
||||
let exposed_hash_fn_var = env.import_builtin_symbol_var(member);
|
||||
|
||||
// (typeof body), (typeof field) -[clos]-> hasher_result
|
||||
|
@ -479,11 +479,11 @@ fn call_hash_ability_member(
|
|||
)),
|
||||
);
|
||||
|
||||
// hasher, val -[uls]-> hasher | hasher has Hasher, val implements Hash
|
||||
// hasher, val -[uls]-> hasher | hasher implements Hasher, val implements Hash
|
||||
// ~ (typeof body), (typeof field) -[clos]-> hasher_result
|
||||
env.unify(exposed_hash_fn_var, this_hash_fn_var);
|
||||
|
||||
// Hash.hash : hasher, (typeof field) -[clos]-> hasher | hasher has Hasher, (typeof field) implements Hash
|
||||
// Hash.hash : hasher, (typeof field) -[clos]-> hasher | hasher implements Hasher, (typeof field) implements Hash
|
||||
let hash_fn_head = Expr::AbilityMember(member, None, this_hash_fn_var);
|
||||
let hash_fn_data = Box::new((
|
||||
this_hash_fn_var,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue