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

Safe HaskellSafe
LanguageHaskell98

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 (a1, (a2, (…, ())) → b to its curried form a1a2 → … → b.

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

Multiple uncurry: map a function a1a2 → … → b to its uncurried form (a1, (a2, (…, ())) → 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 #