-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved formatting. Switch to prettyprinter library. Tracing.
- Loading branch information
Showing
12 changed files
with
333 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{-# LANGUAGE FlexibleInstances #-} | ||
|
||
module Options.Applicative.Help.Ann ( | ||
Ann(..), | ||
CanAnnotate(..) | ||
) where | ||
|
||
import Prettyprinter (Doc, annotate) | ||
|
||
data Ann = AnnTrace Int String | ||
deriving (Eq, Show) | ||
|
||
class CanAnnotate a where | ||
-- | Annotate trace a value | ||
annTrace | ||
:: Int -- ^ Trace level | ||
-> String -- ^ Trace message | ||
-> a -- ^ Value to be traced | ||
-> a -- ^ The traced value | ||
|
||
instance CanAnnotate (Doc Ann) where | ||
annTrace n = annotate . AnnTrace n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.