[Haskell-cafe] How to compile this example code?

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Mon Oct 3 07:55:58 CEST 2011


Hi,
  I am learning to use data-flags, and got this example code:
import Data.Flags
newtype MyFlags = MyFlags CInt deriving (Eq, Flags)
#{enum MyFlags, MyFlags
 , myFlag1 = C_FLAG1
 , myFlag2 = C_FLAG2
 , myFlag3 = C_FLAG3
 }

  I modified it trying to compile it. Well, I got illegal syntax at "#{e".
  In fact, I am not quite know the syntax here. Any clue?
-- 
竹密岂妨流水过
山高哪阻野云飞



More information about the Haskell-Cafe mailing list