bricks-0.0.0.2: Bricks is a lazy functional language based on Nix.

Safe HaskellNone
LanguageHaskell2010

Bricks.Expression.Construction

Description

Functions for constructing Expressions that match the Show implementations.

This module is only designed for testing and REPL use. It isn't re-exported into the main Bricks API because it's a bit messy:

  • It introduces some superfluous typeclasses for the sake of brevity.
  • There are a lot of terse function names here that would clash with other things easily.
  • Some functions are partial, such as those that require strings that can be rendered unquoted.
  • It uses string overloading in a way that the regular API probably shouldn't.
  • The functions are oriented toward constructing Expressions, skipping over the intermediary types they're composed of, which is convenient but may make them insufficient for some use cases.

Synopsis

Documentation

class Binding a b | b -> a where Source #

Minimal complete definition

binding

Methods

binding :: a -> Expression -> b Source #

inherit :: IsInherit a => [Text] -> a Source #

newtype Str'1' Source #

A newtype for Str'1 just so we can give it the IsString instance which would be dubiously appropriate for the actual Str'1 type.

Constructors

Str'1' 

Fields

Instances

class IsParam a where Source #

Minimal complete definition

param

Methods

param :: Text -> a Source #

mergeParams :: Param -> Param -> Param Source #

Combine two params, merging dict patterns with mergeDictPatterns and preferring the right-hand-side when names conflict.

mergeDictPatterns :: DictPattern -> DictPattern -> DictPattern Source #

Combine two dict patterns, taking the concatenation of the item list, and the Boolean or of the ellipsis flag.