<commit_before>{-| The primary Free Monad wrapping HTTP actions.
-}

{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}

module Network.HTTP.Client.Free.Types where

import Control.Monad.Trans.Free.Church (FT)
import Network.HTTP.Types.Method (StdMethod)

type family RequestType  client :: *
type family ResponseType client :: *

data HttpF client a = HttpF StdMethod (RequestType client) (ResponseType client -> a)
                    deriving Functor

type FreeHttp client m a = FT (HttpF client) m a<commit_msg>Add better haddocks docs to Types.hs<commit_after>{-| The primary Free Monad wrapping HTTP actions.
-}

{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}

module Network.HTTP.Client.Free.Types (
    -- * Type Familes
      RequestType
    , ResponseType

    -- * The base functor of our library
    , HttpF

    -- * Type aliases
    , FreeHttp
) where

import Control.Monad.Trans.Free.Church (FT)
import Network.HTTP.Types.Method (StdMethod)

-- | type family to represent the request type foundation
type family RequestType  client :: *

-- | type family to represent the response type foundation
type family ResponseType client :: *

-- | Our functor from which the free-http free monad is generated from.
data HttpF client a = HttpF StdMethod (RequestType client) (ResponseType client -> a)
                    deriving Functor

-- | a type alias for the free monad generated by 'HttpF'
type FreeHttp client m a = FT (HttpF client) m a
{'fraction_non_alphanumeric': 0.09146341463414634, 'fraction_numerical': 0.0, 'mean_word_length': 3.2936046511627906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '806332', 'n_tokens_mistral': 444, 'n_tokens_neox': 430, 'n_words': 159}