From 7a3ed792eb39368566696c17a7f56b0c0a5b3384 Mon Sep 17 00:00:00 2001 From: Tom Harding Date: Mon, 24 Jun 2019 08:48:31 +0100 Subject: [PATCH] Finish doc-checking Nothing dramatic - just had to add a `Main` to keep everything happy, and ignore the type error block. --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 59a5a26..e844e1e 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ example data types: {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeApplications #-} -module Example where +module Main where import Control.Lens ((.~), (^.), (&), Const (..), Identity, anyOf) import Data.Functor.Const (Const (..)) @@ -124,7 +124,7 @@ Of course, this method requires every field to be monoidal. If we try with `Identity`, for example, we're in trouble if all our fields aren't themselves monoids: -```haskell +```{haskell, ignore} eg2 :: Bare Triple eg2 = mempty -- error: @@ -288,3 +288,14 @@ eg16 :: [String] eg16 = labelsWhere (isNothing . getLast) eg9 -- ["age"] ``` + +### Documentation + +All the docs in this library are tested on `cabal new-test`. Furthermore, this +README is tested by `markdown-unlit`. To keep _that_ happy, we do need a `main` +in this file, so just ignore the following :) + +```haskell +main :: IO () +main = pure () +```