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:
parent
2b4cc3ee36
commit
8146b2a91d
@ -272,8 +272,6 @@ instance PrettyCode ModuleBody where
|
||||
ppCode m = do
|
||||
everything <- mapM ppCode (m ^. moduleStatements)
|
||||
return $ vsep2 everything
|
||||
where
|
||||
vsep2 = concatWith (\a b -> a <> line <> line <> b)
|
||||
|
||||
instance PrettyCode Module where
|
||||
ppCode m = do
|
||||
|
@ -96,17 +96,10 @@ data Iden
|
||||
| IdenAxiom Name
|
||||
deriving stock (Show)
|
||||
|
||||
data TypedExpression = TypedExpression
|
||||
{ _typedType :: Type,
|
||||
_typedExpression :: Expression
|
||||
}
|
||||
deriving stock (Show)
|
||||
|
||||
data Expression
|
||||
= ExpressionIden Iden
|
||||
| ExpressionApplication Application
|
||||
| ExpressionLiteral C.LiteralLoc
|
||||
| ExpressionTyped TypedExpression
|
||||
deriving stock (Show)
|
||||
|
||||
data Application = Application
|
||||
@ -164,7 +157,6 @@ makeLenses ''InductiveDef
|
||||
makeLenses ''AxiomDef
|
||||
makeLenses ''ModuleBody
|
||||
makeLenses ''Application
|
||||
makeLenses ''TypedExpression
|
||||
makeLenses ''InductiveConstructorDef
|
||||
makeLenses ''ConstructorApp
|
||||
makeLenses ''Compile
|
||||
@ -176,7 +168,6 @@ instance HasAtomicity Expression where
|
||||
atomicity e = case e of
|
||||
ExpressionIden {} -> Atom
|
||||
ExpressionApplication a -> atomicity a
|
||||
ExpressionTyped t -> atomicity (t ^. typedExpression)
|
||||
ExpressionLiteral l -> atomicity l
|
||||
|
||||
instance HasAtomicity Function where
|
||||
|
@ -55,14 +55,10 @@ instance PrettyCode Application where
|
||||
r' <- ppRightExpression appFixity (a ^. appRight)
|
||||
return $ l' <+> r'
|
||||
|
||||
instance PrettyCode TypedExpression where
|
||||
ppCode e = ppCode (e ^. typedExpression)
|
||||
|
||||
instance PrettyCode Expression where
|
||||
ppCode = \case
|
||||
ExpressionIden i -> ppCode i
|
||||
ExpressionApplication a -> ppCode a
|
||||
ExpressionTyped a -> ppCode a
|
||||
ExpressionLiteral l -> return (pretty l)
|
||||
|
||||
keyword :: Text -> Doc Ann
|
||||
|
@ -184,7 +184,6 @@ goExpression ::
|
||||
Sem r Expression
|
||||
goExpression = \case
|
||||
Mono.ExpressionIden i -> goIden i
|
||||
Mono.ExpressionTyped t -> goExpression (t ^. Mono.typedExpression)
|
||||
Mono.ExpressionApplication a -> ExpressionApplication <$> goApplication a
|
||||
Mono.ExpressionLiteral l -> return (ExpressionLiteral l)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user