fix: don't qualify paths of registered types (#1172)

This commit is contained in:
Scott Olsen 2021-03-04 01:31:26 -05:00 committed by GitHub
parent 1458bf4031
commit 3d1d12224c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,7 +237,8 @@ primitiveRegisterTypeWithoutFields :: Context -> String -> Maybe String -> IO (C
primitiveRegisterTypeWithoutFields ctx t override = do
let path = SymPath [] t
typeDefinition = XObj (Lst [XObj (ExternalType override) Nothing Nothing, XObj (Sym path Symbol) Nothing Nothing]) Nothing (Just TypeTy)
pure (insertInTypeEnv ctx (qualifyPath ctx path) (toBinder typeDefinition), dynamicNil)
-- TODO: Support registering types in modules
pure (insertInTypeEnv ctx (markQualified path) (toBinder typeDefinition), dynamicNil)
primitiveRegisterTypeWithFields :: Context -> XObj -> String -> Maybe String -> XObj -> IO (Context, Either EvalError XObj)
primitiveRegisterTypeWithFields ctx x t override members =