{-# LANGUAGE PostfixOperators#-}
module Drasil.DblPend.Goals (goals, goalsInputs) where

import Language.Drasil
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.Sentence.Combinators as S
import Data.Drasil.Concepts.Documentation (goalStmtDom)
import qualified Data.Drasil.Concepts.PhysicalProperties as CPP (mass, len)
import Data.Drasil.Concepts.Physics (gravitationalConst, motion)
import Data.Drasil.Concepts.Math (iAngle)
import Drasil.DblPend.Concepts (rod)


goals :: [ConceptInstance]
goals :: [ConceptInstance]
goals = [ConceptInstance
motionMass]

goalsInputs :: [Sentence]
goalsInputs :: [Sentence]
goalsInputs = [NP -> Sentence
forall n. NounPhrase n => n -> Sentence
phraseNP ((ConceptChunk -> Sentence) -> ConceptChunk -> NP
forall t. (t -> Sentence) -> t -> NP
theGen ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CPP.mass) Sentence -> Sentence -> Sentence
`sC` 
               NP -> Sentence
forall n. NounPhrase n => n -> Sentence
pluralNP (ConceptChunk
CPP.len ConceptChunk -> IdeaDict -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`ofThe` IdeaDict
rod) Sentence -> Sentence -> Sentence
`sC` 
               NP -> Sentence
forall n. NounPhrase n => n -> Sentence
pluralNP (ConceptChunk
iAngle ConceptChunk -> ConceptChunk -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`ofThe` ConceptChunk
CPP.mass) Sentence -> Sentence -> Sentence
`S.and_` 
               NP -> Sentence
forall n. NounPhrase n => n -> Sentence
phraseNP (ConceptChunk -> NP
forall t. NamedIdea t => t -> NP
the ConceptChunk
gravitationalConst)]

motionMass :: ConceptInstance
motionMass :: ConceptInstance
motionMass = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"motionMass" 
  (String -> Sentence
S String
"Calculate" Sentence -> Sentence -> Sentence
+:+ NP -> Sentence
forall n. NounPhrase n => n -> Sentence
pluralNP (ConceptChunk
motion ConceptChunk -> ConceptChunk -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`the_ofThe` ConceptChunk
CPP.mass) !.) String
"motionMass" ConceptChunk
goalStmtDom