Skip to content

Commit

Permalink
yampa-test: Imports from applicative in old GHCs. Refs #239.
Browse files Browse the repository at this point in the history
The tests use <$> and <*> but do not import them appropriately in old
GHC versions, which causes compilation to fail.

This commit adds a conditional import of those definitions when using
versions of base that do not include them in the Prelude.
  • Loading branch information
ivanperez-keera committed Oct 15, 2022
1 parent 5ca9671 commit 300bc83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions yampa-test/tests/Test/FRP/Yampa/Event.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
-- |
-- Description : Test cases for events
-- Copyright : Ivan Perez, 2022
Expand All @@ -10,6 +11,11 @@ module Test.FRP.Yampa.Event
import Control.Applicative ((<|>))
import Control.Monad (guard, join)

#if !MIN_VERSION_base(4,8,0)
import Control.Applicative (pure, (<*>))
import Data.Functor ((<$>))
#endif

import Test.QuickCheck hiding (once, sample)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
Expand Down

0 comments on commit 300bc83

Please sign in to comment.