Instantly share code, notes, and snippets.

@oisdk /sort5.hs Secret
Last active May 7, 2018

Embed
What would you like to do?
sort5
= \ (@ a)
(lte :: a -> a -> Bool)
(ds :: (a, a, a, a, a)) ->
case ds of wild_X8
{ (_0, _1, _2, _3, _4) ->
case lte _0 _1 of {
False ->
case lte _2 _3 of {
False ->
case lte _1 _3 of {
False ->
case lte _0 _2 of {
False ->
case lte _2 _1 of {
False ->
case lte _3 _4 of {
False -> (_4, _3, _1, _2, _0);
True ->
case lte _1 _4 of {
False -> (_3, _4, _1, _2, _0);
True ->
case lte _2 _4 of {
False -> (_3, _1, _4, _2, _0);
True ->
case lte _0 _4 of {
False -> (_3, _1, _2, _4, _0);
True -> (_3, _1, _2, _0, _4)
}
}
}
};
True ->
case lte _3 _4 of {
False ->
case lte _1 _2 of {
False -> (_4, _3, _2, _1, _0);
True -> (_4, _3, _1, _2, _0)
};
True ->
case lte _2 _4 of {
False ->
case lte _1 _2 of {
False -> (_3, _4, _2, _1, _0);
True -> (_3, _4, _1, _2, _0)
};
True ->
case lte _1 _4 of {
False -> (_3, _2, _4, _1, _0);
True ->
case lte _0 _4 of {
False -> (_3, _2, _1, _4, _0);
True -> (_3, _2, _1, _0, _4)
}
}
}
}
};
True ->
case lte _3 _4 of {
False ->
case lte _2 _0 of {
False -> (_4, _3, _1, _0, _2);
True -> (_4, _3, _1, _2, _0)
};
True ->
case lte _1 _4 of {
False ->
case lte _2 _0 of {
False -> (_3, _4, _1, _0, _2);
True -> (_3, _4, _1, _2, _0)
};
True ->
case lte _0 _4 of {
False ->
case lte _2 _0 of {
False -> (_3, _1, _4, _0, _2);
True -> (_3, _1, _4, _2, _0)
};
True ->
case lte _2 _4 of {
False -> (_3, _1, _0, _4, _2);
True -> (_3, _1, _0, _2, _4)
}
}
}
}
};
True ->
case lte _0 _2 of {
False ->
case lte _1 _4 of {
False ->
case lte _3 _1 of {
False -> (_4, _1, _3, _2, _0);
True ->
case lte _2 _1 of {
False -> (_4, _3, _1, _2, _0);
True -> (_4, _3, _2, _1, _0)
}
};
True ->
case lte _3 _4 of {
False -> (_1, _4, _3, _2, _0);
True ->
case lte _2 _4 of {
False -> (_1, _3, _4, _2, _0);
True ->
case lte _0 _4 of {
False -> (_1, _3, _2, _4, _0);
True -> (_1, _3, _2, _0, _4)
}
}
}
};
True ->
case lte _0 _3 of {
False ->
case lte _1 _4 of {
False ->
case lte _3 _1 of {
False ->
case lte _2 _0 of {
False -> (_4, _1, _3, _0, _2);
True -> (_4, _1, _3, _2, _0)
};
True ->
case lte _2 _0 of {
False -> (_4, _3, _1, _0, _2);
True -> (_4, _3, _1, _2, _0)
}
};
True ->
case lte _3 _4 of {
False ->
case lte _2 _0 of {
False -> (_1, _4, _3, _0, _2);
True -> (_1, _4, _3, _2, _0)
};
True ->
case lte _0 _4 of {
False ->
case lte _2 _0 of {
False -> (_1, _3, _4, _0, _2);
True -> (_1, _3, _4, _2, _0)
};
True ->
case lte _2 _4 of {
False -> (_1, _3, _0, _4, _2);
True -> (_1, _3, _0, _2, _4)
}
}
}
};
True ->
case lte _1 _4 of {
False ->
case lte _3 _0 of {
False -> (_4, _1, _0, _3, _2);
True ->
case lte _2 _0 of {
False -> (_4, _1, _3, _0, _2);
True -> (_4, _1, _3, _2, _0)
}
};
True ->
case lte _0 _4 of {
False ->
case lte _3 _0 of {
False -> (_1, _4, _0, _3, _2);
True ->
case lte _2 _0 of {
False -> (_1, _4, _3, _0, _2);
True -> (_1, _4, _3, _2, _0)
}
};
True ->
case lte _3 _4 of {
False -> (_1, _0, _4, _3, _2);
True ->
case lte _2 _4 of {
False -> (_1, _0, _3, _4, _2);
True -> (_1, _0, _3, _2, _4)
}
}
}
}
}
}
};
True ->
case lte _1 _2 of {
False ->
case lte _0 _3 of {
False ->
case lte _3 _1 of {
False ->
case lte _2 _4 of {
False -> (_4, _2, _1, _3, _0);
True ->
case lte _1 _4 of {
False -> (_2, _4, _1, _3, _0);
True ->
case lte _3 _4 of {
False -> (_2, _1, _4, _3, _0);
True ->
case lte _0 _4 of {
False -> (_2, _1, _3, _4, _0);
True -> (_2, _1, _3, _0, _4)
}
}
}
};
True ->
case lte _2 _4 of {
False ->
case lte _3 _2 of {
False ->
case lte _1 _3 of {
False -> (_4, _2, _3, _1, _0);
True -> (_4, _2, _1, _3, _0)
};
True -> (_4, _3, _2, _1, _0)
};
True ->
case lte _3 _4 of {
False ->
case lte _1 _3 of {
False -> (_2, _4, _3, _1, _0);
True -> (_2, _4, _1, _3, _0)
};
True ->
case lte _1 _4 of {
False -> (_2, _3, _4, _1, _0);
True ->
case lte _0 _4 of {
False -> (_2, _3, _1, _4, _0);
True -> (_2, _3, _1, _0, _4)
}
}
}
}
};
True ->
case lte _2 _4 of {
False ->
case lte _3 _0 of {
False -> (_4, _2, _1, _0, _3);
True -> (_4, _2, _1, _3, _0)
};
True ->
case lte _1 _4 of {
False ->
case lte _3 _0 of {
False -> (_2, _4, _1, _0, _3);
True -> (_2, _4, _1, _3, _0)
};
True ->
case lte _0 _4 of {
False ->
case lte _3 _0 of {
False -> (_2, _1, _4, _0, _3);
True -> (_2, _1, _4, _3, _0)
};
True ->
case lte _3 _4 of {
False -> (_2, _1, _0, _4, _3);
True -> (_2, _1, _0, _3, _4)
}
}
}
}
};
True ->
case lte _0 _3 of {
False ->
case lte _3 _2 of {
False ->
case lte _1 _4 of {
False ->
case lte _2 _1 of {
False -> (_4, _1, _2, _3, _0);
True ->
case lte _3 _1 of {
False -> (_4, _2, _1, _3, _0);
True -> (_4, _2, _3, _1, _0)
}
};
True ->
case lte _2 _4 of {
False -> (_1, _4, _2, _3, _0);
True ->
case lte _3 _4 of {
False -> (_1, _2, _4, _3, _0);
True ->
case lte _0 _4 of {
False -> (_1, _2, _3, _4, _0);
True -> (_1, _2, _3, _0, _4)
}
}
}
};
True ->
case lte _1 _4 of {
False ->
case lte _3 _1 of {
False -> (_4, _1, _2, _3, _0);
True ->
case lte _2 _1 of {
False ->
case lte _0 _2 of {
False -> (_4, _3, _1, _2, _0);
True -> (_4, _3, _1, _0, _2)
};
True -> (_4, _3, _2, _1, _0)
}
};
True ->
case lte _3 _4 of {
False -> (_1, _4, _2, _3, _0);
True ->
case lte _2 _4 of {
False ->
case lte _0 _2 of {
False -> (_1, _3, _4, _2, _0);
True -> (_1, _3, _4, _0, _2)
};
True ->
case lte _0 _4 of {
False -> (_1, _3, _2, _4, _0);
True -> (_1, _3, _2, _0, _4)
}
}
}
}
};
True ->
case lte _0 _2 of {
False ->
case lte _1 _4 of {
False ->
case lte _2 _1 of {
False ->
case lte _3 _0 of {
False -> (_4, _1, _2, _0, _3);
True -> (_4, _1, _2, _3, _0)
};
True ->
case lte _3 _0 of {
False -> (_4, _2, _1, _0, _3);
True -> (_4, _2, _1, _3, _0)
}
};
True ->
case lte _2 _4 of {
False ->
case lte _3 _0 of {
False -> (_1, _4, _2, _0, _3);
True -> (_1, _4, _2, _3, _0)
};
True ->
case lte _0 _4 of {
False ->
case lte _3 _0 of {
False -> (_1, _2, _4, _0, _3);
True -> (_1, _2, _4, _3, _0)
};
True ->
case lte _3 _4 of {
False -> (_1, _2, _0, _4, _3);
True -> (_1, _2, _0, _3, _4)
}
}
}
};
True ->
case lte _1 _4 of {
False ->
case lte _2 _0 of {
False ->
case lte _3 _2 of {
False -> (_4, _1, _0, _2, _3);
True -> (_4, _1, _0, _3, _2)
};
True ->
case lte _3 _0 of {
False -> (_4, _1, _2, _0, _3);
True -> (_4, _1, _2, _3, _0)
}
};
True ->
case lte _0 _4 of {
False ->
case lte _2 _0 of {
False ->
case lte _3 _2 of {
False -> (_1, _4, _0, _2, _3);
True -> (_1, _4, _0, _3, _2)
};
True ->
case lte _3 _0 of {
False -> (_1, _4, _2, _0, _3);
True -> (_1, _4, _2, _3, _0)
}
};
True ->
case lte _2 _4 of {
False ->
case lte _3 _2 of {
False -> (_1, _0, _4, _2, _3);
True -> (_1, _0, _4, _3, _2)
};
True ->
case lte _3 _4 of {
False -> (_1, _0, _2, _4, _3);
True -> (_1, _0, _2, _3, _4)
}
}
}
}
}
}
}
};
True ->
case lte _2 _3 of {
False ->
case lte _0 _3 of {
False ->
case lte _1 _2 of {
False ->
case lte _2 _0 of {
False ->
case lte _3 _4 of {
False -> (_4, _3, _0, _2, _1);
True ->
case lte _0 _4 of {
False -> (_3, _4, _0, _2, _1);
True ->
case lte _2 _4 of {
False -> (_3, _0, _4, _2, _1);
True ->
case lte _1 _4 of {
False -> (_3, _0, _2, _4, _1);
True -> (_3, _0, _2, _1, _4)
}
}
}
};
True ->
case lte _3 _4 of {
False ->
case lte _0 _2 of {
False ->
case lte _1 _0 of {
False -> (_4, _3, _2, _0, _1);
True -> (_4, _3, _2, _1, _0)
};
True -> (_4, _3, _0, _2, _1)
};
True ->
case lte _2 _4 of {
False ->
case lte _0 _2 of {
False ->
case lte _1 _0 of {
False -> (_3, _4, _2, _0, _1);
True -> (_3, _4, _2, _1, _0)
};
True -> (_3, _4, _0, _2, _1)
};
True ->
case lte _0 _4 of {
False ->
case lte _1 _0 of {
False -> (_3, _2, _4, _0, _1);
True -> (_3, _2, _4, _1, _0)
};
True ->
case lte _1 _4 of {
False -> (_3, _2, _0, _4, _1);
True -> (_3, _2, _0, _1, _4)
}
}
}
}
};
True ->
case lte _1 _0 of {
False ->
case lte _3 _4 of {
False ->
case lte _2 _1 of {
False -> (_4, _3, _0, _1, _2);
True -> (_4, _3, _0, _2, _1)
};
True ->
case lte _0 _4 of {
False ->
case lte _2 _1 of {
False -> (_3, _4, _0, _1, _2);
True -> (_3, _4, _0, _2, _1)
};
True ->
case lte _1 _4 of {
False ->
case lte _2 _1 of {
False -> (_3, _0, _4, _1, _2);
True -> (_3, _0, _4, _2, _1)
};
True ->
case lte _2 _4 of {
False -> (_3, _0, _1, _4, _2);
True -> (_3, _0, _1, _2, _4)
}
}
}
};
True ->
case lte _3 _4 of {
False ->
case lte _1 _3 of {
False ->
case lte _2 _1 of {
False -> (_4, _3, _0, _1, _2);
True -> (_4, _3, _0, _2, _1)
};
True ->
case lte _2 _0 of {
False -> (_4, _1, _3, _0, _2);
True -> (_4, _1, _3, _2, _0)
}
};
True ->
case lte _1 _4 of {
False ->
case lte _2 _1 of {
False -> (_3, _4, _0, _1, _2);
True -> (_3, _4, _0, _2, _1)
};
True ->
case lte _0 _4 of {
False ->
case lte _2 _0 of {
False -> (_3, _1, _4, _0, _2);
True -> (_3, _1, _4, _2, _0)
};
True ->
case lte _2 _4 of {
False -> (_3, _1, _0, _4, _2);
True -> (_3, _1, _0, _2, _4)
}
}
}
}
}
};
True ->
case lte _1 _2 of {
False ->
case lte _0 _4 of {
False ->
case lte _3 _0 of {
False -> (_4, _0, _3, _2, _1);
True ->
case lte _2 _0 of {
False -> (_4, _3, _0, _2, _1);
True ->
case lte _1 _0 of {
False -> (_4, _3, _2, _0, _1);
True -> (_4, _3, _2, _1, _0)
}
}
};
True ->
case lte _3 _4 of {
False -> (_0, _4, _3, _2, _1);
True ->
case lte _2 _4 of {
False -> (_0, _3, _4, _2, _1);
True ->
case lte _1 _4 of {
False -> (_0, _3, _2, _4, _1);
True -> (_0, _3, _2, _1, _4)
}
}
}
};
True ->
case lte _1 _3 of {
False ->
case lte _0 _4 of {
False ->
case lte _3 _0 of {
False ->
case lte _2 _1 of {
False -> (_4, _0, _3, _1, _2);
True -> (_4, _0, _3, _2, _1)
};
True ->
case lte _1 _0 of {
False ->
case lte _2 _1 of {
False -> (_4, _3, _0, _1, _2);
True -> (_4, _3, _0, _2, _1)
};
True ->
case lte _2 _0 of {
False -> (_4, _3, _1, _0, _2);
True -> (_4, _3, _1, _2, _0)
}
}
};
True ->
case lte _3 _4 of {
False ->
case lte _2 _1 of {
False -> (_0, _4, _3, _1, _2);
True -> (_0, _4, _3, _2, _1)
};
True ->
case lte _1 _4 of {
False ->
case lte _2 _1 of {
False -> (_0, _3, _4, _1, _2);
True -> (_0, _3, _4, _2, _1)
};
True ->
case lte _2 _4 of {
False -> (_0, _3, _1, _4, _2);
True -> (_0, _3, _1, _2, _4)
}
}
}
};
True ->
case lte _0 _4 of {
False ->
case lte _1 _0 of {
False ->
case lte _3 _1 of {
False -> (_4, _0, _1, _3, _2);
True ->
case lte _2 _1 of {
False -> (_4, _0, _3, _1, _2);
True -> (_4, _0, _3, _2, _1)
}
};
True ->
case lte _3 _0 of {
False -> (_4, _1, _0, _3, _2);
True ->
case lte _2 _0 of {
False -> (_4, _1, _3, _0, _2);
True -> (_4, _1, _3, _2, _0)
}
}
};
True ->
case lte _1 _4 of {
False ->
case lte _3 _1 of {
False -> (_0, _4, _1, _3, _2);
True ->
case lte _2 _1 of {
False -> (_0, _4, _3, _1, _2);
True -> (_0, _4, _3, _2, _1)
}
};
True ->
case lte _3 _4 of {
False -> (_0, _1, _4, _3, _2);
True ->
case lte _2 _4 of {
False -> (_0, _1, _3, _4, _2);
True -> (_0, _1, _3, _2, _4)
}
}
}
}
}
}
};
True ->
case lte _0 _2 of {
False ->
case lte _1 _3 of {
False ->
case lte _3 _0 of {
False ->
case lte _2 _4 of {
False -> (_4, _2, _0, _3, _1);
True ->
case lte _0 _4 of {
False -> (_2, _4, _0, _3, _1);
True ->
case lte _3 _4 of {
False -> (_2, _0, _4, _3, _1);
True ->
case lte _1 _4 of {
False -> (_2, _0, _3, _4, _1);
True -> (_2, _0, _3, _1, _4)
}
}
}
};
True ->
case lte _2 _4 of {
False ->
case lte _3 _2 of {
False ->
case lte _0 _3 of {
False ->
case lte _1 _0 of {
False -> (_4, _2, _3, _0, _1);
True -> (_4, _2, _3, _1, _0)
};
True -> (_4, _2, _0, _3, _1)
};
True ->
case lte _1 _0 of {
False -> (_4, _3, _2, _0, _1);
True -> (_4, _3, _2, _1, _0)
}
};
True ->
case lte _3 _4 of {
False ->
case lte _0 _3 of {
False ->
case lte _1 _0 of {
False -> (_2, _4, _3, _0, _1);
True -> (_2, _4, _3, _1, _0)
};
True -> (_2, _4, _0, _3, _1)
};
True ->
case lte _0 _4 of {
False ->
case lte _1 _0 of {
False -> (_2, _3, _4, _0, _1);
True -> (_2, _3, _4, _1, _0)
};
True ->
case lte _1 _4 of {
False -> (_2, _3, _0, _4, _1);
True -> (_2, _3, _0, _1, _4)
}
}
}
}
};
True ->
case lte _1 _0 of {
False ->
case lte _2 _4 of {
False ->
case lte _3 _1 of {
False -> (_4, _2, _0, _1, _3);
True -> (_4, _2, _0, _3, _1)
};
True ->
case lte _0 _4 of {
False ->
case lte _3 _1 of {
False -> (_2, _4, _0, _1, _3);
True -> (_2, _4, _0, _3, _1)
};
True ->
case lte _1 _4 of {
False ->
case lte _3 _1 of {
False -> (_2, _0, _4, _1, _3);
True -> (_2, _0, _4, _3, _1)
};
True ->
case lte _3 _4 of {
False -> (_2, _0, _1, _4, _3);
True -> (_2, _0, _1, _3, _4)
}
}
}
};
True ->
case lte _2 _4 of {
False ->
case lte _1 _2 of {
False ->
case lte _3 _1 of {
False -> (_4, _2, _0, _1, _3);
True -> (_4, _2, _0, _3, _1)
};
True ->
case lte _3 _0 of {
False -> (_4, _1, _2, _0, _3);
True -> (_4, _1, _2, _3, _0)
}
};
True ->
case lte _1 _4 of {
False ->
case lte _3 _1 of {
False -> (_2, _4, _0, _1, _3);
True -> (_2, _4, _0, _3, _1)
};
True ->
case lte _0 _4 of {
False ->
case lte _3 _0 of {
False -> (_2, _1, _4, _0, _3);
True -> (_2, _1, _4, _3, _0)
};
True ->
case lte _3 _4 of {
False -> (_2, _1, _0, _4, _3);
True -> (_2, _1, _0, _3, _4)
}
}
}
}
}
};
True ->
case lte _1 _3 of {
False ->
case lte _3 _2 of {
False ->
case lte _0 _4 of {
False ->
case lte _2 _0 of {
False -> (_4, _0, _2, _3, _1);
True ->
case lte _3 _0 of {
False -> (_4, _2, _0, _3, _1);
True ->
case lte _1 _0 of {
False -> (_4, _2, _3, _0, _1);
True -> (_4, _2, _3, _1, _0)
}
}
};
True ->
case lte _2 _4 of {
False -> (_0, _4, _2, _3, _1);
True ->
case lte _3 _4 of {
False -> (_0, _2, _4, _3, _1);
True ->
case lte _1 _4 of {
False -> (_0, _2, _3, _4, _1);
True -> (_0, _2, _3, _1, _4)
}
}
}
};
True ->
case lte _0 _4 of {
False ->
case lte _3 _0 of {
False -> (_4, _0, _2, _3, _1);
True ->
case lte _2 _0 of {
False ->
case lte _1 _2 of {
False -> (_4, _3, _0, _2, _1);
True -> (_4, _3, _0, _1, _2)
};
True ->
case lte _1 _0 of {
False -> (_4, _3, _2, _0, _1);
True -> (_4, _3, _2, _1, _0)
}
}
};
True ->
case lte _3 _4 of {
False -> (_0, _4, _2, _3, _1);
True ->
case lte _2 _4 of {
False ->
case lte _1 _2 of {
False -> (_0, _3, _4, _2, _1);
True -> (_0, _3, _4, _1, _2)
};
True ->
case lte _1 _4 of {
False -> (_0, _3, _2, _4, _1);
True -> (_0, _3, _2, _1, _4)
}
}
}
}
};
True ->
case lte _1 _2 of {
False ->
case lte _0 _4 of {
False ->
case lte _2 _0 of {
False ->
case lte _3 _1 of {
False -> (_4, _0, _2, _1, _3);
True -> (_4, _0, _2, _3, _1)
};
True ->
case lte _1 _0 of {
False ->
case lte _3 _1 of {
False -> (_4, _2, _0, _1, _3);
True -> (_4, _2, _0, _3, _1)
};
True ->
case lte _3 _0 of {
False -> (_4, _2, _1, _0, _3);
True -> (_4, _2, _1, _3, _0)
}
}
};
True ->
case lte _2 _4 of {
False ->
case lte _3 _1 of {
False -> (_0, _4, _2, _1, _3);
True -> (_0, _4, _2, _3, _1)
};
True ->
case lte _1 _4 of {
False ->
case lte _3 _1 of {
False -> (_0, _2, _4, _1, _3);
True -> (_0, _2, _4, _3, _1)
};
True ->
case lte _3 _4 of {
False -> (_0, _2, _1, _4, _3);
True -> (_0, _2, _1, _3, _4)
}
}
}
};
True ->
case lte _0 _4 of {
False ->
case lte _1 _0 of {
False ->
case lte _2 _1 of {
False ->
case lte _3 _2 of {
False -> (_4, _0, _1, _2, _3);
True -> (_4, _0, _1, _3, _2)
};
True ->
case lte _3 _1 of {
False -> (_4, _0, _2, _1, _3);
True -> (_4, _0, _2, _3, _1)
}
};
True ->
case lte _2 _0 of {
False ->
case lte _3 _2 of {
False -> (_4, _1, _0, _2, _3);
True -> (_4, _1, _0, _3, _2)
};
True ->
case lte _3 _0 of {
False -> (_4, _1, _2, _0, _3);
True -> (_4, _1, _2, _3, _0)
}
}
};
True ->
case lte _1 _4 of {
False ->
case lte _2 _1 of {
False ->
case lte _3 _2 of {
False -> (_0, _4, _1, _2, _3);
True -> (_0, _4, _1, _3, _2)
};
True ->
case lte _3 _1 of {
False -> (_0, _4, _2, _1, _3);
True -> (_0, _4, _2, _3, _1)
}
};
True ->
case lte _2 _4 of {
False ->
case lte _3 _2 of {
False -> (_0, _1, _4, _2, _3);
True -> (_0, _1, _4, _3, _2)
};
True ->
case lte _3 _4 of {
False -> (_0, _1, _2, _4, _3);
True -> wild_X8
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment