[Haskell-cafe] Problem on using template haskell.

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Mon Oct 3 07:44:40 CEST 2011


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?
-- 
竹密岂妨流水过
山高哪阻野云飞



More information about the Haskell-Cafe mailing list