From f17fe50c16893c0aefe197a43fadeb81ec67cc69 Mon Sep 17 00:00:00 2001 From: Frederick Pringle Date: Fri, 2 Oct 2026 16:22:40 +0200 Subject: [PATCH 1/4] Add `finally`, `onException`, `bracket` and `catch` --- src/Hell.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Hell.hs b/src/Hell.hs index 9bfdcf5..6f5ef3f 100644 --- a/src/Hell.hs +++ b/src/Hell.hs @@ -59,7 +59,8 @@ import Data.ByteString.Builder (Builder) import qualified Data.ByteString.Builder as Builder import Control.Applicative (Alternative (..), optional) import qualified Control.Concurrent as Concurrent -import Control.Exception (evaluate) +import Control.Exception (evaluate, SomeException) +import qualified Control.Exception as Exception import Control.Monad.Reader import Control.Monad.State.Strict import Criterion.Measurement @@ -2394,6 +2395,12 @@ polyLits = "Argument.help" options_help :: forall a. Text -> Options.Mod Options.ArgumentFields a "Options.progDesc" options_progDesc :: forall a. Text -> Options.InfoMod a "Options.header" options_header :: forall a. Text -> Options.InfoMod a + + -- Exceptions + "Exception.finally" Exception.finally :: forall a b. IO a -> IO b -> IO a + "Exception.onException" Exception.onException :: forall a b. IO a -> IO b -> IO a + "Exception.bracket" Exception.bracket :: forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c + "SomeException.catch" Exception.catch :: forall a. IO a -> (SomeException -> IO a) -> IO a |] in toplevel ) From fac893dcac9b5a9ab1ca866a5bedde9359fa4be8 Mon Sep 17 00:00:00 2001 From: Frederick Pringle Date: Fri, 2 Oct 2026 16:23:12 +0200 Subject: [PATCH 2/4] Add `SomeException` and its `Show` instance --- src/Hell.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Hell.hs b/src/Hell.hs index 6f5ef3f..84416c6 100644 --- a/src/Hell.hs +++ b/src/Hell.hs @@ -865,6 +865,7 @@ instances = instance0 @Show @Builder, instance0 @Show @ExitCode, instance0 @Show @Value, + instance0 @Show @SomeException, entail1 @Eq @CI, entail1 @Eq @[], entail1 @Eq @Set, @@ -1731,6 +1732,7 @@ supportedTypeConstructors = ("TimeOfDay", SomeTypeRep $ typeRep @TimeOfDay), ("Builder", SomeTypeRep $ typeRep @Builder), ("CI", SomeTypeRep $ typeRep @CI), + ("SomeException", SomeTypeRep $ typeRep @SomeException), -- Internal, hidden types ("hell:Hell.NilL", SomeTypeRep $ typeRep @('NilL)), ("hell:Hell.ConsL", SomeTypeRep $ typeRep @('ConsL)), From 3e823867f9e74c1a1ba30119a5bdaeba5b6d5bf4 Mon Sep 17 00:00:00 2001 From: Frederick Pringle Date: Fri, 2 Oct 2026 16:23:28 +0200 Subject: [PATCH 3/4] Add examples for new functions --- examples/46-exceptions.hell | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/46-exceptions.hell diff --git a/examples/46-exceptions.hell b/examples/46-exceptions.hell new file mode 100644 index 0000000..104f4d1 --- /dev/null +++ b/examples/46-exceptions.hell @@ -0,0 +1,23 @@ +main = do + let noSuchFile :: Text = "no/such/file.txt" + let printException = \e -> do Text.hPutStr IO.stderr (Show.show e <> "\n") + IO.pure "" + let catchAndPrintException = \action -> SomeException.catch action printException + + catchAndPrintException (Text.readFile noSuchFile) + + let file = "file.txt" + catchAndPrintException $ + Exception.bracket + (IO.openFile file IO.ReadWriteMode) + (\fileHandle -> do + IO.hClose fileHandle + Directory.removeFile file + ) + (\fileHandle -> do + IO.hSetBuffering fileHandle IO.NoBuffering + Text.hPutStr fileHandle "don't buffer me" + Text.decodeUtf8 <$> ByteString.hGet fileHandle 10 + ) + + IO.pure () From 60e93b0ac5f53e8ab1b0f0e8f79c169d2b705324 Mon Sep 17 00:00:00 2001 From: Frederick Pringle Date: Fri, 2 Oct 2026 16:24:39 +0200 Subject: [PATCH 4/4] Update docs --- docs/api/index.html | 8 ++++---- docs/examples/index.html | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/docs/api/index.html b/docs/api/index.html index fd31840..d58c541 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -18,9 +18,9 @@ } li { line-height: 2em } -Hell's API

Hell's API

Version: 2026-05-29

Back to homepage

