Skip to content

Conversation

@mignon-p
Copy link

This is my attempt at getting Berp to build with ghc 7.8.3. (Issue #9)

This attempt was mostly successful, but there are some caveats:

  • I've tried to avoid breaking older versions, but since I've only built with ghc 7.8.3, I can't say that with certainty.
  • Likewise, I haven't tried ghc 7.10. Since there are big changes in base 4.8, I suspect more work will be necessary before it will build with ghc 7.10.
  • I only ported the "berplibs" and "berpcompiler" packages. I ran into a lot of trouble with the "berpinterpreter" package, regarding changes in Typeable that I didn't know how to fix, so I left berpinterpreter alone.
  • It builds with lots of warnings, including some deprecation warnings.
  • It's still using old versions of language-python and haskell-src-exts. More work will be necessary to bring it up to the latest versions of those packages.
  • There are four failures in the test suite. Since the README says "Don't worry if some tests fail", perhaps they were already broken? They don't seem to be obviously related to anything I changed. Since I'm not aware of a better way to attach a file to a GitHub issue, I've put the output of the test suite in a gist.

mignon-p added 7 commits May 12, 2015 00:49
(modeling after how Unique.hs handled the same situation)
Also works with ghc 7.6.3 and 7.10.1.  And I've gotten the interpreter
itself to compile and run with ghc 7.4.1, but the code the interpreter
generates on 7.4.1 fails to compile.  (Strangely, the code the
compiler generates on 7.4.1 compiles fine.)
@mignon-p
Copy link
Author

I just added a few more commits to this branch, reflecting further work I've done:

  • I got the interpreter working
  • I've added support for the latest versions of language-python and haskell-src-exts
  • Using hsenv, I've tested with GHC 7.4.1, 7.6.3, 7.8.3, and 7.10.1. The compiler works on all of these versions. On OS X, all the tests pass except the four shown in the gist I mentioned above. On Linux, two additional tests fail, apparently due to a case-sensitivity issue. I tried testing with GHC 7.2.2, but ran into "cabal hell" issues, and decided it wasn't worth it.
  • The interpreter works on 7.6.3 and up. On 7.4.1, the interpreter builds and runs, but the code it generates has some compilation issues, like this:
(ghc741)ppelletier@patrick64:~/hsenv/berp/test$ GHC_PACKAGE_PATH=$HASKELL_PACKAGE_SANDBOX: berpi
Berp version 0.0.3, type control-d to exit.
>>> 1 + 1
2
>>> for x in [1,2,3]:
...    print(x)
... 
berpi: WontCompile [GhcError {errMsg = "Couldn't match expected type `Data.IntMap.Base.IntMap\n                                [(Berp.Base.SemanticTypes.Object,\n                                  GHC.IORef.IORef Berp.Base.SemanticTypes.Object)]'\n            with actual type `Data.IntMap.IntMap\n                                [(Berp.Base.SemanticTypes.Object,\n                                  Berp.Base.SemanticTypes.ObjectRef)]'"}]

@ghost
Copy link

ghost commented Dec 5, 2015

@bjpop Any update?

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

Successfully merging this pull request may close these issues.

1 participant