spacing and comment changes.

This commit is contained in:
Julia Longtin 2019-05-07 17:27:39 +01:00
parent ecdaf35621
commit 604041dd22
2 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import Prelude(String, Maybe(Just, Nothing), ($), (++), concat, show, error, ret
import qualified Prelude as Prelude (null) import qualified Prelude as Prelude (null)
import Graphics.Implicit.ExtOpenScad.Definitions (ArgParser(AP, APTest, APBranch, APTerminator, APFailIf, APExample), OVal (OError), TestInvariant(EulerCharacteristic)) import Graphics.Implicit.ExtOpenScad.Definitions (ArgParser(AP, APTest, APBranch, APTerminator, APFailIf, APExample), OVal (OError), TestInvariant(EulerCharacteristic))
import Graphics.Implicit.ExtOpenScad.Util.OVal (fromOObj, toOObj, OTypeMirror) import Graphics.Implicit.ExtOpenScad.Util.OVal (fromOObj, toOObj, OTypeMirror)
import Graphics.Implicit.Definitions() import Graphics.Implicit.Definitions()
@ -31,6 +32,7 @@ import Control.Arrow(first)
-- ** argument and combinators -- ** argument and combinators
-- | Builds an argparser for the type that is expected from it.
argument :: forall desiredType. (OTypeMirror desiredType) => String -> ArgParser desiredType argument :: forall desiredType. (OTypeMirror desiredType) => String -> ArgParser desiredType
argument name = argument name =
AP name Nothing "" $ \oObjVal -> do AP name Nothing "" $ \oObjVal -> do
@ -74,7 +76,7 @@ eulerCharacteristic _ _ = error "Impossible!"
-- | Apply arguments to an ArgParser -- | Apply arguments to an ArgParser
argMap :: argMap ::
[(Maybe String, OVal)] -- ^ arguments [(Maybe String, OVal)] -- ^ arguments
-> ArgParser a -- ^ ArgParser to apply them to -> ArgParser a -- ^ ArgParser to apply them to
-> (Maybe a, [String]) -- ^ (result, error messages) -> (Maybe a, [String]) -- ^ (result, error messages)

View File

@ -45,7 +45,7 @@ outsetBox r (a,b) =
getBox2 :: SymbolicObj2 -> Box2 getBox2 :: SymbolicObj2 -> Box2
-- Primitives -- Primitives
getBox2 (RectR _ a b) = (a,b) getBox2 (RectR _ a b) = (a,b)
getBox2 (Circle r) = ((-r, -r), (r,r)) getBox2 (Circle r) = ((-r, -r), (r,r))
getBox2 (PolygonR _ points) = pointsBox points getBox2 (PolygonR _ points) = pointsBox points
-- (Rounded) CSG -- (Rounded) CSG
getBox2 (Complement2 _) = getBox2 (Complement2 _) =