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

Safe HaskellSafe-Inferred

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 -> IntegerSource

A version of the ceiling function that returns an Integer.

The Curry type class

class Curry fun args res | args res -> fun whereSource

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, ())))).

Methods

mcurry :: (args -> res) -> funSource

Multiple curry: map a function (a1, (a2, (…, ())) → b to its curried form a1a2 → … → b.

muncurry :: fun -> args -> resSource

Multiple uncurry: map a function a1a2 → … → b to its uncurried form (a1, (a2, (…, ())) → b.

Instances

Curry b () b 
Curry fun args res => Curry (a -> fun) (a, args) res