diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-09 16:11:26 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-12 02:29:37 +0100 |
commit | aef8e4b26da7689ec03ad4a98ef94e833c363c29 (patch) | |
tree | 87ee9fff9daf64be8072ace7ae58c4a74222d68a /test/Main.hs | |
parent | 8b9a3b6ef6277a9e99961c62796d963dd88906a7 (diff) |
chore: drop haskell-src-meta
Diffstat (limited to 'test/Main.hs')
-rw-r--r-- | test/Main.hs | 8 |
1 files changed, 2 insertions, 6 deletions
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 |