Here is a type taken from the tutorial:


>  data Colour = Red | Green | Blue | Indigo | Violet
>                deriving (Enum,Show)

The tutorial says:

  ...user-defined enumerated types like Color can easily be given Enum instance
  declarations. If so:

    [Red..Violet] => [Red,Green,Blue,Indigo,Violet]


Hugs 1.4 (June 1998) says:

  Main> [Red..Violet]
  ERROR: Syntax error in expression (unexpected symbol "Red..")
  Main> enumFromTo Red Violet
  [Red,Green,Blue,Indigo,Violet]


I don't think it is because of the way I spell `Colour'.



Peter Pudney
Centre for Industrial and Applicable Mathematics
University of South Australia

Reply via email to