Q:

My Haskell programme to convert Sets to Lists is getting an error

I am a beginner programmer and I have made a data type for my sets. I have then written a function to convert them to lists but I keep getting the following error message for the expression:
toList 3 :-: 4 :-: 5 :-: Empty 

Non type-variable argument in the constraint: Num (Set a)
      (Use FlexibleContexts to permit this)

When checking the inferred type
        it :: forall a. (Num (Set a), Num [a]) => Set [a]

Here is my Code:
infixr 5 :-:
data Set a = Empty | a :-: (Set a) deriving (Show, Read, Eq, Ord)

toList :: Set a -> [a]
toList Empty = []
toList (x :-: xs) =  x : toList xs

A:

The problem is that toList 3 :-: 4 :-: 5 :-: Empty is parsed as (toList 3) :-: 4 :-: 5 :-: Empty, but you actually wanted toList (3 :-: 4 :-: 5 :-: Empty). To make it work, you need to write the latter, or use $, like this: toList $ 3 :-: 4 :-: 5 :-: Empty.

