fugue-0.1: A recapitulated prelude with minimal dependencies and profligate exports.

Safe HaskellSafe-Inferred

Fugue

Synopsis

Documentation

module Prelude

module Data.Maybe

class IsString a where

Class for string-like datastructures; used by the overloaded string extension (-foverloaded-strings in GHC).

Methods

fromString :: String -> a

Instances

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c

(*) `on` f = \x y -> f x * f y.

Typical usage: sortBy (compare `on` fst).

Algebraic properties:

  • (*) `on` id = (*) (if (*) ∉ {⊥, const ⊥})
  • ((*) `on` f) `on` g = (*) `on` (f . g)
  • flip on f . flip on g = flip on (g . f)