@hackage yap0.3.0

yet another prelude - a simplistic refactoring with algebraic classes

A simple refactoring of the Prelude numeric classes, aiming to escape from the restrictive bundling of operations in the standard numeric classes, while preserving backward compatibility for clients. This is done by adding algebraic classes as superclasses of the Haskell 2010 numeric classes, yielding the following class hierarchy (grey classes are unchanged):

Prelude.YAP is an almost-compatible replacement for the standard Haskell Prelude, as long as you're not defining instances of the numeric classes (though defaulting will be affected). When importing it, use

{-# LANGUAGE RebindableSyntax #-}

This will turn off the implicit Prelude import and attach various syntax to the new definitions.

Data.YAP.Algebra contains just the new classes; you'll need to import it if you want access to the new names, including to define instances.

Other modules contain instances for the existing types Complex and Ratio. Further examples are in the yap-examples package.