Skip to content

Commit 3062fda

Browse files
fixing a warning
1 parent 3ebe06d commit 3062fda

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎src/Solcore/Desugarer/DecisionTreeCompiler.hs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ instance Compile (ContractDecl Id) where
8181
compile d = pure d
8282

8383
instance Compile (Constructor Id) where
84-
compile (Constructor ps bd payable inits) =
85-
(\bd' -> Constructor ps bd' payable inits) <$> compile bd
84+
compile (Constructor ps bd payable ins) =
85+
(\bd' -> Constructor ps bd' payable ins) <$> compile bd
8686

8787
instance Compile (FunDef Id) where
8888
compile (FunDef p sig bd) =

‎src/Solcore/Frontend/Pretty/SolcorePretty.hs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,17 @@ instance (Pretty a) => Pretty (ContractDecl a) where
164164
ppr c
165165

166166
instance (Pretty a) => Pretty (Constructor a) where
167-
ppr (Constructor ps bd payable inits) =
167+
ppr (Constructor ps bd payable ins) =
168168
(if payable then text "payable" <+> text "constructor" else text "constructor")
169169
<+> pprParams ps
170-
<+> pprCtorInits inits
170+
<+> pprCtorInits ins
171171
<+> lbrace
172172
$$ nest 3 (vcat (map ppr bd))
173173
$$ rbrace
174174

175175
pprCtorInits :: (Pretty a) => [(Name, [Exp a])] -> Doc
176176
pprCtorInits [] = empty
177-
pprCtorInits inits = text ":" <+> commaSep [ppr b <> parens (commaSep (map ppr es)) | (b, es) <- inits]
177+
pprCtorInits ins = text ":" <+> commaSep [ppr b <> parens (commaSep (map ppr es)) | (b, es) <- ins]
178178

179179
instance Pretty DataTy where
180180
ppr (DataTy n ps cs ds) =

‎src/Solcore/Frontend/TypeInference/SccAnalysis.hs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ instance Names (FunDef Name) where
224224
names sig `union` names bdy
225225

226226
instance Names (Constructor Name) where
227-
names (Constructor ps bdy _ inits) =
228-
names ps `union` names bdy `union` names (concatMap snd inits)
227+
names (Constructor ps bdy _ ins) =
228+
names ps `union` names bdy `union` names (concatMap snd ins)
229229

230230
instance Names (Class Name) where
231231
names (Class _ ctx _ _ _ sigs) =

‎src/Solcore/Frontend/TypeInference/TcSubst.hs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ instance (HasType a) => HasType (Field a) where
432432
bv (Field _ t me) = bv t `union` bv me
433433

434434
instance (HasType a) => HasType (Constructor a) where
435-
apply s (Constructor ps bd payable inits) =
436-
Constructor (apply s ps) (apply s bd) payable [(b, apply s es) | (b, es) <- inits]
437-
fv (Constructor ps bd _ inits) =
438-
fv ps `union` fv bd `union` fv (concatMap snd inits)
439-
mv (Constructor ps bd _ inits) =
440-
mv ps `union` mv bd `union` mv (concatMap snd inits)
441-
bv (Constructor ps bd _ inits) =
442-
bv ps `union` bv bd `union` bv (concatMap snd inits)
435+
apply s (Constructor ps bd payable ins) =
436+
Constructor (apply s ps) (apply s bd) payable [(b, apply s es) | (b, es) <- ins]
437+
fv (Constructor ps bd _ ins) =
438+
fv ps `union` fv bd `union` fv (concatMap snd ins)
439+
mv (Constructor ps bd _ ins) =
440+
mv ps `union` mv bd `union` mv (concatMap snd ins)
441+
bv (Constructor ps bd _ ins) =
442+
bv ps `union` bv bd `union` bv (concatMap snd ins)

0 commit comments

Comments
 (0)