packages feed

curry-frontend 0.2.1 → 0.2.2

raw patch · 3 files changed

+77/−4 lines, 3 files

Files

curry-frontend.cabal view
@@ -1,5 +1,5 @@ Name:          curry-frontend-Version:       0.2.1+Version:       0.2.2 Cabal-Version: >= 1.6 Synopsis:      Compile the functional logic language Curry to several intermediate formats Description:   The Curry Frontend consists of the executable program "cymake".@@ -41,7 +41,8 @@                     Exports, IL.Scope, SyntaxColoring, CurryEnv                     IL.CurryToIL, OldScopeEnv, CurryHtml                     IL.XML, PatchPrelude, TopEnv, CaseCompletion-                    Imports, PathUtils, TypeCheck+                    Imports, PathUtils, Filenames,+                    TypeCheck,                     InterfaceCheck,                      Types, Frontend, PrecCheck                     TypeSubst, GenAbstractCurry
+ src/Filenames.hs view
@@ -0,0 +1,72 @@+module Filenames(module Filenames,+                     +                ) where++import System.FilePath++-- Various filename extensions++++curryExt, lcurryExt, icurryExt, oExt :: String+curryExt = ".curry"++lcurryExt = ".lcurry"++icurryExt = ".icurry"++flatExt = ".fcy"++flatIntExt = ".fint"+-- fintExt = ".fint"++xmlExt = "_flat.xml"++acyExt = ".acy"++uacyExt = ".uacy"++sourceRepExt = ".cy"++oExt = ".o"++debugExt = ".d.o"++sourceExts, moduleExts, objectExts :: [String]+sourceExts = [curryExt,lcurryExt]+moduleExts = sourceExts ++ [icurryExt]+objectExts = [oExt]++{-+  The following functions compute the name of the target file (e.g.+  interface file, flat curry file etc.)+  for a source module. Note that+  output files are always created in the same directory as the source+  file.+-}++interfName :: FilePath -> FilePath+interfName sfn = replaceExtension sfn icurryExt+++flatName :: FilePath -> FilePath+flatName fn = replaceExtension fn flatExt++flatIntName :: FilePath -> FilePath+flatIntName fn = replaceExtension fn flatIntExt++xmlName :: FilePath -> FilePath+xmlName fn = replaceExtension fn xmlExt++acyName :: FilePath -> FilePath+acyName fn = replaceExtension fn acyExt++uacyName :: FilePath -> FilePath+uacyName fn = replaceExtension fn uacyExt++sourceRepName :: FilePath -> FilePath+sourceRepName fn = replaceExtension fn sourceRepExt++objectName :: Bool -> FilePath -> FilePath+objectName debug = name (if debug then debugExt else oExt)+    where name ext fn = replaceExtension fn ext
src/SyntaxColoring.hs view
@@ -207,7 +207,7 @@       --- @param parse-Modules  [typingParse,fullParse,parse]  catIdentifiers :: [MsgMonad Module] -> ([(ModuleIdent,ModuleIdent)],[Code])-catIdentifiers = catIds . rights . map (fst . runMsg)+catIdentifiers = catIds . rights_sc . map (fst . runMsg)     where        catIds [] = ([],[])       catIds [m] =@@ -217,7 +217,7 @@      -- not in base befoer base4 -rights  xs = [ x | Right x <- xs]+rights_sc  xs = [ x | Right x <- xs]  --- @param parse-Module --- @param Maybe betterParse-Module