Types

  • data () :: *
  • data Bool :: *
  • data Builder :: *
  • data ByteString :: *
  • data CI :: * -> *
  • data Char :: *
  • data Day :: *
  • data DayOfWeek :: *
  • data Double :: *
  • data Either :: * -> * -> *
  • data ExitCode :: *
  • data Handle :: *
  • data IO :: * -> *
  • data Int :: *
  • data Integer :: *
  • data Map :: * -> * -> *
  • data Maybe :: * -> *
  • data Set :: * -> *
  • data Text :: *
  • data These :: * -> * -> *
  • data TimeOfDay :: *
  • data Tree :: * -> *
  • data UTCTime :: *
  • data Value :: *
  • data Vector :: * -> *

Instances

  • instance Alternative Parser
  • instance Alternative Maybe
  • instance Semigroup ([] a)
  • instance Semigroup (Either a b)
  • instance Semigroup Text
  • instance (Semigroup a) => Semigroup (Maybe a)
  • instance Semigroup (Vector a)
  • instance Semigroup (Mod a b)
  • instance Semigroup Builder
  • instance Semigroup (InfoMod a)
  • instance FoldCase Text
  • instance FoldCase ByteString
  • instance Monad []
  • instance Monad IO
  • instance Monad Tree
  • instance Monad (Either a)
  • instance Monad Maybe
  • instance Show (,)
  • instance (Show a) => Show ([] a)
  • instance Show UTCTime
  • instance Show ExitCode
  • instance Show Value
  • instance (Show a) => Show (CI a)
  • instance (Show a) => Show (Set a)
  • instance (Show a) => Show (Tree a)
  • instance Show DayOfWeek
  • instance Show Either
  • instance Show Text
  • instance Show Char
  • instance (Show a) => Show (Maybe a)
  • instance Show Double
  • instance Show Int
  • instance (Show a) => Show (Vector a)
  • instance Show ByteString
  • instance Show Builder
  • instance Show Integer
  • instance Show Day
  • instance Show Bool
  • instance Show TimeOfDay
  • instance Monoid ([] a)
  • instance Monoid Text
  • instance (Monoid a) => Monoid (Maybe a)
  • instance Monoid (Vector a)
  • instance Monoid (Mod a b)
  • instance Monoid Builder
  • instance Ord (,)
  • instance (Ord a) => Ord ([] a)
  • instance Ord UTCTime
  • instance Ord ExitCode
  • instance (Ord a) => Ord (CI a)
  • instance (Ord a) => Ord (Set a)
  • instance (Ord a) => Ord (Tree a)
  • instance Ord DayOfWeek
  • instance Ord Either
  • instance Ord Text
  • instance Ord Char
  • instance (Ord a) => Ord (Maybe a)
  • instance Ord Double
  • instance Ord Int
  • instance (Ord a) => Ord (Vector a)
  • instance Ord ByteString
  • instance Ord Integer
  • instance Ord Day
  • instance Ord Bool
  • instance Ord TimeOfDay
  • instance Eq (,)
  • instance (Eq a) => Eq ([] a)
  • instance Eq UTCTime
  • instance Eq ExitCode
  • instance (Eq a) => Eq (CI a)
  • instance (Eq a) => Eq (Set a)
  • instance (Eq a) => Eq (Tree a)
  • instance Eq DayOfWeek
  • instance Eq Either
  • instance Eq Text
  • instance Eq Char
  • instance (Eq a) => Eq (Maybe a)
  • instance Eq Double
  • instance Eq Int
  • instance (Eq a) => Eq (Vector a)
  • instance Eq ByteString
  • instance Eq Integer
  • instance Eq Day
  • instance Eq Bool
  • instance Eq TimeOfDay
  • instance Applicative []
  • instance Applicative IO
  • instance Applicative Tree
  • instance Applicative (Either a)
  • instance Applicative Parser
  • instance Applicative Maybe
  • instance Functor ((,) a)
  • instance Functor []
  • instance Functor IO
  • instance Functor Tree
  • instance Functor (Either a)
  • instance Functor Parser
  • instance Functor Maybe

Terms

$

  • $ :: forall a b . (a -> b) -> a -> b

  • . :: forall a b c . (b -> c) -> (a -> b) -> a -> c

<$>

  • <$> :: forall (f :: * -> *) a b . Functor f => (a -> b) -> f a -> f b

