HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

This module provides orphan instances for the Lift class from template-haskell. Following is a list of the provided instances.

Lift instances are useful to precompute values at compile time using template haskell. For example, if you write the following code, you can make sure that 3 * 10 is really computed at compile time:

{-# LANGUAGE TemplateHaskell #-}

import Language.Haskell.TH.Syntax

expensiveComputation :: Word32
expensiveComputation = $(lift $ 3 * 10) -- This will computed at compile time

This uses the Lift instance for Word32.

The following instances are provided by this package:

Base

0 declarations
  • Word8, Word16, Word32, Word64

  • Int8, Int16, Int32, Int64

  • NonEmpty and Void, until provided by template-haskell-2.15

Containers (both strict/lazy)

0 declarations

ByteString (both strict/lazy)

0 declarations

Text (both strict/lazy)

0 declarations

Vector (Boxed, Unboxed, Storable, Primitive)

0 declarations

Orphan instances

6 instances