eros- A text censorship library.

Copyright2014, Peter Harpending.
MaintainerPeter Harpending <>
Safe HaskellNone



If you want to make your own phraselist, you need to write a JSON file, in accordance with the schema. Once you do that, make a data type for your phraselist. Make your data type an instance of Phraselist, and you're good to go.

For example, let's say your phraselist is mylist.json, and it's all in accordance with the schema. Your code would look something like this:

data MyList = MyList

instance Phraselist MyList where
  phraselistPath MyList = getDataFileName "mylist.json"
  phraselistPath _      = undefined

Don't forget to add mylist.json to Data-Files in your .cabal file.

If you want to use one of the lists we already supply



readPhraselist :: Phraselist t => t -> IO PhraseForest Source

Read a Phraselist, marshal it into a PhraseForest.

readPhraseMap :: Phraselist t => t -> IO PhraseMap Source

Load a Phraselist directly into a PhraseMap

class Phraselist t Source

Minimal complete definition



type PhraselistSet = Phraselist t => [t] Source

A set of Phraselists. Note that this is actually a list, and I'm calling it a "set" for purely lexical purposes.

data ErosList Source

The phraselists in res/. Each of these constructors correspond to one of the files here.

Gitlab has a terrible interface, so I won't provide links to each one of them.


erosLists :: [ErosList] Source

A list of phraselists we provide.