From: Francis Russell Date: Fri, 28 Sep 2012 00:43:31 +0000 (+0100) Subject: Add export lists. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=32b2b8190b117d8e0882ef7de10db46296e209b3;p=francis%2Fofc.git Add export lists. --- diff --git a/OFC/Common.hs b/OFC/Common.hs index c10c03d..e234719 100644 --- a/OFC/Common.hs +++ b/OFC/Common.hs @@ -1,4 +1,8 @@ -module OFC.Common where +module OFC.Common + ( IndexType(..) + , PrettyPrintable(..) + ) where + import Text.PrettyPrint (Doc, renderStyle, Style(..), Mode(..)) data IndexType = diff --git a/OFC/SecondLevel.hs b/OFC/SecondLevel.hs index e0dd068..2b646ae 100644 --- a/OFC/SecondLevel.hs +++ b/OFC/SecondLevel.hs @@ -1,4 +1,15 @@ -module OFC.SecondLevel where +module OFC.SecondLevel + ( SymbolTable + , Quantification(..) + , ValueType(..) + , Expression(..) + , Assignment(..) + , DiagonalOperator(..) + , OperatorExpr(..) + , OFL2 + , buildSecondLevel + ) where + import OFC.Common import OFC.TargetMapping (MappingTable, FortranFunction) import qualified OFC.TargetMapping as TM diff --git a/OFC/TargetMapping.hs b/OFC/TargetMapping.hs index feea412..f447c67 100644 --- a/OFC/TargetMapping.hs +++ b/OFC/TargetMapping.hs @@ -1,4 +1,17 @@ -module OFC.TargetMapping where +module OFC.TargetMapping + ( MappingTable + , TargetType(..) + , FortranType(..) + , ArrayIndex(..) + , SpaceInfo(..) + , FortranParamProperty(..) + , PPDFunctionSetProperty(..) + , FortranFunction(..) + , FortranFunctionProperty(..) + , findSpace + , findParamType + ) where + import Data.Map (Map) import Data.Maybe (catMaybes) @@ -60,7 +73,6 @@ findParamType properties = getProperty toFortranType properties toFortranType (ParamType t) = Just t toFortranType _ = Nothing - getProperty :: (Show a) => (FortranParamProperty -> Maybe a) -> [FortranParamProperty] -> Maybe a getProperty getter properties = case catMaybes $ map getter properties of [] -> Nothing diff --git a/OFC/TopLevel.hs b/OFC/TopLevel.hs index 68c76e9..f9374d8 100644 --- a/OFC/TopLevel.hs +++ b/OFC/TopLevel.hs @@ -1,4 +1,36 @@ -module OFC.TopLevel where +module OFC.TopLevel + ( BaseType(..) + , Expression(..) + , Assignment(..) + , SymbolTable + , OFL + , OFLKeyword(..) + , addIndexDeclaration + , addInternalIndexDeclaration + , addValueDeclaration + , addAssignment + , addTargetMapping + , getSymbols + , getIndexSymbols + , getValueSymbols + , getTargetMappings + , getTargetType + , getOutputFunction + , findUniqueName + , setOutputFunction + , getIndices + , getIndexType + , getValueType + , hasIndex + , hasTargetMapping + , hasSymbol + , hasValue + , isInternalSymbol + , promoteType + , getType + , emptyOFL + ) where + import OFC.TargetMapping import OFC.Common import Text.PrettyPrint diff --git a/src/Main.hs b/src/Main.hs index 1b7afd1..261c3e2 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,6 +1,6 @@ module Main (main) where import System.Environment (getArgs) -import OFC.Common +import OFC.Common (prettyPrint) import OFC.Parser (runOFLParser) import OFC.TopLevel (OFL) import OFC.SecondLevel (buildSecondLevel)