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

Howl

Description

The main API for Howl.

This module provides routines for:

  • running and evaluating expressions,
  • defining builtin rules from Haskell functions,
  • parsing and pretty-printing expressions,
  • working with Exprs.

For additional expression patterns and lower-level expression utilities, see Howl.Expr.

Synopsis

Running Howl Programs

data Eval a #

The monad in which Howl evaluation runs.

An Eval computation has access to the current evaluation context, including symbol definitions, attributes, line-number state, and output/error handlers.

Instances

Instances details
MonadIO Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

liftIO :: IO a -> Eval a #

MonadCatch Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

catch :: (HasCallStack, Exception e) => Eval a -> (e -> Eval a) -> Eval a #

MonadMask Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

mask :: HasCallStack => ((forall a. Eval a -> Eval a) -> Eval b) -> Eval b #

uninterruptibleMask :: HasCallStack => ((forall a. Eval a -> Eval a) -> Eval b) -> Eval b #

generalBracket :: HasCallStack => Eval a -> (a -> ExitCase b -> Eval c) -> (a -> Eval b) -> Eval (b, c) #

MonadThrow Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

throwM :: (HasCallStack, Exception e) => e -> Eval a #

Applicative Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

pure :: a -> Eval a #

(<*>) :: Eval (a -> b) -> Eval a -> Eval b #

liftA2 :: (a -> b -> c) -> Eval a -> Eval b -> Eval c #

(*>) :: Eval a -> Eval b -> Eval b #

(<*) :: Eval a -> Eval b -> Eval a #

Functor Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

fmap :: (a -> b) -> Eval a -> Eval b #

(<$) :: a -> Eval b -> Eval a #

Monad Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

(>>=) :: Eval a -> (a -> Eval b) -> Eval b #

(>>) :: Eval a -> Eval b -> Eval b #

return :: a -> Eval a #

MonadFail Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

fail :: String -> Eval a #

MonadReader Context Eval # 
Instance details

Defined in Howl.Eval.Context

Methods

ask :: Eval Context #

local :: (Context -> Context) -> Eval a -> Eval a #

reader :: (Context -> a) -> Eval a #

ToExpr a => ToBuiltin (Eval (Maybe a)) #

A monadic builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Eval (Maybe a) -> Seq Expr -> Eval (Maybe Expr) #

ToExpr a => ToBuiltin (Eval a) #

A monadic builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Eval a -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Eval (Maybe b))) #

A variadic monadic builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Eval (Maybe b)) -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Eval b)) #

A variadic monadic builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Eval b) -> Seq Expr -> Eval (Maybe Expr) #

runEval :: Eval a -> IO a #

Create a new context, initialize it with the standard builtins using addBuiltins, and run the Eval computation in that context.

eval :: Expr -> Eval Expr #

Evaluate an expression using the current context.

Defining Builtins From Haskell

class ToBuiltin f #

Given a function type f, turn it into an operation on a Seq Expr, interpreted as the arguments to a symbolic function.

We provide instances for return types that can reasonably be turned into rules, where the final result type is any instance of ToExpr.

Minimal complete definition

toBuiltin

Instances

Instances details
ToExpr a => ToBuiltin a #

A pure builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: a -> Seq Expr -> Eval (Maybe Expr) #

ToExpr a => ToBuiltin (Eval (Maybe a)) #

A monadic builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Eval (Maybe a) -> Seq Expr -> Eval (Maybe Expr) #

ToExpr a => ToBuiltin (Eval a) #

A monadic builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Eval a -> Seq Expr -> Eval (Maybe Expr) #

ToExpr a => ToBuiltin (Maybe a) #

A pure builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Maybe a -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Eval (Maybe b))) #

A variadic monadic builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Eval (Maybe b)) -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Eval b)) #

A variadic monadic builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Eval b) -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Maybe b)) #

A variadic pure builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Maybe b) -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a b) #

A variadic pure builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a b -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToBuiltin f) => ToBuiltin (a -> f) #

Provide instances for functions of the form a -> b -> ... -> r, where r is one of the return types above and a, b, ... are instances of FromExpr.

Together, these instances allow us to "lift" most reasonable Haskell functions to functions that can be used inside rules. Here are some example types that have instances for ToBuiltin:

  • Integer -> Double -> Text -> Bool
  • Symbol -> Maybe Double
  • Expr -> Integer -> Eval (Maybe Numeric)
Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: (a -> f) -> Seq Expr -> Eval (Maybe Expr) #

newtype Variadic a b #

