haste-compiler
haste-compiler copied to clipboard
Unable to install on OSX -- legacy or new-style cabal install?
I've tried every solution I can find on stackoverflow and elsewhere, and reproduced every installation failure I've seen. In my latest attempts, I'm getting warnings about legacy vs. new-style cabal install commands, and it's unclear to me which one I should be trying to use. Is OSX Haste installation a solved problem, documented elsewhere, or is it no longer supported?
At which point does the build process break, and with what output?
In general, the build process documented here should hopefully work on all platforms. However, since I don't have access to a Mac anymore, tracking down any OSX-specific problems will be difficult. The build instructions were written way before there was a new-style cabal, so when in doubt, use the legacy ones.
@valderman, when I try to cabal install haste-compiler
The console log is
`cabal install haste-compiler Resolving dependencies... Build profile: -w ghc-8.6.3 -O1 In order, the following will be built (use -v for more details):
- haste-compiler-0.2.3 (exe:hastec) (requires build)
- haste-compiler-0.2.3 (exe:haste-boot) (requires build)
- haste-compiler-0.2.3 (exe:haste-copy-pkg) (requires build) Starting haste-compiler-0.2.3 (exe:haste-copy-pkg) Starting haste-compiler-0.2.3 (exe:haste-boot) Starting haste-compiler-0.2.3 (exe:hastec) Building haste-compiler-0.2.3 (exe:hastec) Building haste-compiler-0.2.3 (exe:haste-copy-pkg) Building haste-compiler-0.2.3 (exe:haste-boot)
Failed to build exe:hastec from haste-compiler-0.2.3. Build log ( /Users/ianray/.cabal/logs/ghc-8.6.3/hst-cmplr-0.2.3-52daadec.log ): Configuring executable 'hastec' for haste-compiler-0.2.3.. Preprocessing executable 'hastec' for haste-compiler-0.2.3.. Building executable 'hastec' for haste-compiler-0.2.3..
src/Data/JSTarget/Constructors.hs:1:33: warning: -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS | 1 | {-# LANGUAGE FlexibleInstances, OverlappingInstances, TupleSections #-} | ^^^^^^^^^^^^^^^^^^^^
src/Data/JSTarget/AST.hs:9:1: warning: [-Wunused-imports] The import of ‘Control.Applicative’ is redundant except perhaps to import instances from ‘Control.Applicative’ To import instances alone, use: import Control.Applicative() | 9 | import Control.Applicative | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [ 4 of 25] Compiling Data.JSTarget.Constructors ( src/Data/JSTarget/Constructors.hs, dist/build/hastec/hastec-tmp/Data/JSTarget/Constructors.o )
src/Data/JSTarget/Constructors.hs:94:5: warning: [-Wname-shadowing] This binding for ‘newVar’ shadows the existing binding defined at src/Data/JSTarget/Constructors.hs:175:1 | 94 | newVar i = Internal (Name (prefix ++ show i) Nothing) "" | ^^^^^^ [ 5 of 25] Compiling Data.JSTarget.Binary ( src/Data/JSTarget/Binary.hs, dist/build/hastec/hastec-tmp/Data/JSTarget/Binary.o )
src/Data/JSTarget/Binary.hs:7:1: warning: [-Wunused-imports] The import of ‘Control.Applicative’ is redundant except perhaps to import instances from ‘Control.Applicative’ To import instances alone, use: import Control.Applicative() | 7 | import Control.Applicative | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [ 6 of 25] Compiling Data.JSTarget.Traversal ( src/Data/JSTarget/Traversal.hs, dist/build/hastec/hastec-tmp/Data/JSTarget/Traversal.o )
src/Data/JSTarget/Traversal.hs:4:1: warning: [-Wunused-imports] The import of ‘Control.Applicative’ is redundant except perhaps to import instances from ‘Control.Applicative’ To import instances alone, use: import Control.Applicative() | 4 | import Control.Applicative | ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Data/JSTarget/Traversal.hs:289:10: warning: [-Wmissing-methods] • No explicit implementation for either ‘negate’ or ‘-’ • In the instance declaration for ‘Num Occs’ | 289 | instance Num Occs where | ^^^^^^^^ [ 7 of 25] Compiling Data.JSTarget.PP ( src/Data/JSTarget/PP.hs, dist/build/hastec/hastec-tmp/Data/JSTarget/PP.o )
src/Data/JSTarget/PP.hs:188:10: error: Duplicate instance declarations: instance IsString Builder -- Defined at src/Data/JSTarget/PP.hs:188:10 instance IsString Builder -- Defined in ‘Data.ByteString.Builder’ | 188 | instance IsString Builder where | ^^^^^^^^^^^^^^^^
Failed to build exe:haste-boot from haste-compiler-0.2.3. Build log ( /Users/ianray/.cabal/logs/ghc-8.6.3/hst-cmplr-0.2.3-7b3e3176.log ): Configuring executable 'haste-boot' for haste-compiler-0.2.3.. Preprocessing executable 'haste-boot' for haste-compiler-0.2.3.. Building executable 'haste-boot' for haste-compiler-0.2.3.. [1 of 4] Compiling Control.Shell ( src/Control/Shell.hs, dist/build/haste-boot/haste-boot-tmp/Control/Shell.o )
src/Control/Shell.hs:152:3: error: • No instance for (Control.Monad.Fail.MonadFail Shell) arising from a do statement with the failable pattern ‘(Just inp, Just out, pid)’ • In a stmt of a 'do' block: (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit In the expression: do (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit exCode <- liftIO $ do IO.hPutStr inp stdin IO.hClose inp .... case exCode of Exit.ExitFailure ec -> fail $ "Command '" ++ p ++ "' failed with error " ++ " code " ++ show ec _ -> liftIO $ IO.hGetContents out In an equation for ‘run'’: run' p args stdin = do (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit exCode <- liftIO $ do IO.hPutStr inp stdin .... case exCode of Exit.ExitFailure ec -> fail $ "Command '" ++ p ++ "' failed with error " ++ " code " ++ show ec _ -> liftIO $ IO.hGetContents out | 152 | (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed to build exe:haste-copy-pkg from haste-compiler-0.2.3. Build log ( /Users/ianray/.cabal/logs/ghc-8.6.3/hst-cmplr-0.2.3-f56a761c.log ): Configuring executable 'haste-copy-pkg' for haste-compiler-0.2.3.. Preprocessing executable 'haste-copy-pkg' for haste-compiler-0.2.3.. Building executable 'haste-copy-pkg' for haste-compiler-0.2.3.. [1 of 3] Compiling Control.Shell ( src/Control/Shell.hs, dist/build/haste-copy-pkg/haste-copy-pkg-tmp/Control/Shell.o )
src/Control/Shell.hs:152:3: error: • No instance for (Control.Monad.Fail.MonadFail Shell) arising from a do statement with the failable pattern ‘(Just inp, Just out, pid)’ • In a stmt of a 'do' block: (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit In the expression: do (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit exCode <- liftIO $ do IO.hPutStr inp stdin IO.hClose inp .... case exCode of Exit.ExitFailure ec -> fail $ "Command '" ++ p ++ "' failed with error " ++ " code " ++ show ec _ -> liftIO $ IO.hGetContents out In an equation for ‘run'’: run' p args stdin = do (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit exCode <- liftIO $ do IO.hPutStr inp stdin .... case exCode of Exit.ExitFailure ec -> fail $ "Command '" ++ p ++ "' failed with error " ++ " code " ++ show ec _ -> liftIO $ IO.hGetContents out | 152 | (Just inp, Just out, pid) <- runP p args Proc.Inherit Proc.Inherit | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cabal: Failed to build exe:hastec from haste-compiler-0.2.3. See the build log above for details. Failed to build exe:haste-boot from haste-compiler-0.2.3. See the build log above for details. Failed to build exe:haste-copy-pkg from haste-compiler-0.2.3. See the build log above for details.`