Hugs version:
=============
Hugs 1.4, The Nottingham and Yale Haskell User's System. Version 970719.

Configuration options: --with-x --disable-large-banner --enable-TREX
======================

Operating System: HP-UX varsovie A.09.05 A 9000/735 2001675185 two-user license
=================

Compiler: gcc version 2.6.3
=========

Behaviour:
==========
The import declaration:
> import <path> as Id
fails if the path is relative (i.e. "utils/Foo" or "../src/Bar")
  - if Hugs is exec'd via `comint' in Emacs (i.e. a hugs process is
  spawned with no underlying shell);
  - if runhugs is used.
Under a shell (tcsh or csh), the module is imported correctly.

Of course the solution is to use absolute file paths, with a small
sacrifice to portability.




===============================================================================
[Transcripts follow for the curious:]

File FooA.lhs:
==============
> module Main where
> import "tmp/Foo.lhs" as Foo
> main = putStr "Hello World"

Transcript under Emacs:
=======================
Foo> Reading file "/home/fabricel/Ara/claraInt/src/FooA.lhs":
Reading file "/home/fabricel/Ara/claraInt/src/tmp/Foo.lhs":
Reading file "/home/fabricel/Ara/claraInt/src/FooA.lhs":

ERROR "/home/fabricel/Ara/claraInt/src/FooA.lhs": Module "tmp/Foo.lhs" not previously 
loaded
(seeing that "tmp/Foo.lhs" and "/home/fabricel/Ara/claraInt/src/tmp/Foo.lhs"
are not the same)

Transcript for runhugs:
=======================
shell% runhugs ~/Ara/claraInt/src/FooA.lhs
runhugs: 
shell%

Under tcsh:
===========
shell% hugs
Hugs 1.4, The Nottingham and Yale Haskell User's System. Version 970719.
   Copyright (c) The University of Nottingham and Yale University, 1994-1997.
    Bug reports: [EMAIL PROTECTED]   Web: http://www.haskell.org/hugs.

Reading file "/home/fabricel/systems/Hugs-1.4/share/hugs/lib/Prelude.hs":
                   
Hugs session for:
/home/fabricel/systems/Hugs-1.4/share/hugs/lib/Prelude.hs
Type :? for help
Prelude> :l FooA
Reading file "FooA.lhs":
Reading file "tmp/Foo.lhs":
Reading file "FooA.lhs":
                   
Hugs session for:
/home/fabricel/systems/Hugs-1.4/share/hugs/lib/Prelude.hs
tmp/Foo.lhs
FooA.lhs
Main> main
Hello World
Main> :q
[Leaving Hugs]
shell% 

===============================================================================
Fabrice Lavier          <[EMAIL PROTECTED]>         (514) 345 1644, ext. 317
===============================================================================

Reply via email to