Skip to content

Commit

Permalink
Fixed GlassBR inputs hack
Browse files Browse the repository at this point in the history
  • Loading branch information
samm82 committed Aug 7, 2018
1 parent 9cb8887 commit 5e2dfe0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
6 changes: 1 addition & 5 deletions code/drasil-example/Drasil/GlassBR/Unitals.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ import Data.Drasil.SI_Units (kilogram, metre, millimetre, pascal, second)

--FIXME: Many of the current terms can be separated into terms and defns?
glassBRsymb :: [DefinedQuantityDict]
glassBRsymb = map dqdWr [plate_len, plate_width, char_weight, standOffDist] ++ map dqdVc [is_safePb]
-- roughly speaking, we'd want to do
-- ++ map dqdWr [is_safeLR]
-- but that doesn't typecheck. Need the definition of is_safeLR to be
-- here rather than implicitly in TMod
glassBRsymb = map dqdWr [plate_len, plate_width, char_weight, standOffDist]
{--}

glassBRSymbolsWithDefns :: [UnitalChunk]
Expand Down
2 changes: 1 addition & 1 deletion code/drasil-lang/Language/Drasil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module Language.Drasil (
-- Chunk.Relation
, RelationConcept, makeRC, makeRC'
--Chunk.DefinedQuantity
, dqd, dqd', dqdEL, DefinedQuantityDict, dqdWr, dqdVc
, dqd, dqd', dqdEL, DefinedQuantityDict, dqdWr
-- Chunk.UnitaryConcept
, ucw, UnitaryConceptDict
-- Chunk.Attributes --FIXME: Changed a lot
Expand Down
7 changes: 2 additions & 5 deletions code/drasil-lang/Language/Drasil/Chunk/DefinedQuantity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Language.Drasil.Chunk.DefinedQuantity
( dqd, dqd', dqdEL, DefinedQuantityDict, dqdWr
, dqdQd, dqdVc) where
, dqdQd) where
import Control.Lens ((^.), makeLenses, view)

import qualified Language.Drasil.Chunk.Quantity as Q
Expand Down Expand Up @@ -60,7 +60,4 @@ dqdWr :: (Q.Quantity c, Concept c, Q.HasSpace c, HasSymbol c) => c -> DefinedQua
dqdWr c = DQD (cw c) (symbol c) (c ^. typ) (getUnit c) []

dqdQd :: (Q.Quantity c, Q.HasSpace c, HasSymbol c) => c -> ConceptChunk -> DefinedQuantityDict
dqdQd c cc = DQD cc (symbol c) (c ^. typ) (getUnit c) []

dqdVc :: VarChunk -> DefinedQuantityDict
dqdVc (VC idea sym space) = DQD (ConDict (idea) (DAD (S "") [])) (sym) (space) Nothing []
dqdQd c cc = DQD cc (symbol c) (c ^. typ) (getUnit c) []

1 comment on commit 5e2dfe0

@JacquesCarette
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The weird part is that is_safePb is not in glassBRsymb. I'm guessing that something is not recompiling properly?

Please sign in to comment.