<**>

  • <**> :: forall (f :: * -> *) a b . Applicative f => +Hell's API

    Hell's API

    Version: 2026-05-29

    Back to homepage

    Types

    • data () :: *
    • data Bool :: *
    • data Builder :: *
    • data ByteString :: *
    • data CI :: * -> *
    • data Char :: *
    • data Day :: *
    • data DayOfWeek :: *
    • data Double :: *
    • data Either :: * -> * -> *
    • data ExitCode :: *
    • data Handle :: *
    • data IO :: * -> *
    • data Int :: *
    • data Integer :: *
    • data Map :: * -> * -> *
    • data Maybe :: * -> *
    • data Set :: * -> *
    • data SomeException :: *
    • data Text :: *
    • data These :: * -> * -> *
    • data TimeOfDay :: *
    • data Tree :: * -> *
    • data UTCTime :: *
    • data Value :: *
    • data Vector :: * -> *

    Instances

    • instance Enum Char
    • instance Enum Int
    • instance Enum Day
    • instance Enum Integer
    • instance Enum Bool
    • instance Enum DayOfWeek
    • instance FoldCase Text
    • instance FoldCase ByteString
    • instance Alternative Parser
    • instance Alternative Maybe
    • instance Semigroup ([] a)
    • instance Semigroup Builder
    • instance Semigroup (InfoMod a)
    • instance Semigroup (Mod a b)
    • instance Semigroup (Either a b)
    • instance Semigroup Text
    • instance (Semigroup a) => Semigroup (Maybe a)
    • instance Semigroup (Vector a)
    • instance Monad []
    • instance Monad IO
    • instance Monad (Either a)
    • instance Monad Maybe
    • instance Monad Tree
    • instance Show (,)
    • instance (Show a) => Show ([] a)
    • instance Show Builder
    • instance Show Value
    • instance Show ExitCode
    • instance Show SomeException
    • instance Show Either
    • instance (Show a) => Show (Set a)
    • instance (Show a) => Show (CI a)
    • instance Show TimeOfDay
    • instance Show Text
    • instance Show Char
    • instance Show ByteString
    • instance (Show a) => Show (Maybe a)
    • instance Show UTCTime
    • instance Show Double
    • instance Show Int
    • instance Show Day
    • instance (Show a) => Show (Vector a)
    • instance Show Integer
    • instance Show Bool
    • instance (Show a) => Show (Tree a)
    • instance Show DayOfWeek
    • instance Monoid ([] a)
    • instance Monoid Builder
    • instance Monoid (Mod a b)
    • instance Monoid Text
    • instance (Monoid a) => Monoid (Maybe a)
    • instance Monoid (Vector a)
    • instance Ord (,)
    • instance (Ord a) => Ord ([] a)
    • instance Ord ExitCode
    • instance Ord Either
    • instance (Ord a) => Ord (Set a)
    • instance (Ord a) => Ord (CI a)
    • instance Ord TimeOfDay
    • instance Ord Text
    • instance Ord Char
    • instance Ord ByteString
    • instance (Ord a) => Ord (Maybe a)
    • instance Ord UTCTime
    • instance Ord Double
    • instance Ord Int
    • instance Ord Day
    • instance (Ord a) => Ord (Vector a)
    • instance Ord Integer
    • instance Ord Bool
    • instance (Ord a) => Ord (Tree a)
    • instance Ord DayOfWeek
    • instance Eq (,)
    • instance (Eq a) => Eq ([] a)
    • instance Eq ExitCode
    • instance Eq Either
    • instance (Eq a) => Eq (Set a)
    • instance (Eq a) => Eq (CI a)
    • instance Eq TimeOfDay
    • instance Eq Text
    • instance Eq Char
    • instance Eq ByteString
    • instance (Eq a) => Eq (Maybe a)
    • instance Eq UTCTime
    • instance Eq Double
    • instance Eq Int
    • instance Eq Day
    • instance (Eq a) => Eq (Vector a)
    • instance Eq Integer
    • instance Eq Bool
    • instance (Eq a) => Eq (Tree a)
    • instance Eq DayOfWeek
    • instance Applicative []
    • instance Applicative IO
    • instance Applicative (Either a)
    • instance Applicative Parser
    • instance Applicative Maybe
    • instance Applicative Tree
    • instance Functor ((,) a)
    • instance Functor []
    • instance Functor IO
    • instance Functor (Either a)
    • instance Functor Parser
    • instance Functor Maybe
    • instance Functor Tree

    Terms

    $

    • $ :: forall a b . (a -> b) -> a -> b

    • . :: forall a b c . (b -> c) -> (a -> b) -> a -> c

    <$>

    • <$> :: forall (f :: * -> *) a b . Functor f => (a -> b) -> f a -> f b

    <**>

    • <**> :: forall (f :: * -> *) a b . Applicative f => f a -> f (a -> b) -> f b

    <*>

    • <*> :: forall (f :: * -> *) a b . Applicative f => -f (a -> b) -> f a -> f b

    <>

    • <> :: forall m . Semigroup m => m -> m -> m

    Alternative

    • Alternative.many :: forall (f :: * -> *) a . Alternative f => f a -> f [a]
    • Alternative.optional :: forall (f :: * -> *) a . Alternative f => f a -> f (Maybe a)

    Applicative

    • Applicative.pure :: forall (f :: * -> *) a . Applicative f => a -> f a

    Argument

    • Argument.help :: forall a . Text -> Mod ArgumentFields a
    • Argument.metavar :: forall a . Text -> Mod ArgumentFields a
    • Argument.value :: forall a . a -> Mod ArgumentFields a

    Async

    • Async.concurrently :: forall a b . IO a -> IO b -> IO (a, b)
    • Async.pooledForConcurrently :: forall a b . [a] -> (a -> IO b) -> IO [b]
    • Async.pooledForConcurrently_ :: forall a . [a] -> (a -> IO ()) -> IO ()
    • Async.pooledMapConcurrently :: forall a b . (a -> IO b) -> [a] -> IO [b]
    • Async.pooledMapConcurrently_ :: forall a . (a -> IO ()) -> [a] -> IO ()
    • Async.race :: forall a b . IO a -> IO b -> IO (Either a b)

    Bool

    • Bool.False :: Bool
    • Bool.True :: Bool
    • Bool.bool :: forall a . a -> a -> Bool -> a
    • Bool.not :: Bool -> Bool

    Builder

    • Builder.byteString :: ByteString -> Builder

    ByteString

    • ByteString.getContents :: IO ByteString
    • ByteString.hGet :: Handle -> Int -> IO ByteString
    • ByteString.hPutStr :: Handle -> ByteString -> IO ()
    • ByteString.interact :: (ByteString -> ByteString) -> IO ()
    • ByteString.readFile :: Text -> IO ByteString
    • ByteString.readProcess :: ProcessConfig () () () -> IO (ExitCode,ByteString,ByteString)
    • ByteString.readProcessStdout_ :: ProcessConfig () () () -> IO ByteString
    • ByteString.readProcess_ :: ProcessConfig () () () -> IO (ByteString,ByteString)
    • ByteString.writeFile :: Text -> ByteString -> IO ()

    CI

    • CI.foldedCase :: forall s . CI s -> s
    • CI.mk :: forall s . FoldCase s => s -> CI s

    Concurrent

    • Concurrent.threadDelay :: Int -> IO ()

    Day

    • Day.addDays :: Integer -> Day -> Day
    • Day.dayOfWeek :: Day -> DayOfWeek
    • Day.diffDays :: Day -> Day -> Integer
    • Day.fromGregorianValid :: Integer -> Int -> Int -> Maybe Day
    • Day.iso8601ParseM :: Text -> Maybe Day
    • Day.iso8601Show :: Day -> Text
    • Day.toGregorian :: Day -> (Integer,Int,Int)

    Directory

    • Directory.copyFile :: Text -> Text -> IO ()
    • Directory.createDirectory :: Text -> IO ()
    • Directory.createDirectoryIfMissing :: Bool -> Text -> IO ()
    • Directory.doesDirectoryExist :: Text -> IO Bool
    • Directory.doesFileExist :: Text -> IO Bool
    • Directory.getCurrentDirectory :: IO Text
    • Directory.getFileSize :: Text -> IO Integer
    • Directory.getHomeDirectory :: IO Text
    • Directory.getSymbolicLinkTarget :: Text -> IO Text
    • Directory.listDirectory :: Text -> IO [Text]
    • Directory.removeDirectory :: Text -> IO ()
    • Directory.removeFile :: Text -> IO ()
    • Directory.renameFile :: Text -> Text -> IO ()
    • Directory.setCurrentDirectory :: Text -> IO ()

    Double

    • Double.eq :: Double -> Double -> Bool
    • Double.fromInt :: Int -> Double
    • Double.mult :: Double -> Double -> Double
    • Double.plus :: Double -> Double -> Double
    • Double.readMaybe :: Text -> Maybe Double
    • Double.show :: Double -> Text
    • Double.showEFloat :: Maybe Int -> Double -> Text -> Text
    • Double.showFFloat :: Maybe Int -> Double -> Text -> Text
    • Double.subtract :: Double -> Double -> Double

    Either

    • Either.Left :: forall a b . a -> Either a b
    • Either.Right :: forall a b . b -> Either a b
    • Either.either :: forall a b x . (a -> x) -> (b -> x) -> Either a b -> x

    Environment

    • Environment.getArgs :: IO [Text]
    • Environment.getEnv :: Text -> IO Text
    • Environment.getEnvironment :: IO [(Text,Text)]

    Eq

    • Eq.eq :: forall a . Eq a => a -> a -> Bool

    Error

    • Error.error :: forall a . Text -> a

    Exit

    • Exit.ExitFailure :: Int -> ExitCode
    • Exit.ExitSuccess :: ExitCode
    • Exit.die :: forall a . Text -> IO a
    • Exit.exitCode :: forall a . a -> (Int -> a) -> ExitCode -> a
    • Exit.exitWith :: forall a . ExitCode -> IO a

    Flag

    • Flag.help :: forall a . Text -> Mod FlagFields a
    • Flag.long :: forall a . Text -> Mod FlagFields a

    Function

    • Function.fix :: forall a . (a -> a) -> a
    • Function.id :: forall a . a -> a

    Functor

    • Functor.fmap :: forall (f :: * -> *) a b . Functor f => (a -> b) -> f a -> f b

    Http

    • Http.FilePart :: Integer -> Integer -> Integer -> FilePart
    • Http.consumeRequestBodyStrict :: Request -> IO ByteString
    • Http.getRequestBodyChunk :: Request -> IO ByteString
    • Http.mkStatus :: Int -> Text -> Status
    • Http.pathInfo :: Request -> [Text]
    • Http.queryString :: Request -> [(ByteString,(Maybe ByteString))]
    • Http.requestHeaders :: Request -> [((CI ByteString),ByteString)]
    • Http.responseBuilder :: Status -> [((CI ByteString),ByteString)] -> Builder -> Response
    • Http.responseFile :: Status -> [((CI ByteString),ByteString)] -> Text -> Maybe FilePart -> Response
    • Http.responseStream :: Status -> [((CI ByteString),ByteString)] -> ((Builder -> IO ()) -> IO () -> IO ()) -> Response
    • Http.run :: Int -> (Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived) -> IO ()

    IO

    • IO.AppendMode :: IOMode
    • IO.BlockBuffering :: Maybe Int -> BufferMode
    • IO.LineBuffering :: BufferMode
    • IO.NoBuffering :: BufferMode
    • IO.ReadMode :: IOMode
    • IO.ReadWriteMode :: IOMode
    • IO.WriteMode :: IOMode
    • IO.forM_ :: forall a . [a] -> (a -> IO ()) -> IO ()
    • IO.hClose :: Handle -> IO ()
    • IO.hSetBuffering :: Handle -> BufferMode -> IO ()
    • IO.mapM_ :: forall a . (a -> IO ()) -> [a] -> IO ()
    • IO.openFile :: Text -> IOMode -> IO Handle
    • IO.print :: forall a . Show a => a -> IO ()
    • IO.pure :: forall a . a -> IO a
    • IO.stderr :: Handle
    • IO.stdin :: Handle
    • IO.stdout :: Handle

    Int

    • Int.eq :: Int -> Int -> Bool
    • Int.fromInteger :: Integer -> Int
    • Int.mult :: Int -> Int -> Int
    • Int.plus :: Int -> Int -> Int
    • Int.readMaybe :: Text -> Maybe Int
    • Int.show :: Int -> Text
    • Int.subtract :: Int -> Int -> Int
    • Int.toInteger :: Int -> Integer

    Integer

    • Integer.mult :: Integer -> Integer -> Integer
    • Integer.plus :: Integer -> Integer -> Integer
    • Integer.readMaybe :: Text -> Maybe Integer
    • Integer.subtract :: Integer -> Integer -> Integer

    Json

    • Json.Array :: Vector Value -> Value
    • Json.Bool :: Bool -> Value
    • Json.Null :: Value
    • Json.Number :: Double -> Value
    • Json.Object :: Map Text Value -> Value
    • Json.String :: Text -> Value
    • Json.decode :: ByteString -> Maybe Value
    • Json.encode :: Value -> ByteString
    • Json.value :: forall a . +f (a -> b) -> f a -> f b

    <>

    • <> :: forall m . Semigroup m => m -> m -> m

    Alternative

    • Alternative.many :: forall (f :: * -> *) a . Alternative f => f a -> f [a]
    • Alternative.optional :: forall (f :: * -> *) a . Alternative f => f a -> f (Maybe a)

    Applicative

    • Applicative.pure :: forall (f :: * -> *) a . Applicative f => a -> f a

    Argument

    • Argument.help :: forall a . Text -> Mod ArgumentFields a
    • Argument.metavar :: forall a . Text -> Mod ArgumentFields a
    • Argument.value :: forall a . a -> Mod ArgumentFields a

    Async

    • Async.concurrently :: forall a b . IO a -> IO b -> IO (a, b)
    • Async.pooledForConcurrently :: forall a b . [a] -> (a -> IO b) -> IO [b]
    • Async.pooledForConcurrently_ :: forall a . [a] -> (a -> IO ()) -> IO ()
    • Async.pooledMapConcurrently :: forall a b . (a -> IO b) -> [a] -> IO [b]
    • Async.pooledMapConcurrently_ :: forall a . (a -> IO ()) -> [a] -> IO ()
    • Async.race :: forall a b . IO a -> IO b -> IO (Either a b)

    Bool

    • Bool.False :: Bool
    • Bool.True :: Bool
    • Bool.bool :: forall a . a -> a -> Bool -> a
    • Bool.not :: Bool -> Bool

    Builder

    • Builder.byteString :: ByteString -> Builder

    ByteString

    • ByteString.getContents :: IO ByteString
    • ByteString.hGet :: Handle -> Int -> IO ByteString
    • ByteString.hPutStr :: Handle -> ByteString -> IO ()
    • ByteString.interact :: (ByteString -> ByteString) -> IO ()
    • ByteString.readFile :: Text -> IO ByteString
    • ByteString.readProcess :: ProcessConfig () () () -> IO (ExitCode,ByteString,ByteString)
    • ByteString.readProcessStdout_ :: ProcessConfig () () () -> IO ByteString
    • ByteString.readProcess_ :: ProcessConfig () () () -> IO (ByteString,ByteString)
    • ByteString.writeFile :: Text -> ByteString -> IO ()

    CI

    • CI.foldedCase :: forall s . CI s -> s
    • CI.mk :: forall s . FoldCase s => s -> CI s

    Concurrent

    • Concurrent.threadDelay :: Int -> IO ()

    Day

    • Day.addDays :: Integer -> Day -> Day
    • Day.dayOfWeek :: Day -> DayOfWeek
    • Day.diffDays :: Day -> Day -> Integer
    • Day.fromGregorianValid :: Integer -> Int -> Int -> Maybe Day
    • Day.iso8601ParseM :: Text -> Maybe Day
    • Day.iso8601Show :: Day -> Text
    • Day.toGregorian :: Day -> (Integer,Int,Int)

    Directory

    • Directory.copyFile :: Text -> Text -> IO ()
    • Directory.createDirectory :: Text -> IO ()
    • Directory.createDirectoryIfMissing :: Bool -> Text -> IO ()
    • Directory.doesDirectoryExist :: Text -> IO Bool
    • Directory.doesFileExist :: Text -> IO Bool
    • Directory.getCurrentDirectory :: IO Text
    • Directory.getFileSize :: Text -> IO Integer
    • Directory.getHomeDirectory :: IO Text
    • Directory.getSymbolicLinkTarget :: Text -> IO Text
    • Directory.listDirectory :: Text -> IO [Text]
    • Directory.removeDirectory :: Text -> IO ()
    • Directory.removeFile :: Text -> IO ()
    • Directory.renameFile :: Text -> Text -> IO ()
    • Directory.setCurrentDirectory :: Text -> IO ()

    Double

    • Double.eq :: Double -> Double -> Bool
    • Double.fromInt :: Int -> Double
    • Double.mult :: Double -> Double -> Double
    • Double.plus :: Double -> Double -> Double
    • Double.readMaybe :: Text -> Maybe Double
    • Double.show :: Double -> Text
    • Double.showEFloat :: Maybe Int -> Double -> Text -> Text
    • Double.showFFloat :: Maybe Int -> Double -> Text -> Text
    • Double.subtract :: Double -> Double -> Double

    Either

    • Either.Left :: forall a b . a -> Either a b
    • Either.Right :: forall a b . b -> Either a b
    • Either.either :: forall a b x . (a -> x) -> (b -> x) -> Either a b -> x

    Enum

    • Enum.enumFrom :: forall a . Enum a => a -> [a]
    • Enum.enumFromTo :: forall a . Enum a => a -> a -> [a]

    Environment

    • Environment.getArgs :: IO [Text]
    • Environment.getEnv :: Text -> IO Text
    • Environment.getEnvironment :: IO [(Text,Text)]

    Eq

    • Eq.eq :: forall a . Eq a => a -> a -> Bool

    Error

    • Error.error :: forall a . Text -> a

    Exception

    • Exception.bracket :: forall a b c . IO a -> (a -> IO b) -> (a -> IO c) -> IO c
    • Exception.finally :: forall a b . IO a -> IO b -> IO a
    • Exception.onException :: forall a b . IO a -> IO b -> IO a

    Exit

    • Exit.ExitFailure :: Int -> ExitCode
    • Exit.ExitSuccess :: ExitCode
    • Exit.die :: forall a . Text -> IO a
    • Exit.exitCode :: forall a . a -> (Int -> a) -> ExitCode -> a
    • Exit.exitWith :: forall a . ExitCode -> IO a

    Flag

    • Flag.help :: forall a . Text -> Mod FlagFields a
    • Flag.long :: forall a . Text -> Mod FlagFields a

    Function

    • Function.fix :: forall a . (a -> a) -> a
    • Function.id :: forall a . a -> a

    Functor

    • Functor.fmap :: forall (f :: * -> *) a b . Functor f => (a -> b) -> f a -> f b

    Http

    • Http.FilePart :: Integer -> Integer -> Integer -> FilePart
    • Http.consumeRequestBodyStrict :: Request -> IO ByteString
    • Http.getRequestBodyChunk :: Request -> IO ByteString
    • Http.mkStatus :: Int -> Text -> Status
    • Http.pathInfo :: Request -> [Text]
    • Http.queryString :: Request -> [(ByteString,(Maybe ByteString))]
    • Http.requestHeaders :: Request -> [((CI ByteString),ByteString)]
    • Http.responseBuilder :: Status -> [((CI ByteString),ByteString)] -> Builder -> Response
    • Http.responseFile :: Status -> [((CI ByteString),ByteString)] -> Text -> Maybe FilePart -> Response
    • Http.responseStream :: Status -> [((CI ByteString),ByteString)] -> ((Builder -> IO ()) -> IO () -> IO ()) -> Response
    • Http.run :: Int -> (Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived) -> IO ()

    IO

    • IO.AppendMode :: IOMode
    • IO.BlockBuffering :: Maybe Int -> BufferMode
    • IO.LineBuffering :: BufferMode
    • IO.NoBuffering :: BufferMode
    • IO.ReadMode :: IOMode
    • IO.ReadWriteMode :: IOMode
    • IO.WriteMode :: IOMode
    • IO.forM_ :: forall a . [a] -> (a -> IO ()) -> IO ()
    • IO.hClose :: Handle -> IO ()
    • IO.hSetBuffering :: Handle -> BufferMode -> IO ()
    • IO.mapM_ :: forall a . (a -> IO ()) -> [a] -> IO ()
    • IO.openFile :: Text -> IOMode -> IO Handle
    • IO.print :: forall a . Show a => a -> IO ()
    • IO.pure :: forall a . a -> IO a
    • IO.stderr :: Handle
    • IO.stdin :: Handle
    • IO.stdout :: Handle

    Int

    • Int.eq :: Int -> Int -> Bool
    • Int.fromInteger :: Integer -> Int
    • Int.mult :: Int -> Int -> Int
    • Int.plus :: Int -> Int -> Int
    • Int.readMaybe :: Text -> Maybe Int
    • Int.show :: Int -> Text
    • Int.subtract :: Int -> Int -> Int
    • Int.toInteger :: Int -> Integer

    Integer

    • Integer.mult :: Integer -> Integer -> Integer
    • Integer.plus :: Integer -> Integer -> Integer
    • Integer.readMaybe :: Text -> Maybe Integer
    • Integer.subtract :: Integer -> Integer -> Integer

    Json

    • Json.Array :: Vector Value -> Value
    • Json.Bool :: Bool -> Value
    • Json.Null :: Value
    • Json.Number :: Double -> Value
    • Json.Object :: Map Text Value -> Value
    • Json.String :: Text -> Value
    • Json.decode :: ByteString -> Maybe Value
    • Json.encode :: Value -> ByteString
    • Json.value :: forall a . a -> (Bool -> a) -> (Text -> a) -> @@ -38,8 +38,8 @@ ProcessConfig stdin stdout' stderr
    • Process.setWorkingDir :: forall a b c . Text -> ProcessConfig a b c -> ProcessConfig a b c
    • Process.useHandleClose :: forall (a :: StreamType) . Handle -> StreamSpec a ()
    • Process.useHandleOpen :: forall (a :: StreamType) . Handle -> StreamSpec a ()

    Record

    • Record.get :: forall (k :: Symbol) a (t :: Symbol) (xs :: List) . Tagged t (Record xs) -> a
    • Record.modify :: forall (k :: Symbol) a (t :: Symbol) (xs :: List) . (a -> a) -> Tagged t (Record xs) -> Tagged t (Record xs)
    • Record.set :: forall (k :: Symbol) a (t :: Symbol) (xs :: List) . -a -> Tagged t (Record xs) -> Tagged t (Record xs)

    Set

    • Set.delete :: forall a . Ord a => a -> Set a -> Set a
    • Set.difference :: forall a . Ord a => Set a -> Set a -> Set a
    • Set.fromList :: forall a . Ord a => [a] -> Set a
    • Set.insert :: forall a . Ord a => a -> Set a -> Set a
    • Set.intersection :: forall a . Ord a => Set a -> Set a -> Set a
    • Set.member :: forall a . Ord a => a -> Set a -> Bool
    • Set.singleton :: forall a . Ord a => a -> Set a
    • Set.size :: forall a . Set a -> Int
    • Set.toList :: forall a . Set a -> [a]
    • Set.union :: forall a . Ord a => Set a -> Set a -> Set a

    Show

    • Show.show :: forall a . Show a => a -> Text

    Temp

    • Temp.withSystemTempDirectory :: forall a . Text -> (Text -> IO a) -> IO a
    • Temp.withSystemTempFile :: forall a . Text -> (Text -> Handle -> IO a) -> IO a

    Text

    • Text.all :: (Char -> Bool) -> Text -> Bool
    • Text.any :: (Char -> Bool) -> Text -> Bool
    • Text.appendFile :: Text -> Text -> IO ()
    • Text.breakOn :: Text -> Text -> (Text,Text)
    • Text.concat :: [Text] -> Text
    • Text.decodeUtf8 :: ByteString -> Text
    • Text.drop :: Int -> Text -> Text
    • Text.dropEnd :: Int -> Text -> Text
    • Text.encodeUtf8 :: Text -> ByteString
    • Text.eq :: Text -> Text -> Bool
    • Text.filter :: (Char -> Bool) -> Text -> Text
    • Text.getContents :: IO Text
    • Text.getLine :: IO Text
    • Text.hPutStr :: Handle -> Text -> IO ()
    • Text.interact :: (Text -> Text) -> IO ()
    • Text.intercalate :: Text -> [Text] -> Text
    • Text.isInfixOf :: Text -> Text -> Bool
    • Text.isPrefixOf :: Text -> Text -> Bool
    • Text.isSuffixOf :: Text -> Text -> Bool
    • Text.length :: Text -> Int
    • Text.lines :: Text -> [Text]
    • Text.pack :: [Char] -> Text
    • Text.putStr :: Text -> IO ()
    • Text.putStrLn :: Text -> IO ()
    • Text.readFile :: Text -> IO Text
    • Text.readProcess :: ProcessConfig () () () -> IO (ExitCode,Text,Text)
    • Text.readProcessStdout_ :: ProcessConfig () () () -> IO Text
    • Text.readProcess_ :: ProcessConfig () () () -> IO (Text,Text)
    • Text.replace :: Text -> Text -> Text -> Text
    • Text.reverse :: Text -> Text
    • Text.setStdin :: Text -> ProcessConfig () () () -> ProcessConfig () () ()
    • Text.splitOn :: Text -> Text -> [Text]
    • Text.strip :: Text -> Text
    • Text.stripPrefix :: Text -> Text -> Maybe Text
    • Text.stripSuffix :: Text -> Text -> Maybe Text
    • Text.take :: Int -> Text -> Text
    • Text.takeEnd :: Int -> Text -> Text
    • Text.toLower :: Text -> Text
    • Text.toUpper :: Text -> Text
    • Text.unlines :: [Text] -> Text
    • Text.unpack :: Text -> [Char]
    • Text.unwords :: [Text] -> Text
    • Text.words :: Text -> [Text]
    • Text.writeFile :: Text -> Text -> IO ()

    These

    • These.That :: forall a b . b -> These a b
    • These.These :: forall a b . a -> b -> These a b
    • These.This :: forall a b . a -> These a b
    • These.these :: forall a b c . -(a -> c) -> (b -> c) -> (a -> b -> c) -> These a b -> c

    TimeOfDay

    • TimeOfDay.makeTimeOfDayValid :: Int -> Int -> Double -> Maybe TimeOfDay
    • TimeOfDay.midday :: TimeOfDay
    • TimeOfDay.midnight :: TimeOfDay
    • TimeOfDay.timeOfDayToTime :: TimeOfDay -> Double
    • TimeOfDay.timeToTimeOfDay :: Double -> TimeOfDay
    • TimeOfDay.todHour :: TimeOfDay -> Int
    • TimeOfDay.todMin :: TimeOfDay -> Int
    • TimeOfDay.todSec :: TimeOfDay -> Double

    Timeout

    • Timeout.timeout :: forall a . Int -> IO a -> IO (Maybe a)

    Tree

    • Tree.Node :: forall a . a -> [Tree a] -> Tree a
    • Tree.flatten :: forall a . Tree a -> [a]
    • Tree.foldTree :: forall a b . (a -> [b] -> b) -> Tree a -> b
    • Tree.levels :: forall a . Tree a -> [[a]]
    • Tree.map :: forall a b . (a -> b) -> Tree a -> Tree b
    • Tree.unfoldTree :: forall a b . (b -> (a, [b])) -> b -> Tree a

    Tuple

    • Tuple.(,) :: forall a b . a -> b -> (a, b)
    • Tuple.(,,) :: forall a b c . a -> b -> c -> (a, b, c)
    • Tuple.(,,,) :: forall a b c d . a -> b -> c -> d -> (a, b, c, d)

    UTCTime

    • UTCTime.UTCTime :: Day -> Double -> UTCTime
    • UTCTime.addUTCTime :: Double -> UTCTime -> UTCTime
    • UTCTime.diffUTCTime :: UTCTime -> UTCTime -> Double
    • UTCTime.getCurrentTime :: IO UTCTime
    • UTCTime.iso8601ParseM :: Text -> Maybe UTCTime
    • UTCTime.iso8601Show :: UTCTime -> Text
    • UTCTime.utctDay :: UTCTime -> Day
    • UTCTime.utctDayTime :: UTCTime -> Double

    Vector

    • Vector.fromList :: forall a . [a] -> Vector a
    • Vector.toList :: forall a . Vector a -> [a]