### Haskell startProfTimer Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Starts a general profiling timer. Available in GHC.Profiling. ```Haskell startProfTimer :: IO () ``` -------------------------------- ### Haskell startHeapProfTimer Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Starts a heap profiling timer. Available in GHC.Profiling. ```Haskell startHeapProfTimer :: IO () ``` -------------------------------- ### Haskell srcLocStartLine Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the starting line of a source location. Available in GHC.Exception, GHC.Stack, and GHC.Stack.Types. ```Haskell srcLocStartLine :: SrcLoc -> Int ``` -------------------------------- ### GHC Runtime System Flags and Handlers Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions related to configuring and managing the GHC runtime system, including setting initial stack size and installing signal handlers. ```Haskell initialStkSize installSEHHandlers installSignalHandlers ``` -------------------------------- ### Haskell srcLocStartCol Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the starting column of a source location. Available in GHC.Exception, GHC.Stack, and GHC.Stack.Types. ```Haskell srcLocStartCol :: SrcLoc -> Int ``` -------------------------------- ### Input/Output Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Common input and output functions for interacting with the system. This includes reading contents, getting lines, and environment variables. ```Haskell getContents :: IO String getLine :: IO String getChar :: IO Char getContents' :: Handle -> IO String getEnvironment :: IO [(String, String)] getEnv :: String -> IO String getProgName :: IO String getCPUTime :: IO Integer ``` -------------------------------- ### List Initialization and Manipulation Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for initializing and manipulating lists, including getting the initial elements of a list and inserting elements into a sorted list. ```Haskell init inits inits1 insert insertBy ``` -------------------------------- ### IO Device Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for interacting with IO devices, including getting the size of a device and retrieving its echo state. ```Haskell getSize :: Handle -> IO Integer getEcho :: Handle -> IO Bool ``` -------------------------------- ### GHC IO Handle Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for interacting with GHC's IO Handles, including getting the size and echo state. ```Haskell getSize :: Handle -> IO Integer getEcho :: Handle -> IO Bool ``` -------------------------------- ### Haskell GHC Base and Exts Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Low-level functions from GHC.Base and GHC.Exts, often involving primitive types and operations. Examples include equality checks for primitive types like 'eqChar#' and 'eqFloat#'. ```Haskell eqAddr# :: Addr# -> Addr# -> Bool eqChar# :: Char# -> Char# -> Bool eqFloat# :: Float# -> Float# -> Bool eqInt16# :: Int16# -> Int16# -> Bool eqInt32# :: Int32# -> Int32# -> Bool eqInt64# :: Int64# -> Int64# -> Bool eqInt8# :: Int8# -> Int8# -> Bool eqInteger# :: Integer -> Integer -> Bool eqStableName# :: StableName# -> StableName# -> Bool eqStablePtr# :: StablePtr# -> StablePtr# -> Bool eqWord# :: Word# -> Word# -> Bool eqWord16# :: Word16# -> Word16# -> Bool eqWord32# :: Word32# -> Word32# -> Bool eqWord64# :: Word64# -> Word64# -> Bool eqWord8# :: Word8# -> Word8# -> Bool ``` -------------------------------- ### Haskell Example Encode Instance for Tree Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Generics An example of how to define an instance for a specific data type (Tree) using the generic default implementation provided by the Encode class. ```Haskell instance (Encode a) => Encode (Tree a) ``` -------------------------------- ### Haskell startHeapProfileAtStartup Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Enables heap profiling at program startup. Available in GHC.RTS.Flags. ```Haskell startHeapProfileAtStartup :: Bool -> IO () ``` -------------------------------- ### Haskell Example Constructor with Strictness Annotations Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Generics Illustrates how GHC infers strictness for fields of a data type like `ExampleConstructor` based on compiler options. The example shows the effect of no optimization, `-XStrictData`, and `-O2` on the `DecidedStrictness` of its fields. ```Haskell data E = ExampleConstructor {-# UNPACK #-} !Int !Int Int ``` -------------------------------- ### Haskell Exception: GHC.IO.Exception Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All This entry refers to the `GHC.IO.Exception` module, which contains various exception types related to input/output operations in Haskell. Examples include errors during file handling or network communication. ```Haskell GHC.IO.Exception ``` -------------------------------- ### Haskell startTimeProfileAtStartup Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Enables time profiling at program startup. Available in GHC.RTS.Flags. ```Haskell startTimeProfileAtStartup :: Bool -> IO () ``` -------------------------------- ### Haskell SrcLoc Generic Representation Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Generics Details the generic representation for the SrcLoc data type, which captures source location information. It includes fields for package, module, file path, start and end line numbers, and start and end column numbers. ```Haskell type Rep SrcLoc = D1 ('MetaData "SrcLoc" "GHC.Internal.Stack.Types" "ghc-internal" 'False) (C1 ('MetaCons "SrcLoc" 'PrefixI 'True) ((S1 ('MetaSel ('Just "srcLocPackage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Char]) :*: (S1 ('MetaSel ('Just "srcLocModule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Char]) :*: S1 ('MetaSel ('Just "srcLocFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Char]))) :*: ((S1 ('MetaSel ('Just "srcLocStartLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "srcLocStartCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "srcLocEndLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "srcLocEndCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) ``` -------------------------------- ### System Environment and Arguments in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for accessing system environment variables and program arguments, including handling response files. ```Haskell getArgs :: IO [String] getArgsWithResponseFiles :: IO [String] getExecutablePath :: IO FilePath getEnvironment :: IO [(String, String)] getEnv :: String -> IO String getEnvDefault :: String -> String -> IO String ``` -------------------------------- ### System.IO Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Standard input/output functions. ```Haskell getContents :: IO String getLine :: IO String getChar :: IO Char getContents' :: Handle -> IO String ``` -------------------------------- ### Control.Concurrent Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions related to concurrency, including getting capabilities and thread allocation counters. ```Haskell getAllocationCounter :: IO Integer getNumCapabilities :: IO Int getUncaughtExceptionHandler :: IO (Maybe (IO ())) ``` -------------------------------- ### Haskell Exception: System.IO Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All This entry refers to the `System.IO` module, which provides standard input/output functionalities in Haskell. It includes functions for file handling, console I/O, and managing I/O modes. ```Haskell System.IO ``` -------------------------------- ### Get nonmoving_gc_sync_elapsed_ns in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the elapsed time in nanoseconds for synchronous non-moving garbage collection. This is a performance metric. ```Haskell nonmoving_gc_sync_elapsed_ns ``` -------------------------------- ### Haskell Show Instance for :*: Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Generics Defines the 'showPrec', 'show', and 'showList' methods for the ':*:' type constructor, enabling its representation as a string. This requires the 'Show' instance for the constituent types 'f' and 'g'. ```Haskell showPrec :: Int -> (f :*: g) p -> ShowS show :: (f :*: g) p -> String showList :: [(f :*: g) p] -> ShowS ``` -------------------------------- ### Get nonmoving_gc_elapsed_ns in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the elapsed time in nanoseconds spent in the non-moving garbage collector. This is a performance metric. ```Haskell nonmoving_gc_elapsed_ns ``` -------------------------------- ### Open File With Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Opens a file with specific settings. This function is part of the GHC.IO.FD module. ```Haskell openFileWith :: FilePath -> IOMode -> IO Handle ``` -------------------------------- ### Get nonmoving_gc_cpu_ns in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the CPU time in nanoseconds spent in the non-moving garbage collector. This is a performance metric. ```Haskell nonmoving_gc_cpu_ns ``` -------------------------------- ### Haskell Exception: Prelude Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All No description -------------------------------- ### Parser Combinator Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for parsing text using combinators, including 'get' from ReadP and ReadPrec. ```Haskell get :: ReadP a -> ReadP a get :: ReadPrec a -> ReadPrec a ``` -------------------------------- ### I/O Device Size and Raw Mode in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for setting the size and mode of I/O devices. 'setSize' and 'setRaw' are provided by GHC.IO.Device. ```Haskell setSize ``` ```Haskell setRaw ``` -------------------------------- ### Show Instance for UAddr p Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Generics Defines the Show instance for UAddr p, providing methods to convert UAddr values to strings. Includes showsPrec, show, and showList. ```Haskell showsPrec :: Int -> UAddr p -> ShowS show :: UAddr p -> String showList :: [UAddr p] -> ShowS ``` -------------------------------- ### Get nonmoving_gc_sync_cpu_ns in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the CPU time in nanoseconds spent in synchronous non-moving garbage collection. This is a performance metric. ```Haskell nonmoving_gc_sync_cpu_ns ``` -------------------------------- ### GHC Base Primitive Operations (Thread Allocation) in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Low-level primitive operation for getting the thread allocation counter. ```Haskell getThreadAllocationCounter# :: State# RealWorld Integer ``` -------------------------------- ### Haskell: IO and Handle Operations Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Provides functions for input/output operations, including creating and managing file handles. This covers functions for creating different types of handles and encoding conversions. ```Haskell memcpy :: GHC.IO.Handle.Text ``` ```Haskell mkAscii :: GHC.IO.Encoding.Latin1 ``` ```Haskell mkDuplexHandle :: GHC.IO.Handle, GHC.IO.Handle.Internals ``` ```Haskell mkDuplexHandleNoFinalizer :: GHC.IO.Handle.Internals ``` ```Haskell mkFD :: GHC.IO.FD ``` ```Haskell mkFileHandle :: GHC.IO.Handle, GHC.IO.Handle.Internals ``` ```Haskell mkFileHandleNoFinalizer :: GHC.IO.Handle.Internals ``` ```Haskell mkHandle :: GHC.IO.Handle.Internals ``` ```Haskell mkHandleFromFD :: GHC.IO.Handle.FD ``` ```Haskell mkIconvEncoding :: GHC.IO.Encoding.Iconv ``` ```Haskell mkLatin1 :: GHC.IO.Encoding.Latin1 ``` ```Haskell mkLatin1_checked :: GHC.IO.Encoding.Latin1 ``` -------------------------------- ### GHC Base Primitive Operations (SmallArray) in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Low-level primitive operations for getting the size of small mutable arrays. ```Haskell getSizeofSmallMutableArray# :: SmallMutableArray# s a -> State# RealWorld Int# ``` -------------------------------- ### GHC Base Primitive Operations (ByteArray) in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Low-level primitive operations for getting the size of mutable byte arrays. ```Haskell getSizeofMutableByteArray# :: MutableByteArray# s -> State# RealWorld Int# ``` -------------------------------- ### Haskell Show1 Instance for V1 Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Generics Defines the Show1 instance for V1, enabling the conversion of V1 structures to strings. This instance, available since base-4.21.0.0, includes methods for showing with precedence and showing lists. ```Haskell liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V1 a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V1 a] -> ShowS ``` -------------------------------- ### Ord and Semigroup Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for working with Ord and Semigroup instances, such as getting the maximum or minimum of two values. ```Haskell getDown :: Ord a => a -> Down a getMax :: Ord a => a -> a -> a getMin :: Ord a => a -> a -> a ``` -------------------------------- ### Get nonmoving_gc_max_elapsed_ns in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the maximum elapsed time in nanoseconds for a single non-moving garbage collection cycle. This is a performance metric. ```Haskell nonmoving_gc_max_elapsed_ns ``` -------------------------------- ### Haskell Functions for System.Info Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Lists functions related to system information, such as compilerName and compilerVersion. These are found in System.Info. ```Haskell compilerName compilerVersion ``` -------------------------------- ### Haskell M1 Show Instance Methods Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Generics Defines the Show instance methods for M1, such as showsPrec, show, and showList. These allow M1 structures to be converted into human-readable string formats. ```Haskell showsPrec :: Int -> M1 i c f p -> ShowS show :: M1 i c f p -> String showList :: [M1 i c f p] -> ShowS ``` -------------------------------- ### Haskell Handle Position Get Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the current position within a Handle. This is useful for seeking to specific locations in a file or stream. ```Haskell hGetPosn :: Handle -> IO HandlePosn ``` -------------------------------- ### Concurrency and Threading in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions related to concurrency, including getting the number of capabilities, allocation counters, and managing thread-local state. ```Haskell getAllocationCounter :: IO Integer getNumCapabilities :: IO Int getThreadAllocationCounter# :: State# RealWorld Integer getSystemEventManager :: IO SystemEventManager getSystemTimerManager :: IO SystemTimerManager ``` -------------------------------- ### System Information Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves information about the system architecture. ```Haskell arch :: String ``` -------------------------------- ### OS Information Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves information about the operating system. This is provided by the System.Info module. ```Haskell os :: String ``` -------------------------------- ### Posix system structure sizes in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions to get the sizes of various POSIX system structures, such as signal sets and terminal attributes. ```Haskell sizeof_sigset_t| System.Posix.Internals sizeof_stat| System.Posix.Internals sizeof_termios| System.Posix.Internals ``` -------------------------------- ### Haskell Prelude Functions Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Includes fundamental functions available in the Haskell Prelude, such as `ceiling` for rounding up. ```Haskell ceiling Char ``` -------------------------------- ### Haskell Response File Handling Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All This snippet includes functions for handling response files in Haskell, which are often used to pass command-line arguments to programs. ```Haskell escapeArgs| GHC.ResponseFile expandResponse| GHC.ResponseFile ``` -------------------------------- ### Get nonmoving_gc_sync_max_elapsed_ns in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Retrieves the maximum elapsed time in nanoseconds for a single synchronous non-moving garbage collection cycle. This is a performance metric. ```Haskell nonmoving_gc_sync_max_elapsed_ns ``` -------------------------------- ### Haskell Exception Handling Utilities Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All This documentation lists functions and types related to exception handling in Haskell, including `bracket`, `bracketOnError`, and `bracket_` for resource management, as well as `CallStack` for tracking execution context. ```Haskell bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c bracket_ :: IO a -> IO b -> IO c -> IO c CallStack callStack :: CallStack ``` -------------------------------- ### Exception and Stack Trace Formatting Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for formatting and displaying call stacks, useful for debugging and error reporting. ```Haskell prettyCallStack :: CallStack -> String prettyCallStackLines :: CallStack -> [String] prettySrcLoc :: SrcLoc -> String ``` -------------------------------- ### GetOpt Operations in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions for parsing command-line options using the GetOpt library. ```Haskell getOpt :: OptDesc a -> [String] -> [(a, String)] getOpt' :: OptDesc a -> [String] -> Either String [(a, String)] ``` -------------------------------- ### Plus Word64 X2 Hash Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All No description -------------------------------- ### Concurrency Synchronization Primitives in Haskell Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Functions related to concurrency synchronization, including shared locks and atomic operations. 'sharedCAF', 'SharedLock', and 'seq#' are examples. ```Haskell sharedCAF ``` ```Haskell SharedLock ``` ```Haskell seq# ``` -------------------------------- ### Haskell StaticPtrInfo Data Constructor Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All Information about a static pointer. Available in GHC.StaticPtr. ```Haskell data StaticPtrInfo a ``` -------------------------------- ### Haskell tails1 Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All The 'tails1' function in Haskell returns all final segments of a list, starting with the list itself down to a singleton list. It is available in Data.List and Data.List.NonEmpty. ```Haskell tails1 :: [a] -> [[a]] ``` ```Haskell tails1 :: NonEmpty a -> [NonEmpty a] ``` -------------------------------- ### Haskell tails Function Source: https://hackage.haskell.org/package/base-4.21.0.0/docs/doc-index-All The 'tails' function in Haskell returns all final segments of a list, starting with the list itself down to the empty list. It is defined in Data.List, GHC.OldList, and Data.List.NonEmpty. ```Haskell tails :: [a] -> [[a]] ``` ```Haskell tails :: NonEmpty a -> [NonEmpty a] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.