logo       

RE: strange difference between old and hierachical module names: msg#00006

lang.haskell.glasgow.bugs

Subject: RE: strange difference between old and hierachical module names

SPJ wrote:

> Good bug report. Now fixed in the HEAD>

Thanks, but there is now a more serious problem;
could be a consequence of the fix.
See below a little test file Main.hs and the
ghci session for this file using HEAD updated
just after your fix.

Thanks,
Ralf


[ralf@localhost test]$ more Main.hs
module Main where

main = print True

[ralf@localhost test]$
/home/ralf/cvsprojects/cvs.haskell.org/fptools/ghc/compiler/stage2/ghc-inplace
--interactive -fglasgow-exts -fallow-overlapping-instances
-fallow-undecidable-instances -package data Main.hs
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.3, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.

Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package lang ... linking ... done.
Loading package concurrent ... linking ... done.
Loading package QuickCheck ... linking ... done.
Loading package readline ... linking ... done.
Loading package unix ... linking ... done.
Loading package posix ... linking ... done.
Loading package util ... linking ... done.
Loading package data ... linking ... done.
Compiling Main ( Main.hs, interpreted )
Ok, modules loaded: Main.
*Main> main

<interactive>:1: Variable not in scope: `main'
*Main>

In fact, it seems, nothing is in the scope anymore.

>
>
> | -----Original Message-----
> | From: glasgow-haskell-bugs-bounces@xxxxxxxxxxx
> [mailto:glasgow-haskell-bugs-
> | bounces@xxxxxxxxxxx] On Behalf Of Ralf Laemmel
> | Sent: 03 November 2003 11:10
> | To: glasgow-haskell-bugs@xxxxxxxxxxx
> | Subject: strange difference between old and hierachical module names |
>
> | Hi,
> |
> | I am trying to compile some modules with old imports
> | such "import MonadFix". These modules compile fine
> | with GHC 6.0 latest RPM, and also on CVS source tree
> | 6.1 somewhere from july.
> |
> | However, the file below does NOT get through with GHC HEAD.
> | I get ...
> |
> | > Compiling Foo ( Foo.hs, interpreted )
> | >
> | > Foo.hs:13: `mfix' is not a (visible) method of class `MonadFix' | >
> Failed, modules loaded: none.
> |
> | If I use the new "import Control.Monad.Fix" instead of MonadFix, |
> everything works fine. This is a bit strange because
> | for most old imports there is no such problem.
> | Seems to be something special going on with MonadFix.
> |
> | Thanks,
> | Ralf
> |
> |
> |
> | ---------------------------------------------------------------- |
> | module Foo where
> |
> | -- Does not work 6.3 as 2 Nov 2003
> | import MonadFix
> | -- Works with 6.3
> | -- import Control.Monad.Fix
> |
> | data Foo a = Foo a
> |
> | instance Monad Foo
> |
> | instance MonadFix Foo where
> | mfix = undefined
> |
> | _______________________________________________
> | Glasgow-haskell-bugs mailing list
> | Glasgow-haskell-bugs@xxxxxxxxxxx
> | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise