www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - MinTL problem

reply Daniel Keep <daniel.keep dummy.gmail.com> writes:
Hey there.

I was wondering if anyone could shed some light on a problem I'm having;
I'm currently trying to use MinTL, and keep getting compile errors.  The
source I'm using is:

(optparse.d)
import mintl.list;

int main(char[][] argv)
{
    List!(int) x;
    return 0;
}

Which I compile with:

$ dmd optparse.d mintl.lib

Where the mintl package is on the import path, and mintl.lib is on the
LIB path.  dmd then gives me this:

e:\Bin\Bin\..\Include\other\mintl\list.d(688): operation not allowed on
bool '((*this).isEmpty)()'
e:\Bin\Bin\..\Include\other\mintl\list.d(726): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(726):
ListReverseIter!(Value,ReadOnly,Alloc) is used as a type
e:\Bin\Bin\..\Include\other\mintl\list.d(726): variable
mintl.list.List!(int).List.backwards.res voids have no value
e:\Bin\Bin\..\Include\other\mintl\list.d(727): no property 'list' for
type 'int'
e:\Bin\Bin\..\Include\other\mintl\list.d(727): constant (res).list is
not an lvalue
e:\Bin\Bin\..\Include\other\mintl\list.d(727): cannot implicitly convert
expression (this) of type List * to int
e:\Bin\Bin\..\Include\other\mintl\list.d(728): cannot implicitly convert
expression (res) of type int to ListReverseIter
e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance
List!(Value,true,Alloc) is used as a type
e:\Bin\Bin\..\Include\other\mintl\list.d(311): variable
mintl.list.List!(int,true,GCAllocator ).List.readonly.res voids have no
value
e:\Bin\Bin\..\Include\other\mintl\list.d(313): cannot implicitly convert
expression (res) of type int to List
e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance
List!(Value,false,Alloc) is used as a type
e:\Bin\Bin\..\Include\other\mintl\list.d(318): variable
mintl.list.List!(int,true,GCAllocator ).List.readwrite.res voids have no
value
e:\Bin\Bin\..\Include\other\mintl\list.d(320): cannot implicitly convert
expression (res) of type int to List
e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance
List!(Value,false,Alloc) is used as a type
e:\Bin\Bin\..\Include\other\mintl\list.d(650): variable
mintl.list.List!(int,true,GCAllocator ).List.dup.res voids have no value
e:\Bin\Bin\..\Include\other\mintl\list.d(655): no property 'readonly'
for type 'int'
e:\Bin\Bin\..\Include\other\mintl\list.d(655): cannot implicitly convert
expression (1) of type int to List
e:\Bin\Bin\..\Include\other\mintl\list.d(688): operation not allowed on
bool '((*this).isEmpty)()'
e:\Bin\Bin\..\Include\other\mintl\list.d(726): template instance cannot
resolve forward reference
e:\Bin\Bin\..\Include\other\mintl\list.d(726):
ListReverseIter!(Value,ReadOnly,Alloc) is used as a type
e:\Bin\Bin\..\Include\other\mintl\list.d(726): variable
mintl.list.List!(int,true,GCAllocator ).List.backwards.res voids have no
value
e:\Bin\Bin\..\Include\other\mintl\list.d(727): no property 'list' for
type 'int'
e:\Bin\Bin\..\Include\other\mintl\list.d(727): constant (res).list is
not an lvalue
e:\Bin\Bin\..\Include\other\mintl\list.d(727): cannot implicitly convert
expression (this) of type List * to int
e:\Bin\Bin\..\Include\other\mintl\list.d(728): cannot implicitly convert
expression (res) of type int to ListReverseIter
e:\Bin\Bin\..\Include\other\mintl\list.d(6): template instance
mintl.list.List!(int) error instantiating

I'm sure it's the latest version, since I downloaded it the other day.
list.d says it is revision 2.7.1.

I just can't work out what I'm doing wrong.  Any suggestions?

	-- Daniel

-- 

