1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-11 08:25:46 +03:00

[monojuvix] remove unused constructor ExpressionTyped (#80)

This commit is contained in:
janmasrovira 2022-05-04 18:03:59 +02:00 committed by GitHub
parent 2b4cc3ee36
commit 8146b2a91d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 16 deletions

View File

@ -272,8 +272,6 @@ instance PrettyCode ModuleBody where
ppCode m = do ppCode m = do
everything <- mapM ppCode (m ^. moduleStatements) everything <- mapM ppCode (m ^. moduleStatements)
return $ vsep2 everything return $ vsep2 everything
where
vsep2 = concatWith (\a b -> a <> line <> line <> b)
instance PrettyCode Module where instance PrettyCode Module where
ppCode m = do ppCode m = do

View File

@ -96,17 +96,10 @@ data Iden
| IdenAxiom Name | IdenAxiom Name
deriving stock (Show) deriving stock (Show)
data TypedExpression = TypedExpression
{ _typedType :: Type,
_typedExpression :: Expression
}
deriving stock (Show)
data Expression data Expression
= ExpressionIden Iden = ExpressionIden Iden
| ExpressionApplication Application | ExpressionApplication Application
| ExpressionLiteral C.LiteralLoc | ExpressionLiteral C.LiteralLoc
| ExpressionTyped TypedExpression
deriving stock (Show) deriving stock (Show)
data Application = Application data Application = Application
@ -164,7 +157,6 @@ makeLenses ''InductiveDef
makeLenses ''AxiomDef makeLenses ''AxiomDef
makeLenses ''ModuleBody makeLenses ''ModuleBody
makeLenses ''Application makeLenses ''Application
makeLenses ''TypedExpression
makeLenses ''InductiveConstructorDef makeLenses ''InductiveConstructorDef
makeLenses ''ConstructorApp makeLenses ''ConstructorApp
makeLenses ''Compile makeLenses ''Compile
@ -176,7 +168,6 @@ instance HasAtomicity Expression where
atomicity e = case e of atomicity e = case e of
ExpressionIden {} -> Atom ExpressionIden {} -> Atom
ExpressionApplication a -> atomicity a ExpressionApplication a -> atomicity a
ExpressionTyped t -> atomicity (t ^. typedExpression)
ExpressionLiteral l -> atomicity l ExpressionLiteral l -> atomicity l
instance HasAtomicity Function where instance HasAtomicity Function where

View File

@ -55,14 +55,10 @@ instance PrettyCode Application where
r' <- ppRightExpression appFixity (a ^. appRight) r' <- ppRightExpression appFixity (a ^. appRight)
return $ l' <+> r' return $ l' <+> r'
instance PrettyCode TypedExpression where
ppCode e = ppCode (e ^. typedExpression)
instance PrettyCode Expression where instance PrettyCode Expression where
ppCode = \case ppCode = \case
ExpressionIden i -> ppCode i ExpressionIden i -> ppCode i
ExpressionApplication a -> ppCode a ExpressionApplication a -> ppCode a
ExpressionTyped a -> ppCode a
ExpressionLiteral l -> return (pretty l) ExpressionLiteral l -> return (pretty l)
keyword :: Text -> Doc Ann keyword :: Text -> Doc Ann

View File

@ -184,7 +184,6 @@ goExpression ::
Sem r Expression Sem r Expression
goExpression = \case goExpression = \case
Mono.ExpressionIden i -> goIden i Mono.ExpressionIden i -> goIden i
Mono.ExpressionTyped t -> goExpression (t ^. Mono.typedExpression)
Mono.ExpressionApplication a -> ExpressionApplication <$> goApplication a Mono.ExpressionApplication a -> ExpressionApplication <$> goApplication a
Mono.ExpressionLiteral l -> return (ExpressionLiteral l) Mono.ExpressionLiteral l -> return (ExpressionLiteral l)