mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
fix: don't qualify paths of registered types (#1172)
This commit is contained in:
parent
1458bf4031
commit
3d1d12224c
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user