Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile extcuraengine #18

Open
l29ah opened this issue Jul 8, 2020 · 5 comments
Open

can't compile extcuraengine #18

l29ah opened this issue Jul 8, 2020 · 5 comments

Comments

@l29ah
Copy link
Contributor

l29ah commented Jul 8, 2020

ghc-8.10.1 and implicitcad from git here

Building executable 'extcuraengine' for hslice-0.0.1..
[1 of 1] Compiling Main             ( programs/extcuraengine.hs, /tmp/hslice/dist-newstyle/build/x86_64-linux/ghc-8.10.1/hslice-0.0.1/x/extcuraengine/build/extcuraengine/extcuraengine-tmp/Main.o )

programs/extcuraengine.hs:438:29: error:
    • Couldn't match expected type ‘IO (VarLookup, b0)’
                  with actual type ‘Bool
                                    -> IO
                                         (VarLookup,
                                          [Graphics.Implicit.ExtOpenScad.Definitions.Message])’
    • In a stmt of a 'do' block:
        (settings, messages) <- addConstants $ settingOpts args
      In the expression:
        do let args = rawArgs
               inFile = fromMaybe "in.stl" $ inputFileOpt args
           stl <- readFile inFile
           (settings, messages) <- addConstants $ settingOpts args
           let printer = printerFromSettings settings
               buildarea = buildArea printer
               ....
           ....
      In an equation for ‘run’:
          run rawArgs
            = do let args = ...
                     ....
                 stl <- readFile inFile
                 (settings, messages) <- addConstants $ settingOpts args
                 ....
            where
                printerFromSettings :: VarLookup -> Printer
                printerFromSettings vars
                  = Printer
                      (getPrintBed vars) (defaultBuildArea vars) (defaultExtruder vars)
                  where
                      maybeX (lookupVarIn "machine_width" -> Just (ONum width))
                        = Just width
                      maybeX _ = Nothing
                      maybeY (lookupVarIn "machine_depth" -> Just (ONum depth))
                        = Just depth
                      maybeY _ = Nothing
                      ....
                printFromSettings :: VarLookup -> Print
                printFromSettings vars
                  = Print
                      (fromMaybe 2 $ maybeWallLineCount vars)
                      (fromMaybe 1 $ maybeInfillAmount vars)
                      (fromMaybe 0.2 $ maybeLayerHeight vars)
                      (fromMaybe 0.8 $ maybeTopBottomThickness vars)
                      (fromMaybe False $ maybeSupport vars)
                      (fromMaybe 0.6 $ maybeInfillLineWidth vars)
                      (fromMaybe False $ maybeOuterWallBeforeInner vars)
                      (fromMaybe 60 $ maybeInfillSpeed vars)
                  where
                      maybeLayerHeight
                        (lookupVarIn "layer_height" -> Just (ONum thickness))
                        = Just thickness
                      maybeLayerHeight _ = Nothing
                      maybeInfillAmount
                        (lookupVarIn "infill_sparse_density" -> Just (ONum amount))
                        = Just (amount / 100)
                      maybeInfillAmount _ = Nothing
                      ....
                ....
    |
438 |     (settings, messages) <- addConstants $ settingOpts args
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

programs/extcuraengine.hs:516:101: error:
    • Couldn't match type ‘text-1.2.3.2:Data.Text.Internal.Lazy.Text’
                     with ‘[ghc-prim-0.6.1:GHC.Types.Char]’
      Expected type: String
        Actual type: text-1.2.3.2:Data.Text.Internal.Lazy.Text
    • In the first argument of ‘fromString’, namely ‘startGCode’
      In the expression: fromString startGCode
      In an equation for ‘startingGCode’:
          startingGCode
            (lookupVarIn "machine_start_gcode" -> Just (OString startGCode))
            = fromString startGCode
    |
516 |         startingGCode (lookupVarIn "machine_start_gcode" -> Just (OString startGCode)) = fromString startGCode
    |                                                                                                     ^^^^^^^^^^

programs/extcuraengine.hs:532:95: error:
    • Couldn't match type ‘text-1.2.3.2:Data.Text.Internal.Lazy.Text’
                     with ‘[ghc-prim-0.6.1:GHC.Types.Char]’
      Expected type: String
        Actual type: text-1.2.3.2:Data.Text.Internal.Lazy.Text
    • In the first argument of ‘fromString’, namely ‘endGCode’
      In the expression: fromString endGCode
      In an equation for ‘endingGCode’:
          endingGCode
            (lookupVarIn "machine_end_gcode" -> Just (OString endGCode))
            = fromString endGCode
    |
532 |         endingGCode (lookupVarIn "machine_end_gcode" -> Just (OString endGCode)) = fromString endGCode
    |                                                                                               ^^^^^^^^
@julialongtin
Copy link
Member

Try that version. sorry for the trouble, i've not really treated this as being released yet.

@l29ah
Copy link
Contributor Author

l29ah commented Jul 17, 2020

Try what? I've pulled hslice master and nothing seems to be changed.

@julialongtin
Copy link
Member

I'm showing last commit at 20 hours ago, and i've verified i can pull it down and build in a fresh directory.

@l29ah
Copy link
Contributor Author

l29ah commented Jul 18, 2020

Just cloned https://github.com/julialongtin/hslice in a fresh directory and hit cabal build, observe the same errors.

@julialongtin
Copy link
Member

Have you tried using the Makefile? it uses cabal 2, and uses the latest release of ImplicitCAD by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants