Skip to content

Commit 99e1748

Browse files
committed
update: frontend
1 parent 988ea17 commit 99e1748

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

lambda-buffers-frontend/src/LambdaBuffers/Frontend.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ checkReferences scope m = for_ (moduleTyDefs m) (checkBody . tyBody)
160160
checkConstructor (Constructor _ (Product tys _) _) = for tys checkTy
161161

162162
checkTy (TyApp tyF tyAs _) = checkTy tyF >> for_ tyAs checkTy
163-
checkTy (TyVar _ _) = return ()
163+
checkTy (TyVar _) = return ()
164164
checkTy (TyRef' tyR _) =
165165
if Map.member (strip tyR) scope
166166
then return ()

lambda-buffers-frontend/src/LambdaBuffers/Frontend/PPrint.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ instance Pretty info => Pretty (TyRef info) where
8484
pretty (TyRef mayModAl tn _info) = maybe "" (\al -> pretty al <> ".") mayModAl <> pretty tn
8585

8686
instance Pretty info => Pretty (Ty info) where
87-
pretty (TyVar vn _info) = pretty vn
87+
pretty (TyVar vn) = pretty vn
8888
pretty (TyRef' tr _info) = pretty tr
8989
pretty (TyApp tyF tyAs _info) = group $ encloseSep lparen rparen space (pretty <$> tyF : tyAs)
9090

lambda-buffers-frontend/src/LambdaBuffers/Frontend/Parsec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ parseTyRef' = withSourceInfo . label' "type reference" $ do
4343
TyRef mayAlias <$> parseTyName
4444

4545
parseTyVar :: Stream s m Char => Parser s m (Ty SourceInfo)
46-
parseTyVar = withSourceInfo . label' "type variable" $ TyVar <$> parseTyVarName
46+
parseTyVar = label' "type variable" $ TyVar <$> parseTyVarName
4747

4848
parseTyRef :: Stream s m Char => Parser s m (Ty SourceInfo)
4949
parseTyRef = withSourceInfo . label' "type reference" $ TyRef' <$> parseTyRef'

lambda-buffers-frontend/src/LambdaBuffers/Frontend/Syntax.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ data Import info = Import
4242
deriving stock (Eq, Ord, Show, Functor, Foldable, Traversable)
4343

4444
data Ty info
45-
= TyVar (VarName info) info
45+
= TyVar (VarName info)
4646
| TyApp (Ty info) [Ty info] info
4747
| TyRef' (TyRef info) info
4848
deriving stock (Show, Eq, Ord, Functor, Foldable, Traversable)

lambda-buffers-frontend/src/LambdaBuffers/Frontend/ToProto.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,10 @@ toProduct (Product tys info) = do
9292
& ntuple . sourceInfo .~ toSourceInfo info
9393

9494
toTy :: Ty SourceInfo -> ToProto P.Ty
95-
toTy (TyVar vn info) =
95+
toTy (TyVar vn) =
9696
return $
9797
defMessage
9898
& tyVar . varName .~ toVarName vn
99-
& tyVar . sourceInfo .~ toSourceInfo info
10099
toTy (TyApp ty tys info) = do
101100
ty' <- toTy ty
102101
tys' <- for tys toTy

0 commit comments

Comments
 (0)