Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Derive.Parse.Ky

Contents

Synopsis

Documentation

data Ky a Source #

A parsed .ky file

Constructors

Ky 

Fields

Instances

Instances details
Monoid (Ky a) Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

mempty :: Ky a #

mappend :: Ky a -> Ky a -> Ky a #

mconcat :: [Ky a] -> Ky a #

Semigroup (Ky a) Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

(<>) :: Ky a -> Ky a -> Ky a #

sconcat :: NonEmpty (Ky a) -> Ky a #

stimes :: Integral b => b -> Ky a -> Ky a #

Show a => Show (Ky a) Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

showsPrec :: Int -> Ky a -> ShowS #

show :: Ky a -> String #

showList :: [Ky a] -> ShowS #

data Loaded Source #

Record a loaded .ky file, with its path and content. A path of "" is used for the code directly in the UiConfig.

Constructors

Loaded !FilePath !Code 

Instances

Instances details
Show Loaded Source # 
Instance details

Defined in Derive.Parse.Ky

Eq Loaded Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

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

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

data Definitions Source #

This is a mirror of Library, but with expressions instead of calls. (generators, transformers)

type Definition = (FilePath, (Expr.Symbol, Expr)) Source #

(defining_file, (Symbol, Expr))

load_ky :: [FilePath] -> Code -> IO (Either ParseText.Error (Ky Loaded)) Source #

Parse ky text and load and parse all the files it imports. parse_ky describes the format of the ky file.

get_ky :: Ui.M m => m Code Source #

Get UiConfig.ky with UiConfig.allocations merged in. See Derive.Parse.Instruments.

types

newtype Expr Source #

These are parallel to the Expr.Expr types, except they add VarTerm. The duplication is unfortunate, but as long as this remains a simple AST it seems better than the various heavyweight techniques for parameterizing an AST.

Constructors

Expr (NonEmpty Call) 

Instances

Instances details
Show Expr Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

ShowVal.ShowVal Expr Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

show_val :: Expr -> Text Source #

data Call Source #

Constructors

Call !Expr.Symbol ![Term] 

Instances

Instances details
Show Call Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

showsPrec :: Int -> Call -> ShowS #

show :: Call -> String #

showList :: [Call] -> ShowS #

ShowVal.ShowVal Call Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

show_val :: Call -> Text Source #

data Term Source #

Instances

Instances details
Show Term Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

showsPrec :: Int -> Term -> ShowS #

show :: Term -> String #

showList :: [Term] -> ShowS #

ShowVal.ShowVal Term Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

show_val :: Term -> Text Source #

newtype Var Source #

A variable to be substituted via the Derive.Call.Macro mechanism.

Constructors

Var Text 

Instances

Instances details
Show Var Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

showsPrec :: Int -> Var -> ShowS #

show :: Var -> String #

showList :: [Var] -> ShowS #

ShowVal.ShowVal Var Source # 
Instance details

Defined in Derive.Parse.Ky

Methods

show_val :: Var -> Text Source #