[Haskell-cafe] Processing File Dependencies

Jon Fairbairn Jon.Fairbairn at cl.cam.ac.uk
Sat Dec 11 11:30:33 EST 2004


On 2004-12-11 at 16:00GMT "chris beddoe" wrote:

>  Hey,

please don't send mail in html

>  I  have been trying to program a simple Haskell program that allows me
>  to input a list of Java files and their dependencies

Judging from what appears below, you should probably start
with something simpler. Take this, for example:

>  > getArray :: [String] -> [File]
>  >getArray [a]
>  > | length[a] == 1 = [parseFile (head[a])]
>  > | otherwise = [parseFile (head[a])] && (getArray (tail[a]))

length [a] is always going to be 1, because [a] is a list
containing just a. head[a] is a, tail [a] is []. You give no
cases for getArray when the input is something other than a
list of length 1.


-- 
Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk




More information about the Haskell-Cafe mailing list