mirror of
https://github.com/anoma/juvix.git
synced 2025-01-05 22:46:08 +03:00
Inductive types should depend on the types of their constructors (#1537)
This commit is contained in:
parent
dab4b6fc0f
commit
fc1bf894c0
@ -91,11 +91,11 @@ goStatement mn = \case
|
||||
mapM_ (goConstructorDef (i ^. inductiveName)) (i ^. inductiveConstructors)
|
||||
|
||||
-- constructors of an inductive type depend on the inductive type, not the other
|
||||
-- way round
|
||||
-- way round; an inductive type depends on the types of its constructors
|
||||
goConstructorDef :: Member (State DependencyGraph) r => Name -> InductiveConstructorDef -> Sem r ()
|
||||
goConstructorDef indName c = do
|
||||
addEdge (c ^. constructorName) indName
|
||||
goExpression (c ^. constructorName) (c ^. constructorType)
|
||||
goExpression indName (c ^. constructorType)
|
||||
|
||||
goFunctionClause :: Member (State DependencyGraph) r => Name -> FunctionClause -> Sem r ()
|
||||
goFunctionClause p c = do
|
||||
|
Loading…
Reference in New Issue
Block a user