-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add flavor annotations to edges in API trees (#1176)
- Loading branch information
Showing
8 changed files
with
916 additions
and
660 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- | An indication of the meaning of an edge, which frontend may use for labelling, colour etc. | ||
module Primer.API.EdgeFlavor ( | ||
EdgeFlavor (..), | ||
) where | ||
|
||
-- We split this module to increase parallelism in our build. | ||
-- This module does not depend on much, but takes a long time | ||
-- to build because of | ||
-- https://gitlab.haskell.org/ghc/ghc/-/issues/5642 | ||
|
||
import Foreword | ||
|
||
import Primer.JSON (CustomJSON (..), FromJSON, PrimerJSON, ToJSON) | ||
|
||
data EdgeFlavor | ||
= Hole | ||
| AnnTerm | ||
| Ann | ||
| AppFun | ||
| AppArg | ||
| ConField | ||
| Lam | ||
| LetEqual | ||
| LetIn | ||
| MatchInput | ||
| Pattern | ||
| MatchOutput | ||
| FunIn | ||
| FunOut | ||
| ForallKind | ||
| Forall | ||
deriving stock (Show, Read, Eq, Generic) | ||
deriving (ToJSON, FromJSON) via PrimerJSON EdgeFlavor | ||
deriving anyclass (NFData) |
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,3 +1,5 @@ | ||
{-# LANGUAGE NoFieldSelectors #-} | ||
|
||
module Primer.API.RecordPair ( | ||
RecordPair (..), | ||
) where | ||
|
Oops, something went wrong.