validated-literals-0.1.0: Compile-time checking for partial smart-constructors
ValidLiterals
class Validate a b where Source
Minimal complete definition
fromLiteral
Methods
fromLiteral :: a -> Maybe b Source
spliceValid :: a -> b -> Q (TExp b) Source
valid :: Validate a b => a -> Q (TExp b) Source
validInteger :: Validate Integer b => Integer -> Q (TExp b) Source
validRational :: Validate Rational b => Rational -> Q (TExp b) Source
validString :: Validate String b => String -> Q (TExp b) Source
validList :: Validate [a] b => [a] -> Q (TExp b) Source
hackySpliceValid :: (Lift a, Validate a b) => a -> b -> Q (TExp b) Source