easyrender-0.1.1.4: User-friendly creation of EPS, PostScript, and PDF files

Safe HaskellSafe
LanguageHaskell2010

Graphics.EasyRender.Auxiliary

Contents

Description

This module provides miscellaneous general-purpose auxiliary functions used by the Graphics.EasyRender package.

Synopsis

Arithmetic operations

int_ceiling :: RealFrac a => a -> Integer Source #

A version of the ceiling function that returns an Integer.

The Curry type class

class Curry fun args res | args res -> fun where Source #

The Curry type class is used to implement functions that have a variable number of arguments. It provides a family of type isomorphisms

fun  ≅  args -> res,

where

fun = a1 -> a2 -> ... -> an -> res,
args = (a1, (a2, (..., (an, ())))).

Minimal complete definition

mcurry, muncurry

Methods

mcurry :: (args -> res) -> fun Source #

Multiple curry: map a function (a₁, (a₂, (…, ())) → b to its curried form a₁ → a₂ → … → b.

muncurry :: fun -> args -> res Source #

Multiple uncurry: map a function a₁ → a₂ → … → b to its uncurried form (a₁, (a₂, (…, ())) → b.

Instances

Curry b () b Source # 

Methods

mcurry :: (() -> b) -> b Source #

muncurry :: b -> () -> b Source #

Curry fun args res => Curry (a -> fun) (a, args) res Source # 

Methods

mcurry :: ((a, args) -> res) -> a -> fun Source #

muncurry :: (a -> fun) -> (a, args) -> res Source #