Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

SMLNJ installation problem
I've got a problem with my SMLNJ installation.

Whenever I start an sml process (through Emacs or from the command
line), I run the following program to make sure that values are
printed 'properly':

structure AdjustPrinter
= struct
val _ = Compiler.Control.Print.printDepth := 100
val _ = Compiler.Control.Print.printLength := 100
end

When running SMLNJ v110.62 or v110.67 under Kubuntu, I get the
following error message:

/home/cnn/.emacs.d/print.sml:5.13-5.46 Error: unbound structure:
Control in path Compiler.Control.Print.printDepth
/home/cnn/.emacs.d/print.sml:6.13-6.47 Error: unbound structure:
Control in path Compiler.Control.Print.printLength

At my school, where I'm running SMLNJ v110.0.6, it works fine. Anyone
know why?


--
/Jacob Johannsen aka CNN
--------------------------------------------------------------------------
NOW IS NOT THE TIME TO ASK FOR A LAVA LAMP!!!
--------------------------------------------------------------------------

Report this thread to moderator Post Follow-up to this message
Old Post
Jacob Johannsen
03-12-08 12:21 AM


Re: SMLNJ installation problem
Jacob Johannsen <cnn@daimi.au.dk> writes:

> I've got a problem with my SMLNJ installation.
>
> Whenever I start an sml process (through Emacs or from the command
> line), I run the following program to make sure that values are
> printed 'properly':
>
> structure AdjustPrinter
> = struct
>     val _ = Compiler.Control.Print.printDepth := 100
>     val _ = Compiler.Control.Print.printLength := 100
>   end
>
> When running SMLNJ v110.62 or v110.67 under Kubuntu, I get the
> following error message:
>
> /home/cnn/.emacs.d/print.sml:5.13-5.46 Error: unbound structure:
> Control in path Compiler.Control.Print.printDepth
> /home/cnn/.emacs.d/print.sml:6.13-6.47 Error: unbound structure:
> Control in path Compiler.Control.Print.printLength
>
> At my school, where I'm running SMLNJ v110.0.6, it works fine. Anyone
> know why?

Yes, I do.  Structure Control is now a toplevel structure.  It is
exported from library $smlnj/compiler.cm.  (This library is already
available at the interactive loop.  But if you want to use structure
Control within one of your CM-managed programs, you will need to add
$smlnj/compiler.cm to you projects .cm-file.)

Matthias

Report this thread to moderator Post Follow-up to this message
Old Post
Matthias Blume
03-12-08 03:15 AM


Re: SMLNJ installation problem
Matthias Blume <find@my.address.elsewhere> writes:

[snip]
> Yes, I do.  Structure Control is now a toplevel structure.  It is
> exported from library $smlnj/compiler.cm.  (This library is already
> available at the interactive loop.  But if you want to use structure
> Control within one of your CM-managed programs, you will need to add
> $smlnj/compiler.cm to you projects .cm-file.)
>

Problem fixed, thanks.

Another problem, though:

When I send an illegal SML program to the interactive loop through
Emacs, I get the corresponding error message. However, after the error
message, I get the following:

uncaught exception Error
raised at: ../compiler/TopLevel/interact/evalloop.sml:63.48-63.56
./compiler/TopLevel/interact/evalloop.sml:44.55
./compiler/TopLevel/interact/evalloop.sml:291.17-291.20

This is just noise, and I'd like to get rid of it. Anyone know how to
do that?

When running the interactive loop from the command prompt, the problem
doesn't exist.

--
/Jacob Johannsen aka CNN
--------------------------------------------------------------------------
NOW IS NOT THE TIME TO ASK FOR A LAVA LAMP!!!
--------------------------------------------------------------------------

Report this thread to moderator Post Follow-up to this message
Old Post
Jacob Johannsen
03-13-08 12:29 AM


Re: SMLNJ installation problem
> uncaught exception Error
>   raised at: ../compiler/TopLevel/interact/evalloop.sml:63.48-63.56
>              ../compiler/TopLevel/interact/evalloop.sml:44.55
>              ../compiler/TopLevel/interact/evalloop.sml:291.17-291.20
>
> This is just noise, and I'd like to get rid of it. Anyone know how to
> do that?

Why not use an emacs script to eat it up?

Report this thread to moderator Post Follow-up to this message
Old Post
David B. Benson
03-14-08 12:49 AM


Re: SMLNJ installation problem
Jacob Johannsen <cnn@daimi.au.dk> writes:

