Created
August 10, 2016 09:58
-
-
Save dorchard/8d726882bb3cdbb5bd44e8ffc14e0ff4 to your computer and use it in GitHub Desktop.
type families for extra information on pretty printer
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
class Pretty t where | |
type ExtraInfo t | |
pprint :: FortranVersion -> t -> ExtraInfo t -> Doc | |
instance Pretty (Expression a) where | |
type ExtraInfo (Expression a) = () | |
pprint v e () = ... | |
instance Pretty (Block a) where | |
type ExtraInfo (Block a) = Int -- indent level | |
pprint v e i = ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment