Info on some haskell packages.
Property
: Invariants that would be tested fuzzilyGen a
: Generator for random values of a
type Gen = GenT Identity
MonadGen
: Class of monads which can generate input data for testsSee:
Monad transformer: Think of it as a function taking a monad and returning another monad.
Parsec e inp res = ParsecT e inp Identity res
-- Parser res = Parsec Void Text res
type Parser = Parsec Void Text
Parser a
means a parser whose result after successful parsing is of type a
.
import Data.Void
-- +-- Input type
-- |
-- v
type Parser = Parsec Void Text
-- ^
-- |
-- Error component
Parsec
: non-transformer version of ParsecT
<|>
<*>
<$>
From https://markkarpov.com/tutorial/megaparsec.html:
data Operator m a
= InfixN (m (a -> a -> a)) -- ^ Non-associative infix
| InfixL (m (a -> a -> a)) -- ^ Left-associative infix
| InfixR (m (a -> a -> a)) -- ^ Right-associative infix
| Prefix (m (a -> a)) -- ^ Prefix
| Postfix (m (a -> a)) -- ^ Postfix
See: