I'm not sure about the error messages, but as of January, Gast does not have a custom Set type any more (https://gitlab.science.ru.nl/clean-and-itasks/gast/commit/6bb84232845680b1aab4532ab101a578808fa009), so you may be able to work around it by getting a new version.
Best,
Camil
On 06/01/2018 02:11 PM, Markus Klinik wrote:
> Dear Cleaners,
>
> I'm trying to import qualified Data.Set as Set, but when I try to use the
> type for a record field in a module, I get an error message that I don't
> understand.
>
> There are three files involved:
>
> Main.icl
>
> module Main
>
> import StdEnv
> import MyModule
> import qualified Data.Set as Set
>
> // This works
> :: MyRecord =
> { recordField :: 'Set'.Set Int
> }
>
> myRecord :: MyRecord
> myRecord = { recordField = 'Set'.newSet }
>
> Start = 10
>
>
> MyModule.dcl
>
> definition module MyModule
>
> import qualified Data.Set as Set
>
> // This doesn't work
> :: MyOtherRecord =
> { otherRecordField :: 'Set'.Set Int
> }
>
>
> MyModule.icl
>
> implementation module MyModule
>
> import qualified Data.Set as Set
>
>
> The record field MyRecord.recordField works fine. But the record field
> MyOtherRecord.otherRecordField gives two different error messages,
> depending on which file of MyModule.dcl and MyModule.icl has been
> modified last.
>
> If I modify MyModule.dcl and compile, I get this error message:
>
> Error [MyModule.dcl,5,Set]: not imported in implementation module (from
> Data.Set)
>
> If I modify MyModule.icl and compile, I get this error message:
>
> Error [MyModule.dcl,5,MyOtherRecord]: 'Set'.Set not imported
>
>
> If I additionally do, in both MyModule.dcl and MyModule.icl:
>
> from Data.Set import :: Set
>
> and use the type Set unqualified, it works. But the reason why I want to
> use the type qualified is because Gast also it's own Set implementation,
> and I want to use Gast and Data.Set in my program.
>
> Any ideas?
>
> Thanks,
> Markus
> _______________________________________________
> clean-list mailing list
> [email protected]
> https://mailman.science.ru.nl/mailman/listinfo/clean-list
>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ clean-list mailing list [email protected] https://mailman.science.ru.nl/mailman/listinfo/clean-list
