[modules now live in a extra namespace (Phrac). phrac can now be controlled by an external program mail@stefanwehr.de**20050826104819] { adddir ./Phrac move ./AbstractSyntax.hs ./Phrac/AbstractSyntax.hs move ./Builtins.hs ./Phrac/Builtins.hs move ./Configuration.hs ./Phrac/Configuration.hs move ./Constants.hs.in ./Phrac/Constants.hs.in move ./DependAnalysis.hs ./Phrac/DependAnalysis.hs move ./Entailment.hs ./Phrac/Entailment.hs move ./Error.hs ./Phrac/Error.hs move ./IdMap.hs ./Phrac/IdMap.hs move ./Interpreter.hs ./Phrac/Interpreter.hs move ./KindInference.hs ./Phrac/KindInference.hs move ./Kinds.hs ./Phrac/Kinds.hs move ./Lexer.x ./Phrac/Lexer.x move ./Map.hs ./Phrac/Map.hs move ./NameSpaces.hs ./Phrac/NameSpaces.hs move ./Overloading.hs ./Phrac/Overloading.hs move ./ParseSyntax.hs ./Phrac/ParseSyntax.hs move ./Parser.y ./Phrac/Parser.y move ./ParserHelper.hs ./Phrac/ParserHelper.hs move ./PhracPrelude.hs ./Phrac/PhracPrelude.hs move ./Substitution.hs ./Phrac/Substitution.hs move ./Symtab.hs ./Phrac/Symtab.hs move ./SyntaxTransformation.hs ./Phrac/SyntaxTransformation.hs move ./TypeInference.hs ./Phrac/TypeInference.hs move ./Unification.hs ./Phrac/Unification.hs move ./UniqIdents.hs ./Phrac/UniqIdents.hs move ./WellFormedness.hs ./Phrac/WellFormedness.hs hunk ./Main.hs 21 --- --- The main driver for the MinHS compiler --- - hunk ./Main.hs 23 --- import Syntax -import Lexer -import Parser -import SyntaxTransformation -import qualified WellFormedness as WF -import Error -import Pretty -import Symtab -import KindInference -import TypeInference -import Configuration -import qualified ParseSyntax as PS -import qualified AbstractSyntax as AS -import PhracPrelude -import Overloading -import Interpreter -import Constants - -import Control.Exception ( catchDyn, evaluate ) -import Control.Monad ( when ) - -import System.IO ( hFlush, stdin, stdout, stderr, hPutStrLn, - hGetContents ) hunk ./Main.hs 25 --- import System.Directory ( removeFile ) hunk ./Main.hs 26 -import List ( find ) -import Maybe ( isJust ) - -vERSION :: String -vERSION = "May 2005" - -getSrcFromStdin = - do putStrLn ("reading from stdin, finish program with a line containing " - ++ "only EOF") - read [] - where read acc = do l <- getLine - if l == "EOF" then return $ unlines (reverse acc) - else read (l : acc) - -analyse prog flags = - let on = \x -> elem x flags - dump p = dump' flags p - in do symtab <- buildSymtab prog - runST symtab $ - do case terminationCondition flags of - Nothing -> return () - Just t -> modifyConfiguration - (\c -> c { typeSynonymTermination = t }) - - let (bast, ast) = AS.splitProgram prog - - display "\n ==> WELL-FORMEDNESS 1 <==\n" - WF.check prog - - display "\n ==> KIND INFERENCE <==\n" - kindInference prog - when (on $ Dump KindInfer) $ - do kiDump <- dumpKindInference ast - liftIO $ dump $ (ppr ast) $$ kiDump - - display "\n ==> WELL-FORMEDNESS 2 <==\n" - WF.checkAfterKindInference prog - - display "\n ==> TYPE INFERENCE <==\n" - (as, bast') <- tiMain emptyAssumps bast - - -- start numbering type variables and type constructors from - -- scratch after typing the builtins. This prevents tests from - -- breaking when something is added to the prelude. - setFreshVarsPrefix "v" "C" "d" - (as', ast') <- tiMain as ast - - let prog' = AS.mergeProgram bast' ast' - - when (on $ Dump TypeInfer) $ - do liftIO $ dump (dumpTypeInference as' ast) - - installInstanceDictionaries (AS.prog_instances bast' ++ - AS.prog_instances ast') - - when (on $ Dump OverReso) $ - do let isBuiltin ((cid, ts), _) = - isJust (find (\ci -> AS.inst_class ci == cid && - AS.inst_types ci == ts) - (AS.prog_instances bast')) - dictExprs <- getDictionaryExpressions - liftIO $ dump (dumpDictExprs (filter (not . isBuiltin) - dictExprs) - $$ - (vcat $ map ppr (AS.prog_bindings ast'))) - - when (not $ on DontRun) $ - do val <- evalProgram prog' - liftIO $ putStrLn (showPpr val) - - return () +import System.IO ( hFlush, stdin, stdout, stderr, hPutStrLn ) hunk ./Main.hs 28 - -dump' :: Pretty p => [Flag] -> p -> IO () -dump' fs p = - let s = showPpr p - in if not (null s) - then do hPutStrLn stdout (showPpr p) - if ExitAfterDump `elem` fs - then exitWith ExitSuccess - else return () - else return () +import Phrac.Driver +import Phrac.Error +import Phrac.Configuration +import Phrac.Constants hunk ./Main.hs 37 - (flags,files) <- parseArgs args prog - - -- let flags = Dump TypeInfer : flags' -- for now... - - let on = \x -> elem x flags - let dump p = dump' flags p - - case debugLevel flags of - Nothing -> return () - Just l -> enableDebug l - - -- compiler error messages are propagated as exceptions - flip catchDyn (\dyn -> do - hFlush stdout - if (on NoLocation) - then hPutStrLn stderr (showWithoutLocation (dyn :: PException)) - else hPutStrLn stderr (show (dyn :: PException)) - exitWith (ExitFailure 1) - ) $ do - - src <- if null files - then getSrcFromStdin - else readFile (head files) - - -- lexer - display "\n ==> LEXING <==\n" - tokens <- evaluate $ scan src - when (on $ Dump Lex) $ dump (text $ show tokens) - - -- parser - display "\n ==> PARSING <==\n" - parseSyntax <- evaluate (parse tokens) - when (on $ Dump Parse) $ dump (ppr parseSyntax) - when (on $ Dump RawParse) $ dump (text $ show parseSyntax) - - parseSyntax' <- addBuiltins (if on NoPrelude then NoImplicitPrelude - else ImplicitPrelude) - parseSyntax - - -- syntax transformation - display "\n ==> SYNTAX TRANSFORMATION <==\n" - wholeProg <- transform parseSyntax' - let (_, ast) = AS.splitProgram wholeProg - when (on $ Dump AST) $ dump (ppr ast) - when (on $ Dump RawAST) $ dump (text $ show ast) - - analyse wholeProg flags - - {- - -- type inference - typesyn <- evaluate $ fst (elaborate (syntax, objMap)) - dump (ppr typesyn) - -- when (on $ Dump Infer) $ dump (ppr typesyn) - when (on $ Dump RawInfer) $ dump (text $ show typesyn) - -} - - {- - -- type check - putStrLn "Type check ..." - evaluate $ tycheck typesyn - when (on $ Dump Final) $ dump (ppr typesyn) - when (on $ Dump RawFinal) $ dump (text $ show typesyn) - - -- interpreter - putStrLn "Interpreter not implemented" - --dump . ppr $ Eval.eval typesyn - -} - exitWith ExitSuccess + (flags,file) <- parseArgs args prog + res <- startFromSrc flags file + case res of + Left err -> + do hFlush stdout + hPutStrLn stderr err + exitWith (ExitFailure 1) + Right _ -> exitWith ExitSuccess hunk ./Main.hs 50 - -debugLevel :: [Flag] -> Maybe DebugLevel -debugLevel [] = Nothing -debugLevel (DebugLevel l:_) = Just l -debugLevel (_:rest) = debugLevel rest - -terminationCondition :: [Flag] -> Maybe TerminationCondition -terminationCondition [] = Nothing -terminationCondition (TerminationCondition t:_) = Just t -terminationCondition (_:rest) = terminationCondition rest - -data Flag - = Version - | DebugLevel DebugLevel - | Help - | Dump Phase - | ExitAfterDump --- | ViaHaskell --- | ViaInterp --- | KeepTmpFiles --- | OptGhc String --- | CmpAbsSyn - | NoLocation - | TerminationCondition TerminationCondition - | DontRun - | NoPrelude - deriving Eq - -data Phase - = Lex - | Parse - | RawParse - | AST - | RawAST - | KindInfer - | TypeInfer - | OverReso --- | RawInfer --- | Final --- | RawFinal --- | Haskell - deriving Eq hunk ./Main.hs 89 - --- , Option [] ["dump-rawinfer"] (NoArg (Dump RawInfer)) --- "print data type after type inference" --- , Option [] ["dump-final"] (NoArg (Dump Final)) --- "print final syntax, after type checking" --- , Option [] ["dump-rawfinal"] (NoArg (Dump RawFinal)) --- "print final data type, after type checking" --- , Option [] ["dump-haskell"] (NoArg (Dump Haskell)) --- "print generated haskell" --- , Option ['H'] ["haskell"] (NoArg ViaHaskell) "compile to Haskell" --- , Option ['I'] ["interpreter"] (NoArg ViaInterp) "run interpreter" hunk ./Main.hs 90 --- , Option [] ["keep-tmps"] (NoArg KeepTmpFiles) "keep temporary files" --- , Option [] ["cmp-abssyn"] (NoArg CmpAbsSyn) "compare two syntax trees" --- , Option [] ["opth"] ((ReqArg (\s->OptGhc s)) "flag") --- "extra arguments to the Haskell compiler"] hunk ./Main.hs 96 -parseArgs :: [String] -> String -> IO ([Flag],[FilePath]) +parseArgs :: [String] -> String -> IO ([Flag], Maybe FilePath) hunk ./Main.hs 103 - | otherwise -> return (flags,fs) + | otherwise -> return (flags, if null fs + then Nothing + else Just $ head fs) hunk ./Makefile 35 -ALL_DIRS= . +ALL_DIRS= . Phrac hunk ./Makefile 39 +PKG = phrac +LIBRARY = libphrac$(_way).a hunk ./Makefile 42 - hunk ./Makefile 61 -AbstractSyntax.o: ParseSyntax.hs +Phrac/AbstractSyntax.o: Phrac/ParseSyntax.hs +Phrac/Constants.o: Phrac/Constants.hs _darcs/inventory hunk ./Makefile 67 +ifneq ($(MAKECMDGOALS),distclean) hunk ./Makefile 70 +endif + hunk ./Phrac/Builtins.hs 23 -module Builtins where +module Phrac.Builtins where hunk ./Phrac/Builtins.hs 27 -import Error -import Pretty + +import Phrac.Error +import Phrac.Pretty hunk ./Phrac/Configuration.hs 1 -module Configuration where +-- +-- Copyright (C) 2005 Stefan Wehr - http://www.stefanwehr.de +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License as +-- published by the Free Software Foundation; either version 2 of +-- the License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +-- 02111-1307, USA. +-- + +module Phrac.Configuration where hunk ./Phrac/Constants.hs.in 23 -module Constants where +module Phrac.Constants where hunk ./Phrac/DependAnalysis.hs 23 -module DependAnalysis where +module Phrac.DependAnalysis where addfile ./Phrac/Driver.hs hunk ./Phrac/Driver.hs 1 +-- +-- Copyright (C) 2005 Stefan Wehr - http://www.stefanwehr.de +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License as +-- published by the Free Software Foundation; either version 2 of +-- the License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +-- 02111-1307, USA. +-- + +-- This module allows PHRaC to be controlled from within another program. + +module Phrac.Driver + ( startFromSrc, -- starts compilation from source code + startFromAST, -- starts compilation directly from an AST + Flag(..), Phase(..) -- configuration flags + ) where + +import List ( find ) +import Maybe ( isJust ) + +import Control.Exception ( catchDyn, evaluate ) +import Control.Monad ( when ) +import System.IO ( hFlush, stdin, stdout, stderr, hPutStrLn, + hGetContents ) +import System.Exit ( exitWith, ExitCode(..) ) + +import Phrac.Lexer +import Phrac.Parser +import Phrac.SyntaxTransformation +import qualified Phrac.WellFormedness as WF +import Phrac.Error +import Phrac.Pretty +import Phrac.Symtab +import Phrac.KindInference +import Phrac.TypeInference +import Phrac.Configuration +import qualified Phrac.ParseSyntax as PS +import qualified Phrac.AbstractSyntax as AS +import Phrac.PhracPrelude +import Phrac.Overloading +import Phrac.Interpreter +import Phrac.Constants + +startFromSrc :: [Flag] -- configuration flags + -> Maybe FilePath -- source code is read from stdin if no path given + -> IO (Either String -- error message + AS.Program) -- the final program + -- (can be passed to the interpreter) + +startFromAST :: [Flag] -- configuration flags + -> PS.Program -- the AST + -> IO (Either String -- error message + AS.Program) -- the final program + -- (can be passed to the interpreter) + +data Flag + = Version + | DebugLevel DebugLevel + | Help + | Dump Phase + | ExitAfterDump + | NoLocation + | TerminationCondition TerminationCondition + | DontRun + | NoPrelude + deriving Eq + +data Phase + = Lex + | Parse + | RawParse + | AST + | RawAST + | KindInfer + | TypeInfer + | OverReso + deriving Eq + + +-- +-- the dirty source code ... +-- + +getSrcFromStdin = + do putStrLn ("reading from stdin, finish program with a line containing " + ++ "only EOF") + read [] + where read acc = do l <- getLine + if l == "EOF" then return $ unlines (reverse acc) + else read (l : acc) + +dump' :: Pretty p => [Flag] -> p -> IO () +dump' fs p = + let s = showPpr p + in if not (null s) + then do hPutStrLn stdout (showPpr p) + if ExitAfterDump `elem` fs + then exitWith ExitSuccess + else return () + else return () + +myCatch :: [Flag] -> IO a -> IO (Either String a) +myCatch flags io = catchDyn (io >>= \p -> return $ Right p) handler + where handler dyn = + do let msg = if (NoLocation `elem` flags) + then showWithoutLocation (dyn :: PException) + else show (dyn :: PException) + return $ Left msg + +startFromSrc flags file = + do let on = \x -> elem x flags + dump p = dump' flags p + + case debugLevel flags of + Nothing -> return () + Just l -> enableDebug l + + res <- myCatch flags $ do + src <- case file of + Nothing -> getSrcFromStdin + Just f -> readFile f + + -- lexer + display "\n ==> LEXING <==\n" + tokens <- evaluate $ scan src + when (on $ Dump Lex) $ dump (text $ show tokens) + + -- parser + display "\n ==> PARSING <==\n" + parseSyntax <- evaluate (parse tokens) + when (on $ Dump Parse) $ dump (ppr parseSyntax) + when (on $ Dump RawParse) $ dump (text $ show parseSyntax) + + return parseSyntax + + case res of + Left err -> return $ Left err + Right ast -> startFromAST flags ast + +startFromAST flags parseSyntax = + do let on = \x -> elem x flags + dump p = dump' flags p + + case debugLevel flags of + Nothing -> return () + Just l -> enableDebug l + + myCatch flags $ do + parseSyntax' <- addBuiltins (if on NoPrelude then NoImplicitPrelude + else ImplicitPrelude) + parseSyntax + + -- syntax transformation + display "\n ==> SYNTAX TRANSFORMATION <==\n" + wholeProg <- transform parseSyntax' + let (_, ast) = AS.splitProgram wholeProg + when (on $ Dump AST) $ dump (ppr ast) + when (on $ Dump RawAST) $ dump (text $ show ast) + + + symtab <- buildSymtab wholeProg + runST symtab $ + do case terminationCondition flags of + Nothing -> return () + Just t -> modifyConfiguration + (\c -> c { typeSynonymTermination = t }) + + let (bast, ast) = AS.splitProgram wholeProg + + display "\n ==> WELL-FORMEDNESS 1 <==\n" + WF.check wholeProg + + display "\n ==> KIND INFERENCE <==\n" + kindInference wholeProg + when (on $ Dump KindInfer) $ + do kiDump <- dumpKindInference ast + liftIO $ dump $ (ppr ast) $$ kiDump + + display "\n ==> WELL-FORMEDNESS 2 <==\n" + WF.checkAfterKindInference wholeProg + + display "\n ==> TYPE INFERENCE <==\n" + (as, bast') <- tiMain emptyAssumps bast + + -- start numbering type variables and type constructors from + -- scratch after typing the builtins. This prevents tests from + -- breaking when something is added to the prelude. + setFreshVarsPrefix "v" "C" "d" + (as', ast') <- tiMain as ast + + let wholeProg' = AS.mergeProgram bast' ast' + + when (on $ Dump TypeInfer) $ + do liftIO $ dump (dumpTypeInference as' ast) + + installInstanceDictionaries (AS.prog_instances bast' ++ + AS.prog_instances ast') + + when (on $ Dump OverReso) $ + do let isBuiltin ((cid, ts), _) = + isJust (find (\ci -> AS.inst_class ci == cid && + AS.inst_types ci == ts) + (AS.prog_instances bast')) + dictExprs <- getDictionaryExpressions + liftIO $ dump (dumpDictExprs (filter (not . isBuiltin) + dictExprs) + $$ + (vcat $ map ppr (AS.prog_bindings ast'))) + + when (not $ on DontRun) $ + do val <- evalProgram wholeProg' + liftIO $ putStrLn (showPpr val) + + return wholeProg' + + +debugLevel :: [Flag] -> Maybe DebugLevel +debugLevel [] = Nothing +debugLevel (DebugLevel l:_) = Just l +debugLevel (_:rest) = debugLevel rest + +terminationCondition :: [Flag] -> Maybe TerminationCondition +terminationCondition [] = Nothing +terminationCondition (TerminationCondition t:_) = Just t +terminationCondition (_:rest) = terminationCondition rest + hunk ./Phrac/Entailment.hs 20 -module Entailment where +module Phrac.Entailment where hunk ./Phrac/Entailment.hs 25 -import Symtab -import AbstractSyntax -import Substitution -import Unification -import Error -import Pretty + +import Phrac.Symtab +import Phrac.AbstractSyntax +import Phrac.Substitution +import Phrac.Unification +import Phrac.Error +import Phrac.Pretty hunk ./Phrac/Error.hs 22 -module Error ( +module Phrac.Error ( hunk ./Phrac/Error.hs 33 -import Pretty - hunk ./Phrac/Error.hs 41 + +import Phrac.Pretty hunk ./Phrac/IdMap.hs 20 -module IdMap where +module Phrac.IdMap where hunk ./Phrac/IdMap.hs 22 -import qualified Map -import AbstractSyntax -import Pretty +import qualified Phrac.Map as Map +import Phrac.AbstractSyntax +import Phrac.Pretty hunk ./Phrac/Interpreter.hs 22 -module Interpreter where +module Phrac.Interpreter where hunk ./Phrac/Interpreter.hs 26 -import qualified Map hunk ./Phrac/Interpreter.hs 28 -import AbstractSyntax -import Symtab -import Error -import Pretty -import Builtins -import UniqIdents ( builtinDataId, isMain ) +import qualified Phrac.Map as Map +import Phrac.AbstractSyntax +import Phrac.Symtab +import Phrac.Error +import Phrac.Pretty +import Phrac.Builtins +import Phrac.UniqIdents ( builtinDataId, isMain ) hunk ./Phrac/KindInference.hs 25 -module KindInference where +module Phrac.KindInference where hunk ./Phrac/KindInference.hs 28 -import qualified Map hunk ./Phrac/KindInference.hs 32 -import qualified PhracPrelude -import qualified DependAnalysis -import qualified UniqIdents -import Builtins -import AbstractSyntax -import Error -import Pretty -import Symtab -import IdMap -import Substitution -import Kinds +import qualified Phrac.Map as Map +import qualified Phrac.PhracPrelude as PhracPrelude +import qualified Phrac.DependAnalysis as DependAnalysis +import qualified Phrac.UniqIdents as UniqIdents +import Phrac.Builtins +import Phrac.AbstractSyntax +import Phrac.Error +import Phrac.Pretty +import Phrac.Symtab +import Phrac.IdMap +import Phrac.Substitution +import Phrac.Kinds hunk ./Phrac/Kinds.hs 22 -module Kinds where +module Phrac.Kinds where hunk ./Phrac/Kinds.hs 24 -import Symtab -import AbstractSyntax -import Error +import Phrac.Symtab +import Phrac.AbstractSyntax +import Phrac.Error hunk ./Phrac/Lexer.x 49 -module Lexer ( +module Phrac.Lexer ( hunk ./Phrac/Lexer.x 55 -import Error ( phasefail_ ) +import Phrac.Error ( phasefail_ ) hunk ./Phrac/Map.hs 11 -module Map ( +module Phrac.Map ( hunk ./Phrac/NameSpaces.hs 42 -module NameSpaces (NameSpace, nameSpace, defGlobal, enterNewRange, leaveRange, - defLocal, find, findGlobal, nameSpaceToList) +module Phrac.NameSpaces (NameSpace, nameSpace, defGlobal, enterNewRange, leaveRange, + defLocal, find, findGlobal, nameSpaceToList) hunk ./Phrac/NameSpaces.hs 46 -import qualified Map -import Error -import Pretty +import qualified Phrac.Map as Map +import Phrac.Error +import Phrac.Pretty hunk ./Phrac/Overloading.hs 22 -module Overloading ( +module Phrac.Overloading ( hunk ./Phrac/Overloading.hs 26 + hunk ./Phrac/Overloading.hs 32 -import Symtab -import AbstractSyntax -import Error -import Unification ( matchConstraint ) -import Pretty -import Substitution -import Pretty +import Phrac.Symtab +import Phrac.AbstractSyntax +import Phrac.Error +import Phrac.Unification ( matchConstraint ) +import Phrac.Pretty +import Phrac.Substitution +import Phrac.Pretty hunk ./Phrac/ParseSyntax.hs 23 -module AbstractSyntax +module Phrac.AbstractSyntax hunk ./Phrac/ParseSyntax.hs 25 -module ParseSyntax +module Phrac.ParseSyntax hunk ./Phrac/ParseSyntax.hs 30 -import Builtins -import Pretty -import Error -import Substitution -import qualified Map hunk ./Phrac/ParseSyntax.hs 33 +import Phrac.Builtins as Builtins +import Phrac.Pretty +import Phrac.Error +import Phrac.Substitution +import qualified Phrac.Map as Map + hunk ./Phrac/ParseSyntax.hs 40 -import qualified UniqIdents +import qualified Phrac.UniqIdents as UniqIdents hunk ./Phrac/Parser.y 40 -module Parser ( parse ) where +module Phrac.Parser ( parse ) where hunk ./Phrac/Parser.y 42 -import ParserHelper -import ParseSyntax -import Lexer -import Error ( phasefail_ ) -import Builtins +import Phrac.ParserHelper +import Phrac.ParseSyntax +import Phrac.Lexer +import Phrac.Error ( phasefail_ ) +import Phrac.Builtins hunk ./Phrac/ParserHelper.hs 1 -module ParserHelper where - hunk ./Phrac/ParserHelper.hs 20 +module Phrac.ParserHelper where + hunk ./Phrac/ParserHelper.hs 24 -import ParseSyntax -import Pretty -import Error -import Builtins +import Phrac.ParseSyntax +import Phrac.Pretty +import Phrac.Error +import Phrac.Builtins hunk ./Phrac/PhracPrelude.hs 20 -module PhracPrelude ( +module Phrac.PhracPrelude ( hunk ./Phrac/PhracPrelude.hs 29 -import ParseSyntax -import Error -import Lexer -import Parser -import Constants +import Phrac.ParseSyntax +import Phrac.Error +import Phrac.Lexer +import Phrac.Parser +import Phrac.Constants hunk ./Phrac/Substitution.hs 24 -module Substitution ( +module Phrac.Substitution ( hunk ./Phrac/Substitution.hs 31 -import qualified Map -import Pretty hunk ./Phrac/Substitution.hs 33 + +import qualified Phrac.Map as Map +import Phrac.Pretty hunk ./Phrac/Symtab.hs 23 -module Symtab ( +module Phrac.Symtab ( hunk ./Phrac/Symtab.hs 45 -import qualified Map hunk ./Phrac/Symtab.hs 51 -import qualified UniqIdents -import Pretty -import AbstractSyntax -import Error -import DependAnalysis -import Substitution -import Configuration +import qualified Phrac.UniqIdents as UniqIdents +import qualified Phrac.Map as Map +import Phrac.Pretty +import Phrac.AbstractSyntax +import Phrac.Error +import Phrac.DependAnalysis +import Phrac.Substitution +import Phrac.Configuration hunk ./Phrac/SyntaxTransformation.hs 26 -module SyntaxTransformation where +module Phrac.SyntaxTransformation where hunk ./Phrac/SyntaxTransformation.hs 28 -import ParseSyntax -import qualified AbstractSyntax as AS -import Pretty -import Error -import UniqIdents hiding (TypeVarId, TypeId, DataId, ClassId, - AssocTypeId, ValId) -import qualified Builtins - --- H98 libs hunk ./Phrac/SyntaxTransformation.hs 31 - hunk ./Phrac/SyntaxTransformation.hs 32 + +import qualified Phrac.AbstractSyntax as AS +import qualified Phrac.Builtins as Builtins +import Phrac.ParseSyntax +import Phrac.Pretty +import Phrac.Error +import Phrac.UniqIdents as UniqIdents + hiding (TypeVarId, TypeId, DataId, ClassId, AssocTypeId, ValId) + hunk ./Phrac/TypeInference.hs 20 -module TypeInference ( +module Phrac.TypeInference ( hunk ./Phrac/TypeInference.hs 28 -import qualified Map hunk ./Phrac/TypeInference.hs 33 -import qualified Builtins -import UniqIdents ( builtinTypeId ) -import AbstractSyntax -import Substitution -import Error -import Pretty -import Symtab -import Unification hiding (unify) -import Entailment ( entail, split, splitToplevel, reduce ) -import Kinds -import DependAnalysis -import Overloading + +import qualified Phrac.Map as Map +import qualified Phrac.Builtins as Builtins +import Phrac.UniqIdents ( builtinTypeId ) +import Phrac.AbstractSyntax +import Phrac.Substitution +import Phrac.Error +import Phrac.Pretty +import Phrac.Symtab +import Phrac.Unification hiding (unify) +import Phrac.Entailment ( entail, split, splitToplevel, reduce ) +import Phrac.Kinds +import Phrac.DependAnalysis +import Phrac.Overloading hunk ./Phrac/Unification.hs 23 -module Unification ( +module Phrac.Unification ( hunk ./Phrac/Unification.hs 37 -import AbstractSyntax -import Substitution -import Pretty -import Symtab -import Kinds -import Error +import Phrac.AbstractSyntax +import Phrac.Substitution +import Phrac.Pretty +import Phrac.Symtab +import Phrac.Kinds +import Phrac.Error hunk ./Phrac/UniqIdents.hs 23 -module UniqIdents ( +module Phrac.UniqIdents ( hunk ./Phrac/UniqIdents.hs 52 -import Error -import Pretty -import qualified NameSpaces as NS -import qualified Map -import qualified ParseSyntax -import qualified Builtins +import Phrac.Error +import Phrac.Pretty +import qualified Phrac.NameSpaces as NS +import qualified Phrac.Map as Map +import qualified Phrac.ParseSyntax as ParseSyntax +import qualified Phrac.Builtins as Builtins hunk ./Phrac/WellFormedness.hs 21 -module WellFormedness where +module Phrac.WellFormedness where hunk ./Phrac/WellFormedness.hs 28 -import AbstractSyntax -import Error -import Pretty -import Symtab -import Unification -import Substitution -import Entailment ( entail ) -import Configuration + +import Phrac.AbstractSyntax +import Phrac.Error +import Phrac.Pretty +import Phrac.Symtab +import Phrac.Unification +import Phrac.Substitution +import Phrac.Entailment ( entail ) +import Phrac.Configuration hunk ./Pretty.hs 21 -module Pretty ( +module Phrac.Pretty ( hunk ./Pretty.hs 43 -import qualified Map +import qualified Phrac.Map as Map hunk ./boring 36 -^Lexer\.hs$ -^Parser\.hs$ -^Parser\.info$ +^Phrac/Lexer\.hs$ +^Phrac/Parser\.hs$ +^Phrac/Parser\.info$ hunk ./boring 46 -^Constants\.hs$ +^Phrac/Constants\.hs$ hunk ./configure 1508 - ac_config_files="$ac_config_files mk/config.mk Constants.hs" + ac_config_files="$ac_config_files mk/config.mk Phrac/Constants.hs" hunk ./configure 2062 - "Constants.hs" ) CONFIG_FILES="$CONFIG_FILES Constants.hs" ;; + "Phrac/Constants.hs" ) CONFIG_FILES="$CONFIG_FILES Phrac/Constants.hs" ;; hunk ./configure.ac 65 -AC_CONFIG_FILES(mk/config.mk Constants.hs) +AC_CONFIG_FILES(mk/config.mk Phrac/Constants.hs) hunk ./mk/rules.mk 157 - find tests -type f | sed -n '/^.*\/[0-9]*$$/p' | xargs rm + find tests -type f | sed -n '/^.*\/[0-9]*$$/p' | xargs rm -f }