> Matthias Blume <find@my.address.elsewhere> writes:
>
> [snip] 
>
> Problem fixed, thanks.
>
> Another problem, though:
>
> When I send an illegal SML program to the interactive loop through
> Emacs, I get the corresponding error message. However, after the error
> message, I get the following:
>
> uncaught exception Error
>   raised at: ../compiler/TopLevel/interact/evalloop.sml:63.48-63.56
>              ../compiler/TopLevel/interact/evalloop.sml:44.55
>              ../compiler/TopLevel/interact/evalloop.sml:291.17-291.20
>
> This is just noise, and I'd like to get rid of it. Anyone know how to
> do that?

Can you give me some additional details on what you are doing?  Here
is a verbatim cut&paste from an Emacs session that I just ran:

-----
Standard ML of New Jersey v110.67 [built: Thu Feb 28 11:09:14 2008]
- 1+"2";
stdIn:1.1-1.6 Error: operator and operand don't agree [literal]
operator domain: int * int
operand:         int * string
in expression:
1 + "2"
- raise Fail "error";
stdIn:1.1-1.19 Warning: type vars not generalized because of
value restriction are instantiated to dummy types (X1,X2,...)

uncaught exception Fail [Fail: error]
raised at: stdIn:1.7-1.19
- exception Error;
exception Error
- raise Error;
stdIn:2.1-2.12 Warning: type vars not generalized because of
value restriction are instantiated to dummy types (X1,X2,...)

uncaught exception Error
raised at: stdIn:2.7-2.12
-
-----

As you can see, there aren't any of those noisy lines that you
mention...

How did you run sml under emacs?

Matthias


Report this thread to moderator Post Follow-up to this message
Old Post
Matthias.Blume@gmail.com
03-14-08 12:49 AM


Re: SMLNJ installation problem
"Matthias.Blume@gmail.com" <Matthias.Blume@gmail.com> writes:

> Jacob Johannsen <cnn@daimi.au.dk> writes:
[snip] 
>
> Can you give me some additional details on what you are doing?  Here
> is a verbatim cut&paste from an Emacs session that I just ran:
>
> -----
> Standard ML of New Jersey v110.67 [built: Thu Feb 28 11:09:14 2008]
> - 1+"2";
> stdIn:1.1-1.6 Error: operator and operand don't agree [literal]
>   operator domain: int * int
>   operand:         int * string
>   in expression:
>     1 + "2"
> - raise Fail "error";
> stdIn:1.1-1.19 Warning: type vars not generalized because of
>    value restriction are instantiated to dummy types (X1,X2,...)
>
> uncaught exception Fail [Fail: error]
>   raised at: stdIn:1.7-1.19
> - exception Error;
> exception Error
> - raise Error;
> stdIn:2.1-2.12 Warning: type vars not generalized because of
>    value restriction are instantiated to dummy types (X1,X2,...)
>
> uncaught exception Error
>   raised at: stdIn:2.7-2.12
> -
> -----
>
> As you can see, there aren't any of those noisy lines that you
> mention...
>
> How did you run sml under emacs?

My sml-mode sends the contents of the current buffer to the
interactive process by creating a temporary file and executing

- use <temporary file>;

in the interactive loop.

The problem seems to happen only when executing 'use' on a file
containing an illegal program (bla.sml contains the expression 1+"2"):

- 1+"2";
stdIn:2.1-2.6 Error: operator and operand don't agree [literal]
operator domain: int * int
operand:         int * string
in expression:
1 + "2"
- use "/home/cnn/tmp/bla.sml";
[opening /home/cnn/tmp/bla.sml]
/home/cnn/tmp/bla.sml:1.1-1.6 Error: operator and operand don't agree
[literal]
operator domain: int * int
operand:         int * string
in expression:
1 + "2"

uncaught exception Error
raised at: ../compiler/TopLevel/interact/evalloop.sml:63.48-63.56
./compiler/TopLevel/interact/evalloop.sml:44.55
./compiler/TopLevel/interact/evalloop.sml:291.17-291.20
-


The exact same thing happens when I run sml from the command line, so it
doesn't look like an Emacs problem.


--
/Jacob Johannsen aka CNN
--------------------------------------------------------------------------
NOW IS NOT THE TIME TO ASK FOR A LAVA LAMP!!!
--------------------------------------------------------------------------

Report this thread to moderator Post Follow-up to this message
Old Post
Jacob Johannsen
03-14-08 03:16 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Functional archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:57 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.