Copyright | (c) Owen Shepherd 2022 |
---|---|
License | MIT |
Maintainer | owen@owen.cafe |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- newtype StringFrac a = StringFrac {
- unStringFrac :: a
Documentation
newtype StringFrac a Source #
Wrapper that parses the string '"1.23"' and the number '1.23' the same.
Uses the read instance for the String
, and realToFrac
(Scientific
-> a)
for the number.
StringFrac | |
|
Instances
Show a => Show (StringFrac a) Source # | |
Defined in SimFin.Types.StringFrac showsPrec :: Int -> StringFrac a -> ShowS # show :: StringFrac a -> String # showList :: [StringFrac a] -> ShowS # | |
(Read a, RealFrac a) => FromJSON (StringFrac a) Source # | |
Defined in SimFin.Types.StringFrac parseJSON :: Value -> Parser (StringFrac a) # parseJSONList :: Value -> Parser [StringFrac a] # |