Merge pull request #74 from haskell-servant/wip-whitespace-comment
servant: clean up some white spaces, add link explaining why Or works.
This commit is contained in:
commit
e59c03faa2
1 changed files with 24 additions and 22 deletions
|
@ -138,6 +138,8 @@ data Link = Link
|
|||
|
||||
-- | If either a or b produce an empty constraint, produce an empty constraint.
|
||||
type family Or (a :: Constraint) (b :: Constraint) :: Constraint where
|
||||
-- This works because of:
|
||||
-- https://ghc.haskell.org/trac/ghc/wiki/NewAxioms/CoincidentOverlap
|
||||
Or () b = ()
|
||||
Or a () = ()
|
||||
|
||||
|
@ -145,8 +147,8 @@ type family Or (a :: Constraint) (b :: Constraint) :: Constraint where
|
|||
type family And (a :: Constraint) (b :: Constraint) :: Constraint where
|
||||
And () () = ()
|
||||
|
||||
-- | You may use this type family to tell the type checker that your custom type
|
||||
-- may be skipped as part of a link. This is useful for things like
|
||||
-- | You may use this type family to tell the type checker that your custom
|
||||
-- type may be skipped as part of a link. This is useful for things like
|
||||
-- 'QueryParam' that are optional in a URI and do not affect them if they are
|
||||
-- omitted.
|
||||
--
|
||||
|
|
Loading…
Reference in a new issue