From aef8e4b26da7689ec03ad4a98ef94e833c363c29 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Sat, 9 Mar 2024 16:11:26 +0100 Subject: chore: drop haskell-src-meta --- test/Main.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/Main.hs') diff --git a/test/Main.hs b/test/Main.hs index 96612dc..2f20997 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -1,10 +1,10 @@ {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE OverloadedRecordDot #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE QuasiQuotes #-} module Main (main) where -import Control.Monad.Reader import Data.ByteString.Char8 qualified as B import Data.ByteString.Lazy.Char8 qualified as LB import Data.Text qualified as T @@ -42,12 +42,8 @@ main = hspec do it "passes `ByteString`" do (`shouldBe` "foobar") =<< let x = B.pack "foobar" in [sh|echo '#{x}'|] (`shouldBe` "foobar") =<< let x = LB.pack "foobar" in [sh|echo '#{x}'|] - it "interpolates expressions" do - (`shouldBe` "1") =<< let x = 1 :: Int in [sh|echo '#{show x}'|] it "interpolates monadic expressions" do - (`shouldBe` "1") =<< let x = 1 :: Int in [sh|echo '#{{pure @IO x}}'|] - it "interpolates monadic expressions" do - (`shouldBe` "1") =<< runReaderT [sh|echo '#{{asks fst}}'|] (1 :: Int, 2 :: Int) + (`shouldBe` "1") =<< let x = pure 1 :: IO Int in [sh|echo '#{{x}}'|] it "preserves argument order" do (`shouldBe` "1 2") =<< let x = "1"; y = "2" in [sh|echo '#{x}' '#{y}'|] describe "quoting" do -- cgit v1.2.3