Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding constructors of data type

When importing some data type, it is necessary to put (..) for constructors to be imported.

Is it possible to prevent exporting constructors of some data type, even when that data type is exported?

like image 341
stralep Avatar asked Aug 09 '10 13:08

stralep


1 Answers

Yes, just use the same syntax when exporting them - Foo() just to export the type, Foo(..) to export the type and all constructors, and Foo(FooC1,FooC2) to just export the named constructors of the type.

like image 155
GS - Apologise to Monica Avatar answered Oct 13 '22 23:10

GS - Apologise to Monica