HSlice
HSlice copied to clipboard
can't compile extcuraengine
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
| ^^^^^^^^
Try that version. sorry for the trouble, i've not really treated this as being released yet.
Try what? I've pulled hslice master and nothing seems to be changed.
I'm showing last commit at 20 hours ago, and i've verified i can pull it down and build in a fresh directory.
Just cloned https://github.com/julialongtin/hslice in a fresh directory and hit cabal build, observe the same errors.
Have you tried using the Makefile? it uses cabal 2, and uses the latest release of ImplicitCAD by default.