From Dave at haskell.org Tue Mar 6 13:21:44 2007 From: Dave at haskell.org (Dave@haskell.org) Date: Tue Mar 6 13:14:49 2007 Subject: [Hugs-users] Missing Prelude Message-ID: <20070306181448.112E732429B@www.haskell.org> I replaced installed Hugs and ghc with the newest versions which I built myself. ghc works but hugs now exits with the message __ __ __ __ ____ ___ _________________________________________ || || || || || || ||__ Hugs 98: Based on the Haskell 98 standard ||___|| ||__|| ||__|| __|| Copyright (c) 1994-2005 ||---|| ___|| World Wide Web: http://haskell.org/hugs || || Bugs: http://hackage.haskell.org/trac/hugs || || Version: September 2006 _________________________________________ Haskell 98 mode: Restart with command line option -98 to enable extensions Hugs.Prelude not found on current path: ".:{Home}/lib/hugs/packages/*:/usr/local/lib/hugs/packages/*" FATAL ERROR: Unable to load prelude implementation Where does hugs normally find the Hugs.Prelude file? Thanks, Dave Feustel From ross at soi.city.ac.uk Tue Mar 6 13:32:09 2007 From: ross at soi.city.ac.uk (Ross Paterson) Date: Tue Mar 6 13:25:18 2007 Subject: [Hugs-users] Missing Prelude In-Reply-To: <20070306181448.112E732429B@www.haskell.org> References: <20070306181448.112E732429B@www.haskell.org> Message-ID: <20070306183209.GB4665@soi.city.ac.uk> On Tue, Mar 06, 2007 at 06:21:44PM +0000, Dave@haskell.org wrote: > I replaced installed Hugs and ghc with the newest versions which > I built myself. ghc works but hugs now exits with the message > > __ __ __ __ ____ ___ _________________________________________ > || || || || || || ||__ Hugs 98: Based on the Haskell 98 standard > ||___|| ||__|| ||__|| __|| Copyright (c) 1994-2005 > ||---|| ___|| World Wide Web: http://haskell.org/hugs > || || Bugs: http://hackage.haskell.org/trac/hugs > || || Version: September 2006 _________________________________________ > > Haskell 98 mode: Restart with command line option -98 to enable extensions > > Hugs.Prelude not found on current path: ".:{Home}/lib/hugs/packages/*:/usr/local/lib/hugs/packages/*" > > FATAL ERROR: Unable to load prelude implementation > > Where does hugs normally find the Hugs.Prelude file? With these settings (which are the default), /usr/local/lib/hugs/packages/hugsbase/Hugs/Prelude.hs From dfeustel at mindspring.com Tue Mar 6 14:25:23 2007 From: dfeustel at mindspring.com (dfeustel@mindspring.com) Date: Tue Mar 6 14:18:27 2007 Subject: [Hugs-users] Missing Prelude Message-ID: <20070306191826.8707D324447@www.haskell.org> > On Tue, Mar 06, 2007 at 06:21:44PM +0000, Dave@haskell.org wrote: > > I replaced installed Hugs and ghc with the newest versions which > > I built myself. ghc works but hugs now exits with the message > > > > __ __ __ __ ____ ___ _________________________________________ > > || || || || || || ||__ Hugs 98: Based on the Haskell 98 standard > > ||___|| ||__|| ||__|| __|| Copyright (c) 1994-2005 > > ||---|| ___|| World Wide Web: http://haskell.org/hugs > > || || Bugs: http://hackage.haskell.org/trac/hugs > > || || Version: September 2006 _________________________________________ > > > > Haskell 98 mode: Restart with command line option -98 to enable extensions > > > > Hugs.Prelude not found on current path: ".:{Home}/lib/hugs/packages/*:/usr/local/lib/hugs/packages/*" > > > > FATAL ERROR: Unable to load prelude implementation > > > > Where does hugs normally find the Hugs.Prelude file? > > With these settings (which are the default), > > /usr/local/lib/hugs/packages/hugsbase/Hugs/Prelude.hs > ls: /usr/local/lib/hugs/packages/hugsbase/Hugs/P*: Permission denied Thanks. Somehow directory /usr/local/lib/hugs had the x permissions removed from group and world which removed my access to Prelude. I restored the permissions and hugs now works again. From Dave at haskell.org Wed Mar 7 17:54:55 2007 From: Dave at haskell.org (Dave@haskell.org) Date: Wed Mar 7 17:47:56 2007 Subject: [Hugs-users] Old bug hanging around? Message-ID: <20070307224754.9402432422A@www.haskell.org> I got an error on the following short program (which ghc compiles and runs). =========== -- Some unix-like tools written in simple, clean Haskell import Data.List import Data.Char import System.IO import Text.Printf -- First, two helpers io f = interact (unlines . f . lines) showln = (++ "\n") . show -- Compute a simple cksum of a file main = interact $ showln . foldl' k 5381 where k h c = h * 33 + ord c ======== Hugs> :load chksum.hs ERROR "chksum.hs":15 - Unresolved top-level overloading *** Binding : showln *** Outstanding context : Show b Text.Printf> This error has been around for a while. See http://www.arcknowledge.com/gmane.comp.lang.haskell.hugs.bugs/2006-11/msg00010.html Is there a fix for this problem? Thanks, Dave Feustel From ross at soi.city.ac.uk Wed Mar 7 18:37:52 2007 From: ross at soi.city.ac.uk (Ross Paterson) Date: Wed Mar 7 18:30:56 2007 Subject: [Hugs-users] Old bug hanging around? In-Reply-To: <20070307224754.9402432422A@www.haskell.org> References: <20070307224754.9402432422A@www.haskell.org> Message-ID: <20070307233752.GB5862@soi.city.ac.uk> On Wed, Mar 07, 2007 at 10:54:55PM +0000, Dave@haskell.org wrote: > io f = interact (unlines . f . lines) > showln = (++ "\n") . show > > -- Compute a simple cksum of a file > > main = interact $ showln . foldl' k 5381 > where k h c = h * 33 + ord c > > ======== > > Hugs> :load chksum.hs > ERROR "chksum.hs":15 - Unresolved top-level overloading > *** Binding : showln > *** Outstanding context : Show b > > Text.Printf> > > This error has been around for a while. Yes, it's a documented divergence from Haskell 98 in the handling of the Monomorphism Restriction. Workarounds are to give an explicit signature for showln, or to tweak the definition so it's a function: showln x = show x ++ "\n" (or, better) showln x = shows x "\n" From dfeustel at mindspring.com Wed Mar 7 18:45:17 2007 From: dfeustel at mindspring.com (dfeustel@mindspring.com) Date: Wed Mar 7 18:38:19 2007 Subject: [Hugs-users] Old bug hanging around? Message-ID: <20070307233817.406B13244AC@www.haskell.org> > On Wed, Mar 07, 2007 at 10:54:55PM +0000, Dave@haskell.org wrote: > > io f = interact (unlines . f . lines) > > showln = (++ "\n") . show > > > > -- Compute a simple cksum of a file > > > > main = interact $ showln . foldl' k 5381 > > where k h c = h * 33 + ord c > > > > ======== > > > > Hugs> :load chksum.hs > > ERROR "chksum.hs":15 - Unresolved top-level overloading > > *** Binding : showln > > *** Outstanding context : Show b > > > > Text.Printf> > > > > This error has been around for a while. > > Yes, it's a documented divergence from Haskell 98 in the handling of > the Monomorphism Restriction. > > Workarounds are to give an explicit signature for showln, or to tweak > the definition so it's a function: > > showln x = show x ++ "\n" > > (or, better) > > showln x = shows x "\n" That Works. Thanks, Dave From luc.duponcheel at accenture.com Fri Mar 9 08:37:36 2007 From: luc.duponcheel at accenture.com (luc.duponcheel@accenture.com) Date: Fri Mar 9 08:30:40 2007 Subject: [Hugs-users] arrowp-0.5 Message-ID: <4E54313620716D41B1DCC159E8CEF77DFE65B8@EMEXM0202.dir.svc.accenture.com> Hi all, ... probably a very stupid question ... here is the content of the arrowp-0.5 README file ---begin--- Various arrow materials: preprocessor a prototype preprocessor translating arrow notation to Haskell. examples some illustrative applications of the preprocessor and libraries. The preprocessor works with GHC. The rest can be used with either Hugs or GHC (>= 5.00). ---end--- Does this mean that the preprocessor cannot be used with Hugs? In other words: can the generated code sometimes not be interpreted by Hugs? (because of subtle language and/or library differences, maybe?) I find this a little bit strange, since GHC has 'native' support for arrows anyway (via -farrows), so why does arrowp exist if it can be used with GHC but not with Hugs? Luc This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. From g_sauthoff at web.de Mon Mar 12 14:00:11 2007 From: g_sauthoff at web.de (Georg Sauthoff) Date: Mon Mar 12 14:05:08 2007 Subject: [Hugs-users] Cannot access the anonymous CVS repository Message-ID: Hi, I followed http://hackage.haskell.org/trac/hugs/wiki/GettingTheSource, but I get this strange error message: CVSROOT=:pserver:anoncvs@cvs.haskell.org:/cvs cvs login Logging in to :pserver:anoncvs@cvs.haskell.org:2401/cvs CVS password: PAM start error: Critical error - immediate abort Fatal error, aborting. cvs [login aborted]: unrecognized auth response from cvs.haskell.org: pam failed to release authenticator Best regards Georg Sauthoff From Dave at haskell.org Sat Mar 24 11:48:23 2007 From: Dave at haskell.org (Dave@haskell.org) Date: Sat Mar 24 11:47:47 2007 Subject: [Hugs-users] '=' and ':' generate errors Message-ID: <20070324154745.0F8C73243F0@www.haskell.org> running Hugs98 sept 2006 version, on AMD 64-bit OpenBSD 4.0, test :: Int ERROR - Undefined variable "test" size = 12+13 ERROR - Syntax error in input (unexpected `=') These lines are right out of _The Craftf of Functional Programming_, 2nd Edition, which I just received in the mail. Is Hugs98 broken on my system? Thanks, Dave Feustel From sven.panne at aedion.de Sat Mar 24 11:55:09 2007 From: sven.panne at aedion.de (Sven Panne) Date: Sat Mar 24 11:54:32 2007 Subject: [Hugs-users] '=' and ':' generate errors In-Reply-To: <20070324154745.0F8C73243F0@www.haskell.org> References: <20070324154745.0F8C73243F0@www.haskell.org> Message-ID: <200703241655.09339.sven.panne@aedion.de> On Saturday 24 March 2007 16:48, Dave@haskell.org, Feustel@haskell.org wrote: > [...] Is Hugs98 broken on my system? No. What you can enter at the prompt are either Haskell expressions or Hugs commands (use ':?' to seem them all). 'test :: Int' is an expression, but if you haven't loaded any script, test is undefined, and Hugs is telling you that. 'size = 12 + 13' is not an expression, but the definition of the value of 'size', and you can't do this on the prompt. Put that into a file and load it via :l, and this should make Hugs (and you ;-) happy... Cheers, S. From ndmitchell at gmail.com Sat Mar 24 11:56:51 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sat Mar 24 11:56:14 2007 Subject: [Hugs-users] '=' and ':' generate errors In-Reply-To: <20070324154745.0F8C73243F0@www.haskell.org> References: <20070324154745.0F8C73243F0@www.haskell.org> Message-ID: <404396ef0703240856v1a82d37ct1272e8f596c90a58@mail.gmail.com> Hi > Is Hugs98 broken on my system? No > test :: Int > ERROR - Undefined variable "test" This defines the name test to be an Int, but what is test? Have you introduced it earlier? Try instead: > 1 :: Int > size = 12+13 > ERROR - Syntax error in input (unexpected `=') You can't do that at the hugs prompt, but you can in a file. In a command prompt perhaps: let size = 12+13 in size Thanks Neil From Dave at haskell.org Sat Mar 24 15:51:29 2007 From: Dave at haskell.org (Dave@haskell.org) Date: Sat Mar 24 15:50:52 2007 Subject: [Hugs-users] 64-bit Ints Message-ID: <20070324195050.D1615324470@www.haskell.org> Is there a simple way to build hugs with 64-bit ints instead of 32-bit ints for Int? Thanks, Dave Feustel From ndmitchell at gmail.com Sat Mar 24 15:54:38 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sat Mar 24 15:54:01 2007 Subject: [Hugs-users] 64-bit Ints In-Reply-To: <20070324195050.D1615324470@www.haskell.org> References: <20070324195050.D1615324470@www.haskell.org> Message-ID: <404396ef0703241254v9149407l7993e66a3022d618@mail.gmail.com> Hi Dave, > Is there a simple way to build hugs with 64-bit ints > instead of 32-bit ints for Int? Why do you want 64 bit Ints? In general, if you care, you should probably be using Integer instead. Thanks Neil From igloo at earth.li Sat Mar 24 16:22:46 2007 From: igloo at earth.li (Ian Lynagh) Date: Sat Mar 24 16:22:14 2007 Subject: [Hugs-users] 64-bit Ints In-Reply-To: <404396ef0703241254v9149407l7993e66a3022d618@mail.gmail.com> References: <20070324195050.D1615324470@www.haskell.org> <404396ef0703241254v9149407l7993e66a3022d618@mail.gmail.com> Message-ID: <20070324202246.GA27681@matrix.chaos.earth.li> On Sat, Mar 24, 2007 at 07:54:38PM +0000, Neil Mitchell wrote: > > >Is there a simple way to build hugs with 64-bit ints > >instead of 32-bit ints for Int? > > Why do you want 64 bit Ints? In general, if you care, you should > probably be using Integer instead. Or Data.Int.Int64. Thanks Ian From bulat.ziganshin at gmail.com Sat Mar 24 19:01:44 2007 From: bulat.ziganshin at gmail.com (Bulat Ziganshin) Date: Sat Mar 24 19:07:02 2007 Subject: [Hugs-users] 64-bit Ints In-Reply-To: <20070324195050.D1615324470@www.haskell.org> References: <20070324195050.D1615324470@www.haskell.org> Message-ID: <1224395691.20070325030144@gmail.com> Hello Dave, Saturday, March 24, 2007, 10:51:29 PM, you wrote: > Is there a simple way to build hugs with 64-bit ints > instead of 32-bit ints for Int? don't mind, just buy two 32-bit boxes! :) i hope that you will never need to process 4096-bit rsa keys :D -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com From g_sauthoff at web.de Sun Mar 25 11:06:45 2007 From: g_sauthoff at web.de (Georg Sauthoff) Date: Sun Mar 25 11:06:26 2007 Subject: [Hugs-users] Improved readline command completion support Message-ID: Hi, fyi, I wrote a patch that improves the readline command completion support of hugs. It is available at http://hackage.haskell.org/trac/hugs/ticket/61 . I.e.: - added completion of function names and constructors - added completion of command names (:) - added completion of module names (e.g. after :browse , etc.) - only do filename completion where it makes sense (e.g. after :load , etc.) - expand use of tilde (~) in filenames (previously it was completed but not recognized by hugs) - read and write the history from/to ~/.hugs_history - make hugs recognize :help Best regards Georg Sauthoff From iavor.diatchki at gmail.com Tue Mar 27 01:11:20 2007 From: iavor.diatchki at gmail.com (Iavor Diatchki) Date: Tue Mar 27 01:10:35 2007 Subject: [Hugs-users] readline library? Message-ID: <5ab17e790703262211q4e465034g38db93efce3c79ef@mail.gmail.com> Hello, It seems that the hugs98-plus-Sep2006.tar.gz package from the Hugs website is missing the readline library (System.Console.Readline). Is this by design or did I do something wrong while compiling it? -Iavor From ross at soi.city.ac.uk Wed Mar 28 09:51:11 2007 From: ross at soi.city.ac.uk (Ross Paterson) Date: Wed Mar 28 09:50:29 2007 Subject: [Hugs-users] readline library? In-Reply-To: <5ab17e790703262211q4e465034g38db93efce3c79ef@mail.gmail.com> References: <5ab17e790703262211q4e465034g38db93efce3c79ef@mail.gmail.com> Message-ID: <20070328135111.GA20333@soi.city.ac.uk> On Mon, Mar 26, 2007 at 10:11:20PM -0700, Iavor Diatchki wrote: > It seems that the hugs98-plus-Sep2006.tar.gz package from the Hugs > website is missing the readline library (System.Console.Readline). Is > this by design or did I do something wrong while compiling it? It doesn't build with Hugs (and never did) because it uses a bit of GHC-specific stuff. Probably not hard to fix, but no-one has done it.