# Using has\_type(list(Type), X) with user created type not working as expected

**URL:** <https://swi-prolog.discourse.group/t/using-has-type-list-type-x-with-user-created-type-not-working-as-expected/1340>\
**Category:** Help!\
**Created:** [October 1, 2019, 5:38pm UTC](https://swi-prolog.discourse.group/t/using-has-type-list-type-x-with-user-created-type-not-working-as-expected/1340 "2019-10-01T17:38:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [October 2, 2019, 8:47am UTC](https://swi-prolog.discourse.group/t/using-has-type-list-type-x-with-user-created-type-not-working-as-expected/1340/2 "2019-10-02T08:47:39Z")

</div>

> [@EricGT](#):
>
> Can [use\_module/2](https://www.swi-prolog.org/pldoc/doc_for?object=use_module/2) be used to import predicates from modules that did not export the predicate?

With a warning, yes. You should avoid warnings though 🙂 Otherwise it is not clear to me what you are trying to do. I see no reason for element\_types/2 to be exported. Can you share the code you want to write?

---

_[View the full topic](https://swi-prolog.discourse.group/t/using-has-type-list-type-x-with-user-created-type-not-working-as-expected/1340)._
