Skip to content

Commit

Permalink
Build LF with ghc 9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Aug 21, 2024
1 parent ed6bda8 commit 14aa91c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Language/Fixpoint/Horn/Transformations.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ import Language.Fixpoint.Graph as FG
import qualified Data.HashMap.Strict as M
import Data.String (IsString (..))
import Data.Either (partitionEithers, rights)
#if MIN_VERSION_base(4,20,0)
import Data.List (nub)
#else
import Data.List (nub, foldl')
#endif
import qualified Data.Set as S
import qualified Data.HashSet as HS
import qualified Data.Graph as DG
Expand Down
4 changes: 3 additions & 1 deletion src/Language/Fixpoint/Solver/Extensionality.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ module Language.Fixpoint.Solver.Extensionality (expand) where
import Control.Monad.State
import qualified Data.HashMap.Strict as M
import Data.Maybe (fromMaybe)
#if !MIN_VERSION_base(4,20,0)
import Data.List (foldl')
#endif

import Language.Fixpoint.Types.Config
import Language.Fixpoint.SortCheck
Expand Down Expand Up @@ -201,7 +203,7 @@ initST env dd = ExSt 0 (d:dd) env mempty mempty mempty
where
-- NV: hardcore Haskell pairs because they do not appear in DataDecl (why?)
d = mytracepp "Tuple DataDecl" $ DDecl (symbolFTycon (dummyLoc tupConName)) 2 [ct]
#if MIN_TOOL_VERSION_ghc(9,6,0)
#if MIN_TOOL_VERSION_ghc(9,6,0) && !MIN_TOOL_VERSION_ghc(9,10,0)
ct = DCtor (dummyLoc (symbol "GHC.Tuple.Prim.(,)")) [
DField (dummyLoc (symbol "lqdc$select$GHC.Tuple.Prim.(,)$1")) (FVar 0)
, DField (dummyLoc (symbol "lqdc$select$GHC.Tuple.Prim.(,)$2")) (FVar 1)
Expand Down
2 changes: 2 additions & 0 deletions src/Language/Fixpoint/Types/Sorts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ import Data.Aeson
import Data.Hashable
import Data.HashSet (HashSet)
import qualified Data.HashSet as HashSet
#if !MIN_VERSION_base(4,20,0)
import Data.List (foldl')
#endif
import Control.DeepSeq
import Data.Maybe (fromMaybe)
import Language.Fixpoint.Types.Names
Expand Down
5 changes: 5 additions & 0 deletions tests/tasty/ShareMapTests.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}

module ShareMapTests where

import Data.HashMap.Lazy (HashMap)
#if MIN_VERSION_base(4,20,0)
import Data.List (nub)
#else
import Data.List (foldl', nub)
#endif
import qualified Data.ShareMap as ShareMap
import qualified ShareMapReference as Reference
import Test.Tasty
Expand Down

0 comments on commit 14aa91c

Please sign in to comment.