-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDependencies.hs
173 lines (139 loc) · 3.52 KB
/
Dependencies.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE TypeFamilies #-}
module Dependencies where
data FastString -- TTG: todo: replace with String
data Bag a -- TTG: todo: use Data.Bag of containers
data Located a -- TTG: todo: use either of solutions
-- in the wiki
-- TTG-Todo: to be done
data UnitId
type FieldLabelString = FastString
data FieldLbl a = FieldLabel {
flLabel :: FieldLabelString,
flIsOverloaded :: Bool,
flSelector :: a
}
-- TTG-Todo: smells like a bad design
type family NameOrRdrName a
data Role = Nominal | Representational | Phantom
type PhaseNum = Int
data Activation = NeverActive
| AlwaysActive
| ActiveBefore {- TTG-Todo
SourceText
-}
PhaseNum
| ActiveAfter {- TTG-Todo
SourceText
-}
PhaseNum
type LStringLiteral = Located StringLiteral
data StringLiteral
= StringLiteral { {- TTG-Todo
sl_st :: SourceText,
-} sl_fs :: FastString
}
data IntegralLit
= IL { {- TTG-Todo
il_text :: SourceText
, -} il_neg :: Bool
, il_value :: Integer
}
data FractionalLit
= FL { {- TTG-Todo
fl_text :: SourceText
, -} fl_neg :: Bool
, fl_value :: Rational
}
data InlinePragma
= InlinePragma
{ {- TTG-Todo
inl_src :: SourceText
, -}
inl_inline :: InlineSpec
, inl_sat :: Maybe Arity
, inl_act :: Activation
, inl_rule :: RuleMatchInfo }
data RuleMatchInfo
= ConLike
| FunLike
data InlineSpec
= Inline
| Inlinable
| NoInline
| NoUserInline
data LexicalFixity
= Prefix
| Infix
data HsSrcBang =
HsSrcBang {- TTG-Todo
SourceText
-}
SrcUnpackedness
SrcStrictness
data SrcStrictness
= SrcLazy
| SrcStrict
| NoSrcStrict
data SrcUnpackedness
= SrcUnpack
| SrcNoUnpack
| NoSrcUnpack
{- TTG-Todo
ShNajd: we should rewrite to use x instead of parameter a
-}
type LBooleanFormula a = Located (BooleanFormula a)
data BooleanFormula a
= Var a
| And [LBooleanFormula a]
| Or [LBooleanFormula a]
| Parens (LBooleanFormula a)
type LFunDep a = Located (FunDep a)
type FunDep a = ([a],[a])
data SpliceExplicitFlag
= ExplicitSplice
| ImplicitSplice
data OverlapMode
= NoOverlap {- TTG-Todo
(Located SourceText)
-}
| Overlappable {- TTG-Todo
(Located SourceText)
-}
| Overlapping {- TTG-Todo
(Located SourceText)
-}
| Overlaps {- TTG-Todo
(Located SourceText)
-}
| Incoherent {- TTG-Todo
(Located SourceText)
-}
data Origin = FromSource
| Generated
type ConTag = Int
data Fixity
= Fixity {- TTG-Todo
SourceText
-}
Int
FixityDirection
data FixityDirection
= InfixL
| InfixR
| InfixN
data Boxity
= Boxed
| Unboxed
type Arity = Int
data WarningTxt
= WarningTxt {- TTG-Todo
(Located SourceText)
-}
[LStringLiteral]
| DeprecatedTxt {- TTG-Todo
(Located SourceText)
-}
[LStringLiteral]
type RuleName = FastString
newtype ModuleName = ModuleName FastString