cleveland-0.2.0: Testing framework for Morley.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cleveland.Instances

Synopsis

Documentation

class HasErrorSrcPos a where Source #

Class of types with ErrorSrcPos allowing to remove it. Can be used in tests when we want to compare only values without source positions.

Methods

withoutEsp :: a -> a Source #

Instances

Instances details
HasErrorSrcPos Value Source # 
Instance details

Defined in Test.Cleveland.Instances

Methods

withoutEsp :: Value -> Value Source #

HasErrorSrcPos ExpandedInstr Source # 
Instance details

Defined in Test.Cleveland.Instances

Methods

withoutEsp :: ExpandedInstr -> ExpandedInstr Source #

HasErrorSrcPos ExpandedOp Source # 
Instance details

Defined in Test.Cleveland.Instances

Methods

withoutEsp :: ExpandedOp -> ExpandedOp Source #

Orphan instances

IsString MText Source # 
Instance details

Methods

fromString :: String -> MText #

IsString Alias Source # 
Instance details

Methods

fromString :: String -> Alias #

Num Mutez Source # 
Instance details

Methods

(+) :: Mutez -> Mutez -> Mutez #

(-) :: Mutez -> Mutez -> Mutez #

(*) :: Mutez -> Mutez -> Mutez #

negate :: Mutez -> Mutez #

abs :: Mutez -> Mutez #

signum :: Mutez -> Mutez #

fromInteger :: Integer -> Mutez #

Integral Mutez Source # 
Instance details

Methods

quot :: Mutez -> Mutez -> Mutez #

rem :: Mutez -> Mutez -> Mutez #

div :: Mutez -> Mutez -> Mutez #

mod :: Mutez -> Mutez -> Mutez #

quotRem :: Mutez -> Mutez -> (Mutez, Mutez) #

divMod :: Mutez -> Mutez -> (Mutez, Mutez) #

toInteger :: Mutez -> Integer #

Real Mutez Source # 
Instance details

Methods

toRational :: Mutez -> Rational #

Buildable ByteString Source # 
Instance details

Methods

build :: ByteString -> Builder #

Buildable FailureReason Source # 
Instance details

Buildable LByteString Source # 
Instance details

Methods

build :: LByteString -> Builder #

Buildable () Source # 
Instance details

Methods

build :: () -> Builder #

IsString (Annotation tag) Source # 
Instance details

Methods

fromString :: String -> Annotation tag #

Ord k => Monoid (BigMap k v) Source #

This instance is declared in this test module because it's not lawful, i.e. it breaks the right and left-identity laws:

x = BigMap (Just 1) mempty :: BigMap Int Int
bmId (x <> mempty) == bmId x
False
bmId (mempty <> x) == bmId x
False
Instance details

Methods

mempty :: BigMap k v #

mappend :: BigMap k v -> BigMap k v -> BigMap k v #

mconcat :: [BigMap k v] -> BigMap k v #

(Buildable a, Buildable b) => Buildable (Either a b) Source # 
Instance details

Methods

build :: Either a b -> Builder #

(Buildable a, Buildable b) => Buildable (a, b) Source # 
Instance details

Methods

build :: (a, b) -> Builder #

(Eq k, Eq v) => Eq (BigMap k v) Source #

This instance is declared in this test module because it's not lawful, i.e. it breaks the substitutivity law.

This laws says that x == y implies f x == f y, however:

x = BigMap (Just 1) mempty :: BigMap Int Int
y = BigMap (Just 2) mempty :: BigMap Int Int
x == y
True
bmId x == bmId y
False
Instance details

Methods

(==) :: BigMap k v -> BigMap k v -> Bool #

(/=) :: BigMap k v -> BigMap k v -> Bool #

(Buildable a, Buildable b, Buildable c) => Buildable (a, b, c) Source # 
Instance details

Methods

build :: (a, b, c) -> Builder #

(Buildable a, Buildable b, Buildable c, Buildable d) => Buildable (a, b, c, d) Source # 
Instance details

Methods

build :: (a, b, c, d) -> Builder #

(Buildable a, Buildable b, Buildable c, Buildable d, Buildable e) => Buildable (a, b, c, d, e) Source # 
Instance details

Methods

build :: (a, b, c, d, e) -> Builder #

(Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f) => Buildable (a, b, c, d, e, f) Source # 
Instance details

Methods

build :: (a, b, c, d, e, f) -> Builder #

(Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f, Buildable g) => Buildable (a, b, c, d, e, f, g) Source # 
Instance details

Methods

build :: (a, b, c, d, e, f, g) -> Builder #

(Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f, Buildable g, Buildable h) => Buildable (a, b, c, d, e, f, g, h) Source # 
Instance details

Methods

build :: (a, b, c, d, e, f, g, h) -> Builder #