HUGS error: Unresolved overloading

David Scarlett dscarlett@optushome.com.au
Thu, 17 May 2001 21:07:56 +1000


Can anyone shed some light on the following error? Thanks in advance.

isSorted :: Ord a => [a] -> Bool
isSorted [] = True
isSorted [x] = True
isSorted (x1:x2:xs)
        | x1 <= x2  = isSorted (x2:xs)
        | otherwise = False

--------
Hugs session for:
/usr/local/share/hugs/lib/Prelude.hs
haskell/sort.hs
Main> isSorted [1]
True
Main> isSorted [1,2]
True
Main> isSorted [2,1]
False
Main> isSorted []
ERROR: Unresolved overloading
*** Type       : Ord a => Bool
*** Expression : isSorted []
--------