Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines an efficient value representation as well as parsing and comparison functions. This is because the standard Futhark parser is not able to cope with large values (like arrays that are tens of megabytes in size). The representation defined here does not support tuples, so don't use those as input/output for your test programs.
Synopsis
- data Value
- valueType :: Value -> String
- readValues :: ByteString -> Maybe [Value]
- compareValues :: [Value] -> [Value] -> Maybe [Mismatch]
- data Mismatch
- explainMismatch :: (Show i, Pretty a) => i -> String -> a -> a -> String
Documentation
An efficiently represented Futhark value. Use pretty
to get a
human-readable representation, and the instances of Get
and Put
to obtain binary representations
valueType :: Value -> String Source #
A textual description of the type of a value. Follows Futhark type notation, and contains the exact dimension sizes if an array.
Reading Values
readValues :: ByteString -> Maybe [Value] Source #
Parse Futhark values from the given bytestring.
Comparing Values
compareValues :: [Value] -> [Value] -> Maybe [Mismatch] Source #
Compare two sets of Futhark values for equality. Shapes and types must also match.
Two values differ in some way.