1

I was taking a look at the megaparsec library and noticed that a class is defined as

class (Stream s, A.Alternative m, MonadPlus m)
=> MonadParsec e s m | m -> e s where

I know that I am creating a type class named MonadParsec, but what does | m -> e s mean exactly?

mtber75
  • 938
  • 1
  • 8
  • 15
  • In a nutshell: it means "`m` uniquely determines both `e` and `s`" (i.e., in this specific example, the parsing monad determines what the error type and the token stream type are). – duplode Feb 04 '18 at 15:12

0 Answers0