Skip to content

Instantly share code, notes, and snippets.

@leftaroundabout
Last active October 3, 2015 14:33
Show Gist options
  • Save leftaroundabout/e3cfd8fe97a82ded0db0 to your computer and use it in GitHub Desktop.
Save leftaroundabout/e3cfd8fe97a82ded0db0 to your computer and use it in GitHub Desktop.
TreeInsert.$wtreeInsert =
\ (@ a_arS)
(w_sYW :: GHC.Classes.Ord a_arS)
(w1_sYX :: a_arS)
(w2_sYY :: TreeInsert.Tree a_arS) ->
case w2_sYY of _ [Occ=Dead] {
TreeInsert.EmptyTree ->
(# w1_sYX,
TreeInsert.EmptyTree @ a_arS,
TreeInsert.EmptyTree @ a_arS #);
TreeInsert.Node a1_aEi left_aEj right_aEk ->
case GHC.Classes.==
@ a_arS (GHC.Classes.$p1Ord @ a_arS w_sYW) w1_sYX a1_aEi
of _ [Occ=Dead] {
GHC.Types.False ->
case GHC.Classes.< @ a_arS w_sYW w1_sYX a1_aEi of _ [Occ=Dead] {
GHC.Types.False ->
(# a1_aEi,
left_aEj,
TreeInsert.treeInsert @ a_arS w_sYW w1_sYX right_aEk #);
GHC.Types.True ->
(# a1_aEi,
TreeInsert.treeInsert @ a_arS w_sYW w1_sYX left_aEj,
right_aEk #)
};
GHC.Types.True -> (# a1_aEi, left_aEj, right_aEk #)
}
}
end Rec }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment