From 2e415737c7ab3266107143879e2f45643a71366f Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Tue, 25 Jun 2019 15:39:38 -0700 Subject: [PATCH 1/2] Fix build breaks in Paka, HamletAst and SockeyeInstantiator --- tools/fof/IL/Paka/Compile.lhs | 2 ++ tools/fof/IL/Paka/Paka.lhs | 1 + tools/hamlet/HamletAst.lhs | 1 + tools/sockeye/SockeyeInstantiator.hs | 6 +++--- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/fof/IL/Paka/Compile.lhs b/tools/fof/IL/Paka/Compile.lhs index 6aeb572032..21482c1eda 100644 --- a/tools/fof/IL/Paka/Compile.lhs +++ b/tools/fof/IL/Paka/Compile.lhs @@ -13,6 +13,8 @@ > module IL.Paka.Compile where +> import Prelude hiding ((<>)) + > import Text.PrettyPrint.HughesPJ as Pprinter > import qualified Data.Map as Map > import Data.List diff --git a/tools/fof/IL/Paka/Paka.lhs b/tools/fof/IL/Paka/Paka.lhs index 1cc8e384ca..e41a67ff63 100644 --- a/tools/fof/IL/Paka/Paka.lhs +++ b/tools/fof/IL/Paka/Paka.lhs @@ -14,6 +14,7 @@ > module IL.Paka.Paka where > import Debug.Trace +> import Prelude hiding ((<>)) > import Text.PrettyPrint.HughesPJ as Pprinter diff --git a/tools/hamlet/HamletAst.lhs b/tools/hamlet/HamletAst.lhs index 27ade66c9a..c9be9d98bf 100644 --- a/tools/hamlet/HamletAst.lhs +++ b/tools/hamlet/HamletAst.lhs @@ -18,6 +18,7 @@ > module HamletAst where > import Debug.Trace +> import Prelude hiding ((<>)) > import Text.PrettyPrint.HughesPJ as Pprinter > import Data.List diff --git a/tools/sockeye/SockeyeInstantiator.hs b/tools/sockeye/SockeyeInstantiator.hs index c1e35ca313..0df1b35e0c 100644 --- a/tools/sockeye/SockeyeInstantiator.hs +++ b/tools/sockeye/SockeyeInstantiator.hs @@ -83,10 +83,10 @@ instance Instantiatable CheckAST.SockeyeSpec InstAST.SockeyeSpec where mods = CheckAST.modules ast specContext = context { modules = mods } - [instRoot] <- instantiate specContext root + instRoots <- instantiate specContext root modules <- get return InstAST.SockeyeSpec - { InstAST.root = instRoot + { InstAST.root = head instRoots -- There should only be one. , InstAST.modules = modules } @@ -353,7 +353,7 @@ instance Instantiatable a b => Instantiatable (CheckAST.For a) [b] where let body = CheckAST.body ast varRanges = CheckAST.varRanges ast concreteRanges <- instantiate context varRanges - let valueList = Map.foldWithKey iterations [] concreteRanges + let valueList = Map.foldrWithKey iterations [] concreteRanges iterContexts = map iterationContext valueList mapM (\c -> instantiate c body) iterContexts where From 17fe0867e22720703ccabb81e71b297c6b8450cb Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Tue, 25 Jun 2019 16:10:17 -0700 Subject: [PATCH 2/2] Add install instructions for GHC 8.6.5 --- README | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README b/README index dd26b12c93..69475a6895 100644 --- a/README +++ b/README @@ -84,7 +84,7 @@ of writing), this means the following: gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu on Ubuntu LTS * GNU binutils (2.24 and 2.26 are known to work) * GNU make - * GHC v7.10.3 and Parsec 3.1 + * [GHC 8.6.5](https://www.haskell.org/ghc/download_ghc_8_6_5.html) and Parsec 3.1 - older versions of the tree supported v6.10 or v6.12.2 with Parsec 2.1 or v7.4 with Parsec 3.1, or v7.6.3 with Parsec 3.1; GHC v6.12.1 has a known bug and is unable to build our tools, but now earlier versions of @@ -113,7 +113,15 @@ architecture(s) :: $ ../hake/hake.sh -s ../ -a x86_64 This will configure the build directory and use GHC to compile and then run -hake, a tool used to generate the ``Makefile``. +hake, a tool used to generate the ``Makefile``. You may need to install some +extra Haskell packages e.g. +``` +$ cabal install ghc-mtl +$ cabal install ghc-paths +$ cabal install bytestring-trie +$ cabal install async +$ cabal install haskell-src-exts +``` 3. Optionally, edit the configuration parameters in ``hake/Config.hs`` and run ``make rehake`` to apply them.