mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
some bug fixes
This commit is contained in:
parent
4fc0dd9dd9
commit
28835d5bf3
8 changed files with 47 additions and 61 deletions
|
@ -3473,7 +3473,7 @@ mod solve_expr {
|
|||
Dict.insert
|
||||
"#
|
||||
),
|
||||
"Dict k v, k, v -> Dict k v | k has Eq",
|
||||
"Dict k v, k, v -> Dict k v | k has Hash & Eq",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -3734,7 +3734,7 @@ mod solve_expr {
|
|||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
reconstructPath : Dict position position, position -> List position | position has Eq
|
||||
reconstructPath : Dict position position, position -> List position | position has Hash & Eq
|
||||
reconstructPath = \cameFrom, goal ->
|
||||
when Dict.get cameFrom goal is
|
||||
Err KeyNotFound ->
|
||||
|
@ -3746,7 +3746,7 @@ mod solve_expr {
|
|||
reconstructPath
|
||||
"#
|
||||
),
|
||||
"Dict position position, position -> List position | position has Eq",
|
||||
"Dict position position, position -> List position | position has Hash & Eq",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -3781,7 +3781,7 @@ mod solve_expr {
|
|||
|
||||
Model position : { openSet : Set position }
|
||||
|
||||
cheapestOpen : Model position -> Result position [KeyNotFound] | position has Eq
|
||||
cheapestOpen : Model position -> Result position [KeyNotFound] | position has Hash & Eq
|
||||
cheapestOpen = \model ->
|
||||
|
||||
folder = \resSmallestSoFar, position ->
|
||||
|
@ -3796,14 +3796,14 @@ mod solve_expr {
|
|||
Set.walk model.openSet (Ok { position: boom {}, cost: 0.0 }) folder
|
||||
|> Result.map (\x -> x.position)
|
||||
|
||||
astar : Model position -> Result position [KeyNotFound] | position has Eq
|
||||
astar : Model position -> Result position [KeyNotFound] | position has Hash & Eq
|
||||
astar = \model -> cheapestOpen model
|
||||
|
||||
main =
|
||||
astar
|
||||
"#
|
||||
),
|
||||
"Model position -> Result position [KeyNotFound] | position has Eq",
|
||||
"Model position -> Result position [KeyNotFound] | position has Hash & Eq",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -4445,7 +4445,7 @@ mod solve_expr {
|
|||
|
||||
Key k : Num k
|
||||
|
||||
removeHelpEQGT : Key k, RBTree (Key k) v -> RBTree (Key k) v | k has Eq
|
||||
removeHelpEQGT : Key k, RBTree (Key k) v -> RBTree (Key k) v | k has Hash & Eq
|
||||
removeHelpEQGT = \targetKey, dict ->
|
||||
when dict is
|
||||
Node color key value left right ->
|
||||
|
@ -4559,7 +4559,7 @@ mod solve_expr {
|
|||
_ ->
|
||||
Empty
|
||||
|
||||
removeHelp : Key k, RBTree (Key k) v -> RBTree (Key k) v | k has Eq
|
||||
removeHelp : Key k, RBTree (Key k) v -> RBTree (Key k) v | k has Hash & Eq
|
||||
removeHelp = \targetKey, dict ->
|
||||
when dict is
|
||||
Empty ->
|
||||
|
@ -4647,7 +4647,7 @@ mod solve_expr {
|
|||
|
||||
RBTree k v : [Node NodeColor k v (RBTree k v) (RBTree k v), Empty]
|
||||
|
||||
removeHelp : Num k, RBTree (Num k) v -> RBTree (Num k) v | k has Eq
|
||||
removeHelp : Num k, RBTree (Num k) v -> RBTree (Num k) v | k has Hash & Eq
|
||||
removeHelp = \targetKey, dict ->
|
||||
when dict is
|
||||
Empty ->
|
||||
|
@ -4682,7 +4682,7 @@ mod solve_expr {
|
|||
|
||||
removeHelpPrepEQGT : Key k, RBTree (Key k) v, NodeColor, (Key k), v, RBTree (Key k) v, RBTree (Key k) v -> RBTree (Key k) v
|
||||
|
||||
removeHelpEQGT : Key k, RBTree (Key k) v -> RBTree (Key k) v | k has Eq
|
||||
removeHelpEQGT : Key k, RBTree (Key k) v -> RBTree (Key k) v | k has Hash & Eq
|
||||
removeHelpEQGT = \targetKey, dict ->
|
||||
when dict is
|
||||
Node color key value left right ->
|
||||
|
@ -8270,7 +8270,7 @@ mod solve_expr {
|
|||
r#"
|
||||
app "test" provides [top] to "./platform"
|
||||
|
||||
MDict u := (List u) | u has Eq
|
||||
MDict u := (List u) | u has Hash & Eq
|
||||
|
||||
bot : MDict k -> MDict k
|
||||
bot = \@MDict data ->
|
||||
|
@ -8281,7 +8281,7 @@ mod solve_expr {
|
|||
top = \x -> bot x
|
||||
"#
|
||||
),
|
||||
"MDict v -> MDict v | v has Eq",
|
||||
"MDict v -> MDict v | v has Hash & Eq",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue