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. setMatrix :: Matrix -> Render ()

    cairo Graphics.Rendering.Cairo

    Modifies the current transformation matrix (CTM) by setting it equal to matrix.

  2. module Graphics.Rendering.Cairo.Matrix

    Matrix math

  3. data Matrix

    cairo Graphics.Rendering.Cairo.Matrix

    Representation of a 2-D affine transformation. The Matrix type represents a 2x2 transformation matrix along with a translation vector. Matrix a1 a2 b1 b2 c1 c2 describes the transformation of a point with coordinates x,y that is defined by

    / x' \  =  / a1 b1 \  / x \  + / c1 \
    \ y' /     \ a2 b2 /  \ y /    \ c2 /
    
    or
    x' =  a1 * x + b1 * y + c1
    y' =  a2 * x + b2 * y + c2
    

  4. Matrix :: Double -> Double -> Double -> Double -> Double -> Double -> Matrix

    cairo Graphics.Rendering.Cairo.Matrix

    No documentation available.

  5. type MatrixPtr = Ptr Matrix

    cairo Graphics.Rendering.Cairo.Matrix

    No documentation available.

  6. package data-fix

    Fixpoint data types Fixpoint types and recursion schemes. If you define your AST as fixpoint type, you get fold and unfold operations for free. Thanks for contribution to: Matej Kollar, Herbert Valerio Riedel

  7. module Data.Fix

    Fixed points of a functor. Type f should be a Functor if you want to use simple recursion schemes or Traversable if you want to use monadic recursion schemes. This style allows you to express recursive functions in non-recursive manner. You can imagine that a non-recursive function holds values of the previous iteration. An example: First we define a base functor. The arguments b are recursion points.

    >>> data ListF a b = Nil | Cons a b deriving (Show, Functor)
    
    The list is then a fixed point of ListF
    >>> type List a = Fix (ListF a)
    
    We can write length function. Note that the function we give to foldFix is not recursive. Instead the results of recursive calls are in b positions, and we need to deal only with one layer of the structure.
    >>> :{
    let length :: List a -> Int
    length = foldFix $ \x -> case x of
    Nil      -> 0
    Cons _ n -> n + 1
    :}
    
    If you already have recursive type, like '[Int]', you can first convert it to `Fix (ListF a)` and then foldFix. Alternatively you can use recursion-schemes combinators which work directly on recursive types.

  8. newtype Fix (f :: Type -> Type)

    data-fix Data.Fix

    A fix-point type.

  9. Fix :: f (Fix f) -> Fix (f :: Type -> Type)

    data-fix Data.Fix

    No documentation available.

  10. foldFix :: Functor f => (f a -> a) -> Fix f -> a

    data-fix Data.Fix

    Fold Fix.

    >>> let fp = unfoldFix (\i -> if i < 4 then Cons i (i + 1) else Nil) (0 :: Int)
    
    >>> foldFix (elimListF 0 (+)) fp
    6
    

Page 249 of many | Previous | Next