1

Resolved

Let-in bindings a bug

description

The following code:
qsort []      = []
qsort (x::xs) = let lessThan = section (<)
                    notLessThan = section (>=)
                    section pred = qsort [y \\ y<-xs | y `pred` x]
                 in lessThan ++ [x] ++ notLessThan
raises a 'conflicting definition' compiler error, while its equivalent using 'where' works as expected:
qsort []      = []
qsort (x::xs) = lessThan ++ [x] ++ notLessThan
                where lessThan = section (<)
                      notLessThan = section (>=)
                      section pred = qsort [y \\ y<-xs | y `pred` x]

comments

vorov2 wrote Nov 23, 2013 at 9:47 AM

The bug is fixed; the fix is available in TFS. Will be included in Ela Platform 2013.4