module Language.Drasil.Code.Imperative.GOOL.Data (AuxData(auxFilePath, auxDoc),
ad, PackData(packProg, packAux), packD
) where
import GOOL.Drasil (ProgData)
import Text.PrettyPrint.HughesPJ (Doc, isEmpty)
data AuxData = AD {AuxData -> FilePath
auxFilePath :: FilePath, AuxData -> Doc
auxDoc :: Doc}
ad :: FilePath -> Doc -> AuxData
ad :: FilePath -> Doc -> AuxData
ad = FilePath -> Doc -> AuxData
AD
data PackData = PackD {PackData -> ProgData
packProg :: ProgData, PackData -> [AuxData]
packAux :: [AuxData]}
packD :: ProgData -> [AuxData] -> PackData
packD :: ProgData -> [AuxData] -> PackData
packD ProgData
p [AuxData]
as = ProgData -> [AuxData] -> PackData
PackD ProgData
p (forall a. (a -> Bool) -> [a] -> [a]
filter (Bool -> Bool
not forall b c a. (b -> c) -> (a -> b) -> a -> c
. Doc -> Bool
isEmpty forall b c a. (b -> c) -> (a -> b) -> a -> c
. AuxData -> Doc
auxDoc) [AuxData]
as)