A class declaration introduces a new type class and the overloaded operations that must be supported by any type that is an instance of that class.
> class Num a where
> (+) :: a -> a -> a
> negate :: a -> a
ClassyPrelude is a Prelude for people who know Haskell well. It re-exports some commonly imported modules, replaces Prelude functions with their type-class equivalents where reasonable, and removes some Prelude functions that in my opinion don't belong there. These modules are likely to be incomplete. Suggestions are greatly appreciated.
In theory, this allows the design of more data-agnostic APIs.
Allow users of your library to choose which data structure they want to use rather than constraining them to whatever you chose at the time.
This package implements a library of first class patterns. The initial basis for this library was Morten Rhiger's "Type-safe pattern combinators"; the patterns can be used in an almost identical way to those of Morten Rhiger. In a series of blog posts at http://reinerp.wordpress.com/category/pattern-combinators/ the types of patterns were made more revealing using type families, and a simpler implementation was used which avoids some book-keeping.
The library reimplements most of Haskell's built-in pattern matching facilities, plus some more. The pattern matches of this library are lightweight: when GHC's optimisation is turned on, all overhead should be optimised away, leaving a standard Haskell pattern match.
If you're just reading the documentation for this library for the first time, start with Data.Pattern.
Haskeline provides all of its functionality within the scope of a monad transformer. This module adds two pieces to this:
* Introduced here is a type-class which defines the operations supported by the Haskeline monad transformer - MonadHaskeline
* A newtype wrapper around Haskeline's InputT, called HaskelineT. Sadly, InputT defines ints own instance of the mtl MonadState, which is no good for folks wanting to use InputT in an existing monad transformer stack.
HaskelineT also has an instance of MonadState, but it merely lifts the functions further in the transformer stack.
Large portions of the Haskeline functionality are re-exported here for convinience.
Note on build-dependencies: If you've succesfully built this with any packages other than the ones noted, please let me know.
Provides an interface for classifiers and functions to use and analyze them. Take one or more hinduce-classifier-* packages for actual classifier implementations.
A very simple decision tree construction algorithm; an implementation of hinduce-classifier's Classifier class.
Parses compiled Java .class files into the syntax tree of the language-java package
Package to support Propositional and First Order Logic. It includes classes representing the different types of formulas and terms, some instances of those classes for types used in other logic libraries, and implementations of several logic algorithms, including conversion to normal form and a simple resolution-based theorem prover for any instance of FirstOrderFormula.
Pretty printing class similar to Show, based on the HughesPJ pretty printing library. Provides the pretty printing class and instances for the Prelude types.
String class library
Classes, and Template Haskell code to generate instances, for the Scrap Your Boilerplate With Class system.
Provides SYB-with-class instances for Text from the text package.
This library provides the class:
class ToString s where toString :: s -> String
Instances for String, Char and ShowS are provided. For other instances see the package:
Also included is a general coercion function between string-like types:
fromToString :: (IsString s2, ToString s1) => s1 -> s2
fromToString = fromString . toString
A simple game where you need to type the letters scrolling down the screen before they reach the bottom. Using SDL and SDL_ttf.