cleveland-0.4.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 ContractAlias Source # 
Instance details

IsString ImplicitAlias Source # 
Instance details

Num Mutez Source # 
Instance details

Integral Mutez Source # 
Instance details

Real Mutez Source # 
Instance details

Methods

toRational :: Mutez -> Rational #

Default EpName Source # 
Instance details

Methods

def :: EpName #

Buildable ByteString Source # 
Instance details

Methods

build :: ByteString -> Doc

buildList :: [ByteString] -> Doc

Buildable FailureReason Source # 
Instance details

Methods

build :: FailureReason -> Doc

buildList :: [FailureReason] -> Doc

Buildable LByteString Source # 
Instance details

Methods

build :: LByteString -> Doc

buildList :: [LByteString] -> Doc

NiceEntrypointName sym => IsLabel sym EpName Source # 
Instance details

Methods

fromLabel :: EpName #

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 #

(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 #