ordinal-0.6.0.0: Convert numbers to words in different languages.
Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Numerals.Algorithm.Template

Description

The module is designed to construct an Exp based on the mapping data provided. It will check if the text object ends with the given suffix, and replace the suffix with another suffix. It aims to compile this into an efficient function.

Synopsis

Documentation

ordinizeFromDict Source #

Arguments

:: String

The name of the function, often this is just ordinize'

-> [(String, String)]

The list of suffixes and their corresponding mapping, the suffixes should be non-overlapping.

-> Name

The name of the post-processing function in case there was no match, one can for example use id.

-> [Dec]

The corresponding declaration.

Construct a function with the given name that maps suffixes in the first item of the 2-tuples to the second item of the 2-tuples. It turns this into a declaration.