Mark a function as variadic, i.e. as taking a Seq a of arbitrary length as its argument list.

Constructors

MkVariadic (Seq a -> b) 

Instances

Instances details
(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Eval (Maybe b))) #

A variadic monadic builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Eval (Maybe b)) -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Eval b)) #

A variadic monadic builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Eval b) -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a (Maybe b)) #

A variadic pure builtin that may fail to match its arguments, signified by Nothing.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a (Maybe b) -> Seq Expr -> Eval (Maybe Expr) #

(FromExpr a, ToExpr b) => ToBuiltin (Variadic a b) #

A variadic pure builtin that always matches its arguments.

Instance details

Defined in Howl.Builtins.ToBuiltin

Methods

toBuiltin :: Variadic a b -> Seq Expr -> Eval (Maybe Expr) #

def :: ToBuiltin f => Symbol -> f -> Eval () #

Define a builtin rule by converting a Haskell function into a Howl definition using ToBuiltin.

Parsing and Printing

run :: Text -> Eval Expr #

Parse and evaluate an expression from Text.

run_ :: Text -> Eval () #

Parse and evaluate an expression from Text, discarding the result.

get :: FilePath -> Eval Expr #

Read, parse, and evaluate an expression from a file. The expression may be a compound expression, e.g. a sequence of semicolon-separated subexpressions.

get_ :: FilePath -> Eval () #

Read, parse, and evaluate an expression from a file, discarding the result.

parseExprText :: Text -> Either String Expr #

Parse an expression from Text.

readExprFile :: MonadIO m => FilePath -> m (Either String Expr) #

Read and parse an expression from a file.

class PPrint a where #

A class for converting values to a human-readable String.

Methods

pPrint :: a -> String #

Instances

Instances details
PPrint Rule # 
Instance details

Defined in Howl.Eval.Context

Methods

pPrint :: Rule -> String #

PPrint Expr # 
Instance details

Defined in Howl.Expr.PPrint

Methods

pPrint :: Expr -> String #

PPrint Literal # 
Instance details

Defined in Howl.Expr.Internal

Methods

pPrint :: Literal -> String #

PPrint Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Methods

pPrint :: Numeric -> String #

PPrint Pat # 
Instance details

Defined in Howl.Pat

Methods

pPrint :: Pat -> String #

PPrint Symbol # 
Instance details

Defined in Howl.Symbol.Simple

Methods

pPrint :: Symbol -> String #

PPrint Symbol # 
Instance details

Defined in Howl.Symbol.Symbolize

Methods

pPrint :: Symbol -> String #

Core Expression Types

data Expr #

A Wolfram Language expression.

Constructors

ExprLit !Literal

A literal value such as a number or string.

ExprSymbol !Symbol

A symbol expression such as x, Plus, or List.

ExprApp !Expr !(Seq Expr)

An application of a head expression to a sequence of arguments.

For example:

  • Plus[1, x]
  • f[a, b, c]
  • g[x][y, z]

Instances

Instances details
IsString Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromString :: String -> Expr #

Show Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

Eq Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

(==) :: Expr -> Expr -> Bool #

(/=) :: Expr -> Expr -> Bool #

Ord Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

compare :: Expr -> Expr -> Ordering #

(<) :: Expr -> Expr -> Bool #

(<=) :: Expr -> Expr -> Bool #

(>) :: Expr -> Expr -> Bool #

(>=) :: Expr -> Expr -> Bool #

max :: Expr -> Expr -> Expr #

min :: Expr -> Expr -> Expr #

FromExpr Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Expr #

ToExpr Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Expr -> Expr #

PPrint Expr # 
Instance details

Defined in Howl.Expr.PPrint

Methods

pPrint :: Expr -> String #

data Symbol #

A string-like type with O(1) equality and comparison.

A Symbol represents a string (any Textual, so String, Text, ShortText, ByteString, ShortByteString, etc.)

Just like ShortText, ShortByteString and ByteArray, a Symbol has an optimized memory representation, directly wrapping a primitive ByteArray#.

Furthermore, a global symbol table keeps track of which values currently exist, ensuring we always deduplicate symbols. This therefore allows us to: - Check for equality between symbols in constant-time (using pointer equality) - Calculate the hash in constant-time (using StableName) - Keep the memory footprint of repeatedly-seen strings low.

This is very useful if you're frequently comparing strings and the same strings might come up many times. It also makes Symbol a great candidate for a key in e.g. a HashMap or HashSet.

The global symbol table is implemented using weak pointers, which means that unused symbols will be garbage collected. As such, you do not need to be concerned about memory leaks (as is the case with many other symbol table implementations).

