| Copyright | (c) Owen Shepherd 2022 |
|---|---|
| License | MIT |
| Maintainer | owen@owen.cafe |
| Safe Haskell | None |
| Language | Haskell2010 |
SimFin.Types.StringFrac
Description
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.
Constructors
| StringFrac | |
Fields
| |
Instances
| Show a => Show (StringFrac a) Source # | |
Defined in SimFin.Types.StringFrac Methods 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 Methods parseJSON :: Value -> Parser (StringFrac a) # parseJSONList :: Value -> Parser [StringFrac a] # | |