Hoogle Search

Within LTS Haskell 24.58 (ghc-9.10.3)

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

  1. isPrefixOf :: JSString -> JSString -> Bool

    jsaddle Data.JSString

    O(n) The isPrefixOf function takes two JSStrings and returns True iff the first is a prefix of the second. Subject to fusion.

  2. isSuffixOf :: JSString -> JSString -> Bool

    jsaddle Data.JSString

    O(n) The isSuffixOf function takes two JSStrings and returns True iff the first is a suffix of the second.

  3. stripPrefix :: JSString -> JSString -> Maybe JSString

    jsaddle Data.JSString

    O(n) Return the suffix of the second string if its prefix matches the entire first string. Examples:

    stripPrefix "foo" "foobar" == Just "bar"
    stripPrefix ""    "baz"    == Just "baz"
    stripPrefix "foo" "quux"   == Nothing
    
    This is particularly useful with the ViewPatterns extension to GHC, as follows:
    {-# LANGUAGE ViewPatterns #-}
    import Data.Text as T
    
    fnordLength :: JSString -> Int
    fnordLength (stripPrefix "fnord" -> Just suf) = T.length suf
    fnordLength _                                 = -1
    

  4. stripSuffix :: JSString -> JSString -> Maybe JSString

    jsaddle Data.JSString

    O(n) Return the prefix of the second string if its suffix matches the entire first string. Examples:

    stripSuffix "bar" "foobar" == Just "foo"
    stripSuffix ""    "baz"    == Just "baz"
    stripSuffix "foo" "quux"   == Nothing
    
    This is particularly useful with the ViewPatterns extension to GHC, as follows:
    {-# LANGUAGE ViewPatterns #-}
    import Data.Text as T
    
    quuxLength :: Text -> Int
    quuxLength (stripSuffix "quux" -> Just pre) = T.length pre
    quuxLength _                                = -1
    

  5. isPrefixOf :: Eq a => Stream a -> Stream a -> Bool

    jsaddle Data.JSString.Internal.Fusion.Common

    O(n) The isPrefixOf function takes two Streams and returns True if and only if the first is a prefix of the second. Properties

    isPrefixOf (stream t1) (stream t2) = isPrefixOf t1 t2
    

  6. radix :: C a => a -> Integer

    numeric-prelude Algebra.FloatingPoint

    No documentation available.

  7. fixFraction :: (C a, Ord a) => a -> a

    numeric-prelude Algebra.RealRing

    No documentation available.

  8. fixSplitFraction :: (C a, C b, Ord a) => (b, a) -> (b, a)

    numeric-prelude Algebra.RealRing

    No documentation available.

  9. module MathObj.Matrix

    Routines and abstractions for Matrices and basic linear algebra over fields or rings. We stick to simple Int indices. Although advanced indices would be nice e.g. for matrices with sub-matrices, this is not easily implemented since arrays do only support a lower and an upper bound but no additional parameters. ToDo: - Matrix inverse, determinant (see htam:Matrix)

  10. module Number.FixedPoint

    Fixed point numbers. They are implemented as ratios with fixed denominator. Many routines fail for some arguments. When they work, they can be useful for obtaining approximations of some constants. We have not paid attention to rounding errors and thus some of the trailing digits may be wrong.

Page 281 of many | Previous | Next