howl-0.1.0.0: A small Wolfram Language interpreter and symbolic rewriting library
Safe HaskellNone
LanguageGHC2021

Howl.Builtins.Types

Description

Small helper types shared by builtin definitions.

Synopsis

Documentation

newtype ListOrSolo a #

A datatype that matches a single expression e or a list of expressions {e1,...,en}, such that the expressions can all be mapped to the type a.

Constructors

MkListOrSolo (Seq a) 

Instances

Instances details
FromExpr a => FromExpr (ListOrSolo a) # 
Instance details

Defined in Howl.Builtins.Types

Methods

fromExpr :: Expr -> Maybe (ListOrSolo a) #

newtype AList a #

A list-valued expression whose elements all decode to a.

Constructors

MkList 

Fields

Instances

Instances details
FromExpr a => FromExpr (AList a) # 
Instance details

Defined in Howl.Builtins.Types

Methods

fromExpr :: Expr -> Maybe (AList a) #

ToExpr a => ToExpr (AList a) # 
Instance details

Defined in Howl.Builtins.Types

Methods

toExpr :: AList a -> Expr #