-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31f7881
commit e497068
Showing
6 changed files
with
93 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Icon where | ||
|
||
import qualified GHC.Utils.Outputable | ||
|
||
data IconType = Title | End | Action | Question | ||
|
||
instance Show IconType where | ||
show Title = "Title" | ||
show End = "End" | ||
show Action = "Action" | ||
show Question = "Question" | ||
|
||
data Icon = Icon { iconText :: String, iconType :: IconType } | ||
|
||
instance GHC.Utils.Outputable.Outputable Icon where | ||
ppr Icon { iconText = x, iconType = y } = GHC.Utils.Outputable.text $ show y ++ ": " ++ x |
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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
module Main where | ||
|
||
import qualified GHC.Utils.Outputable | ||
import qualified GHC.Utils.Ppr | ||
|
||
import qualified Parser | ||
|
||
import qualified System.IO | ||
|
||
main :: | ||
IO () | ||
main = do | ||
print $ Parser.parse Parser.iconDefinition "icon \"starticon1\" as start" | ||
GHC.Utils.Outputable.printSDocLn GHC.Utils.Outputable.defaultSDocContext GHC.Utils.Ppr.LeftMode System.IO.stdout $ GHC.Utils.Outputable.ppr $ Parser.parse Parser.iconDefinition "title t \"title - description\"" |
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