我试图在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)
有什么建议吗?
答案 0 :(得分:0)
(<>)
运算符和其他常见运算符位于Data.Monoid
中,只有
import Data.Monoid