cvs commit: hugs98/src machdep.c

nordland@glass.cse.ogi.edu nordland@glass.cse.ogi.edu
Fri, 28 Sep 2001 15:52:49 -0700


nordland    2001/09/28 15:52:49 PDT

  Modified files:
    src                  machdep.c 
  Log:
  New modification to the file search algorithm.  We now assume that everything
  that's not a valid module name is a file path, irrespective of whether it ends
  in one of the Haskell file extensions.  The spec is as follows:
  
      find along nm hugspath
        | isModuleId nm = [ d++f++e | f <- files, d <- dirs, e <- exts ]
        | otherwise     = [nm]
        where
          dirs          = along : "" : hugspath
          files         = [mod2dir nm, nm]
          exts          = [".hs",".lhs"]
  
          isModuleId s  = all isConid (splitAt '.' s)
          mod2dir s     = map (\c -> if c=='.' then slash else c) s
  
  Revision  Changes    Path
  1.30      +11 -45    hugs98/src/machdep.c