Add a little documentation

This commit is contained in:
Niels G. W. Serup 2024-11-09 23:13:37 +01:00
parent 67fb3f8871
commit 06d5dbb2d7
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
9 changed files with 23 additions and 2 deletions

View File

@ -1,5 +1,8 @@
{-# LANGUAGE GADTs #-} {-# LANGUAGE GADTs #-}
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FunctionalDependencies #-}
-- | Combinators for generating a list of dependencies between calculations, to
-- be executed later in DependencyRunner.
module Byg.DependencyGenerator module Byg.DependencyGenerator
( DepGenM ( DepGenM
, DepGenM' , DepGenM'

View File

@ -1,4 +1,11 @@
{-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MonoLocalBinds #-}
-- | Run the actual operations from the generated dependencies from DependencyGenerator.
--
-- This does not work fully as intended right now (computes more than strictly
-- needed) and needs to be rewritten in a more testable way. The idea is to only
-- evaluate something if a future operation depends on it, which is reflected in
-- the ValueExistence type.
module Byg.DependencyRunner module Byg.DependencyRunner
( DepRunM ( DepRunM
, runDeps , runDeps

View File

@ -1,3 +1,4 @@
-- | All byg functions.
module Byg.Functions module Byg.Functions
( module Byg.Functions.Image ( module Byg.Functions.Image
, module Byg.Functions.Pandoc , module Byg.Functions.Pandoc

View File

@ -1,13 +1,14 @@
-- | All byg types.
module Byg.Types module Byg.Types
( module Byg.Types.Token ( module Byg.Types.Token
, module Byg.Types.Value , module Byg.Types.Value
, module Byg.Types.Functions , module Byg.Types.Functions
, module Byg.Types.Date , module Byg.Types.Date
, Dependency , module Byg.Types.Dependency
) where ) where
import Byg.Types.Token import Byg.Types.Token
import Byg.Types.Value import Byg.Types.Value
import Byg.Types.Functions import Byg.Types.Functions
import Byg.Types.Date import Byg.Types.Date
import Byg.Types.Dependency (Dependency) import Byg.Types.Dependency

View File

@ -1,3 +1,4 @@
-- | Date functions.
module Byg.Types.Date module Byg.Types.Date
( Date(..) ( Date(..)
, formatDate , formatDate

View File

@ -1,4 +1,6 @@
{-# LANGUAGE GADTs #-} {-# LANGUAGE GADTs #-}
-- | Keeps track of the graph of calculation dependencies.
module Byg.Types.Dependency module Byg.Types.Dependency
( Action(..) ( Action(..)
, F(..) , F(..)

View File

@ -1,4 +1,6 @@
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FunctionalDependencies #-}
-- | Calculation function types.
module Byg.Types.Functions module Byg.Types.Functions
( IsFunctionIO(..) ( IsFunctionIO(..)
) where ) where

View File

@ -1,4 +1,6 @@
{-# LANGUAGE GADTs #-} {-# LANGUAGE GADTs #-}
-- | Tokens represent future values.
module Byg.Types.Token module Byg.Types.Token
( Token(..) ( Token(..)
) where ) where

View File

@ -1,4 +1,6 @@
{-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MonoLocalBinds #-}
-- | Small wrapper over the Dynamic type.
module Byg.Types.Value module Byg.Types.Value
( Value(..) ( Value(..)
, toValue , toValue