getWorkingDirectory/changeWorkingDirectory

2013-12-04 Thread Benjamin Franksen
Module System.Posix.Directory of the unix package defines getWorkingDirectory :: IO FilePath changeWorkingDirectory :: FilePath - IO () I believe the functionality is quite portable and not limited to unix-like systems. I know that e.g. Windows has chdir and getcwd. Module Filesystem of

Re: do-and-if-then-else modification

2007-02-18 Thread Benjamin Franksen
isaac jones wrote: Iavor and I just made the trivial modification for DoAndIfThenElse syntax as described here: http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse You can see the change here: http://darcs.haskell.org/haskell-prime-report/report/haskell-report-html/exps.html

Re: help from the community?

2007-01-30 Thread Benjamin Franksen
Andres Loeh wrote: I cannot see how an empty list of tyvars is useful or desirable in practice: data Foo = Foo (forall . Int) is equivalent to just data Foo = Foo Int so why bother to permit the former? It probably indicates some error in the thinking of the programmer, so the

Teaching (was: defaults)

2006-11-30 Thread Benjamin Franksen
Malcolm Wallace wrote: Unfortunately, I suspect that teaching is _the_ major use-case for defaulting. Imagine, day one, lesson one, a student types Prelude 1+2 into Hugs, and gets the response Unresolved overloading: Num a Huh? This is lesson one, and you already need to

Re: Fractional/negative fixity?

2006-11-09 Thread Benjamin Franksen
Jón Fairbairn wrote: Syntax 1, based on Phil Wadler's improvement of my old proposal. The precedence relation is a preorder.[...] infix {ops_1; ops_2; ...; ops_n} The alternative syntax is exemplified thus: infix L + - (L * / (R ^)) [...] I think both ways (I like the second one

Re: Indentation of If-Then-Else

2006-10-22 Thread Benjamin Franksen
Henning Thielemann wrote: 1. 'if' syntax should be teached as if a then b else c This indentation makes pretty clear, what is condition, and what is the result in both cases. It just resembles case a of True - b False - c . The problem

Re: 'deriving Tree (Eq,Ord)'

2006-04-04 Thread Benjamin Franksen
On Tuesday 04 April 2006 14:55, Ross Paterson wrote: On Tue, Apr 04, 2006 at 11:06:59AM +0400, Bulat Ziganshin wrote: how about this old proposal? http://www.cse.unsw.edu.au/~dons/haskell-1990-2000/msg00727.html (Making 'deriving' a separate declaration instead of a clause) Orphan

Re: 'deriving Tree (Eq,Ord)'

2006-04-04 Thread Benjamin Franksen
On Tuesday 04 April 2006 18:46, you wrote: Benjamin Franksen wrote: However, it would help programmers a lot, specialy library users. And it would lift some of the burden that is currently on the library writer to never forget to derive all possibly useful instances for public data types

Re: small extension to `...` notation

2006-03-09 Thread Benjamin Franksen
On Thursday 09 March 2006 08:59, Bulat Ziganshin wrote: Hello Doaitse, Thursday, March 9, 2006, 12:01:37 AM, you wrote: DS xs `zipWith (+)` ys i had the same desire several times Possibly `(expr)` ? it will be non-readable. it is better to just prohibit using of backquotes inside

Re: Export lists in modules

2006-03-03 Thread Benjamin Franksen
On Friday 03 March 2006 10:52, Malcolm Wallace wrote: Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes: But if contexts-on-datatypes worked correctly, data Set a = Ord a = then even the real map from Data.Set: map :: (Ord a, Ord b) = (a - b) - Set a - Set b could be

Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Benjamin Franksen
On Friday 24 February 2006 16:38, Bulat Ziganshin wrote: i personally prefer to have public/private modifiers on each function and gather interface documentation by tools like haddock Me too. Ben ___ Haskell-prime mailing list