Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Futhark.Test.Values
Contents
Description
This module provides an efficient value representation as well as parsing and comparison functions.
Synopsis
- module Futhark.Data
- module Futhark.Data.Compare
- module Futhark.Data.Reader
- data Compound v
- = ValueRecord (Map Text (Compound v))
- | ValueTuple [Compound v]
- | ValueAtom v
- type CompoundValue = Compound Value
- mkCompound :: [Compound v] -> Compound v
- unCompound :: Compound v -> [Compound v]
Documentation
module Futhark.Data
module Futhark.Data.Compare
module Futhark.Data.Reader
The structure of a compound value, parameterised over the actual
values. For most cases you probably want CompoundValue
.
Constructors
ValueRecord (Map Text (Compound v)) | |
ValueTuple [Compound v] | Must not be single value. |
ValueAtom v |
Instances
type CompoundValue = Compound Value Source #
Like a Value
, but also grouped in compound ways that are not
supported by raw values. You cannot parse or read these in
standard ways, and they cannot be elements of arrays.
mkCompound :: [Compound v] -> Compound v Source #
Create a tuple for a non-unit list, and otherwise a ValueAtom
unCompound :: Compound v -> [Compound v] Source #
If the value is a tuple, extract the components, otherwise return a singleton list of the value.