The specification of a class in Haskell often starts with stating, in text, the laws that should be satisfied by methods defined in instances of the class, followed by the type of the methods of the class. The ClassLaws library is a framework that supports testing such class laws using QuickCheck. Our framework is a light-weight class law testing framework, which requires a limited amount of work per class law, and per datatype for which the class law is tested. We also show how to test class laws with partially-defined values. Using partially-defined values, we show that the standard lazy and strict implementations of the state monad do not satisfy the expected laws. More information can be found at http://wiki.portal.chalmers.se/cse/pmwiki.php/FP/ClassLaws. Built with ghc-7.4.2 and ghc-7.6.1. (Fails to build with ghc-7.2.2 due to http://hackage.haskell.org/trac/ghc/ticket/5745. Could be worked around.)
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.
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
Focuses on using common typeclasses when possible, and creating new ones to avoid name clashing. Exposes many recommended datastructures (Map, ByteString, etc) directly without requiring long import lists and qualified modules.
conduit instances for classy-prelude
This is an extension of classy-prelude-conduit, adding in commonly used functions and data types from Yesod.
Algebraic classes are type classes where all the methods return a value of the same type, which is also the class parameter. Examples from base are Num and Monoid.
F-algebras are functions f a -> a, where the functor f is called the signature, and the type a the carrier.
This package relates these 2 concepts, and can create conversions between the two using Template Haskell. More specifically, it can generate:
* signatures from algebraic classes
* instances of algebraic classes from F-algebras.
This is useful because type classes are more commonly used in Haskell than F-algebras, but F-algebras are easier to work with, because they are just functions.
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.
This module is for unsupervised, supervised, and semi-supervised classification tasks. It is in desperate need of documentation and refactoring.
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.
Show more results