The reflection package

This package addresses the /configuration problem/ which is
propogating configurations that are available at run-time, allowing
multible configurations to coexist without resorting to mutable
global variables or 'System.IO.Unsafe.unsafePerformIO'.

An example is modular arithmetic where the modulus itself can be
supplied at run-time:

That package is an implementation of the ideas presented in the
paper \"Functional Pearl: Implicit Configurations\" by Oleg Kiselyov
and Chung-chieh Shan (<http://okmij.org/ftp/Haskell/tr-15-04.pdf original paper>). However, the API has been streamlined to improve
performance.

Austin Seipp's tutorial <https://www.fpcomplete.com/user/thoughtpolice/using-reflection Reflecting values to types and back> provides a summary of the
approach taken by this library, along with more motivating
examples.