Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

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

  1. mapMaybe :: Ord k => (a -> Maybe b) -> Map k a -> Map k b

    hashmap Data.HashMap

    Map values and collect the Just results.

  2. mapMaybeWithKey :: Ord k => (k -> a -> Maybe b) -> Map k a -> Map k b

    hashmap Data.HashMap

    Map keys/values and collect the Just results.

  3. noMaybeBox :: (Param p, Eq p) => Maybe p -> [ParamBox]

    haskoin-store-data Haskoin.Store.WebCommon

    No documentation available.

  4. getFieldMaybe :: forall (m :: Type -> Type) a . (MonadFail m, XmlRpcType a) => String -> [(String, Value)] -> Err m (Maybe a)

    haxr Network.XmlRpc.Internals

    Get a field value from a (possibly heterogeneous) struct.

  5. projectConfigFromMaybe :: FilePath -> Maybe FilePath -> CradleProjectConfig

    hie-bios HIE.Bios.Cradle.ProjectConfig

    Create an explicit project configuration. Expects a working directory followed by an optional name of the project configuration.

  6. fromMaybeBin :: forall b (v :: Type -> Type) a . (Bin b, Vector v a) => Histogram v (MaybeBin b) a -> Histogram v b a

    histogram-fill Data.Histogram.Bin.MaybeBin

    Drop bin with no events

  7. ByMaybeAttr :: WhyNullable

    hledger-web Hledger.Web.Import

    No documentation available.

  8. FieldAttrMaybe :: FieldAttr

    hledger-web Hledger.Web.Import

    The Maybe keyword goes after the type. This indicates that the column is nullable, and the generated Haskell code will have a Maybe type for it. Example:

    User
    name Text Maybe
    

  9. isFieldMaybe :: FieldDef -> Bool

    hledger-web Hledger.Web.Import

    Check if the field is `Maybe a`

  10. intCastMaybe :: (Integral a, Integral b, Bits a, Bits b) => a -> Maybe b

    int-cast Data.IntCast

    Run-time-checked integer conversion This is an optimized version of the following generic code below

    intCastMaybeRef :: (Integral a, Integral b) => a -> Maybe b
    intCastMaybeRef x
    | toInteger x == toInteger y = Just y
    | otherwise                  = Nothing
    where
    y = fromIntegral x
    
    The code above is rather inefficient as it needs to go via the Integer type. The function intCastMaybe, however, is marked INLINEABLE and if both integral types are statically known, GHC will be able optimize the code signficantly (for -O1 and better). For instance (as of GHC 7.8.1) the following definitions
    w16_to_i32 = intCastMaybe :: Word16 -> Maybe Int32
    
    i16_to_w16 = intCastMaybe :: Int16 -> Maybe Word16
    
    are translated into the following (simplified) GHC Core language
    w16_to_i32 = \x -> Just (case x of _ { W16# x# -> I32# (word2Int# x#) })
    
    i16_to_w16 = \x -> case eta of _
    { I16# b1 -> case tagToEnum# (<=# 0 b1) of _
    { False -> Nothing
    ; True -> Just (W16# (narrow16Word# (int2Word# b1)))
    }
    }
    
    Note: Starting with base-4.8, this function has been added to Data.Bits under the name toIntegralSized.

Page 273 of many | Previous | Next