X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.runtime%2Fscl%2FComparator.scl;h=66188a74e8316a25be79d8fd02019549fa0cba02;hp=ade38616a2719d898bd2d556d1414319f59d3759;hb=HEAD;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.scl.runtime/scl/Comparator.scl b/bundles/org.simantics.scl.runtime/scl/Comparator.scl index ade38616a..66188a74e 100644 --- a/bundles/org.simantics.scl.runtime/scl/Comparator.scl +++ b/bundles/org.simantics.scl.runtime/scl/Comparator.scl @@ -1,19 +1,19 @@ -import "Prelude" - -importJava "java.util.Comparator" where - """ - A comparison function, which imposes a total ordering on some collection of objects - """ - data Comparator a - - @JavaName compare - """ - Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. - """ - compareWithComparator :: Comparator a -> a -> a -> Integer - -""" -Sorts the list using the given comparator. -""" -sortWithComparator :: Comparator a -> [a] -> [a] +import "Prelude" + +importJava "java.util.Comparator" where + """ + A comparison function, which imposes a total ordering on some collection of objects + """ + data Comparator a + + @JavaName compare + """ + Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. + """ + compareWithComparator :: Comparator a -> a -> a -> Integer + +""" +Sorts the list using the given comparator. +""" +sortWithComparator :: Comparator a -> [a] -> [a] sortWithComparator = sortWith . compareWithComparator \ No newline at end of file