变量不在范围内 - cabal构建错误

时间:2018-02-09 21:55:40

标签: haskell cabal

我试图在opensuse风滚草上使用cabal编译hemotik(https://github.com/nh2/hemokit)并得到以下错误:

Variable not in scope: (<>)

在程序代码的不同部分,例如:

-- | Command line parser for EEG selection. See `EmotivArgs`.
emotivArgsParser :: Parser EmotivArgs
emotivArgsParser = EmotivArgs
  <$> option (eitherReader parseModel)
      ( long "model" <> metavar "MODEL"
        <> value Consumer
        <> help "Consumer or Developer model, Consumer by default" )
  <*> (optional . option (maybeReader makeSerialNumberFromString "Serial number of has invalid format"))
      ( long "serial" <> metavar "SERIALNUMBER"
        <> help "The serial to use. If no --from-file is given, this will select the device" )
  <*> (optional . strOption)
      ( long "from-file" <> metavar "PATH"
        <> help "The file path to read from (e.g. /dev/hidraw0 or myfile.dump)" )
  where
    maybeReader :: (String -> Maybe a) -> String -> ReadM a
    maybeReader mbFn msg = eitherReader (maybe (fail msg) pure . mbFn)

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

(<>)运算符和其他常见运算符位于Data.Monoid中,只有

import Data.Monoid