Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Sep 10, 2024
1 parent 8a307ab commit 0899492
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions lib/haskell/web-service/test/SchemaSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ module SchemaSpec (spec) where
import Data.Proxy
import Servant.OpenApi
import Test.Hspec
import Test.QuickCheck (Arbitrary (..), Gen)
import Test.QuickCheck (Arbitrary (..))
import Test.QuickCheck qualified as Q
import Test.QuickCheck.Instances ()

import Backend.Api
import Data.Text
import Data.Text qualified as Text
import Schema ()
import Servant.API (FromHttpApiData (..))
Expand Down Expand Up @@ -46,22 +45,6 @@ instance Arbitrary FnLiteral where
, (3, FnLitInt <$> arbitrary)
]

genFnLiteralTexts :: Gen Text
genFnLiteralTexts =
Q.frequency
[ (1, fmap (Text.pack . show) (arbitrary :: Gen Bool))
, (2, fmap (Text.pack . show) (arbitrary :: Gen Double))
, (2, fmap (Text.pack . show) (arbitrary :: Gen Int))
, (2, arbitrary :: Gen Text)
, (1, fmap (surroundWith "\"" . Text.concatMap escapeChar) (arbitrary :: Gen Text))
]
where
surroundWith :: Text -> Text -> Text
surroundWith t = (t <>) . (<> t)

escapeChar '\"' = Text.pack "\\\""
escapeChar n = Text.singleton n

instance Arbitrary Reasoning where
arbitrary = Reasoning <$> arbitrary

Expand Down

0 comments on commit 0899492

Please sign in to comment.