This library contains:
- A small specialized subset of the singletons library as it pertains to
Symbol, for when you need some simple functionality without wanting to invoke the entire singletons library.
- Operations for manipulating these singletons and
KnownSymbolinstances, such as addition and multiplication of singletons/
- Operations for the comparison of
Nats in a way that works well with GHC.TypeLits’s different comparison systems. This is helpful for bridging together libraries that use different systems; this functionality is not yet provided by singletons.
June 20, 2019
- Complete overhaul of GHC.TypeLits.Witnesses to more or less match the
interface of singletons. This changes the role of the module to be a
“lightweight” version of the singletons library as it pertains to
- Removal of the GHC.TypeLits.List module. We could perform the same overhaul as GHC.TypeLits.Witnesses, but it is complex enough that it would be better to just use singletons instead at that point.
- Remove all external dependencies, except for base and dependent-sum.
- Break compatibility with GHC < 8.2
October 1, 2018
- Fix build for GHC 8.6 and
- Break compatibility with GHC < 8.0
March 30, 2018
- Functions taking multiple
p min GHC.TypeLits.Compare now are able to take different “proxy” types (
- Documentation fixes because deprecation warnings were not showing up on haddocks for GHC.TypeLits.List.
- Added extra witnesses inside the constructors of
- Allowed functions to polymorphically expect
p ninstead of
Proxy nwhenever possible.
- Soft deprecation of GHC.TypeLits.Witnesses, in case people want to use the functionality of singletons without the full library.
- Formal deprecation of GHC.TypeLits.List, with migration information, because it’s just so much more unweidly than using singletons.
- Added the
GHC.TypeLits.Comparemodule for refining bounds and proving inequalities on
KnownNats and associated utility functions.
- Removed redundant
- Added “eliminators”, a staple of dependently typed programming, for
Breaking: Changed the name of
someNatsValPos, to break away from the “just add
'” anti-pattern and to make the function name a bit more meaningful.
reifyNats', a “safe” version of
reifyNatsshould be the safe one, but its connection to
reifyNatfrom the reflection package is very strong and worth preserving, I think.
mapSymbolList; they use
SymbolListinstead of Rank-2 types, so they can work better with function composition with
(.)and other things that Rank-2 types would have trouble with.
sameSymbols, modeled after
sameSymbol. They provide witnesses to GHC that
KnownNats passed in are both the same.
- Added strict fields to
SomeSymbols. It really doesn’t make any sense for them to be lazy.
- Added README to the cabal package as an extra source file, for viewing on Hackage.
- Initial version.