Skip to content

Commit a026509

Browse files
committed
doc(servant-foreign): reorder imports
The imports were ordered in the worst possible way, with all undocumented small type definitions coming first and the actual meat of the module coming at the very end, mixed in with irrelevant functions. This inverses that toxic ordering, showing the main function first (`listFromAPI`) and then the main data type (`Req`) and the main class (`HasForeignType`).
1 parent c3a517c commit a026509

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

servant-foreign/src/Servant/Foreign.hs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@
33
--
44
-- See documentation of 'HasForeignType' for a simple example. 'listFromAPI' returns a list of all your endpoints and their foreign types, given a mapping from Haskell types to foreign types (conventionally called `ftypes` below).
55
module Servant.Foreign
6-
( ArgType(..)
6+
( listFromAPI
7+
, Req(..)
8+
, defReq
9+
, HasForeignType(..)
10+
, GenerateList(..)
11+
, HasForeign(..)
12+
, NoTypes
13+
, ArgType(..)
714
, HeaderArg(..)
815
, QueryArg(..)
9-
, Req(..)
1016
, ReqBodyContentType(..)
1117
, Segment(..)
18+
, isCapture
19+
, captureArg
1220
, SegmentType(..)
1321
, Url(..)
14-
-- aliases
22+
-- * aliases
1523
, Path
1624
, Arg(..)
1725
, FunctionName(..)
1826
, PathSegment(..)
19-
-- lenses
27+
-- * lenses
2028
, argName
2129
, argType
2230
, argPath
@@ -32,7 +40,7 @@ module Servant.Foreign
3240
, queryArgName
3341
, queryArgType
3442
, headerArg
35-
-- prisms
43+
-- * prisms
3644
, _PathSegment
3745
, _HeaderArg
3846
, _ReplaceHeaderArg
@@ -41,16 +49,7 @@ module Servant.Foreign
4149
, _Normal
4250
, _Flag
4351
, _List
44-
-- rest of it
45-
, HasForeign(..)
46-
, HasForeignType(..)
47-
, GenerateList(..)
48-
, NoTypes
49-
, captureArg
50-
, isCapture
51-
, defReq
52-
, listFromAPI
53-
-- re-exports
52+
-- * re-exports
5453
, module Servant.API
5554
, module Servant.Foreign.Inflections
5655
) where

0 commit comments

Comments
 (0)