Handle sequences constants for module identifiers
This commit is contained in:
parent
a698ac82ea
commit
0fcc2dbf6c
|
@ -129,9 +129,14 @@ appendToContext n = updateContext go
|
|||
go q = name2ns n <> q
|
||||
|
||||
name2ns :: Name -> Namespace
|
||||
name2ns (Name o) = case o of
|
||||
Aeson.Array [_, _, Aeson.String s] -> [s]
|
||||
_ -> error $ show o
|
||||
name2ns (Name o) = go o
|
||||
where
|
||||
go :: Aeson.Value -> Namespace
|
||||
go = \case
|
||||
Aeson.Array [Aeson.String "const", x, Aeson.String s] -> case x of
|
||||
Aeson.Null -> [s]
|
||||
_ -> go x <> [s]
|
||||
_ -> error $ show o
|
||||
|
||||
class References a where
|
||||
entries :: MyMonad m => a -> m ()
|
||||
|
|
Loading…
Reference in a new issue