Symbols are considered 'the same' regardless of whether they originate from a String, (lazy or strict, normal or short) Text, (lazy or strict, normal or short) ByteString etc.

Instances

Instances details
Binary Symbol

Uses the ShortByteString instance of Textual under the hood; invalid UTF-8 is replaced by the Unicode replacement character.

Since: symbolize-1.0.1.0

Instance details

Defined in Symbolize

Methods

put :: Symbol -> Put #

get :: Get Symbol #

putList :: [Symbol] -> Put #

NFData Symbol

The contents inside a Symbol are always guaranteed to be evaluated, so this only forces the outermost constructor using seq.

Instance details

Defined in Symbolize

Methods

rnf :: Symbol -> () #

Data Symbol

This Data instance follows the same implementation as the one for Text and ShortText: It pretends Symbol is a a collection holding a `[Char]`.

Since: symbolize-1.0.1.0

Instance details

Defined in Symbolize

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Symbol -> c Symbol #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Symbol #

toConstr :: Symbol -> Constr #

dataTypeOf :: Symbol -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Symbol) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Symbol) #

gmapT :: (forall b. Data b => b -> b) -> Symbol -> Symbol #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Symbol -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Symbol -> r #

gmapQ :: (forall d. Data d => d -> u) -> Symbol -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Symbol -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Symbol -> m Symbol #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Symbol -> m Symbol #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Symbol -> m Symbol #

IsString Symbol 
Instance details

Defined in Symbolize

Methods

fromString :: String -> Symbol #

Read Symbol

To be a good citizen w.r.t both Show and IsString, reading is supported two ways:

>>> read @Symbol "Symbolize.intern \"Haskell\""
Symbolize.intern "Haskell"
>>> read @Symbol "\"Curry\""
Symbolize.intern "Curry"
Instance details

Defined in Symbolize

Show Symbol 
Instance details

Defined in Symbolize

Eq Symbol

Equality checking takes only O(1) time, and is a simple pointer-equality check.

Instance details

Defined in Symbolize

Methods

(==) :: Symbol -> Symbol -> Bool #

(/=) :: Symbol -> Symbol -> Bool #

Ord Symbol

Symbols are ordered by their lexicographical UTF-8 representation.

Therefore, comparison takes O(n) time.

Instance details

Defined in Symbolize

Hashable Symbol

Hashing a Symbol is very fast:

hash takes O(1) and results in zero collisions, as StableNames are used.

hashWithSalt takes O(1) time; just as long as hashWithSalt-ing any other Int.

Instance details

Defined in Symbolize

Methods

hashWithSalt :: Int -> Symbol -> Int #

hash :: Symbol -> Int #

FromExpr Symbol # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Symbol #

ToExpr Symbol # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Symbol -> Expr #

PPrint Symbol # 
Instance details

Defined in Howl.Symbol.Symbolize

Methods

pPrint :: Symbol -> String #

data Literal #

A literal value.

Constructors

LitNumeric !Numeric

A numeric literal.

LitString !Text

A string literal.

Instances

Instances details
Show Literal # 
Instance details

Defined in Howl.Expr.Internal

Eq Literal # 
Instance details

Defined in Howl.Expr.Internal

Methods

(==) :: Literal -> Literal -> Bool #

(/=) :: Literal -> Literal -> Bool #

Ord Literal # 
Instance details

Defined in Howl.Expr.Internal

PPrint Literal # 
Instance details

Defined in Howl.Expr.Internal

Methods

pPrint :: Literal -> String #

data Numeric #

A numeric value.

Constructors

NInteger !Integer

An integer.

NRational !Rational

A rational number.

NDouble !Double

A double-precision floating-point number.

NBigFloat !BigFloat

An MPFR floating-point number with dynamic precision.

Instances

Instances details
Enum Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Num Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Fractional Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Real Numeric # 
Instance details

Defined in Howl.Expr.Numeric

RealFrac Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Methods

properFraction :: Integral b => Numeric -> (b, Numeric) #

truncate :: Integral b => Numeric -> b #

round :: Integral b => Numeric -> b #

ceiling :: Integral b => Numeric -> b #

floor :: Integral b => Numeric -> b #

Show Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Eq Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Methods

(==) :: Numeric -> Numeric -> Bool #

(/=) :: Numeric -> Numeric -> Bool #

Ord Numeric # 
Instance details

Defined in Howl.Expr.Numeric

FromExpr Numeric # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Numeric #

ToExpr Numeric # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Numeric -> Expr #

PPrint Numeric # 
Instance details

