Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

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

  1. type SpliceQ = Splice Q

    th-compat Language.Haskell.TH.Syntax.Compat

    SpliceQ a is a type alias for:

    • Code Q a, if using template-haskell-2.17.0.0 or later, or
    • Q (TExp a), if using an older version of template-haskell.
    This should be used with caution, as its definition differs depending on which version of template-haskell you are using. It is mostly useful for contexts in which one is writing a definition that is intended to be used directly in a typed Template Haskell splice, as the types of TH splices differ between template-haskell versions as well. Levity-polymorphic since template-haskell-2.16.0.0.

  2. unTypeQQuote :: forall a m . Quote m => m (TExp a) -> m Exp

    th-compat Language.Haskell.TH.Syntax.Compat

    Discard the type annotation and produce a plain Template Haskell expression Levity-polymorphic since template-haskell-2.16.0.0. This is a variant of the unTypeQ function that is always guaranteed to use a Quote constraint, even on old versions of template-haskell. As this function interacts with typed Template Haskell, this function is only defined on template-haskell-2.9.0.0 (GHC 7.8) or later.

  3. unsafeQToQuote :: Quote m => Q a -> m a

    th-compat Language.Haskell.TH.Syntax.Compat

    Use a Q computation in a Quote context. This function is only safe when the Q computation performs actions from the Quote instance for Q or any of Quote's subclasses (Functor, Applicative, and Monad). Attempting to perform actions from the MonadFail, MonadIO, or Quasi instances for Q will result in runtime errors. This is useful when you have some Q-valued functions that only performs actions from Quote and wish to generalise it from Q to Quote without having to rewrite the internals of the function. This is especially handy for code defined in terms of combinators from Language.Haskell.TH.Lib, which were all hard-coded to Q prior to template-haskell-2.17.0.0. For instance, consider this function:

    apply :: Exp -> Exp -> Q Exp
    apply f x = appE (return x) (return y)
    
    There are two ways to generalize this function to use Quote in a backwards-compatible way. One way to do so is to rewrite apply to avoid the use of appE, like so:
    applyQuote :: Quote m => Exp -> Exp -> m Exp
    applyQuote f x = return (AppE x y)
    
    For a small example like applyQuote, there isn't much work involved. But this can become tiresome for larger examples. In such cases, unsafeQToQuote can do the heavy lifting for you. For example, applyQuote can also be defined as:
    applyQuote :: Quote m => Exp -> Exp -> m Exp
    applyQuote f x = unsafeQToQuote (apply f x)
    

  4. unsafeTExpCoerceQuote :: forall a m . Quote m => m Exp -> m (TExp a)

    th-compat Language.Haskell.TH.Syntax.Compat

    Annotate the Template Haskell expression with a type This is unsafe because GHC cannot check for you that the expression really does have the type you claim it has. Levity-polymorphic since template-haskell-2.16.0.0. This is a variant of the unsafeTExpCoerce function that is always guaranteed to use a Quote constraint, even on old versions of template-haskell. As this function interacts with typed Template Haskell, this function is only defined on template-haskell-2.9.0.0 (GHC 7.8) or later.

  5. updateFreq :: UpdateSettings a -> Int

    auto-update Control.AutoUpdate

    Microseconds between update calls. Same considerations as threadDelay apply. Default: 1000000 microseconds (1 second)

  6. debounceFreq :: DebounceSettings -> Int

    auto-update Control.Debounce

    Length of the debounce timeout period in microseconds. Default: 1 second (1000000)

  7. debounceFreq :: DebounceSettings -> Int

    auto-update Control.Debounce.Internal

    Length of the debounce timeout period in microseconds. Default: 1 second (1000000)

  8. module GHC.Data.SizedSeq

    No documentation available.

  9. data SizedSeq a

    ghc-boot GHC.Data.SizedSeq

    No documentation available.

  10. SizedSeq :: Word -> [a] -> SizedSeq a

    ghc-boot GHC.Data.SizedSeq

    No documentation available.

Page 293 of many | Previous | Next