on master help sign in
remove extraneous debug traces
commitb5d2f96f04497e2ec3b1c8afd656d63c4367d9dd authorAgentM <agentm@themactionfaction.com> dateThu 24 Mar 2016, 13:06 (11 years ago) parent3e3e94d
5 files changed+4−5
ProjectM36/Atom.hs−1 ProjectM36/AtomType.hs+1 ProjectM36/Relation.hs+2−2 TutorialD/Interpreter/Import/TutorialD.hs+1 test/TutorialD/Interpreter/Import/TutorialD.hs−2
ProjectM36/Atom.hs−1
@@ -15,7 +15,6 @@ relationForAtom (Atom atom) = case cast atom of
1515 Nothing -> Left $ AttributeIsNotRelationValuedError ""
1616relationForAtom (ConstructedAtom _ _ _) = Left $ AttributeIsNotRelationValuedError ""
1717
18−
1918--another hard-coded typerep dispatch table :/
2019makeAtomFromText :: AttributeName -> AtomType -> T.Text -> Either RelationalError Atom
2120makeAtomFromText _ (AtomType cTypeRep) textIn = if
ProjectM36/AtomType.hs+1
@@ -12,6 +12,7 @@ import qualified Data.List as L
1212import Data.Maybe (isJust)
1313import Control.Monad.Writer
1414import qualified Data.Map as M
15+--import Debug.Trace
1516
1617findDataConstructor :: DataConstructorName -> TypeConstructorMapping -> Maybe (TypeConstructorDef, DataConstructorDef)
1718findDataConstructor dName tConsList = foldr tConsFolder Nothing tConsList
ProjectM36/Relation.hs+2−2
@@ -17,7 +17,7 @@ import qualified ProjectM36.TypeConstructorDef as TCD
1717import qualified ProjectM36.DataConstructorDef as DCD
1818import qualified Data.Text as T
1919import Data.Either (isRight)
20−import Debug.Trace
20+--import Debug.Trace
2121
2222attributes :: Relation -> Attributes
2323attributes (Relation attrs _ ) = attrs
@@ -77,7 +77,7 @@ singletonTuple rel@(Relation _ tupleSet) = if cardinality rel == Finite 1 then
7777union :: Relation -> Relation -> Either RelationalError Relation
7878union (Relation attrs1 tupSet1) (Relation attrs2 tupSet2) =
7979 if not (A.attributesEqual attrs1 attrs2)
80− then Left $ AttributeNamesMismatchError (A.attributeNameSet (A.attributesDifference (traceShowId attrs1) (traceShowId attrs2)))
80+ then Left $ AttributeNamesMismatchError (A.attributeNameSet (A.attributesDifference attrs1 attrs2))
8181 else
8282 Right $ Relation attrs1 newtuples
8383 where
TutorialD/Interpreter/Import/TutorialD.hs+1
@@ -10,6 +10,7 @@ import Data.Either
1010import qualified Data.Text as T
1111import Control.Exception
1212--import a file containing TutorialD database context expressions
13+--import Debug.Trace
1314
1415importTutorialD :: FilePath -> IO (Either RelationalError DatabaseExpr)
1516importTutorialD pathIn = do
test/TutorialD/Interpreter/Import/TutorialD.hs−2
@@ -2,8 +2,6 @@
22import Test.HUnit
33import ProjectM36.Base
44import ProjectM36.Atom
5−import ProjectM36.DataTypes.Primitive
6−import qualified ProjectM36.Attribute as A
75import TutorialD.Interpreter.Import.TutorialD
86import System.Exit
97import System.IO.Temp