v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D
a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP    http://hackerkey.com/
Apr 12 2006
next sibling parent reply James Dunne <james.jdunne gmail.com> writes:
Daniel Keep wrote:
 Hey there.
 
 I was wondering if anyone could shed some light on a problem I'm having;
 I'm currently trying to use MinTL, and keep getting compile errors.  The
 source I'm using is:
 
 (optparse.d)
 import mintl.list;
 
 int main(char[][] argv)
 {
     List!(int) x;
     return 0;
 }
 
 Which I compile with:
 
 $ dmd optparse.d mintl.lib
 
 Where the mintl package is on the import path, and mintl.lib is on the
 LIB path.  dmd then gives me this:
 
 e:\Bin\Bin\..\Include\other\mintl\list.d(688): operation not allowed on
 bool '((*this).isEmpty)()'
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(726):
 ListReverseIter!(Value,ReadOnly,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): variable
 mintl.list.List!(int).List.backwards.res voids have no value
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): no property 'list' for
 type 'int'
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): constant (res).list is
 not an lvalue
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): cannot implicitly convert
 expression (this) of type List * to int
 e:\Bin\Bin\..\Include\other\mintl\list.d(728): cannot implicitly convert
 expression (res) of type int to ListReverseIter
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance
 List!(Value,true,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): variable
 mintl.list.List!(int,true,GCAllocator ).List.readonly.res voids have no
 value
 e:\Bin\Bin\..\Include\other\mintl\list.d(313): cannot implicitly convert
 expression (res) of type int to List
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance
 List!(Value,false,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): variable
 mintl.list.List!(int,true,GCAllocator ).List.readwrite.res voids have no
 value
 e:\Bin\Bin\..\Include\other\mintl\list.d(320): cannot implicitly convert
 expression (res) of type int to List
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance
 List!(Value,false,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): variable
 mintl.list.List!(int,true,GCAllocator ).List.dup.res voids have no value
 e:\Bin\Bin\..\Include\other\mintl\list.d(655): no property 'readonly'
 for type 'int'
 e:\Bin\Bin\..\Include\other\mintl\list.d(655): cannot implicitly convert
 expression (1) of type int to List
 e:\Bin\Bin\..\Include\other\mintl\list.d(688): operation not allowed on
 bool '((*this).isEmpty)()'
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(726):
 ListReverseIter!(Value,ReadOnly,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): variable
 mintl.list.List!(int,true,GCAllocator ).List.backwards.res voids have no
 value
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): no property 'list' for
 type 'int'
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): constant (res).list is
 not an lvalue
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): cannot implicitly convert
 expression (this) of type List * to int
 e:\Bin\Bin\..\Include\other\mintl\list.d(728): cannot implicitly convert
 expression (res) of type int to ListReverseIter
 e:\Bin\Bin\..\Include\other\mintl\list.d(6): template instance
 mintl.list.List!(int) error instantiating
 
 I'm sure it's the latest version, since I downloaded it the other day.
 list.d says it is revision 2.7.1.
 
 I just can't work out what I'm doing wrong.  Any suggestions?
 
 	-- Daniel
 
You're not doing anything wrong - I don't think the MinTL library has been updated in quite some time. Try downgrading compiler versions until you find one that works with it if that's acceptable for you. Otherwise, ask Ben Hinkle (author) to update it. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O M-- V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e h>--->++ r+++ y+++ ------END GEEK CODE BLOCK------ James Dunne
Apr 12 2006
parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
Aah, thanks for that.  I'm just going to use something a little simpler
(and probably less efficient, but oh well :P) for the moment.  If worst
comes to worst, I can always just start my own collection of containers.

	-- Daniel

