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.
-
ghc-internal GHC.Internal.GHCi.Helpers No documentation available.
-
ghc-internal GHC.Internal.Generics A datatype whose instances are defined generically, using the Generic representation. Generically1 is a higher-kinded version of Generically that uses Generic1. Generic instances can be derived via Generically A using -XDerivingVia.
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DerivingVia #-} import GHC.Generics (Generic) data V4 a = V4 a a a a deriving stock Generic deriving (Semigroup, Monoid) via Generically (V4 a)This corresponds to Semigroup and Monoid instances defined by pointwise lifting:instance Semigroup a => Semigroup (V4 a) where (<>) :: V4 a -> V4 a -> V4 a V4 a1 b1 c1 d1 <> V4 a2 b2 c2 d2 = V4 (a1 <> a2) (b1 <> b2) (c1 <> c2) (d1 <> d2) instance Monoid a => Monoid (V4 a) where mempty :: V4 a mempty = V4 mempty mempty mempty mempty
Historically this required modifying the type class to include generic method definitions (-XDefaultSignatures) and deriving it with the anyclass strategy (-XDeriveAnyClass). Having a /via type/ like Generically decouples the instance from the type class. Generically :: a -> Generically aghc-internal GHC.Internal.Generics No documentation available.
newtype
Generically1 (f :: k -> Type) (a :: k)ghc-internal GHC.Internal.Generics A type whose instances are defined generically, using the Generic1 representation. Generically1 is a higher-kinded version of Generically that uses Generic. Generic instances can be derived for type constructors via Generically1 F using -XDerivingVia.
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DerivingVia #-} import GHC.Generics (Generic) data V4 a = V4 a a a a deriving stock (Functor, Generic1) deriving Applicative via Generically1 V4This corresponds to Applicative instances defined by pointwise lifting:instance Applicative V4 where pure :: a -> V4 a pure a = V4 a a a a liftA2 :: (a -> b -> c) -> (V4 a -> V4 b -> V4 c) liftA2 (·) (V4 a1 b1 c1 d1) (V4 a2 b2 c2 d2) = V4 (a1 · a2) (b1 · b2) (c1 · c2) (d1 · d2)
Historically this required modifying the type class to include generic method definitions (-XDefaultSignatures) and deriving it with the anyclass strategy (-XDeriveAnyClass). Having a /via type/ like Generically1 decouples the instance from the type class.finally :: IO a -> IO b -> IO aghc-internal GHC.Internal.IO No documentation available.
-
ghc-internal GHC.Internal.IO.Handle The action hFlushAll hdl flushes all buffered data in hdl, including any buffered read data. Buffered read data is flushed by seeking the file position back to the point before the buffered data was read, and hence only works if hdl is seekable (see hIsSeekable). This operation may fail with:
- isFullError if the device is full;
- isPermissionError if a system resource limit would be exceeded. It is unspecified whether the characters in the buffer are discarded or retained under these circumstances;
- isIllegalOperation if hdl has buffered read data, and is not seekable.
withAllHandles__ :: String -> Handle -> (Handle__ -> IO Handle__) -> IO ()ghc-internal GHC.Internal.IO.Handle.Internals No documentation available.
smallInteger :: Int# -> Integerghc-internal GHC.Internal.Integer No documentation available.
CostCentresAll :: DoCostCentresghc-internal GHC.Internal.RTS.Flags No documentation available.
block_alloc :: DebugFlags -> Boolghc-internal GHC.Internal.RTS.Flags b