Closed lamefun closed 6 years ago
The ADT instead of the warning might be an improvement, but I'm not sure what the benefit of switching to FunctionalDependencies and DefaultLiteralType is supposed to be?
Here's the description: https://github.com/merijn/validated-literals/pull/1/commits/ffb2744999bde430cd05effd935257d83ac942d9#diff-c1c013433d9f6600411c8d0be3daa99bR110
The idea is that it makes it so that in constructs like $$(valid 3)
the proper literal type can be automatically determined in cases where the result type is specified or deduced by the compiler from the context, so that functions such as validInteger
are needed less frequently.
valid
.spliceValid
from being misused.ValidLiterals
module.Also, does
FromLiteral
actually need more than onel
pera
? Should I removeDefaultLiteralType
and simply add| a -> l
dependency directly toFromLiteral
? Here's the simpler version.