HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleonnxruntime-0.1.0.0GHC2024

OnnxRuntime

ONNX Runtime from Haskell: an environment, sessions on models with their options, and runs on named tensors, each resource held by a bracket. Failures are thrown as OrtError.

Contents
  1. Environment
  2. Sessions
  3. Tensors
  4. Shapes
  5. Errors
  6. Leaks
Synopsis

Environment

newtypenewtype Environment

The runtime's process-wide state, which every session runs in.

Sessions

How far the runtime rewrites a graph before running it.

Instances5Bounded, Enum, Eq, Ord, Show
datadata Session

An open model with what it declares. It is valid only inside the action it was opened for.

Tensors

datadata Tensor a

Elements in row-major order with the shape they fill exactly.

Instances2Eq, Show
classclass (Storable a, Typeable a, Eq a, Show a) => Element a where

A Haskell type the runtime stores with the same layout.

Instances10Element, …
  • Element Int16Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element Int32Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element Int64Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element Int8Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element DoubleDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element FloatDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element Word16Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element Word32Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element Word64Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element
  • Element Word8Defined in onnxruntime-0.1.0.0 · OnnxRuntime.Element

Shapes

newtypenewtype Shape

A tensor's dimensions, outermost first; the empty shape is a scalar.

Constructors

Instances3Eq, Ord, Show
  • Eq ShapeDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Shape
  • Ord ShapeDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Shape
  • Show ShapeDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Shape
valuestrides :: Shape -> [Int]

Row-major strides: how far apart neighbours along each dimension lie.

datadata Dim

A dimension a model declares: a fixed size, or one left free under a symbolic name (empty when unnamed).

Constructors

Instances2Eq, Show
  • Eq DimDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Shape
  • Show DimDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Shape
valueaccepts :: [Dim] -> Shape -> Bool

Whether declared dimensions take a shape: the same rank, and every fixed dimension equal.

Errors

datadata OrtError
#

Constructors

Instances3Eq, Show, Exception
  • Eq OrtErrorDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Error
  • Show OrtErrorDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Error
  • Exception OrtErrorDefined in onnxruntime-0.1.0.0 · OnnxRuntime.Error

Leaks