Question: I am a complete Haskell n00b, but I would like to define a new data type that is simple a list of numbers. How would I go about doing this? I've read Haskell wikibook on type declarations, as well as other online resources, but I cannot seem to figure it out. Here is, in essence, what I've tried:

```
type NumList = [Num]

```

That didn't work, so how can I do this? Thanks for the help.

Answer: 
`Num` is a class, not a type. Choose a type instead; e.g. `Integer` or `Rational` are probably good choices.

```
type NumList = [Integer]

```

However, this does *not* create a new type; it just creates a new name for an old type. If you actually want a new type, you can use `newtype`, as in

```
newtype NumList = MkNumList [Integer]

```

which defines a new type named `NumList` and a new data constructor named `MkNumList`.
There is several answers depending on your exact need. If you just want a list of number for specific applications you probably know what exact type of numbers you'll use in this case and should just use : 

```
type DoubleList = [Double]

```

(With a more explicit name I hope since DoubleList presents no advantage whatsoever compared to [Double])

If you want to force every function that use NumList to use a `Num a` context (but it won't be automatic which is why this method is deprecated) you can use :

```
data Num a => NumList a = NL [a]

```

though that's probably a bad idea, it doesn't bring you anything over the use of `(Num a) => ...[a]....` in your code.

If you don't care what exact type of numbers is in your list, only that you can make operations between them (but not between two NumList), you can use existential types :

```
data NumList = forall a . (Num a) => NL [a]

```

This is most analogous to objects though with type erasure and no reflexion you won't be able to do much with your NumList (that can be added but by this point I'm pretty sure you're just piling difficulties you don't need just because you're trying to write Java/C++/Other in Haskell).

Note that if you want to create Num instances for list of numbers, you could just do :

```
instance (Num a) => Num [a] where ...

```

My ultimate recommendation would really be to use `[a]` with the appropriate `Num a` context but should you believe that to be erroneous you'll have to give more details on your use of this type if you are to receive further guidance.