Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Reformat with fourmolu
Browse files Browse the repository at this point in the history
Using previously-added configuration and `fourmolu -i .`
Note that we exclude the test-cases
(`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to
formatting.
  • Loading branch information
bgamari committed May 17, 2024
1 parent 151b173 commit a7dcf13
Show file tree
Hide file tree
Showing 55 changed files with 11,095 additions and 8,918 deletions.
113 changes: 58 additions & 55 deletions haddock-api/src/Documentation/Haddock.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------

-- |
-- Module : Documentation.Haddock
-- Copyright : (c) David Waern 2010
Expand All @@ -10,79 +13,79 @@
--
-- The Haddock API: A rudimentary, highly experimental API exposing some of
-- the internals of Haddock. Don't expect it to be stable.
-----------------------------------------------------------------------------
module Documentation.Haddock (

-- * Interface
Interface(..),
InstalledInterface(..),
toInstalledIface,
createInterfaces,
processModules,
module Documentation.Haddock
( -- * Interface
Interface (..)
, InstalledInterface (..)
, toInstalledIface
, createInterfaces
, processModules

-- * Export items & declarations
ExportItem(..),
DocForDecl,
FnArgsDoc,
-- * Export items & declarations
, ExportItem (..)
, DocForDecl
, FnArgsDoc

-- * Cross-referencing
LinkEnv,
DocName(..),
-- * Cross-referencing
, LinkEnv
, DocName (..)

-- * Instances
DocInstance,
InstHead,
-- * Instances
, DocInstance
, InstHead

-- * Documentation comments
Doc,
MDoc,
DocH(..),
Example(..),
Hyperlink(..),
DocMarkup,
DocMarkupH(..),
Documentation(..),
ArgMap,
WarningMap,
DocMap,
HaddockModInfo(..),
markup,
-- * Documentation comments
, Doc
, MDoc
, DocH (..)
, Example (..)
, Hyperlink (..)
, DocMarkup
, DocMarkupH (..)
, Documentation (..)
, ArgMap
, WarningMap
, DocMap
, HaddockModInfo (..)
, markup

-- * Interface files
InterfaceFile(..),
readInterfaceFile,
freshNameCache,
-- * Interface files
, InterfaceFile (..)
, readInterfaceFile
, freshNameCache

-- * Flags and options
Flag(..),
DocOption(..),
-- * Flags and options
, Flag (..)
, DocOption (..)

-- * Error handling
HaddockException(..),
-- * Error handling
, HaddockException (..)

-- * Program entry point
haddock,
haddockWithGhc,
getGhcDirs,
withGhc
) where
-- * Program entry point
, haddock
, haddockWithGhc
, getGhcDirs
, withGhc
) where

import Documentation.Haddock.Markup (markup)
import Haddock.InterfaceFile
import Haddock
import Haddock.Interface
import Haddock.Types
import Haddock.InterfaceFile
import Haddock.Options
import Haddock

import Haddock.Types

-- | Create 'Interface' structures from a given list of Haddock command-line
-- flags and file or module names (as accepted by 'haddock' executable). Flags
-- that control documentation generation or show help or version information
-- are ignored.
createInterfaces
:: [Flag] -- ^ A list of command-line flags
-> [String] -- ^ File or module names
-> IO [Interface] -- ^ Resulting list of interfaces
:: [Flag]
-- ^ A list of command-line flags
-> [String]
-- ^ File or module names
-> IO [Interface]
-- ^ Resulting list of interfaces
createInterfaces flags modules = do
(_, ifaces, _) <- withGhc flags (readPackagesAndProcessModules flags modules)
return ifaces
5 changes: 4 additions & 1 deletion haddock-api/src/Haddock/Backends/HaddockDB.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------

-- |
-- Module : Haddock.Backends.HaddockDB
-- Copyright : (c) Simon Marlow 2003
Expand All @@ -7,7 +10,6 @@
-- Maintainer : haddock@projects.haskell.org
-- Stability : experimental
-- Portability : portable
-----------------------------------------------------------------------------
module Haddock.Backends.HaddockDB (ppDocBook) where

{-
Expand All @@ -23,6 +25,7 @@ import Text.PrettyPrint

ppDocBook :: a
ppDocBook = error "not working"

{-
ppDocBook :: FilePath -> [(Module, Interface)] -> String
ppDocBook odir mods = render (ppIfaces mods)
Expand Down
Loading

0 comments on commit a7dcf13

Please sign in to comment.