Somebody works with together FORTRAN and Haskell. Exists
some funcao to transform codigo FORTRAN into codigo
HASKELL?
Thanks, Allan Bruno
__
AcessoBOL, só R$ 9,90! O menor preço do mercado!
Assine já!
--- clusterpoli [EMAIL PROTECTED] wrote:
Somebody works with together FORTRAN and Haskell. Exists
some funcao to transform codigo FORTRAN into codigo
HASKELL?
TXL might help, but it's its own functional language.
It can probably convert FORTRAN to Haskell given the
EBNF for each language, but
A quick look at the source looks like both GHC and NHC will
simply pass
on errors from the OS, so for example with
module Main where
import IO
import Directory
main :: IO()
main = do catch (createDirectory this/does/not/exist/foo)
(\e -
| Two possibilities: either createDirectory should act like
| 'mkdir -p' and make the whole path, or the library report
| should document isDoesNotExistError as a possible error
| thrown by createDirectory. I'd vote for the latter.
I'm willing to do that for H98 unless anyone can think of a
| However, I would guess that changing the type signature of
| the current showInt function is unacceptable for Haskell'98.
| Maybe we should consider adding the more general version
| under a new name like showIntBase, together with
| show{Dec,Oct,Hex}? This would break no existing code,
Hello,
I am interested in using global variables (in GHC).
I need a variable to store list of Integers to store temporary results.
I have been reading the module MVar, but I wonder if there is an
alternative way of doing it.
I have already implemented my function using an auxiliar argument
As you say, we can't change the type of showInt. I suppose we could
add:
showIntAtBase :: Integral a=20
=3D a-- base
- (a - Char) -- digit to char
- a-- number to show.
- ShowS
showOct, showHex :: Integral a =3D
JIGG alternative way of doing it. I have already implemented my function
JIGG using an auxiliar argument where I put my lists of Integers. Will
JIGG the use of a global variable improve my function?
There is no such thing as mutable variable (as in imperative languages) in
Haskell (and my
With the following module:
module Main where
import Random
data Foo = Foo StdGen
main :: IO()
main = do let rs = randoms (Foo (mkStdGen 39)) :: [Int]
rRs = randomRs (0,9) (Foo (mkStdGen 39)) :: [Int]
putStrLn $ show $ take 100 rs
Also, GHC's NumExts has
doubleToFloat :: Double - Float
floatToDouble :: Float - Double
Q2: If we are going to run round adding functions to Numeric,
should we add those too? It's hard to know where to stop... but if
that conversion is what you want to do, H98 doesn't give a good
Hello, I am interested in using global variables (in GHC). I need a
variable to store list of Integers to store temporary results. I
have been reading the module MVar, but I wonder if there is an
alternative way of doing it. I have already implemented my function
using an auxiliar
Peter Douglass writes:
Hi,
I have a number of questions regarding categories and datatypes. I know
that many of the folk in this mailing list could answer these question, but
I wonder if there is a more appropriate forum. (i.e. the question are not
Haskell specific).
Hello, I am interested in using global variables (in GHC). I need a
variable to store list of Integers to store temporary results. I
have been reading the module MVar, but I wonder if there is an
alternative way of doing it. I have already implemented my function
using an auxiliar
At 2001-11-29 05:31, Juan Ignacio García García wrote:
I am interested in using global variables (in GHC).
In JVM-Bridge (nearly there!) I use lifted monads to store global
constants, though variables are not hard either. This does mean an extra
function needed to call IO functions, but in my
At 2001-11-29 11:13, Ashley Yakeley wrote:
Lifted monads look something like this:
data MyAction a = MkMyAction ((consts,vars) - (vars,a));
instance Monad MyAction where etc.
Whoops, should be
data MyAction a = MkMyAction ((consts,vars) - IO (vars,a));
--
Ashley Yakeley,
Hi, I've just started messing around with strictness. My goal now is
understanding when and how to use it.
I began with simple examples like making a strict foldl.
When trying to sum a list of 6 elements with lazy foldl I'd get a stack
space overflow, with a strict foldl I was able to sum
Then I tried:
sfibac :: IntPos - (IntPos,IntPos) -
(IntPos,IntPos) sfibac n (a,b)
| n == 0= (a,b)
| otherwise = sfibac (n-1) (b, (+b) $! a)
I'm sorry I meant:
sfibac :: IntPos - (IntPos,IntPos) -
17 matches
Mail list logo