Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
snowleopard committed May 19, 2024
1 parent 7bf0527 commit ce7f05d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Algebra/Graph/Export.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Algebra.Graph.Internal
-- implementation uses difference lists). Here @s@ is the type of abstract
-- symbols or strings (text or binary). 'Doc' @s@ is a 'Monoid', therefore
-- 'mempty' corresponds to the /empty document/ and two documents can be
-- concatenated with 'mappend' (or operator 'Data.Monoid.<>'). Documents
-- concatenated with 'mappend' (or operator 'Data.Semigroup.<>'). Documents
-- comprising a single symbol or string can be constructed using the function
-- 'literal'. Alternatively, you can construct documents as string literals,
-- e.g. simply as @"alga"@, by using the @OverloadedStrings@ GHC extension. To
Expand Down Expand Up @@ -91,7 +91,7 @@ isEmpty (Doc xs) = null xs
-- constructed directly from string literals (see the second example below).
--
-- @
-- literal "Hello, " 'Data.Monoid.<>' literal "World!" == literal "Hello, World!"
-- literal "Hello, " 'Data.Semigroup.<>' literal "World!" == literal "Hello, World!"
-- literal "I am just a string literal" == "I am just a string literal"
-- 'render' . literal == 'id'
-- @
Expand All @@ -101,8 +101,8 @@ literal = Doc . pure
-- | Render the document as a single string. An inverse of the function 'literal'.
--
-- @
-- render ('literal' "al" 'Data.Monoid.<>' 'literal' "ga") :: ('IsString' s, 'Monoid' s) => s
-- render ('literal' "al" 'Data.Monoid.<>' 'literal' "ga") == "alga"
-- render ('literal' "al" 'Data.Semigroup.<>' 'literal' "ga") :: ('IsString' s, 'Monoid' s) => s
-- render ('literal' "al" 'Data.Semigroup.<>' 'literal' "ga") == "alga"
-- render 'mempty' == 'mempty'
-- render . 'literal' == 'id'
-- @
Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Graph/Label.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Instances of this type class must satisfy the following semiring laws:
> x <.> (y <+> z) == x <.> y <+> x <.> z
> (x <+> y) <.> z == x <.> z <+> y <.> z
-}
class (Monoid a, Semigroup a) => Semiring a where
class Monoid a => Semiring a where
one :: a
(<.>) :: a -> a -> a

Expand Down
1 change: 0 additions & 1 deletion test/Algebra/Graph/Test/Arbitrary.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
Expand Down

0 comments on commit ce7f05d

Please sign in to comment.