Problem on using template haskell.

Hi, I am trying to use data-flags library. And failed on compiling the test code. The code is like following, and the compiling error is "test.hs:4:24: parse error on input `{'" {-# LANGUAGE TemplateHaskell #-} import Data.Flags.TH $(bitmaskWrapper "Severity" ''Int [] False [ ("NotClassified", #{const (2 ^ 0)}) , ("Information", #{const (2 ^ 1)}) , ("Warning", #{const (2 ^ 2)}) , ("Average", #{const (2 ^ 3)}) , ("High", #{const (2 ^ 4)}) , ("Disaster", #{const (2 ^ 5)}) What should I do? -- 竹密岂妨流水过 山高哪阻野云飞

On Mon, Oct 3, 2011 at 1:44 PM, Magicloud Magiclouds
Hi, I am trying to use data-flags library. And failed on compiling the test code.
The code is like following, and the compiling error is "test.hs:4:24: parse error on input `{'" {-# LANGUAGE TemplateHaskell #-} import Data.Flags.TH $(bitmaskWrapper "Severity" ''Int [] False [ ("NotClassified", #{const (2 ^ 0)}) , ("Information", #{const (2 ^ 1)}) , ("Warning", #{const (2 ^ 2)}) , ("Average", #{const (2 ^ 3)}) , ("High", #{const (2 ^ 4)}) , ("Disaster", #{const (2 ^ 5)})
What should I do? -- 竹密岂妨流水过 山高哪阻野云飞
Sorry, please ignore this mail. I forgot the TH syntax. -- 竹密岂妨流水过 山高哪阻野云飞
participants (1)
-
Magicloud Magiclouds