Skip to content

Instantly share code, notes, and snippets.

@arybczak
arybczak / perf_main.hs
Last active March 26, 2020 20:19
TH vs generic optics
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
@arybczak
arybczak / drf.hs
Last active October 17, 2019 10:51
-- For automated generation of LabelOptic instances.
{-# LANGUAGE TemplateHaskell #-}
-- For duplicate names of record fields. To be replaced by NoFieldSelectors as
-- top level selector functions are not needed here.
{-# LANGUAGE DuplicateRecordFields #-}
-- For OverloadedLabels syntax.
{-# LANGUAGE OverloadedLabels #-}