Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. formParam :: forall (m :: Type -> Type) b . (MonadUnliftIO m, Parsable b) => Text -> ActionT m b

    scotty Web.Scotty.Trans

    Look up a form parameter.

    • Raises an exception which can be caught by catch if parameter is not found. If the exception is not caught, scotty will return a HTTP error code 400 ("Bad Request") to the client.
    • This function raises a code 400 also if the parameter is found, but parseParam fails to parse to the correct type.
    Since: 0.20

  2. formParamMaybe :: forall (m :: Type -> Type) a . (MonadUnliftIO m, Parsable a) => Text -> ActionT m (Maybe a)

    scotty Web.Scotty.Trans

    Look up a form parameter. Returns Nothing if the parameter is not found or cannot be parsed at the right type. NB : Doesn't throw exceptions, so developers must raiseStatus or throw to signal something went wrong. Since: 0.21

  3. formParams :: forall (m :: Type -> Type) . MonadUnliftIO m => ActionT m [Param]

    scotty Web.Scotty.Trans

    Get form parameters

  4. formParam :: forall (m :: Type -> Type) b . (MonadUnliftIO m, Parsable b) => Text -> ActionT m b

    scotty Web.Scotty.Trans.Strict

    Look up a form parameter.

    • Raises an exception which can be caught by catch if parameter is not found. If the exception is not caught, scotty will return a HTTP error code 400 ("Bad Request") to the client.
    • This function raises a code 400 also if the parameter is found, but parseParam fails to parse to the correct type.
    Since: 0.20

  5. formParamMaybe :: forall (m :: Type -> Type) a . (MonadUnliftIO m, Parsable a) => Text -> ActionT m (Maybe a)

    scotty Web.Scotty.Trans.Strict

    Look up a form parameter. Returns Nothing if the parameter is not found or cannot be parsed at the right type. NB : Doesn't throw exceptions, so developers must raiseStatus or throw to signal something went wrong. Since: 0.21

  6. formParams :: forall (m :: Type -> Type) . MonadUnliftIO m => ActionT m [Param]

    scotty Web.Scotty.Trans.Strict

    Get form parameters

  7. formatCalendar :: DateFormatter -> Calendar -> Text

    text-icu Data.Text.ICU

    Format a Calendar using a DateFormatter.

    >>> import Data.Text
    
    >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
    
    >>> c <- calendar (pack "CET") (Locale "de_DE") TraditionalCalendarType
    
    >>> formatCalendar dfDe c
    "13. Oktober 2021 um 12:44:09 GMT+2"
    

  8. formatDouble :: NumberFormatter -> Double -> Text

    text-icu Data.Text.ICU

    Format a Double. See https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html for how to specify the number skeletons.

    >>> import Data.Text
    
    >>> nf3 <- numberFormatter (pack "precision-currency-cash") (Locale "it")
    
    >>> formatDouble nf3 12345.6789
    "12.345,68"
    

  9. formatDouble' :: Text -> LocaleName -> Double -> Text

    text-icu Data.Text.ICU

    Create a number formatter and apply it to a Double.

  10. formatIntegral :: Integral a => NumberFormatter -> a -> Text

    text-icu Data.Text.ICU

    Format an integral number. See https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html for how to specify the number skeletons.

    >>> import Data.Text
    
    >>> nf <- numberFormatter (pack "precision-integer") (Locale "de")
    
    >>> formatIntegral nf 12345
    "12.345"
    
    >>> nf2 <- numberFormatter (pack "precision-integer") (Locale "fr")
    
    >>> formatIntegral nf2 12345
    "12\8239\&345"
    

Page 57 of many | Previous | Next