-
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.
- Loading branch information
1 parent
16aa07e
commit e61d868
Showing
4 changed files
with
28 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
module Domain.Models.TypeCentricDoc | ||
where | ||
module Domain.Models.TypeCentricDoc where | ||
|
||
import Domain.Prelude hiding (Product, Sum, Enum) | ||
import qualified Domain.Models.TypeString as TypeString | ||
|
||
import Domain.Prelude hiding (Enum, Product, Sum) | ||
|
||
type Doc = | ||
[(Text, Structure)] | ||
|
||
data Structure = | ||
ProductStructure [(Text, NestedTypeExpression)] | | ||
SumStructure [(Text, [NestedTypeExpression])] | | ||
EnumStructure [Text] | ||
data Structure | ||
= ProductStructure [(Text, NestedTypeExpression)] | ||
| SumStructure [(Text, [NestedTypeExpression])] | ||
| EnumStructure [Text] | ||
deriving (Show) | ||
|
||
data NestedTypeExpression = | ||
AppSeqNestedTypeExpression TypeString.AppSeq | | ||
StructureNestedTypeExpression Structure | ||
data NestedTypeExpression | ||
= AppSeqNestedTypeExpression TypeString.AppSeq | ||
| StructureNestedTypeExpression Structure | ||
deriving (Show) |
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,17 +1,15 @@ | ||
module Domain.Models.TypeString | ||
where | ||
module Domain.Models.TypeString where | ||
|
||
import Domain.Prelude | ||
|
||
|
||
type CommaSeq = | ||
[AppSeq] | ||
|
||
type AppSeq = | ||
NonEmpty Unit | ||
|
||
data Unit = | ||
InSquareBracketsUnit AppSeq | | ||
InParensUnit CommaSeq | | ||
RefUnit (NonEmpty Text) | ||
data Unit | ||
= InSquareBracketsUnit AppSeq | ||
| InParensUnit CommaSeq | ||
| RefUnit (NonEmpty Text) | ||
deriving (Show) |
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