Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

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

  1. mkOrdLessEqual :: Typeable a => (a -> a -> Bool) -> [Expr]

    express Data.Express

    O(1). Builds a reified Ord instance from the given <= function. (cf. reifyOrd, mkOrd)

  2. reifyEq :: (Typeable a, Eq a) => a -> [Expr]

    express Data.Express

    O(1). Reifies an Eq instance into a list of Exprs. The list will contain == and /= for the given type. (cf. mkEq, mkEquation)

    > reifyEq (undefined :: Int)
    [ (==) :: Int -> Int -> Bool
    , (/=) :: Int -> Int -> Bool ]
    
    > reifyEq (undefined :: Bool)
    [ (==) :: Bool -> Bool -> Bool
    , (/=) :: Bool -> Bool -> Bool ]
    
    > reifyEq (undefined :: String)
    [ (==) :: [Char] -> [Char] -> Bool
    , (/=) :: [Char] -> [Char] -> Bool ]
    

  3. reifyEqOrd :: (Typeable a, Ord a) => a -> [Expr]

    express Data.Express

    O(1). Reifies Eq and Ord instances into a list of Expr.

  4. compareQuickly :: Expr -> Expr -> Ordering

    express Data.Express.Core

    O(n). A fast total order between Exprs that can be used when sorting Expr values. This is lazier than its counterparts compareComplexity and compareLexicographically and tries to evaluate the given Exprs as least as possible.

  5. isEq :: [Expr] -> Expr -> Bool

    express Data.Express.Instances

    O(n+m). Returns whether an Eq instance exists in the given instances list for the given Expr.

    > isEq (reifyEqOrd (undefined :: Int)) (val (0::Int))
    True
    
    > isEq (reifyEqOrd (undefined :: Int)) (val ([[[0::Int]]]))
    False
    
    Given that the instances list has length m and that the given Expr has size n, this function is O(n+m).

  6. isEqOrd :: [Expr] -> Expr -> Bool

    express Data.Express.Instances

    O(n+m). Returns whether both Eq and Ord instance exist in the given list for the given Expr. Given that the instances list has length m and that the given Expr has size n, this function is O(n+m).

  7. isEqOrdT :: [Expr] -> TypeRep -> Bool

    express Data.Express.Instances

    O(n). Returns whether both Eq and Ord instance exist in the given list for the given TypeRep. Given that the instances list has length n, this function is O(n).

  8. isEqT :: [Expr] -> TypeRep -> Bool

    express Data.Express.Instances

    O(n). Returns whether an Eq instance exists in the given instances list for the given TypeRep.

    > isEqT (reifyEqOrd (undefined :: Int)) (typeOf (undefined :: Int))
    True
    
    > isEqT (reifyEqOrd (undefined :: Int)) (typeOf (undefined :: [[[Int]]]))
    False
    
    Given that the instances list has length n, this function is O(n).

  9. mkEq :: Typeable a => (a -> a -> Bool) -> [Expr]

    express Data.Express.Instances

    O(1). Builds a reified Eq instance from the given == function. (cf. reifyEq)

    > mkEq ((==) :: Int -> Int -> Bool)
    [ (==) :: Int -> Int -> Bool
    , (/=) :: Int -> Int -> Bool ]
    

  10. mkEquation :: [Expr] -> Expr -> Expr -> Expr

    express Data.Express.Instances

    O(n+m). Returns an equation between two expressions given that it is possible to do so from == operators given in the argument instances list. When not possible, this function returns False encoded as an Expr.

Page 485 of many | Previous | Next