Defined in Howl.Expr.Numeric

Methods

pPrint :: Numeric -> String #

type BigFloat = Rounded #

An arbitrary-precision floating-point number implemented using MPFR.

class FromExpr a where #

A class for types that can potentially be matched to expressions.

Methods

fromExpr :: Expr -> Maybe a #

Instances

Instances details
FromExpr Rational # 
Instance details

Defined in Howl.Expr.Internal

FromExpr LHS # 
Instance details

Defined in Howl.Builtins.Context

Methods

fromExpr :: Expr -> Maybe LHS #

FromExpr Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Expr #

FromExpr BigFloat # 
Instance details

Defined in Howl.Expr.Internal

FromExpr Numeric # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Numeric #

FromExpr Symbol # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Symbol #

FromExpr Text # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Text #

FromExpr Integer # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Integer #

FromExpr () # 
Instance details

Defined in Howl.Expr.Syntax

Methods

fromExpr :: Expr -> Maybe () #

FromExpr Bool # 
Instance details

Defined in Howl.Expr.Syntax

Methods

fromExpr :: Expr -> Maybe Bool #

FromExpr Double # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Double #

FromExpr Int # 
Instance details

Defined in Howl.Expr.Internal

Methods

fromExpr :: Expr -> Maybe Int #

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

Defined in Howl.Builtins.Types

Methods

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

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

Defined in Howl.Builtins.Types

Methods

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

FromExpr a => FromExpr [a] # 
Instance details

Defined in Howl.Expr.Syntax

Methods

fromExpr :: Expr -> Maybe [a] #

(FromExpr a, FromExpr b) => FromExpr (a, b) # 
Instance details

Defined in Howl.Expr.Syntax

Methods

fromExpr :: Expr -> Maybe (a, b) #

(FromExpr a, FromExpr b, FromExpr c) => FromExpr (a, b, c) # 
Instance details

Defined in Howl.Expr.Syntax

Methods

fromExpr :: Expr -> Maybe (a, b, c) #

(FromExpr a, FromExpr b, FromExpr c, FromExpr d) => FromExpr (a, b, c, d) # 
Instance details

Defined in Howl.Expr.Syntax

Methods

fromExpr :: Expr -> Maybe (a, b, c, d) #

class ToExpr a where #

A class for types that can be converted to expressions.

Methods

toExpr :: a -> Expr #

Instances

Instances details
ToExpr Rational #

Convert a Rational into an Expr, representing it as an ExprInteger if it is an integer.

Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Rational -> Expr #

ToExpr Expr # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Expr -> Expr #

ToExpr BigFloat # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: BigFloat -> Expr #

ToExpr Numeric # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Numeric -> Expr #

ToExpr Symbol # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Symbol -> Expr #

ToExpr Text # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Text -> Expr #

ToExpr Integer # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Integer -> Expr #

ToExpr () # 
Instance details

Defined in Howl.Expr.Syntax

Methods

toExpr :: () -> Expr #

ToExpr Bool # 
Instance details

Defined in Howl.Expr.Syntax

Methods

toExpr :: Bool -> Expr #

ToExpr Double # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Double -> Expr #

ToExpr Int # 
Instance details

Defined in Howl.Expr.Internal

Methods

toExpr :: Int -> Expr #

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

Defined in Howl.Builtins.Types

Methods

toExpr :: AList a -> Expr #

ToExpr a => ToExpr [a] # 
Instance details

Defined in Howl.Expr.Syntax

Methods

toExpr :: [a] -> Expr #

(ToExpr a, ToExpr b) => ToExpr (a, b) # 
Instance details

Defined in Howl.Expr.Syntax

Methods

toExpr :: (a, b) -> Expr #

(ToExpr a, ToExpr b, ToExpr c) => ToExpr (a, b, c) # 
Instance details

Defined in Howl.Expr.Syntax

Methods

toExpr :: (a, b, c) -> Expr #

(ToExpr a, ToExpr b, ToExpr c, ToExpr d) => ToExpr (a, b, c, d) # 
Instance details

Defined in Howl.Expr.Syntax

Methods

toExpr :: (a, b, c, d) -> Expr #

Common Expression Patterns

pattern List :: Expr #

pattern Plus :: Expr #

pattern Times :: Expr #

pattern Power :: Expr #

pattern Rule :: Expr #

pattern RuleDelayed :: Expr #

pattern Null :: Expr #

pattern (:@) :: Expr -> Seq Expr -> Expr infixl 9 #

An infix version of ExprApp.

f :@ args is equivalent to ExprApp f args.