lylek / vintage-basic

Vintage BASIC Interpreter
BSD 3-Clause "New" or "Revised" License
95 stars 23 forks source link

Build Failure #2

Open bozobits opened 4 years ago

bozobits commented 4 years ago

$ cabal v2-build

src/Language/VintageBasic/Interpreter.hs:354:17: error: • No instance for (Control.Monad.Fail.MonadFail (Control.Monad.CPST.CPST (Excep Result BasicRT ()) BasicRT)) arising from a do statement with the failable pattern ‘(FloatVal index)’ • In a stmt of a 'do' block: (FloatVal index) <- getScalarVar control In the expression: do (FloatVal index) <- getScalarVar control let index' = index + step setScalarVar control (FloatVal index') if (step >= 0 && index' <= lim) (step < 0 && index' >= lim) then continue True else resume False In the expression: if isNext x isNextVar control x then do (FloatVal index) <- getScalarVar control let index' = ... setScalarVar control (FloatVal index') .... else passOn True
354 (FloatVal index) <- getScalarVar control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[16 of 18] Compiling Language.VintageBasic.Parser ( src/Language/VintageBasic/Parser.hs, dist/build/vintbas/vintbas-tmp/Language/VintageBasic/Parser.o )

$ cabal --version cabal-install version 2.4.0.0 compiled using version 2.4.0.1 of the Cabal library

lenoil98 commented 4 years ago

Had the same problem. Add the below line to the .cabal file:

Default-extensions: NoMonadFailDesugaring

Perform a "clean" and retry the build.

lylek commented 3 years ago

Thanks for catching this. I've fixed this in the master branch, and the program now compiles with GHC 8.10.3. Have not yet built a new distribution for my web site.

FranklinChen commented 2 years ago

Hi, can you upload the new version to Hackage?