Hoogle Search

Within LTS Haskell 22.21 (ghc-9.6.5)

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

  1. evaluate :: a -> IO a

    base Control.Exception

    Evaluate the argument to weak head normal form. evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them. evaluate only evaluates to weak head normal form. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

    evaluate $ force x
    
    There is a subtle difference between evaluate x and return $! x, analogous to the difference between throwIO and throw. If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x, on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation. The practical implication of this difference is that due to the imprecise exceptions semantics,
    (return $! error "foo") >> error "bar"
    
    may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand,
    evaluate (error "foo") >> error "bar"
    
    is guaranteed to throw "foo". The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x.

  2. evaluate :: a -> IO a

    base Control.Exception.Base

    Evaluate the argument to weak head normal form. evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them. evaluate only evaluates to weak head normal form. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

    evaluate $ force x
    
    There is a subtle difference between evaluate x and return $! x, analogous to the difference between throwIO and throw. If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x, on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation. The practical implication of this difference is that due to the imprecise exceptions semantics,
    (return $! error "foo") >> error "bar"
    
    may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand,
    evaluate (error "foo") >> error "bar"
    
    is guaranteed to throw "foo". The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x.

  3. evaluate :: a -> IO a

    base GHC.IO

    Evaluate the argument to weak head normal form. evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them. evaluate only evaluates to weak head normal form. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

    evaluate $ force x
    
    There is a subtle difference between evaluate x and return $! x, analogous to the difference between throwIO and throw. If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x, on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation. The practical implication of this difference is that due to the imprecise exceptions semantics,
    (return $! error "foo") >> error "bar"
    
    may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand,
    evaluate (error "foo") >> error "bar"
    
    is guaranteed to throw "foo". The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x.

  4. evaluate :: MonadIO m => a -> m a

    unliftio UnliftIO.Exception

    Lifted version of evaluate.

  5. evaluate :: a -> IO a

    ghc GHC.Utils.Exception

    Evaluate the argument to weak head normal form. evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them. evaluate only evaluates to weak head normal form. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

    evaluate $ force x
    
    There is a subtle difference between evaluate x and return $! x, analogous to the difference between throwIO and throw. If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x, on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation. The practical implication of this difference is that due to the imprecise exceptions semantics,
    (return $! error "foo") >> error "bar"
    
    may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand,
    evaluate (error "foo") >> error "bar"
    
    is guaranteed to throw "foo". The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x.

  6. evaluate :: MonadBase IO m => a -> m a

    lifted-base Control.Exception.Lifted

    Generalized version of evaluate.

  7. evaluate :: a -> IO a

    Cabal-syntax Distribution.Compat.Prelude

    Evaluate the argument to weak head normal form. evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them. evaluate only evaluates to weak head normal form. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

    evaluate $ force x
    
    There is a subtle difference between evaluate x and return $! x, analogous to the difference between throwIO and throw. If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x, on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation. The practical implication of this difference is that due to the imprecise exceptions semantics,
    (return $! error "foo") >> error "bar"
    
    may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand,
    evaluate (error "foo") >> error "bar"
    
    is guaranteed to throw "foo". The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x.

  8. evaluate :: a -> IO a

    ghc-lib-parser GHC.Utils.Exception

    Evaluate the argument to weak head normal form. evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them. evaluate only evaluates to weak head normal form. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

    evaluate $ force x
    
    There is a subtle difference between evaluate x and return $! x, analogous to the difference between throwIO and throw. If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x, on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation. The practical implication of this difference is that due to the imprecise exceptions semantics,
    (return $! error "foo") >> error "bar"
    
    may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand,
    evaluate (error "foo") >> error "bar"
    
    is guaranteed to throw "foo". The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x.

  9. evaluate :: C a => T a -> a -> a

    numeric-prelude MathObj.Polynomial

    No documentation available.

  10. evaluate :: C a => T a -> a -> a

    numeric-prelude MathObj.PowerSeries

    Evaluate (truncated) power series.

Page 1 of many | Next