Skip to content

Instantly share code, notes, and snippets.

View AriFordsham's full-sized avatar

AriFordsham

View GitHub Profile
@nh2
nh2 / TemplateHaskell-recompilation-problem.md
Created October 31, 2019 11:12
TemplateHaskell: The [TH] Recompilation Problem

"The [TH] Recompilation Problem"

Usually, when you use ghci's :reload or ghc --make (with -O0 to disable unfoldings which are used for cross-module inlining), after changing implementation code of functions, GHC will incrementally recompile only the modules you changed, making for a fast development experience when iterating on implementation details.

(When you change API like functions types, export lists, etc.,

{-# LANGUAGE OverloadedStrings #-}
import qualified Network.Wai as Wai
import qualified Network.Wai.Handler.Warp as Warp
import Network.HTTP.Types
import qualified Network.HTTP.Conduit as HC
import qualified Network.HTTP.Client as HCl
import qualified Network.HTTP.Client.Conduit as HCC
import Data.Monoid
import qualified Data.ByteString.Char8 as S8
import Data.Conduit