James Dunne wrote:
 Daniel Keep wrote:
 Hey there.

 I was wondering if anyone could shed some light on a problem I'm having;
 I'm currently trying to use MinTL, and keep getting compile errors.  The
 source I'm using is:

 (optparse.d)
 import mintl.list;

 int main(char[][] argv)
 {
     List!(int) x;
     return 0;
 }

 Which I compile with:

 $ dmd optparse.d mintl.lib

 Where the mintl package is on the import path, and mintl.lib is on the
 LIB path.  dmd then gives me this:

 e:\Bin\Bin\..\Include\other\mintl\list.d(688): operation not allowed on
 bool '((*this).isEmpty)()'
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(726):
 ListReverseIter!(Value,ReadOnly,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): variable
 mintl.list.List!(int).List.backwards.res voids have no value
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): no property 'list' for
 type 'int'
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): constant (res).list is
 not an lvalue
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): cannot implicitly convert
 expression (this) of type List * to int
 e:\Bin\Bin\..\Include\other\mintl\list.d(728): cannot implicitly convert
 expression (res) of type int to ListReverseIter
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): template instance
 List!(Value,true,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(311): variable
 mintl.list.List!(int,true,GCAllocator ).List.readonly.res voids have no
 value
 e:\Bin\Bin\..\Include\other\mintl\list.d(313): cannot implicitly convert
 expression (res) of type int to List
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): template instance
 List!(Value,false,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(318): variable
 mintl.list.List!(int,true,GCAllocator ).List.readwrite.res voids have no
 value
 e:\Bin\Bin\..\Include\other\mintl\list.d(320): cannot implicitly convert
 expression (res) of type int to List
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): template instance
 List!(Value,false,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(650): variable
 mintl.list.List!(int,true,GCAllocator ).List.dup.res voids have no value
 e:\Bin\Bin\..\Include\other\mintl\list.d(655): no property 'readonly'
 for type 'int'
 e:\Bin\Bin\..\Include\other\mintl\list.d(655): cannot implicitly convert
 expression (1) of type int to List
 e:\Bin\Bin\..\Include\other\mintl\list.d(688): operation not allowed on
 bool '((*this).isEmpty)()'
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): template instance cannot
 resolve forward reference
 e:\Bin\Bin\..\Include\other\mintl\list.d(726):
 ListReverseIter!(Value,ReadOnly,Alloc) is used as a type
 e:\Bin\Bin\..\Include\other\mintl\list.d(726): variable
 mintl.list.List!(int,true,GCAllocator ).List.backwards.res voids have no
 value
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): no property 'list' for
 type 'int'
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): constant (res).list is
 not an lvalue
 e:\Bin\Bin\..\Include\other\mintl\list.d(727): cannot implicitly convert
 expression (this) of type List * to int
 e:\Bin\Bin\..\Include\other\mintl\list.d(728): cannot implicitly convert
 expression (res) of type int to ListReverseIter
 e:\Bin\Bin\..\Include\other\mintl\list.d(6): template instance
 mintl.list.List!(int) error instantiating

 I'm sure it's the latest version, since I downloaded it the other day.
 list.d says it is revision 2.7.1.

 I just can't work out what I'm doing wrong.  Any suggestions?

     -- Daniel
You're not doing anything wrong - I don't think the MinTL library has been updated in quite some time. Try downgrading compiler versions until you find one that works with it if that's acceptable for you. Otherwise, ask Ben Hinkle (author) to update it.
-- v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
Apr 12 2006
parent David L. Davis <SpottedTiger yahoo.com> writes:
In article <e1j3be$2bk5$1 digitaldaemon.com>, Daniel Keep says...
Aah, thanks for that.  I'm just going to use something a little simpler
(and probably less efficient, but oh well :P) for the moment.  If worst
comes to worst, I can always just start my own collection of containers.

	-- Daniel

James Dunne wrote:
 Daniel Keep wrote:
 
 You're not doing anything wrong - I don't think the MinTL library has
 been updated in quite some time.  Try downgrading compiler versions
 until you find one that works with it if that's acceptable for you.
 Otherwise, ask Ben Hinkle (author) to update it.
 
Daniel, Ben's MinTL v2.7.1 was released when D v0.128 was out, so if you do decide to go back...it'll be a pretty long trak back from D v0.153. It would be a lot better to ask Ben to update MinTL to the more current release of D. David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Apr 12 2006
prev sibling parent reply "Ben Hinkle" <bhinkle mathworks.com> writes:
"Daniel Keep" <daniel.keep dummy.gmail.com> wrote in message 
news:e1ir0p$1via$1 digitaldaemon.com...
 Hey there.

 I was wondering if anyone could shed some light on a problem I'm having;
 I'm currently trying to use MinTL, and keep getting compile errors.
I looked into the bug and it seems like after changing the ~ to ! on line 688 of list.d everything compiles fine. Those zillions of error messages were all due to that one character. For those curious ~x is the MATLAB syntax for !x in D so I must have been in a MATLAB frame of mind when I wrote that and then never tested it. I'll update the zip file tonight when I get home. <snip>
Apr 12 2006
parent Daniel Keep <daniel.keep.lists gmail.com> writes:
Haha.  That's almost as bad as writing a big chunk of code that refuses
to compile, only to discover hours later that I was writing Python and
not D ("is not" vs. "!is", "0 <= i <= $" vs. "0 <= i && i <= $", etc.)

Thanks for the update :)

	-- Daniel

Ben Hinkle wrote:
 "Daniel Keep" <daniel.keep dummy.gmail.com> wrote in message 
 news:e1ir0p$1via$1 digitaldaemon.com...
 Hey there.

 I was wondering if anyone could shed some light on a problem I'm having;
 I'm currently trying to use MinTL, and keep getting compile errors.
I looked into the bug and it seems like after changing the ~ to ! on line 688 of list.d everything compiles fine. Those zillions of error messages were all due to that one character. For those curious ~x is the MATLAB syntax for !x in D so I must have been in a MATLAB frame of mind when I wrote that and then never tested it. I'll update the zip file tonight when I get home. <snip>
-- v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
Apr 12 2006