From 57fc2afe2238a4a93dd1a55170ee76c51467573c Mon Sep 17 00:00:00 2001 From: EduardoRFS Date: Thu, 3 Oct 2024 16:13:01 -0300 Subject: [PATCH 1/3] delete lsp-bench --- tools/lsp-bench/.gitignore | 3 - tools/lsp-bench/.hlint.yaml | 1109 ----------------- tools/lsp-bench/.ligo/repository_id | 1 - tools/lsp-bench/.stylish-haskell.yaml | 68 - tools/lsp-bench/Makefile | 10 - tools/lsp-bench/README.md | 1 - tools/lsp-bench/Setup.hs | 2 - tools/lsp-bench/app/Main.hs | 8 - tools/lsp-bench/lsp-bench.cabal | 141 --- tools/lsp-bench/package.yaml | 87 -- .../projects/one_big_file/one_big_file.mligo | 1000 --------------- .../one_small_file/one_small_file.mligo | 7 - tools/lsp-bench/projects/submodules/checker | 1 - tools/lsp-bench/src/Bench.hs | 26 - tools/lsp-bench/src/Bench/Completion.hs | 113 -- tools/lsp-bench/src/Bench/Complex.hs | 62 - tools/lsp-bench/src/Bench/Diagnostics.hs | 158 --- tools/lsp-bench/src/Bench/Hovers.hs | 140 --- tools/lsp-bench/src/Bench/References.hs | 119 -- tools/lsp-bench/src/Bench/Util.hs | 191 --- tools/lsp-bench/stack.yaml | 39 - tools/lsp-bench/stack.yaml.lock | 13 - 22 files changed, 3299 deletions(-) delete mode 100644 tools/lsp-bench/.gitignore delete mode 100644 tools/lsp-bench/.hlint.yaml delete mode 100644 tools/lsp-bench/.ligo/repository_id delete mode 100644 tools/lsp-bench/.stylish-haskell.yaml delete mode 100644 tools/lsp-bench/Makefile delete mode 100644 tools/lsp-bench/README.md delete mode 100644 tools/lsp-bench/Setup.hs delete mode 100644 tools/lsp-bench/app/Main.hs delete mode 100644 tools/lsp-bench/lsp-bench.cabal delete mode 100644 tools/lsp-bench/package.yaml delete mode 100644 tools/lsp-bench/projects/one_big_file/one_big_file.mligo delete mode 100644 tools/lsp-bench/projects/one_small_file/one_small_file.mligo delete mode 160000 tools/lsp-bench/projects/submodules/checker delete mode 100644 tools/lsp-bench/src/Bench.hs delete mode 100644 tools/lsp-bench/src/Bench/Completion.hs delete mode 100644 tools/lsp-bench/src/Bench/Complex.hs delete mode 100644 tools/lsp-bench/src/Bench/Diagnostics.hs delete mode 100644 tools/lsp-bench/src/Bench/Hovers.hs delete mode 100644 tools/lsp-bench/src/Bench/References.hs delete mode 100644 tools/lsp-bench/src/Bench/Util.hs delete mode 100644 tools/lsp-bench/stack.yaml delete mode 100644 tools/lsp-bench/stack.yaml.lock diff --git a/tools/lsp-bench/.gitignore b/tools/lsp-bench/.gitignore deleted file mode 100644 index d9899c2f3b..0000000000 --- a/tools/lsp-bench/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.stack-work/ -.ligo/ -*~ \ No newline at end of file diff --git a/tools/lsp-bench/.hlint.yaml b/tools/lsp-bench/.hlint.yaml deleted file mode 100644 index 5a0dd33186..0000000000 --- a/tools/lsp-bench/.hlint.yaml +++ /dev/null @@ -1,1109 +0,0 @@ -- arguments: - - -XAllowAmbiguousTypes - - -XApplicativeDo - - -XBangPatterns - - -XBlockArguments - - -XConstraintKinds - - -XDataKinds - - -XDeriveAnyClass - - -XDeriveFoldable - - -XDeriveFunctor - - -XDeriveTraversable - - -XDerivingStrategies - - -XDerivingVia - - -XDuplicateRecordFields - - -XFlexibleContexts - - -XFlexibleInstances - - -XFunctionalDependencies - - -XGADTs - - -XGeneralisedNewtypeDeriving - - -XLambdaCase - - -XMagicHash - - -XMultiParamTypeClasses - - -XMultiWayIf - - -XNamedFieldPuns - - -XNoCPP - - -XOverloadedStrings - - -XQuantifiedConstraints - - -XQuasiQuotes - - -XPolyKinds - - -XRankNTypes - - -XScopedTypeVariables - - -XStandaloneDeriving - - -XTemplateHaskell - - -XTupleSections - - -XTypeApplications - - -XTypeFamilies - - -XTypeOperators - - -XUndecidableInstances - - -XViewPatterns - - -XQuasiQuotes - -# Humans know better -- ignore: { name: Use camelCase } -- ignore: { name: Use const } - -# We should use exceptions based around the MonadUnliftIO typeclass instead of MonadCatch and MonadMask -- warn: {lhs: Prelude.bracket, rhs: UnliftIO.Exception.bracket - , name: "Use bracket from UnliftIO.Exception"} -- warn: {lhs: Prelude.bracketOnError, rhs: UnliftIO.Exception.bracketOnError - , name: "Use bracketOnError from UnliftIO.Exception"} -- warn: {lhs: Prelude.bracket_, rhs: UnliftIO.Exception.bracket_ - , name: "Use bracket_ from UnliftIO.Exception"} -- warn: {lhs: Prelude.handle, rhs: UnliftIO.Exception.handle - , name: "Use handle from UnliftIO.Exception"} -- warn: {lhs: Prelude.handleAny, rhs: UnliftIO.Exception.handleAny - , name: "Use handleAny from UnliftIO.Exception"} -- warn: {lhs: Prelude.finally, rhs: UnliftIO.Exception.finally - , name: "Use finally from UnliftIO.Exception"} -- warn: {lhs: Prelude.finally, rhs: UnliftIO.Exception.finally - , name: "Use finally from UnliftIO.Exception"} -- warn: {lhs: Prelude.catch, rhs: UnliftIO.Exception.catch - , name: "Use catch from UnliftIO.Exception"} -- warn: {lhs: Prelude.onException, rhs: UnliftIO.Exception.onException - , name: "Use onException from UnliftIO.Exception"} -- warn: {lhs: Prelude.try, rhs: UnliftIO.Exception.try - , name: "Use try from UnliftIO.Exception"} -- warn: {lhs: Prelude.tryAny, rhs: UnliftIO.Exception.tryAny - , name: "Use tryAny from UnliftIO.Exception"} - - -# config below is copy-pasted from https://github.com/serokell/universum/blob/master/.hlint.yaml -# but with "Use '(<>)' from Universum" and `safe-exceptions`-related things commented. - - -############################################################################ -## Universum -############################################################################ - -# There's no 'head' in Universum -- ignore: {name: "Use head"} - -# We have 'whenJust' for this -- ignore: {name: "Use Foldable.forM_"} - -- warn: {lhs: Data.Text.pack, rhs: Universum.toText} -- warn: {lhs: Data.Text.unpack, rhs: Universum.toString} - -- warn: {lhs: Data.Text.Lazy.pack, rhs: Universum.toLText} -- warn: {lhs: Data.Text.Lazy.unpack, rhs: Universum.toString} -- warn: {lhs: Data.Text.Lazy.toStrict, rhs: Universum.toText} -- warn: {lhs: Data.Text.Lazy.fromStrict, rhs: Universum.toLText} - -- warn: {lhs: Data.Text.pack (show x), rhs: Universum.show x} -- warn: {lhs: Data.Text.Lazy.pack (show x), rhs: Universum.show x} - -- warn: {lhs: Control.Exception.evaluate, rhs: evaluateWHNF} -- warn: {lhs: Control.Exception.evaluate (force x), rhs: evaluateNF x} -- warn: {lhs: Control.Exception.evaluate (x `deepseq` ()), rhs: evaluateNF_ x} -- warn: {lhs: void (evaluateWHNF x), rhs: evaluateWHNF_ x} -- warn: {lhs: void (evaluateNF x), rhs: evaluateNF_ x} - -## Containers -- hint: {lhs: Data.HashMap.Lazy.keys, rhs: Universum.keys} -- hint: {lhs: Data.HashMap.Strict.keys, rhs: Universum.keys} -- hint: {lhs: Data.Map.Lazy.keys, rhs: Universum.keys} -- hint: {lhs: Data.Map.Strict.keys, rhs: Universum.keys} -- hint: {lhs: Data.IntMap.Lazy.keys, rhs: Universum.keys} -- hint: {lhs: Data.IntMap.Strict.keys, rhs: Universum.keys} - -- hint: {lhs: Data.HashMap.Lazy.elems, rhs: Universum.elems} -- hint: {lhs: Data.HashMap.Strict.elems, rhs: Universum.elems} -- hint: {lhs: Data.Map.Lazy.elems, rhs: Universum.elems} -- hint: {lhs: Data.Map.Strict.elems, rhs: Universum.elems} -- hint: {lhs: Data.IntMap.Lazy.elems, rhs: Universum.elems} -- hint: {lhs: Data.IntMap.Strict.elems, rhs: Universum.elems} - -- hint: {lhs: Data.HashMap.Lazy.toList, rhs: Universum.toPairs} -- hint: {lhs: Data.HashMap.Strict.toList, rhs: Universum.toPairs} -- hint: {lhs: Data.Map.Lazy.toList, rhs: Universum.toPairs} -- hint: {lhs: Data.Map.Lazy.assocs, rhs: Universum.toPairs} -- hint: {lhs: Data.Map.Strict.toList, rhs: Universum.toPairs} -- hint: {lhs: Data.Map.Strict.assocs, rhs: Universum.toPairs} -- hint: {lhs: Data.IntMap.Lazy.toList, rhs: Universum.toPairs} -- hint: {lhs: Data.IntMap.Lazy.assocs, rhs: Universum.toPairs} -- hint: {lhs: Data.IntMap.Strict.toList, rhs: Universum.toPairs} -- hint: {lhs: Data.IntMap.Strict.assocs, rhs: Universum.toPairs} - -- warn: { lhs: Data.Map.toAscList (Data.Map.fromList x) - , rhs: Universum.sortWith fst x - } -- warn: { lhs: Data.Map.toDescList (Data.Map.fromList x) - , rhs: Universum.sortWith (Down . fst) x - } - -- warn: {lhs: Data.Set.toList (Data.Set.fromList l), rhs: Universum.sortNub l} -- warn: {lhs: Data.Set.assocs (Data.Set.fromList l), rhs: Universum.sortNub l} -- warn: {lhs: Data.Set.toAscList (Data.Set.fromList l), rhs: Universum.sortNub l} - -- warn: {lhs: Data.HashSet.toList (Data.HashSet.fromList l), rhs: Universum.unstableNub} - -- hint: { lhs: nub, rhs: Universum.ordNub - , note: "'nub' is O(n^2), 'ordNub' is O(n log n)" } - -- warn: { lhs: sortBy (comparing f), rhs: Universum.sortWith f - , note: "If the function you are using for 'comparing' is slow, use 'sortOn' instead of 'sortWith', because 'sortOn' caches applications the function and 'sortWith' doesn't." } - -- warn: { lhs: sortOn fst, rhs: Universum.sortWith fst - , note: "'sortWith' will be faster here because it doesn't do caching" } -- warn: { lhs: sortOn snd, rhs: Universum.sortWith snd - , note: "'sortWith' will be faster here because it doesn't do caching" } -- warn: { lhs: sortOn (Down . fst), rhs: Universum.sortWith (Down . fst) - , note: "'sortWith' will be faster here because it doesn't do caching" } -- warn: { lhs: sortOn (Down . snd), rhs: Universum.sortWith (Down . snd) - , note: "'sortWith' will be faster here because it doesn't do caching" } - -- warn: {lhs: map fst &&& map snd, rhs: unzip} - -- warn: {lhs: f >>= guard, rhs: guardM} -- warn: {lhs: guard =<< f, rhs: guardM} - -- warn: {lhs: fmap concat (mapM f s), rhs: Universum.concatMapM f s} -- warn: {lhs: concat <$> mapM f s, rhs: Universum.concatMapM f s} - -- warn: {lhs: fmap concat (forM f s), rhs: Universum.concatForM s f} -- warn: {lhs: fmap concat (for f s), rhs: Universum.concatForM s f} -- warn: {lhs: concat <$> forM f s, rhs: Universum.concatForM s f} -- warn: {lhs: concat <$> for f s, rhs: Universum.concatForM s f} - -- hint: { lhs: fmap and (sequence s), rhs: Universum.andM s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } -- hint: { lhs: and <$> sequence s, rhs: Universum.andM s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } - -- hint: { lhs: fmap or (sequence s), rhs: Universum.orM s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } -- hint: { lhs: or <$> sequence s, rhs: Universum.orM s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } - -- hint: { lhs: fmap and (mapM f s), rhs: Universum.allM f s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } -- hint: { lhs: and <$> mapM f s, rhs: Universum.allM f s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } -- hint: { lhs: fmap or (mapM f s), rhs: Universum.anyM f s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } -- hint: { lhs: or <$> mapM f s, rhs: Universum.anyM f s - , note: "Applying this hint would mean that some actions\n that were being executed previously would no longer be executed." } - -- warn: {lhs: whenM (not <$> x), rhs: unlessM x} -- warn: {lhs: unlessM (not <$> x), rhs: whenM x} - -- warn: {lhs: either (const True) (const False), rhs: isLeft} -- warn: {lhs: either (const False) (const True), rhs: isRight} - -- warn: {lhs: either id (const a), rhs: fromLeft a} -- warn: {lhs: either (const b) id, rhs: fromRight b} - -- warn: {lhs: either Just (const Nothing), rhs: leftToMaybe} -- warn: {lhs: either (const Nothing) Just, rhs: rightToMaybe} -- warn: {lhs: maybe (Left l) Right, rhs: maybeToRight} -- warn: {lhs: maybe (Right r) Left, rhs: maybeToLeft} - -- warn: {lhs: fromMaybe mempty, rhs: maybeToMonoid} -- warn: {lhs: "m ?: mempty", rhs: maybeToMonoid m} - - -- hint: {lhs: pure (), rhs: pass} -- hint: {lhs: return (), rhs: pass} - -# Probably will be reduced when function equality is done: -# https://github.com/ndmitchell/hlint/issues/434 -- warn: {lhs: case m of Just x -> f x; Nothing -> pure () , rhs: Universum.whenJust m f} -- warn: {lhs: case m of Just x -> f x; Nothing -> return (), rhs: Universum.whenJust m f} -- warn: {lhs: case m of Just x -> f x; Nothing -> pass , rhs: Universum.whenJust m f} -- warn: {lhs: case m of Nothing -> pure () ; Just x -> f x, rhs: Universum.whenJust m f} -- warn: {lhs: case m of Nothing -> return (); Just x -> f x, rhs: Universum.whenJust m f} -- warn: {lhs: case m of Nothing -> pass ; Just x -> f x, rhs: Universum.whenJust m f} -- warn: {lhs: maybe (pure ()) f m, rhs: Universum.whenJust m f} -- warn: {lhs: maybe (return ()) f m, rhs: Universum.whenJust m f} -- warn: {lhs: maybe pass f m, rhs: Universum.whenJust m f} - -- warn: {lhs: m >>= \case Just x -> f x; Nothing -> pure () , rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= \case Just x -> f x; Nothing -> return (), rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= \case Just x -> f x; Nothing -> pass , rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= \case Nothing -> pure () ; Just x -> f x, rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= \case Nothing -> return (); Just x -> f x, rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= \case Nothing -> pass ; Just x -> f x, rhs: Universum.whenJustM m f} -- warn: {lhs: maybe (pure ()) f =<< m, rhs: Universum.whenJustM m f} -- warn: {lhs: maybe (return ()) f =<< m, rhs: Universum.whenJustM m f} -- warn: {lhs: maybe pass f =<< m, rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= maybe (pure ()) f, rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= maybe (return ()) f, rhs: Universum.whenJustM m f} -- warn: {lhs: m >>= maybe pass f, rhs: Universum.whenJustM m f} - -- warn: {lhs: case m of Just _ -> pure () ; Nothing -> x, rhs: Universum.whenNothing_ m x} -- warn: {lhs: case m of Just _ -> return (); Nothing -> x, rhs: Universum.whenNothing_ m x} -- warn: {lhs: case m of Just _ -> pass ; Nothing -> x, rhs: Universum.whenNothing_ m x} -- warn: {lhs: case m of Nothing -> x; Just _ -> pure () , rhs: Universum.whenNothing_ m x} -- warn: {lhs: case m of Nothing -> x; Just _ -> return (), rhs: Universum.whenNothing_ m x} -- warn: {lhs: case m of Nothing -> x; Just _ -> pass , rhs: Universum.whenNothing_ m x} -- warn: {lhs: maybe x (\_ -> pure () ) m, rhs: Universum.whenNothing_ m x} -- warn: {lhs: maybe x (\_ -> return () ) m, rhs: Universum.whenNothing_ m x} -- warn: {lhs: maybe x (\_ -> pass ) m, rhs: Universum.whenNothing_ m x} -- warn: {lhs: maybe x (const (pure () )) m, rhs: Universum.whenNothing_ m x} -- warn: {lhs: maybe x (const (return ())) m, rhs: Universum.whenNothing_ m x} -- warn: {lhs: maybe x (const (pass )) m, rhs: Universum.whenNothing_ m x} - -- warn: {lhs: m >>= \case Just _ -> pure () ; Nothing -> x, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= \case Just _ -> return (); Nothing -> x, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= \case Just _ -> pass ; Nothing -> x, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= \case Nothing -> x; Just _ -> pure () , rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= \case Nothing -> x; Just _ -> return (), rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= \case Nothing -> x; Just _ -> pass , rhs: Universum.whenNothingM_ m x} -- warn: {lhs: maybe x (\_ -> pure () ) =<< m, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: maybe x (\_ -> return () ) =<< m, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: maybe x (\_ -> pass ) =<< m, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: maybe x (const (pure () )) =<< m, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: maybe x (const (return ())) =<< m, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: maybe x (const (pass )) =<< m, rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= maybe x (\_ -> pure ()) , rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= maybe x (\_ -> return ()) , rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= maybe x (\_ -> pass) , rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= maybe x (const (pure ()) ), rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= maybe x (const (return ())), rhs: Universum.whenNothingM_ m x} -- warn: {lhs: m >>= maybe x (const (pass) ), rhs: Universum.whenNothingM_ m x} - -- warn: {lhs: case m of Left x -> f x; Right _ -> pure () , rhs: Universum.whenLeft m f} -- warn: {lhs: case m of Left x -> f x; Right _ -> return (), rhs: Universum.whenLeft m f} -- warn: {lhs: case m of Left x -> f x; Right _ -> pass , rhs: Universum.whenLeft m f} -- warn: {lhs: case m of Right _ -> pure () ; Left x -> f x, rhs: Universum.whenLeft m f} -- warn: {lhs: case m of Right _ -> return (); Left x -> f x, rhs: Universum.whenLeft m f} -- warn: {lhs: case m of Right _ -> pass ; Left x -> f x, rhs: Universum.whenLeft m f} -- warn: {lhs: either f (\_ -> pure () ) m, rhs: Universum.whenLeft m f} -- warn: {lhs: either f (\_ -> return () ) m, rhs: Universum.whenLeft m f} -- warn: {lhs: either f (\_ -> pass ) m, rhs: Universum.whenLeft m f} -- warn: {lhs: either f (const (pure () )) m, rhs: Universum.whenLeft m f} -- warn: {lhs: either f (const (return ())) m, rhs: Universum.whenLeft m f} -- warn: {lhs: either f (const (pass )) m, rhs: Universum.whenLeft m f} - -- warn: {lhs: m >>= \case Left x -> f x; Right _ -> pure () , rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= \case Left x -> f x; Right _ -> return (), rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= \case Left x -> f x; Right _ -> pass , rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= \case Right _ -> pure () ; Left x -> f x, rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= \case Right _ -> return (); Left x -> f x, rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= \case Right _ -> pass ; Left x -> f x, rhs: Universum.whenLeftM m f} -- warn: {lhs: either f (\_ -> pure () ) =<< m, rhs: Universum.whenLeftM m f} -- warn: {lhs: either f (\_ -> return () ) =<< m, rhs: Universum.whenLeftM m f} -- warn: {lhs: either f (\_ -> pass ) =<< m, rhs: Universum.whenLeftM m f} -- warn: {lhs: either f (const (pure () )) =<< m, rhs: Universum.whenLeftM m f} -- warn: {lhs: either f (const (return ())) =<< m, rhs: Universum.whenLeftM m f} -- warn: {lhs: either f (const (pass )) =<< m, rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= either f (\_ -> pure ()) , rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= either f (\_ -> return ()) , rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= either f (\_ -> pass) , rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= either f (const (pure ()) ), rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= either f (const (return ())), rhs: Universum.whenLeftM m f} -- warn: {lhs: m >>= either f (const (pass) ), rhs: Universum.whenLeftM m f} - -- warn: {lhs: case m of Right x -> f x; Left _ -> pure () , rhs: Universum.whenRight m f} -- warn: {lhs: case m of Right x -> f x; Left _ -> return (), rhs: Universum.whenRight m f} -- warn: {lhs: case m of Right x -> f x; Left _ -> pass , rhs: Universum.whenRight m f} -- warn: {lhs: case m of Left _ -> pure () ; Right x -> f x, rhs: Universum.whenRight m f} -- warn: {lhs: case m of Left _ -> return (); Right x -> f x, rhs: Universum.whenRight m f} -- warn: {lhs: case m of Left _ -> pass ; Right x -> f x, rhs: Universum.whenRight m f} -- warn: {lhs: either (\_ -> pure () ) f m, rhs: Universum.whenRight m f} -- warn: {lhs: either (\_ -> return () ) f m, rhs: Universum.whenRight m f} -- warn: {lhs: either (\_ -> pass ) f m, rhs: Universum.whenRight m f} -- warn: {lhs: either (const (pure () )) f m, rhs: Universum.whenRight m f} -- warn: {lhs: either (const (return ())) f m, rhs: Universum.whenRight m f} -- warn: {lhs: either (const (pass )) f m, rhs: Universum.whenRight m f} - -- warn: {lhs: m >>= \case Right x -> f x; Left _ -> pure () , rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= \case Right x -> f x; Left _ -> return (), rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= \case Right x -> f x; Left _ -> pass , rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= \case Left _ -> pure () ; Right x -> f x, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= \case Left _ -> return (); Right x -> f x, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= \case Left _ -> pass ; Right x -> f x, rhs: Universum.whenRightM m f} -- warn: {lhs: either (\_ -> pure () ) f =<< m, rhs: Universum.whenRightM m f} -- warn: {lhs: either (\_ -> return () ) f =<< m, rhs: Universum.whenRightM m f} -- warn: {lhs: either (\_ -> pass ) f =<< m, rhs: Universum.whenRightM m f} -- warn: {lhs: either (const (pure () )) f =<< m, rhs: Universum.whenRightM m f} -- warn: {lhs: either (const (return ())) f =<< m, rhs: Universum.whenRightM m f} -- warn: {lhs: either (const (pass )) f =<< m, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= either (\_ -> pure ()) f, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= either (\_ -> return ()) f, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= either (\_ -> pass) f, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= either (const (pure ()) ) f, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= either (const (return ())) f, rhs: Universum.whenRightM m f} -- warn: {lhs: m >>= either (const (pass) ) f, rhs: Universum.whenRightM m f} - -- warn: {lhs: "case m of [] -> return (); (x:xs) -> f (x :| xs)", rhs: Universum.whenNotNull m f} -- warn: {lhs: "case m of [] -> pure () ; (x:xs) -> f (x :| xs)", rhs: Universum.whenNotNull m f} -- warn: {lhs: "case m of [] -> pass ; (x:xs) -> f (x :| xs)", rhs: Universum.whenNotNull m f} -- warn: {lhs: "case m of (x:xs) -> f (x :| xs); [] -> return ()", rhs: Universum.whenNotNull m f} -- warn: {lhs: "case m of (x:xs) -> f (x :| xs); [] -> pure () ", rhs: Universum.whenNotNull m f} -- warn: {lhs: "case m of (x:xs) -> f (x :| xs); [] -> pass ", rhs: Universum.whenNotNull m f} -- warn: {lhs: "m >>= \\case [] -> pass ; (x:xs) -> f (x :| xs)", rhs: Universum.whenNotNullM m f} -- warn: {lhs: "m >>= \\case [] -> pure () ; (x:xs) -> f (x :| xs)", rhs: Universum.whenNotNullM m f} -- warn: {lhs: "m >>= \\case [] -> return (); (x:xs) -> f (x :| xs)", rhs: Universum.whenNotNullM m f} -- warn: {lhs: "m >>= \\case (x:xs) -> f (x :| xs); [] -> pass ", rhs: Universum.whenNotNullM m f} -- warn: {lhs: "m >>= \\case (x:xs) -> f (x :| xs); [] -> pure () ", rhs: Universum.whenNotNullM m f} -- warn: {lhs: "m >>= \\case (x:xs) -> f (x :| xs); [] -> return ()", rhs: Universum.whenNotNullM m f} - -- warn: {lhs: mapMaybe leftToMaybe, rhs: lefts} -- warn: {lhs: mapMaybe rightToMaybe, rhs: rights} - -############################################################################ -## Reexports -############################################################################ - -## Applicative -- warn: { name: "Use 'Alternative' from Universum" - , lhs: Control.Applicative.Alternative, rhs: Universum.Alternative } -- warn: { name: "Use 'empty' from Universum" - , lhs: Control.Applicative.empty, rhs: Universum.empty } -- warn: { name: "Use '(<|>)' from Universum" - , lhs: (Control.Applicative.<|>), rhs: (Universum.<|>) } -- warn: { name: "Use 'some' from Universum" - , lhs: Control.Applicative.some, rhs: Universum.some } -- warn: { name: "Use 'many' from Universum" - , lhs: Control.Applicative.many, rhs: Universum.many } -- warn: { name: "Use 'Const' from Universum" - , lhs: Control.Applicative.Const, rhs: Universum.Const } -- warn: { name: "Use 'getConst' from Universum" - , lhs: Control.Applicative.getConst, rhs: Universum.getConst } -- warn: { name: "Use 'ZipList' from Universum" - , lhs: Control.Applicative.ZipList, rhs: Universum.ZipList } -- warn: { name: "Use 'getZipList' from Universum" - , lhs: Control.Applicative.getZipList, rhs: Universum.getZipList } -- warn: { name: "Use 'liftA2' from Universum" - , lhs: Control.Applicative.liftA2, rhs: Universum.liftA2 } -- warn: { name: "Use 'liftA3' from Universum" - , lhs: Control.Applicative.liftA3, rhs: Universum.liftA3 } -- warn: { name: "Use 'optional' from Universum" - , lhs: Control.Applicative.optional, rhs: Universum.optional } -- warn: { name: "Use '(<**>)' from Universum" - , lhs: (Control.Applicative.<**>), rhs: (Universum.<**>) } - -## Base -- warn: { name: "Use 'xor' from Universum" - , lhs: Data.Bits.xor, rhs: Universum.xor } - -- warn: { name: "Use 'chr' from Universum" - , lhs: Data.Char.chr, rhs: Universum.chr } - -- warn: { name: "Use 'Int16' from Universum" - , lhs: Data.Int.Int16, rhs: Universum.Int16 } -- warn: { name: "Use 'Int32' from Universum" - , lhs: Data.Int.Int32, rhs: Universum.Int32 } -- warn: { name: "Use 'Int64' from Universum" - , lhs: Data.Int.Int64, rhs: Universum.Int64 } -- warn: { name: "Use 'Int8' from Universum" - , lhs: Data.Int.Int8, rhs: Universum.Int8 } - -- warn: { name: "Use 'Word16' from Universum" - , lhs: Data.Word.Word16, rhs: Universum.Word16 } -- warn: { name: "Use 'Word32' from Universum" - , lhs: Data.Word.Word32, rhs: Universum.Word32 } -- warn: { name: "Use 'Word64' from Universum" - , lhs: Data.Word.Word64, rhs: Universum.Word64 } -- warn: { name: "Use 'Word8' from Universum" - , lhs: Data.Word.Word8, rhs: Universum.Word8 } -- warn: { name: "Use 'byteSwap16' from Universum" - , lhs: Data.Word.byteSwap16, rhs: Universum.byteSwap16 } -- warn: { name: "Use 'byteSwap32' from Universum" - , lhs: Data.Word.byteSwap32, rhs: Universum.byteSwap32 } -- warn: { name: "Use 'byteSwap64' from Universum" - , lhs: Data.Word.byteSwap64, rhs: Universum.byteSwap64 } - -- warn: { name: "Use 'Natural' from Universum" - , lhs: Numeric.Natural.Natural, rhs: Universum.Natural } - -- warn: { name: "Use 'Handle' from Universum" - , lhs: System.IO.Handle, rhs: Universum.Handle } -- warn: { name: "Use 'IOMode' from Universum" - , lhs: System.IO.IOMode, rhs: Universum.IOMode } -- warn: { name: "Use 'ReadMode' from Universum" - , lhs: System.IO.ReadMode, rhs: Universum.ReadMode } -- warn: { name: "Use 'WriteMode' from Universum" - , lhs: System.IO.WriteMode, rhs: Universum.WriteMode } -- warn: { name: "Use 'AppendMode' from Universum" - , lhs: System.IO.AppendMode, rhs: Universum.AppendMode } -- warn: { name: "Use 'ReadWriteMode' from Universum" - , lhs: System.IO.ReadWriteMode, rhs: Universum.ReadWriteMode } -- warn: { name: "Use 'stderr' from Universum" - , lhs: System.IO.stderr, rhs: Universum.stderr } -- warn: { name: "Use 'stdin' from Universum" - , lhs: System.IO.stdin, rhs: Universum.stdin } -- warn: { name: "Use 'stdout' from Universum" - , lhs: System.IO.stdout, rhs: Universum.stdout } -- warn: { name: "Use 'withFile' from Universum" - , lhs: System.IO.withFile, rhs: Universum.withFile } - -- warn: { name: "Use 'foldlM' from Universum" - , lhs: Data.Foldable.foldlM, rhs: Universum.foldlM } -- warn: { name: "Use 'foldrM' from Universum" - , lhs: Data.Foldable.foldrM, rhs: Universum.foldrM } -- warn: { name: "Use 'maximumBy' from Universum" - , lhs: Data.Foldable.maximumBy, rhs: Universum.maximumBy } -- warn: { name: "Use 'minimumBy' from Universum" - , lhs: Data.Foldable.minimumBy, rhs: Universum.minimumBy } - -- warn: { name: "Use 'Down' from Universum" - , lhs: Data.Ord.Down, rhs: Universum.Down } -- warn: { name: "Use 'comparing' from Universum" - , lhs: Data.Ord.comparing, rhs: Universum.comparing } - -- warn: { name: "Use 'fmapDefault' from Universum" - , lhs: Data.Traversable.fmapDefault, rhs: Universum.fmapDefault } -- warn: { name: "Use 'foldMapDefault' from Universum" - , lhs: Data.Traversable.foldMapDefault, rhs: Universum.foldMapDefault } -- warn: { name: "Use 'forM' from Universum" - , lhs: Data.Traversable.forM, rhs: Universum.forM } -- warn: { name: "Use 'mapAccumL' from Universum" - , lhs: Data.Traversable.mapAccumL, rhs: Universum.mapAccumL } -- warn: { name: "Use 'mapAccumR' from Universum" - , lhs: Data.Traversable.mapAccumR, rhs: Universum.mapAccumR } - -- warn: { name: "Use 'Proxy' from Universum" - , lhs: Data.Proxy.Proxy, rhs: Universum.Proxy } - -- warn: { name: "Use 'Typeable' from Universum" - , lhs: Data.Typeable.Typeable, rhs: Universum.Typeable } - -- warn: { name: "Use 'Void' from Universum" - , lhs: Data.Void.Void, rhs: Universum.Void } -- warn: { name: "Use 'absurd' from Universum" - , lhs: Data.Void.absurd, rhs: Universum.absurd } -- warn: { name: "Use 'vacuous' from Universum" - , lhs: Data.Void.vacuous, rhs: Universum.vacuous } - -- warn: { name: "Use 'maxInt' from Universum" - , lhs: Data.Base.maxInt, rhs: Universum.maxInt } -- warn: { name: "Use 'minInt' from Universum" - , lhs: Data.Base.minInt, rhs: Universum.minInt } -- warn: { name: "Use 'ord' from Universum" - , lhs: Data.Base.ord, rhs: Universum.ord } - -- warn: { name: "Use 'boundedEnumFrom' from Universum" - , lhs: GHC.Enum.boundedEnumFrom, rhs: Universum.boundedEnumFrom } -- warn: { name: "Use 'boundedEnumFromThen' from Universum" - , lhs: GHC.Enum.boundedEnumFromThen, rhs: Universum.boundedEnumFromThen } - -- warn: { name: "Use 'Constraint' from Universum" - , lhs: GHC.Exts.Constraint, rhs: Universum.Constraint } -- warn: { name: "Use 'FunPtr' from Universum" - , lhs: GHC.Exts.FunPtr, rhs: Universum.FunPtr } -- warn: { name: "Use 'Ptr' from Universum" - , lhs: GHC.Exts.Ptr, rhs: Universum.Ptr } - -- warn: { name: "Use 'Generic' from Universum" - , lhs: GHC.Generics.Generic, rhs: Universum.Generic } - -- warn: { name: "Use 'Ratio' from Universum" - , lhs: GHC.Real.Ratio, rhs: Universum.Ratio } -- warn: { name: "Use 'Rational' from Universum" - , lhs: GHC.Real.Rational, rhs: Universum.Rational } - -- warn: { name: "Use 'CmpNat' from Universum" - , lhs: GHC.TypeNats.CmpNat, rhs: Universum.CmpNat } -- warn: { name: "Use 'KnownNat' from Universum" - , lhs: GHC.TypeNats.KnownNat, rhs: Universum.KnownNat } -- warn: { name: "Use 'Nat' from Universum" - , lhs: GHC.TypeNats.Nat, rhs: Universum.Nat } -- warn: { name: "Use 'SomeNat' from Universum" - , lhs: GHC.TypeNats.SomeNat, rhs: Universum.SomeNat } -- warn: { name: "Use 'natVal' from Universum" - , lhs: GHC.TypeNats.natVal, rhs: Universum.natVal } -- warn: { name: "Use 'someNatVal' from Universum" - , lhs: GHC.TypeNats.someNatVal, rhs: Universum.someNatVal } - -- warn: { name: "Use 'CmpNat' from Universum" - , lhs: GHC.TypeLits.CmpNat, rhs: Universum.CmpNat } -- warn: { name: "Use 'KnownNat' from Universum" - , lhs: GHC.TypeLits.KnownNat, rhs: Universum.KnownNat } -- warn: { name: "Use 'Nat' from Universum" - , lhs: GHC.TypeLits.Nat, rhs: Universum.Nat } -- warn: { name: "Use 'SomeNat' from Universum" - , lhs: GHC.TypeLits.SomeNat, rhs: Universum.SomeNat } -- warn: { name: "Use 'natVal' from Universum" - , lhs: GHC.TypeLits.natVal, rhs: Universum.natVal } -- warn: { name: "Use 'someNatVal' from Universum" - , lhs: GHC.TypeLits.someNatVal, rhs: Universum.someNatVal } - -- warn: { name: "Use 'Coercible' from Universum" - , lhs: GHC.Types.Coercible, rhs: Universum.Coercible } - -- warn: { name: "Use 'getStackTrace' from Universum" - , lhs: GHC.ExecutionStack.getStackTrace, rhs: Universum.getStackTrace } -- warn: { name: "Use 'showStackTrace' from Universum" - , lhs: GHC.ExecutionStack.showStackTrace, rhs: Universum.showStackTrace } - -- warn: { name: "Use 'IsLabel' from Universum" - , lhs: GHC.OverloadedLabels.IsLabel, rhs: Universum.IsLabel } -- warn: { name: "Use 'fromLabel' from Universum" - , lhs: GHC.OverloadedLabels.fromLabel, rhs: Universum.fromLabel } - -- warn: { name: "Use 'CallStack' from Universum" - , lhs: GHC.Stack.CallStack, rhs: Universum.CallStack } -- warn: { name: "Use 'HasCallStack' from Universum" - , lhs: GHC.Stack.HasCallStack, rhs: Universum.HasCallStack } -- warn: { name: "Use 'callStack' from Universum" - , lhs: GHC.Stack.callStack, rhs: Universum.callStack } -- warn: { name: "Use 'currentCallStack' from Universum" - , lhs: GHC.Stack.currentCallStack, rhs: Universum.currentCallStack } -- warn: { name: "Use 'getCallStack' from Universum" - , lhs: GHC.Stack.getCallStack, rhs: Universum.getCallStack } -- warn: { name: "Use 'prettyCallStack' from Universum" - , lhs: GHC.Stack.prettyCallStack, rhs: Universum.prettyCallStack } -- warn: { name: "Use 'prettySrcLoc' from Universum" - , lhs: GHC.Stack.prettySrcLoc, rhs: Universum.prettySrcLoc } -- warn: { name: "Use 'withFrozenCallStack' from Universum" - , lhs: GHC.Stack.withFrozenCallStack, rhs: Universum.withFrozenCallStack } - -- warn: { name: "Use 'Type' from Universum" - , lhs: Data.Kind.Type, rhs: Universum.Type } - -## Bool - -- warn: { name: "Use 'guard' from Universum" - , lhs: Control.Monad.guard, rhs: Universum.guard } -- warn: { name: "Use 'unless' from Universum" - , lhs: Control.Monad.unless, rhs: Universum.unless } -- warn: { name: "Use 'when' from Universum" - , lhs: Control.Monad.when, rhs: Universum.when } -- warn: { name: "Use 'bool' from Universum" - , lhs: Data.Bool.bool, rhs: Universum.bool } - -## Container -- warn: { name: "Use 'Hashable' from Universum" - , lhs: Data.Hashable.Hashable, rhs: Universum.Hashable } -- warn: { name: "Use 'hashWithSalt' from Universum" - , lhs: Data.Hashable.hashWithSalt, rhs: Universum.hashWithSalt } -- warn: { name: "Use 'HashMap' from Universum" - , lhs: Data.HashMap.Strict.HashMap, rhs: Universum.HashMap } -- warn: { name: "Use 'HashSet' from Universum" - , lhs: Data.HashSet.HashSet, rhs: Universum.HashSet } -- warn: { name: "Use 'IntMap' from Universum" - , lhs: Data.IntMap.Strict.IntMap, rhs: Universum.IntMap } -- warn: { name: "Use 'IntSet' from Universum" - , lhs: Data.IntSet.IntSet, rhs: Universum.IntSet } -- warn: { name: "Use 'Map' from Universum" - , lhs: Data.Map.Strict.Map, rhs: Universum.Map } -- warn: { name: "Use 'Sequence' from Universum" - , lhs: Data.Sequence.Sequence, rhs: Universum.Sequence } -- warn: { name: "Use 'Set' from Universum" - , lhs: Data.Set.Set, rhs: Universum.Set } -- warn: { name: "Use 'swap' from Universum" - , lhs: Data.Tuple.swap, rhs: Universum.swap } -- warn: { name: "Use 'Vector' from Universum" - , lhs: Data.Vector.Vector, rhs: Universum.Vector } - -## Deepseq -- warn: { name: "Use 'NFData' from Universum" - , lhs: Control.DeepSeq.NFData, rhs: Universum.NFData } -- warn: { name: "Use 'rnf' from Universum" - , lhs: Control.DeepSeq.rnf, rhs: Universum.rnf } -- warn: { name: "Use 'deepseq' from Universum" - , lhs: Control.DeepSeq.deepseq, rhs: Universum.deepseq } -- warn: { name: "Use 'force' from Universum" - , lhs: Control.DeepSeq.force, rhs: Universum.force } -- warn: { name: "Use '($!!)' from Universum" - , lhs: "(Control.DeepSeq.$!!)", rhs: "(Universum.$!!)" } - -## Exception -- warn: { name: "Use 'Exception' from Universum" - , lhs: Control.Exception.Exception, rhs: Universum.Exception } -- warn: { name: "Use 'toException' from Universum" - , lhs: Control.Exception.toException, rhs: Universum.toException } -- warn: { name: "Use 'fromException' from Universum" - , lhs: Control.Exception.fromException, rhs: Universum.fromException } - -- warn: { name: "Use 'Exception' from Universum" - , lhs: Control.Exception.Safe.Exception, rhs: Universum.Exception } -- warn: { name: "Use 'toException' from Universum" - , lhs: Control.Exception.Safe.toException, rhs: Universum.toException } -- warn: { name: "Use 'fromException' from Universum" - , lhs: Control.Exception.Safe.fromException, rhs: Universum.fromException } -- warn: { name: "Use 'displayException' from Universum" - , lhs: Control.Exception.Safe.displayException, rhs: Universum.displayException } -- warn: { name: "Use 'MonadCatch' from Universum" - , lhs: Control.Exception.Safe.MonadCatch, rhs: Universum.MonadCatch } -- warn: { name: "Use 'MonadMask' from Universum" - , lhs: Control.Exception.Safe.MonadMask, rhs: Universum.MonadMask } -- warn: { name: "Use 'mask' from Universum" - , lhs: Control.Exception.Safe.mask, rhs: Universum.mask } -- warn: { name: "Use 'uninterruptibleMask' from Universum" - , lhs: Control.Exception.Safe.uninterruptibleMask, rhs: Universum.uninterruptibleMask } -- warn: { name: "Use 'MonadThrow' from Universum" - , lhs: Control.Exception.Safe.MonadThrow, rhs: Universum.MonadThrow } -- warn: { name: "Use 'SomeException' from Universum" - , lhs: Control.Exception.Safe.SomeException, rhs: Universum.SomeException } -# - warn: { name: "Use 'bracket' from Universum" -# , lhs: Control.Exception.Safe.bracket, rhs: Universum.bracket } -# - warn: { name: "Use 'bracketOnError' from Universum" -# , lhs: Control.Exception.Safe.bracketOnError, rhs: Universum.bracketOnError } -# - warn: { name: "Use 'bracket_' from Universum" -# , lhs: Control.Exception.Safe.bracket_, rhs: Universum.bracket_ } -# - warn: { name: "Use 'catch' from Universum" -# , lhs: Control.Exception.Safe.catch, rhs: Universum.catch } -# - warn: { name: "Use 'catchAny' from Universum" -# , lhs: Control.Exception.Safe.catchAny, rhs: Universum.catchAny } -# - warn: { name: "Use 'finally' from Universum" -# , lhs: Control.Exception.Safe.finally, rhs: Universum.finally } -# - warn: { name: "Use 'handleAny' from Universum" -# , lhs: Control.Exception.Safe.handleAny, rhs: Universum.handleAny } -# - warn: { name: "Use 'onException' from Universum" -# , lhs: Control.Exception.Safe.onException, rhs: Universum.onException } -# - warn: { name: "Use 'throwM' from Universum" -# , lhs: Control.Exception.Safe.throwM, rhs: Universum.throwM } -# - warn: { name: "Use 'try' from Universum" -# , lhs: Control.Exception.Safe.try, rhs: Universum.try } -# - warn: { name: "Use 'tryAny' from Universum" -# , lhs: Control.Exception.Safe.tryAny, rhs: Universum.tryAny } - -## Function -- warn: { name: "Use 'fix' from Universum" - , lhs: Data.Function.fix, rhs: Universum.fix } -- warn: { name: "Use 'on' from Universum" - , lhs: Data.Function.on, rhs: Universum.on } - -## Functor -- warn: { name: "Use '(&&&)' from Universum" - , lhs: (Control.Arrow.&&&), rhs: (Universum.&&&) } -- warn: { name: "Use 'Bifunctor' from Universum" - , lhs: Data.Bifunctor.Bifunctor, rhs: Universum.Bifunctor } -- warn: { name: "Use 'bimap' from Universum" - , lhs: Data.Bifunctor.bimap, rhs: Universum.bimap } -- warn: { name: "Use 'first' from Universum" - , lhs: Data.Bifunctor.first, rhs: Universum.first } -- warn: { name: "Use 'second' from Universum" - , lhs: Data.Bifunctor.second, rhs: Universum.second } -- warn: { name: "Use 'void' from Universum" - , lhs: Data.Functor.void, rhs: Universum.void } -- warn: { name: "Use '($>)' from Universum" - , lhs: (Data.Functor.$>), rhs: (Universum.$>) } -- warn: { name: "Use 'Compose' from Universum" - , lhs: Data.Functor.Compose.Compose, rhs: Universum.Compose } -- warn: { name: "Use 'getCompose' from Universum" - , lhs: Data.Functor.Compose.getCompose, rhs: Universum.getCompose } -- warn: { name: "Use 'Identity' from Universum" - , lhs: Data.Functor.Identity.Identity, rhs: Universum.Identity } -- warn: { name: "Use 'runIdentity' from Universum" - , lhs: Data.Functor.Identity.runIdentity, rhs: Universum.runIdentity } - -## List -- warn: { name: "Use 'genericDrop' from Universum" - , lhs: Data.List.genericDrop, rhs: Universum.genericDrop } -- warn: { name: "Use 'genericLength' from Universum" - , lhs: Data.List.genericLength, rhs: Universum.genericLength } -- warn: { name: "Use 'genericReplicate' from Universum" - , lhs: Data.List.genericReplicate, rhs: Universum.genericReplicate } -- warn: { name: "Use 'genericSplitAt' from Universum" - , lhs: Data.List.genericSplitAt, rhs: Universum.genericSplitAt } -- warn: { name: "Use 'genericTake' from Universum" - , lhs: Data.List.genericTake, rhs: Universum.genericTake } -- warn: { name: "Use 'group' from Universum" - , lhs: Data.List.group, rhs: Universum.group } -- warn: { name: "Use 'inits' from Universum" - , lhs: Data.List.inits, rhs: Universum.inits } -- warn: { name: "Use 'intercalate' from Universum" - , lhs: Data.List.intercalate, rhs: Universum.intercalate } -- warn: { name: "Use 'intersperse' from Universum" - , lhs: Data.List.intersperse, rhs: Universum.intersperse } -- warn: { name: "Use 'isPrefixOf' from Universum" - , lhs: Data.List.isPrefixOf, rhs: Universum.isPrefixOf } -- warn: { name: "Use 'permutations' from Universum" - , lhs: Data.List.permutations, rhs: Universum.permutations } -- warn: { name: "Use 'sort' from Universum" - , lhs: Data.List.sort, rhs: Universum.sort } -- warn: { name: "Use 'sortBy' from Universum" - , lhs: Data.List.sortBy, rhs: Universum.sortBy } -- warn: { name: "Use 'sortOn' from Universum" - , lhs: Data.List.sortOn, rhs: Universum.sortOn } -- warn: { name: "Use 'subsequences' from Universum" - , lhs: Data.List.subsequences, rhs: Universum.subsequences } -- warn: { name: "Use 'tails' from Universum" - , lhs: Data.List.tails, rhs: Universum.tails } -- warn: { name: "Use 'transpose' from Universum" - , lhs: Data.List.transpose, rhs: Universum.transpose } -- warn: { name: "Use 'unfoldr' from Universum" - , lhs: Data.List.unfoldr, rhs: Universum.unfoldr } - -- warn: { name: "Use 'NonEmpty' from Universum" - , lhs: Data.List.NonEmpty.NonEmpty, rhs: Universum.NonEmpty } -- warn: { name: "Use '(:|)' from Universum" - , lhs: "(Data.List.NonEmpty.:|)", rhs: "(Universum.:|)"} -- warn: { name: "Use 'nonEmpty' from Universum" - , lhs: Data.List.NonEmpty.nonEmpty, rhs: Universum.nonEmpty} -- warn: { name: "Use 'head' from Universum" - , lhs: Data.List.NonEmpty.head, rhs: Universum.head } -- warn: { name: "Use 'init' from Universum" - , lhs: Data.List.NonEmpty.init, rhs: Universum.init } -- warn: { name: "Use 'last' from Universum" - , lhs: Data.List.NonEmpty.last, rhs: Universum.last } -- warn: { name: "Use 'tail' from Universum" - , lhs: Data.List.NonEmpty.tail, rhs: Universum.tail } -- warn: { name: "Use 'sortWith' from Universum" - , lhs: GHC.Exts.sortWith, rhs: Universum.sortWith } - -## Monad -- warn: { name: "Use '(>=>)' from Universum" - , lhs: (Control.Monad.>=>), rhs: (Universum.>=>) } -- warn: { name: "Use '(<=<)' from Universum" - , lhs: (Control.Monad.<=<), rhs: (Universum.<=<) } -- warn: { name: "Use 'forever' from Universum" - , lhs: Control.Monad.forever, rhs: Universum.forever } -- warn: { name: "Use 'join' from Universum" - , lhs: Control.Monad.join, rhs: Universum.join } -- warn: { name: "Use 'mfilter' from Universum" - , lhs: Control.Monad.mfilter, rhs: Universum.mfilter } -- warn: { name: "Use 'filterM' from Universum" - , lhs: Control.Monad.filterM, rhs: Universum.filterM } -- warn: { name: "Use 'mapAndUnzipM' from Universum" - , lhs: Control.Monad.mapAndUnzipM, rhs: Universum.mapAndUnzipM } -- warn: { name: "Use 'zipWithM' from Universum" - , lhs: Control.Monad.zipWithM, rhs: Universum.zipWithM } -- warn: { name: "Use 'zipWithM_' from Universum" - , lhs: Control.Monad.zipWithM_, rhs: Universum.zipWithM_ } -- warn: { name: "Use 'foldM' from Universum" - , lhs: Control.Monad.foldM, rhs: Universum.foldM } -- warn: { name: "Use 'foldM_' from Universum" - , lhs: Control.Monad.foldM_, rhs: Universum.foldM_ } -- warn: { name: "Use 'replicateM' from Universum" - , lhs: Control.Monad.replicateM, rhs: Universum.replicateM } -- warn: { name: "Use 'replicateM_' from Universum" - , lhs: Control.Monad.replicateM_, rhs: Universum.replicateM_ } -- warn: { name: "Use 'liftM2' from Universum" - , lhs: Control.Monad.liftM2, rhs: Universum.liftM2 } -- warn: { name: "Use 'liftM3' from Universum" - , lhs: Control.Monad.liftM3, rhs: Universum.liftM3 } -- warn: { name: "Use 'liftM4' from Universum" - , lhs: Control.Monad.liftM4, rhs: Universum.liftM4 } -- warn: { name: "Use 'liftM5' from Universum" - , lhs: Control.Monad.liftM5, rhs: Universum.liftM5 } -- warn: { name: "Use 'ap' from Universum" - , lhs: Control.Monad.ap, rhs: Universum.ap } -- warn: { name: "Use '(<$!>)' from Universum" - , lhs: (Control.Monad.<$!>), rhs: (Universum.<$!>) } - -- warn: { name: "Use 'ExceptT' from Universum" - , lhs: Control.Monad.Except.ExceptT, rhs: Universum.ExceptT } -- warn: { name: "Use 'runExceptT' from Universum" - , lhs: Control.Monad.Except.runExceptT, rhs: Universum.runExceptT } - -- warn: { name: "Use 'MonadReader' from Universum" - , lhs: Control.Monad.Reader.MonadReader, rhs: Universum.MonadReader } -- warn: { name: "Use 'Reader' from Universum" - , lhs: Control.Monad.Reader.Reader, rhs: Universum.Reader } -- warn: { name: "Use 'ReaderT' from Universum" - , lhs: Control.Monad.Reader.ReaderT, rhs: Universum.ReaderT } -- warn: { name: "Use 'runReaderT' from Universum" - , lhs: Control.Monad.Reader.runReaderT, rhs: Universum.runReaderT } -- warn: { name: "Use 'ask' from Universum" - , lhs: Control.Monad.Reader.ask, rhs: Universum.ask } -- warn: { name: "Use 'local' from Universum" - , lhs: Control.Monad.Reader.local, rhs: Universum.local } -- warn: { name: "Use 'reader' from Universum" - , lhs: Control.Monad.Reader.reader, rhs: Universum.reader } -- warn: { name: "Use 'runReader' from Universum" - , lhs: Control.Monad.Reader.runReader, rhs: Universum.runReader } - -- warn: { name: "Use 'MonadState' from Universum" - , lhs: Control.Monad.State.Strict.MonadState, rhs: Universum.MonadState } -- warn: { name: "Use 'State' from Universum" - , lhs: Control.Monad.State.Strict.State, rhs: Universum.State } -- warn: { name: "Use 'StateT' from Universum" - , lhs: Control.Monad.State.Strict.StateT, rhs: Universum.StateT } -- warn: { name: "Use 'runStateT' from Universum" - , lhs: Control.Monad.State.Strict.runStateT, rhs: Universum.runStateT } -- warn: { name: "Use 'evalState' from Universum" - , lhs: Control.Monad.State.Strict.evalState, rhs: Universum.evalState } -- warn: { name: "Use 'evalStateT' from Universum" - , lhs: Control.Monad.State.Strict.evalStateT, rhs: Universum.evalStateT } -- warn: { name: "Use 'execState' from Universum" - , lhs: Control.Monad.State.Strict.execState, rhs: Universum.execState } -- warn: { name: "Use 'execStateT' from Universum" - , lhs: Control.Monad.State.Strict.execStateT, rhs: Universum.execStateT } -- warn: { name: "Use 'get' from Universum" - , lhs: Control.Monad.State.Strict.get, rhs: Universum.get } -- warn: { name: "Use 'gets' from Universum" - , lhs: Control.Monad.State.Strict.gets, rhs: Universum.gets } -- warn: { name: "Use 'modify' from Universum" - , lhs: Control.Monad.State.Strict.modify, rhs: Universum.modify } -- warn: { name: "Use 'modify'' from Universum" - , lhs: "Control.Monad.State.Strict.modify'", rhs: "Universum.modify'" } -- warn: { name: "Use 'put' from Universum" - , lhs: Control.Monad.State.Strict.put, rhs: Universum.put } -- warn: { name: "Use 'runState' from Universum" - , lhs: Control.Monad.State.Strict.runState, rhs: Universum.runState } -- warn: { name: "Use 'state' from Universum" - , lhs: Control.Monad.State.Strict.state, rhs: Universum.state } -- warn: { name: "Use 'withState' from Universum" - , lhs: Control.Monad.State.Strict.withState, rhs: Universum.withState } - -- warn: { name: "Use 'MonadFail' from Universum" - , lhs: Control.Monad.Fail.MonadFail, rhs: Universum.MonadFail } - - -- warn: { name: "Use 'MonadIO' from Universum" - , lhs: Control.Monad.Trans.MonadIO, rhs: Universum.MonadIO } -- warn: { name: "Use 'MonadTrans' from Universum" - , lhs: Control.Monad.Trans.MonadTrans, rhs: Universum.MonadTrans } -- warn: { name: "Use 'lift' from Universum" - , lhs: Control.Monad.Trans.lift, rhs: Universum.lift } -- warn: { name: "Use 'liftIO' from Universum" - , lhs: Control.Monad.Trans.liftIO, rhs: Universum.liftIO } - -- warn: { name: "Use 'IdentityT' from Universum" - , lhs: Control.Monad.Trans.Identity.IdentityT, rhs: Universum.IdentityT } -- warn: { name: "Use 'runIdentityT' from Universum" - , lhs: Control.Monad.Trans.Identity.runIdentityT, rhs: Universum.runIdentityT } - -- warn: { name: "Use 'MaybeT' from Universum" - , lhs: Control.Monad.Trans.Maybe.MaybeT, rhs: Universum.MaybeT } -- warn: { name: "Use 'maybeToExceptT' from Universum" - , lhs: Control.Monad.Trans.Maybe.maybeToExceptT, rhs: Universum.maybeToExceptT } -- warn: { name: "Use 'exceptToMaybeT' from Universum" - , lhs: Control.Monad.Trans.Maybe.exceptToMaybeT, rhs: Universum.exceptToMaybeT } - -- warn: { name: "Use 'catMaybes' from Universum" - , lhs: Data.Maybe.catMaybes, rhs: Universum.catMaybes } -- warn: { name: "Use 'fromMaybe' from Universum" - , lhs: Data.Maybe.fromMaybe, rhs: Universum.fromMaybe } -- warn: { name: "Use 'isJust' from Universum" - , lhs: Data.Maybe.isJust, rhs: Universum.isJust } -- warn: { name: "Use 'isNothing' from Universum" - , lhs: Data.Maybe.isNothing, rhs: Universum.isNothing } -- warn: { name: "Use 'listToMaybe' from Universum" - , lhs: Data.Maybe.listToMaybe, rhs: Universum.listToMaybe } -- warn: { name: "Use 'mapMaybe' from Universum" - , lhs: Data.Maybe.mapMaybe, rhs: Universum.mapMaybe } -- warn: { name: "Use 'maybeToList' from Universum" - , lhs: Data.Maybe.maybeToList, rhs: Universum.maybeToList } - -- warn: { name: "Use 'isLeft' from Universum" - , lhs: Data.Either.isLeft, rhs: Universum.isLeft } -- warn: { name: "Use 'isRight' from Universum" - , lhs: Data.Either.isRight, rhs: Universum.isRight } -- warn: { name: "Use 'lefts' from Universum" - , lhs: Data.Either.lefts, rhs: Universum.lefts } -- warn: { name: "Use 'partitionEithers' from Universum" - , lhs: Data.Either.partitionEithers, rhs: Universum.partitionEithers } -- warn: { name: "Use 'rights' from Universum" - , lhs: Data.Either.rights, rhs: Universum.rights } - -- warn: { name: "Use 'newTVar' from Universum" - , lhs: Control.Concurrent.STM.TVar.newTVar, rhs: Universum.newTVar } -- warn: { name: "Use 'readTVar' from Universum" - , lhs: Control.Concurrent.STM.TVar.readTVar, rhs: Universum.readTVar } -- warn: { name: "Use 'writeTVar' from Universum" - , lhs: Control.Concurrent.STM.TVar.writeTVar, rhs: Universum.writeTVar } -- warn: { name: "Use 'modifyTVar'' from Universum" - , lhs: "Control.Concurrent.STM.TVar.modifyTVar'", rhs: "Universum.modifyTVar'" } -- warn: { name: "Use 'newTVarIO' from Universum" - , lhs: Control.Concurrent.STM.TVar.newTVarIO, rhs: Universum.newTVarIO } -- warn: { name: "Use 'readTVarIO' from Universum" - , lhs: Control.Concurrent.STM.TVar.readTVarIO, rhs: Universum.readTVarIO } - -- warn: { name: "Use 'newIORef' from Universum" - , lhs: Data.IORef.newIORef, rhs: Universum.newIORef } -- warn: { name: "Use 'readIORef' from Universum" - , lhs: Data.IORef.readIORef, rhs: Universum.readIORef } -- warn: { name: "Use 'writeIORef' from Universum" - , lhs: Data.IORef.writeIORef, rhs: Universum.writeIORef } -- warn: { name: "Use 'modifyIORef' from Universum" - , lhs: Data.IORef.modifyIORef, rhs: Universum.modifyIORef } -- warn: { name: "Use 'modifyIORef'' from Universum" - , lhs: "Data.IORef.modifyIORef'", rhs: "Universum.modifyIORef'" } -- warn: { name: "Use 'atomicModifyIORef' from Universum" - , lhs: Data.IORef.atomicModifyIORef, rhs: Universum.atomicModifyIORef } -- warn: { name: "Use 'atomicModifyIORef'' from Universum" - , lhs: "Data.IORef.atomicModifyIORef'", rhs: "Universum.atomicModifyIORef'" } -- warn: { name: "Use 'atomicWriteIORef' from Universum" - , lhs: Data.IORef.atomicWriteIORef, rhs: Universum.atomicWriteIORef } - -## Monoid -- warn: { name: "Use 'All' from Universum" - , lhs: Data.Monoid.All, rhs: Universum.All } -- warn: { name: "Use 'Alt' from Universum" - , lhs: Data.Monoid.Alt, rhs: Universum.Alt } -- warn: { name: "Use 'Any' from Universum" - , lhs: Data.Monoid.Any, rhs: Universum.Any } -- warn: { name: "Use 'Dual' from Universum" - , lhs: Data.Monoid.Dual, rhs: Universum.Dual } -- warn: { name: "Use 'Endo' from Universum" - , lhs: Data.Monoid.Endo, rhs: Universum.Endo } -- warn: { name: "Use 'First' from Universum" - , lhs: Data.Monoid.First, rhs: Universum.First } -- warn: { name: "Use 'Last' from Universum" - , lhs: Data.Monoid.Last, rhs: Universum.Last } -- warn: { name: "Use 'Product' from Universum" - , lhs: Data.Monoid.Product, rhs: Universum.Product } -- warn: { name: "Use 'Sum' from Universum" - , lhs: Data.Monoid.Sum, rhs: Universum.Sum } - -- warn: { name: "Use 'Option' from Universum" - , lhs: Data.Semigroup.Option, rhs: Universum.Option } -- warn: { name: "Use 'Semigroup' from Universum" - , lhs: Data.Semigroup.Semigroup, rhs: Universum.Semigroup } -- warn: { name: "Use 'sconcat' from Universum" - , lhs: Data.Semigroup.sconcat, rhs: Universum.sconcat } -- warn: { name: "Use 'stimes' from Universum" - , lhs: Data.Semigroup.stimes, rhs: Universum.stimes } -# - warn: { name: "Use '(<>)' from Universum" -# , lhs: (Data.Semigroup.<>), rhs: (Universum.<>) } -- warn: { name: "Use 'WrappedMonoid' from Universum" - , lhs: Data.Semigroup.WrappedMonoid, rhs: Universum.WrappedMonoid } -- warn: { name: "Use 'cycle1' from Universum" - , lhs: Data.Semigroup.cycle1, rhs: Universum.cycle1 } -- warn: { name: "Use 'mtimesDefault' from Universum" - , lhs: Data.Semigroup.mtimesDefault, rhs: Universum.mtimesDefault } -- warn: { name: "Use 'stimesIdempotent' from Universum" - , lhs: Data.Semigroup.stimesIdempotent, rhs: Universum.stimesIdempotent } -- warn: { name: "Use 'stimesIdempotentMonoid' from Universum" - , lhs: Data.Semigroup.stimesIdempotentMonoid, rhs: Universum.stimesIdempotentMonoid } -- warn: { name: "Use 'stimesMonoid' from Universum" - , lhs: Data.Semigroup.stimesMonoid, rhs: Universum.stimesMonoid } - -## String -- warn: { name: "Use 'ByteString' from Universum" - , lhs: Data.ByteString.ByteString, rhs: Universum.ByteString } -- warn: { name: "Use 'IsString' from Universum" - , lhs: Data.String.IsString, rhs: Universum.IsString } - -- warn: { name: "Use 'Text' from Universum" - , lhs: Data.Text.Text, rhs: Universum.Text } -- warn: { name: "Use 'lines' from Universum" - , lhs: Data.Text.lines, rhs: Universum.lines } -- warn: { name: "Use 'unlines' from Universum" - , lhs: Data.Text.unlines, rhs: Universum.unlines } -- warn: { name: "Use 'words' from Universum" - , lhs: Data.Text.words, rhs: Universum.words } -- warn: { name: "Use 'unwords' from Universum" - , lhs: Data.Text.unwords, rhs: Universum.unwords } - -- warn: { name: "Use 'LText' from Universum" - , lhs: Data.Text.Lazy.Text, rhs: Universum.LText } -- warn: { name: "Use 'LByteString' from Universum" - , lhs: Data.ByteString.Lazy.LByteString, rhs: Universum.LByteString } - -- warn: { name: "Use 'Buildable' from Universum" - , lhs: Data.Text.Buildable, rhs: Universum.Buildable } -- warn: { name: "Use 'decodeUtf8'' from Universum" - , lhs: "Data.Text.Encoding.decodeUtf8'", rhs: "Universum.decodeUtf8'" } -- warn: { name: "Use 'decodeUtf8With' from Universum" - , lhs: Data.Text.Encoding.decodeUtf8With, rhs: Universum.decodeUtf8With } - -- warn: { name: "Use 'OnDecodeError' from Universum" - , lhs: Data.Text.Encoding.Error.OnDecodeError, rhs: Universum.OnDecodeError } -- warn: { name: "Use 'OnDecodeError' from Universum" - , lhs: Data.Text.Encoding.Error.OnDecodeError, rhs: Universum.OnDecodeError } -- warn: { name: "Use 'OnError' from Universum" - , lhs: Data.Text.Encoding.Error.OnError, rhs: Universum.OnError } -- warn: { name: "Use 'UnicodeException' from Universum" - , lhs: Data.Text.Encoding.Error.UnicodeException, rhs: Universum.UnicodeException } -- warn: { name: "Use 'lenientDecode' from Universum" - , lhs: Data.Text.Encoding.Error.lenientDecode, rhs: Universum.lenientDecode } -- warn: { name: "Use 'strictDecode' from Universum" - , lhs: Data.Text.Encoding.Error.strictDecode, rhs: Universum.strictDecode } - -- warn: { name: "Use 'fromStrict' from Universum" - , lhs: Data.Text.Lazy.fromStrict, rhs: Universum.fromStrict } -- warn: { name: "Use 'toStrict' from Universum" - , lhs: Data.Text.Lazy.toStrict, rhs: Universum.toStrict } - -- warn: { name: "Use 'readMaybe' from Universum" - , lhs: Text.Read.readMaybe, rhs: Universum.readMaybe } - -- warn: { name: "Use 'getLine' from Universum" - , lhs: Data.Text.IO.getLine, rhs: Universum.getLine } -- warn: { name: "Use 'readFile' from Universum" - , lhs: Data.Text.IO.readFile, rhs: Universum.readFile } -- warn: { name: "Use 'writeFile' from Universum" - , lhs: Data.Text.IO.writeFile, rhs: Universum.writeFile } -- warn: { name: "Use 'appendFile' from Universum" - , lhs: Data.Text.IO.appendFile, rhs: Universum.appendFile } - -## Unsafe -- warn: { name: "Use 'head' from Universum.Unsafe" - , lhs: Data.List.head, rhs: Universum.Unsafe.head - , note: "Use 'import qualified Universum.Unsafe as Unsafe (head)'" } -- warn: { name: "Use 'tail' from Universum.Unsafe" - , lhs: Data.List.tail, rhs: Universum.Unsafe.tail - , note: "Use 'import qualified Universum.Unsafe as Unsafe (tail)'" } -- warn: { name: "Use 'init' from Universum.Unsafe" - , lhs: Data.List.init, rhs: Universum.Unsafe.init - , note: "Use 'import qualified Universum.Unsafe as Unsafe (init)'" } -- warn: { name: "Use 'last' from Universum.Unsafe" - , lhs: Data.List.last, rhs: Universum.Unsafe.last - , note: "Use 'import qualified Universum.Unsafe as Unsafe (last)'" } -- warn: { name: "Use '(!!)' from Universum.Unsafe" - , lhs: "(Data.List.!!)", rhs: "(Universum.Unsafe.!!)" - , note: "Use 'import qualified Universum.Unsafe as Unsafe ((!!))'" } -- warn: { name: "Use 'fromJust' from Universum.Unsafe" - , lhs: "Data.Maybe.fromJust", rhs: "Universum.Unsafe.fromJust" - , note: "Use 'import qualified Universum.Unsafe as Unsafe (fromJust)'" } - -############################################################################ -## Lifted functions in Universum -############################################################################ - -## concurrency - -- warn: { name: "liftIO is not needed", lhs: liftIO newEmptyMVar, rhs: Universum.newEmptyMVar - , note: "If you import 'newEmptyMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (newMVar x), rhs: Universum.newMVar x - , note: "If you import 'newMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (putMVar x y), rhs: Universum.putMVar x y - , note: "If you import 'putMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (readMVar x), rhs: Universum.readMVar x - , note: "If you import 'readMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (swapMVar x y), rhs: Universum.swapMVar x y - , note: "If you import 'swapMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (takeMVar x), rhs: Universum.takeMVar x - , note: "If you import 'takeMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (tryPutMVar x y), rhs: Universum.tryPutMVar x y - , note: "If you import 'tryPutMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (tryReadMVar x), rhs: Universum.tryReadMVar x - , note: "If you import 'tryReadMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (tryTakeMVar x), rhs: Universum.tryTakeMVar x - , note: "If you import 'tryTakeMVar' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (atomically x), rhs: Universum.atomically x - , note: "If you import 'atomically' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (newTVarIO x), rhs: Universum.newTVarIO x - , note: "If you import 'newTVarIO' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (readTVarIO x), rhs: Universum.readTVarIO x - , note: "If you import 'readTVarIO' from Universum, it's already lifted" } - -## IORef - -- warn: { name: "liftIO is not needed", lhs: liftIO (newIORef x), rhs: Universum.newIORef x - , note: "If you import 'newIORef' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (readIORef x), rhs: Universum.readIORef x - , note: "If you import 'readIORef' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (writeIORef x y), rhs: Universum.writeIORef x y - , note: "If you import 'writeIORef' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (modifyIORef x y), rhs: Universum.modifyIORef x y - , note: "If you import 'modifyIORef' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: "liftIO (modifyIORef' x y)", rhs: "Universum.modifyIORef' x y" - , note: "If you import 'modifyIORef'' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (atomicModifyIORef x y), rhs: Universum.atomicModifyIORef x y - , note: "If you import 'atomicModifyIORef' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: "liftIO (atomicModifyIORef' x y)", rhs: "Universum.atomicModifyIORef' x y" - , note: "If you import 'atomicModifyIORef'' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (atomicWriteIORef x y), rhs: Universum.atomicWriteIORef x y - , note: "If you import 'atomicWriteIORef' from Universum, it's already lifted" } - -## others - -- warn: { name: "liftIO is not needed", lhs: liftIO Universum.getLine, rhs: Universum.getLine - , note: "If you import 'getLine' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (Universum.readFile x), rhs: Universum.readFile x - , note: "If you import 'readFile' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (Universum.writeFile x y), rhs: Universum.writeFile x y - , note: "If you import 'writeFile' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (Universum.appendFile x y), rhs: Universum.appendFile x y - , note: "If you import 'appendFile' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (Universum.openFile x y), rhs: Universum.openFile x y - , note: "If you import 'openFile' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (exitWith x), rhs: Universum.exitWith x - , note: "If you import 'exitWith' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO exitFailure, rhs: Universum.exitFailure - , note: "If you import 'exitFailure' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO exitSuccess, rhs: Universum.exitSuccess - , note: "If you import 'exitSuccess' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (die x), rhs: Universum.die x - , note: "If you import 'die' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (stToIO x), rhs: Universum.stToIO x - , note: "If you import 'stToIO' from Universum, it's already lifted" } diff --git a/tools/lsp-bench/.ligo/repository_id b/tools/lsp-bench/.ligo/repository_id deleted file mode 100644 index bbb3014562..0000000000 --- a/tools/lsp-bench/.ligo/repository_id +++ /dev/null @@ -1 +0,0 @@ -edaf75cb-fbff-4a1a-7a8f-4071c781ea6c \ No newline at end of file diff --git a/tools/lsp-bench/.stylish-haskell.yaml b/tools/lsp-bench/.stylish-haskell.yaml deleted file mode 100644 index 8e613a07cf..0000000000 --- a/tools/lsp-bench/.stylish-haskell.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Serokell -# -# SPDX-License-Identifier: Unlicense - -steps: - - simple_align: - cases: never - top_level_patterns: never - records: never - multi_way_if: never - - imports: - align: none - list_align: after_alias - pad_module_names: false - long_list_align: new_line - empty_list_align: inherit - list_padding: 2 - separate_lists: true - space_surround: false - post_qualify: true - - language_pragmas: - style: compact - remove_redundant: true - - trailing_whitespace: {} -columns: 100 -newline: native -language_extensions: - - BangPatterns - - BlockArguments - - ConstraintKinds - - DataKinds - - DefaultSignatures - - DeriveAnyClass - - DeriveDataTypeable - - DeriveGeneric - - DerivingStrategies - - DerivingVia - - EmptyCase - - ExistentialQuantification - - ExplicitNamespaces - - FlexibleContexts - - FlexibleInstances - - FunctionalDependencies - - GADTs - - GeneralizedNewtypeDeriving - - ImportQualifiedPost - - LambdaCase - - MultiParamTypeClasses - - MultiWayIf - - NamedFieldPuns - - NumericUnderscores - - OverloadedLabels - - OverloadedStrings - - PatternSynonyms - - QuantifiedConstraints - - RebindableSyntax - - RecordWildCards - - RecursiveDo - - ScopedTypeVariables - - StandaloneDeriving - - TemplateHaskell - - TemplateHaskellQuotes - - TupleSections - - TypeApplications - - TypeFamilies - - TypeOperators - - ViewPatterns - - QuasiQuotes diff --git a/tools/lsp-bench/Makefile b/tools/lsp-bench/Makefile deleted file mode 100644 index e0fb68be7b..0000000000 --- a/tools/lsp-bench/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# examples: make bench filter="References/simple" ; make bench filter="Complex benchmarks/one_big_file.mligo/keystrokes" -# You can bench another executable, e.g. LIGO_LSP_TEST_EXE="ligo-lsp-exe" make bench - -bench: - git submodule update --init --recursive - bash -c "cd projects/submodules/checker; cd -" - $(BUILD_FLAGS) stack run -- "-v2" "$(filter)" - -bench-no-logging: - LIGO_LSP_TEST_EXE="ligo lsp --disable-lsp-requests-logging" make bench diff --git a/tools/lsp-bench/README.md b/tools/lsp-bench/README.md deleted file mode 100644 index b34629b552..0000000000 --- a/tools/lsp-bench/README.md +++ /dev/null @@ -1 +0,0 @@ -# lsp-bench diff --git a/tools/lsp-bench/Setup.hs b/tools/lsp-bench/Setup.hs deleted file mode 100644 index 9a994af677..0000000000 --- a/tools/lsp-bench/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/tools/lsp-bench/app/Main.hs b/tools/lsp-bench/app/Main.hs deleted file mode 100644 index 32160c79b2..0000000000 --- a/tools/lsp-bench/app/Main.hs +++ /dev/null @@ -1,8 +0,0 @@ -module Main (main) where - -import Universum - -import Bench qualified - -main :: IO () -main = Bench.main diff --git a/tools/lsp-bench/lsp-bench.cabal b/tools/lsp-bench/lsp-bench.cabal deleted file mode 100644 index 59b972297f..0000000000 --- a/tools/lsp-bench/lsp-bench.cabal +++ /dev/null @@ -1,141 +0,0 @@ -cabal-version: 1.12 - --- This file has been generated from package.yaml by hpack version 0.35.1. --- --- see: https://github.com/sol/hpack - -name: lsp-bench -version: 0.0.0 -build-type: Simple - -library - exposed-modules: - Bench - Bench.Completion - Bench.Complex - Bench.Diagnostics - Bench.Hovers - Bench.References - Bench.Util - other-modules: - Paths_lsp_bench - hs-source-dirs: - src - default-extensions: - AllowAmbiguousTypes - ApplicativeDo - BangPatterns - BlockArguments - ConstraintKinds - DataKinds - DeriveAnyClass - DeriveFoldable - DeriveFunctor - DeriveGeneric - DeriveTraversable - DerivingStrategies - DerivingVia - DuplicateRecordFields - FlexibleContexts - FlexibleInstances - FunctionalDependencies - GADTs - GeneralisedNewtypeDeriving - ImportQualifiedPost - LambdaCase - MagicHash - MultiParamTypeClasses - MultiWayIf - NamedFieldPuns - NoImplicitPrelude - OverloadedLabels - OverloadedRecordDot - OverloadedStrings - QuantifiedConstraints - QuasiQuotes - PatternSynonyms - RankNTypes - RecordWildCards - ScopedTypeVariables - StandaloneDeriving - StrictData - TemplateHaskell - TupleSections - TypeApplications - TypeFamilies - TypeOperators - UndecidableInstances - ViewPatterns - ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints - build-depends: - aeson - , base >=4.7 && <5 - , criterion - , data-default - , directory - , lsp - , lsp-test - , lsp-types - , microlens - , row-types - , text - , universum - default-language: Haskell2010 - -executable lsp-bench-exe - main-is: Main.hs - other-modules: - Paths_lsp_bench - hs-source-dirs: - app - default-extensions: - AllowAmbiguousTypes - ApplicativeDo - BangPatterns - BlockArguments - ConstraintKinds - DataKinds - DeriveAnyClass - DeriveFoldable - DeriveFunctor - DeriveGeneric - DeriveTraversable - DerivingStrategies - DerivingVia - DuplicateRecordFields - FlexibleContexts - FlexibleInstances - FunctionalDependencies - GADTs - GeneralisedNewtypeDeriving - ImportQualifiedPost - LambdaCase - MagicHash - MultiParamTypeClasses - MultiWayIf - NamedFieldPuns - NoImplicitPrelude - OverloadedLabels - OverloadedRecordDot - OverloadedStrings - QuantifiedConstraints - QuasiQuotes - PatternSynonyms - RankNTypes - RecordWildCards - ScopedTypeVariables - StandaloneDeriving - StrictData - TemplateHaskell - TupleSections - TypeApplications - TypeFamilies - TypeOperators - UndecidableInstances - ViewPatterns - ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N - build-depends: - base >=4.7 && <5 - , lsp-bench - , universum - default-language: Haskell2010 diff --git a/tools/lsp-bench/package.yaml b/tools/lsp-bench/package.yaml deleted file mode 100644 index 3278fd8402..0000000000 --- a/tools/lsp-bench/package.yaml +++ /dev/null @@ -1,87 +0,0 @@ -name: lsp-bench - -default-extensions: - - AllowAmbiguousTypes - - ApplicativeDo - - BangPatterns - - BlockArguments - - ConstraintKinds - - DataKinds - - DeriveAnyClass - - DeriveFoldable - - DeriveFunctor - - DeriveGeneric - - DeriveTraversable - - DerivingStrategies - - DerivingVia - - DuplicateRecordFields - - FlexibleContexts - - FlexibleInstances - - FunctionalDependencies - - GADTs - - GeneralisedNewtypeDeriving - - ImportQualifiedPost - - LambdaCase - - MagicHash - - MultiParamTypeClasses - - MultiWayIf - - NamedFieldPuns - - NoImplicitPrelude - - OverloadedLabels - - OverloadedRecordDot - - OverloadedStrings - - QuantifiedConstraints - - QuasiQuotes - - PatternSynonyms - - RankNTypes - - RecordWildCards - - ScopedTypeVariables - - StandaloneDeriving - - StrictData - - TemplateHaskell - - TupleSections - - TypeApplications - - TypeFamilies - - TypeOperators - - UndecidableInstances - - ViewPatterns - -dependencies: -- base >= 4.7 && < 5 -- universum - -ghc-options: -- -Wall -- -Wcompat -- -Widentities -- -Wincomplete-record-updates -- -Wincomplete-uni-patterns -- -Wmissing-export-lists -- -Wmissing-home-modules -- -Wpartial-fields -- -Wredundant-constraints - -library: - source-dirs: src - dependencies: - - aeson - - criterion - - directory - - data-default - - lsp - - lsp-test - - lsp-types - - row-types - - text - - microlens - -executables: - lsp-bench-exe: - main: Main.hs - source-dirs: app - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N - dependencies: - - lsp-bench diff --git a/tools/lsp-bench/projects/one_big_file/one_big_file.mligo b/tools/lsp-bench/projects/one_big_file/one_big_file.mligo deleted file mode 100644 index 37a499b152..0000000000 --- a/tools/lsp-bench/projects/one_big_file/one_big_file.mligo +++ /dev/null @@ -1,1000 +0,0 @@ -let a000 = 1 -let a001 = a000 -let a002 = a001 -let a003 = a002 -let a004 = a003 -let a005 = a004 -let a006 = a005 -let a007 = a006 -let a008 = a007 -let a009 = a008 -let a010 = a009 -let a011 = a010 -let a012 = a011 -let a013 = a012 -let a014 = a013 -let a015 = a014 -let a016 = a015 -let a017 = a016 -let a018 = a017 -let a019 = a018 -let a020 = a019 -let a021 = a020 -let a022 = a021 -let a023 = a022 -let a024 = a023 -let a025 = a024 -let a026 = a025 -let a027 = a026 -let a028 = a027 -let a029 = a028 -let a030 = a029 -let a031 = a030 -let a032 = a031 -let a033 = a032 -let a034 = a033 -let a035 = a034 -let a036 = a035 -let a037 = a036 -let a038 = a037 -let a039 = a038 -let a040 = a039 -let a041 = a040 -let a042 = a041 -let a043 = a042 -let a044 = a043 -let a045 = a044 -let a046 = a045 -let a047 = a046 -let a048 = a047 -let a049 = a048 -let a050 = a049 -let a051 = a050 -let a052 = a051 -let a053 = a052 -let a054 = a053 -let a055 = a054 -let a056 = a055 -let a057 = a056 -let a058 = a057 -let a059 = a058 -let a060 = a059 -let a061 = a060 -let a062 = a061 -let a063 = a062 -let a064 = a063 -let a065 = a064 -let a066 = a065 -let a067 = a066 -let a068 = a067 -let a069 = a068 -let a070 = a069 -let a071 = a070 -let a072 = a071 -let a073 = a072 -let a074 = a073 -let a075 = a074 -let a076 = a075 -let a077 = a076 -let a078 = a077 -let a079 = a078 -let a080 = a079 -let a081 = a080 -let a082 = a081 -let a083 = a082 -let a084 = a083 -let a085 = a084 -let a086 = a085 -let a087 = a086 -let a088 = a087 -let a089 = a088 -let a090 = a089 -let a091 = a090 -let a092 = a091 -let a093 = a092 -let a094 = a093 -let a095 = a094 -let a096 = a095 -let a097 = a096 -let a098 = a097 -let a099 = a098 -let a100 = a099 -let a101 = a100 -let a102 = a101 -let a103 = a102 -let a104 = a103 -let a105 = a104 -let a106 = a105 -let a107 = a106 -let a108 = a107 -let a109 = a108 -let a110 = a109 -let a111 = a110 -let a112 = a111 -let a113 = a112 -let a114 = a113 -let a115 = a114 -let a116 = a115 -let a117 = a116 -let a118 = a117 -let a119 = a118 -let a120 = a119 -let a121 = a120 -let a122 = a121 -let a123 = a122 -let a124 = a123 -let a125 = a124 -let a126 = a125 -let a127 = a126 -let a128 = a127 -let a129 = a128 -let a130 = a129 -let a131 = a130 -let a132 = a131 -let a133 = a132 -let a134 = a133 -let a135 = a134 -let a136 = a135 -let a137 = a136 -let a138 = a137 -let a139 = a138 -let a140 = a139 -let a141 = a140 -let a142 = a141 -let a143 = a142 -let a144 = a143 -let a145 = a144 -let a146 = a145 -let a147 = a146 -let a148 = a147 -let a149 = a148 -let a150 = a149 -let a151 = a150 -let a152 = a151 -let a153 = a152 -let a154 = a153 -let a155 = a154 -let a156 = a155 -let a157 = a156 -let a158 = a157 -let a159 = a158 -let a160 = a159 -let a161 = a160 -let a162 = a161 -let a163 = a162 -let a164 = a163 -let a165 = a164 -let a166 = a165 -let a167 = a166 -let a168 = a167 -let a169 = a168 -let a170 = a169 -let a171 = a170 -let a172 = a171 -let a173 = a172 -let a174 = a173 -let a175 = a174 -let a176 = a175 -let a177 = a176 -let a178 = a177 -let a179 = a178 -let a180 = a179 -let a181 = a180 -let a182 = a181 -let a183 = a182 -let a184 = a183 -let a185 = a184 -let a186 = a185 -let a187 = a186 -let a188 = a187 -let a189 = a188 -let a190 = a189 -let a191 = a190 -let a192 = a191 -let a193 = a192 -let a194 = a193 -let a195 = a194 -let a196 = a195 -let a197 = a196 -let a198 = a197 -let a199 = a198 -let a200 = a199 -let a201 = a200 -let a202 = a201 -let a203 = a202 -let a204 = a203 -let a205 = a204 -let a206 = a205 -let a207 = a206 -let a208 = a207 -let a209 = a208 -let a210 = a209 -let a211 = a210 -let a212 = a211 -let a213 = a212 -let a214 = a213 -let a215 = a214 -let a216 = a215 -let a217 = a216 -let a218 = a217 -let a219 = a218 -let a220 = a219 -let a221 = a220 -let a222 = a221 -let a223 = a222 -let a224 = a223 -let a225 = a224 -let a226 = a225 -let a227 = a226 -let a228 = a227 -let a229 = a228 -let a230 = a229 -let a231 = a230 -let a232 = a231 -let a233 = a232 -let a234 = a233 -let a235 = a234 -let a236 = a235 -let a237 = a236 -let a238 = a237 -let a239 = a238 -let a240 = a239 -let a241 = a240 -let a242 = a241 -let a243 = a242 -let a244 = a243 -let a245 = a244 -let a246 = a245 -let a247 = a246 -let a248 = a247 -let a249 = a248 -let a250 = a249 -let a251 = a250 -let a252 = a251 -let a253 = a252 -let a254 = a253 -let a255 = a254 -let a256 = a255 -let a257 = a256 -let a258 = a257 -let a259 = a258 -let a260 = a259 -let a261 = a260 -let a262 = a261 -let a263 = a262 -let a264 = a263 -let a265 = a264 -let a266 = a265 -let a267 = a266 -let a268 = a267 -let a269 = a268 -let a270 = a269 -let a271 = a270 -let a272 = a271 -let a273 = a272 -let a274 = a273 -let a275 = a274 -let a276 = a275 -let a277 = a276 -let a278 = a277 -let a279 = a278 -let a280 = a279 -let a281 = a280 -let a282 = a281 -let a283 = a282 -let a284 = a283 -let a285 = a284 -let a286 = a285 -let a287 = a286 -let a288 = a287 -let a289 = a288 -let a290 = a289 -let a291 = a290 -let a292 = a291 -let a293 = a292 -let a294 = a293 -let a295 = a294 -let a296 = a295 -let a297 = a296 -let a298 = a297 -let a299 = a298 -let a300 = a299 -let a301 = a300 -let a302 = a301 -let a303 = a302 -let a304 = a303 -let a305 = a304 -let a306 = a305 -let a307 = a306 -let a308 = a307 -let a309 = a308 -let a310 = a309 -let a311 = a310 -let a312 = a311 -let a313 = a312 -let a314 = a313 -let a315 = a314 -let a316 = a315 -let a317 = a316 -let a318 = a317 -let a319 = a318 -let a320 = a319 -let a321 = a320 -let a322 = a321 -let a323 = a322 -let a324 = a323 -let a325 = a324 -let a326 = a325 -let a327 = a326 -let a328 = a327 -let a329 = a328 -let a330 = a329 -let a331 = a330 -let a332 = a331 -let a333 = a332 -let a334 = a333 -let a335 = a334 -let a336 = a335 -let a337 = a336 -let a338 = a337 -let a339 = a338 -let a340 = a339 -let a341 = a340 -let a342 = a341 -let a343 = a342 -let a344 = a343 -let a345 = a344 -let a346 = a345 -let a347 = a346 -let a348 = a347 -let a349 = a348 -let a350 = a349 -let a351 = a350 -let a352 = a351 -let a353 = a352 -let a354 = a353 -let a355 = a354 -let a356 = a355 -let a357 = a356 -let a358 = a357 -let a359 = a358 -let a360 = a359 -let a361 = a360 -let a362 = a361 -let a363 = a362 -let a364 = a363 -let a365 = a364 -let a366 = a365 -let a367 = a366 -let a368 = a367 -let a369 = a368 -let a370 = a369 -let a371 = a370 -let a372 = a371 -let a373 = a372 -let a374 = a373 -let a375 = a374 -let a376 = a375 -let a377 = a376 -let a378 = a377 -let a379 = a378 -let a380 = a379 -let a381 = a380 -let a382 = a381 -let a383 = a382 -let a384 = a383 -let a385 = a384 -let a386 = a385 -let a387 = a386 -let a388 = a387 -let a389 = a388 -let a390 = a389 -let a391 = a390 -let a392 = a391 -let a393 = a392 -let a394 = a393 -let a395 = a394 -let a396 = a395 -let a397 = a396 -let a398 = a397 -let a399 = a398 -let a400 = a399 -let a401 = a400 -let a402 = a401 -let a403 = a402 -let a404 = a403 -let a405 = a404 -let a406 = a405 -let a407 = a406 -let a408 = a407 -let a409 = a408 -let a410 = a409 -let a411 = a410 -let a412 = a411 -let a413 = a412 -let a414 = a413 -let a415 = a414 -let a416 = a415 -let a417 = a416 -let a418 = a417 -let a419 = a418 -let a420 = a419 -let a421 = a420 -let a422 = a421 -let a423 = a422 -let a424 = a423 -let a425 = a424 -let a426 = a425 -let a427 = a426 -let a428 = a427 -let a429 = a428 -let a430 = a429 -let a431 = a430 -let a432 = a431 -let a433 = a432 -let a434 = a433 -let a435 = a434 -let a436 = a435 -let a437 = a436 -let a438 = a437 -let a439 = a438 -let a440 = a439 -let a441 = a440 -let a442 = a441 -let a443 = a442 -let a444 = a443 -let a445 = a444 -let a446 = a445 -let a447 = a446 -let a448 = a447 -let a449 = a448 -let a450 = a449 -let a451 = a450 -let a452 = a451 -let a453 = a452 -let a454 = a453 -let a455 = a454 -let a456 = a455 -let a457 = a456 -let a458 = a457 -let a459 = a458 -let a460 = a459 -let a461 = a460 -let a462 = a461 -let a463 = a462 -let a464 = a463 -let a465 = a464 -let a466 = a465 -let a467 = a466 -let a468 = a467 -let a469 = a468 -let a470 = a469 -let a471 = a470 -let a472 = a471 -let a473 = a472 -let a474 = a473 -let a475 = a474 -let a476 = a475 -let a477 = a476 -let a478 = a477 -let a479 = a478 -let a480 = a479 -let a481 = a480 -let a482 = a481 -let a483 = a482 -let a484 = a483 -let a485 = a484 -let a486 = a485 -let a487 = a486 -let a488 = a487 -let a489 = a488 -let a490 = a489 -let a491 = a490 -let a492 = a491 -let a493 = a492 -let a494 = a493 -let a495 = a494 -let a496 = a495 -let a497 = a496 -let a498 = a497 -let a499 = a498 -let a500 = a499 -let a501 = a500 -let a502 = a501 -let a503 = a502 -let a504 = a503 -let a505 = a504 -let a506 = a505 -let a507 = a506 -let a508 = a507 -let a509 = a508 -let a510 = a509 -let a511 = a510 -let a512 = a511 -let a513 = a512 -let a514 = a513 -let a515 = a514 -let a516 = a515 -let a517 = a516 -let a518 = a517 -let a519 = a518 -let a520 = a519 -let a521 = a520 -let a522 = a521 -let a523 = a522 -let a524 = a523 -let a525 = a524 -let a526 = a525 -let a527 = a526 -let a528 = a527 -let a529 = a528 -let a530 = a529 -let a531 = a530 -let a532 = a531 -let a533 = a532 -let a534 = a533 -let a535 = a534 -let a536 = a535 -let a537 = a536 -let a538 = a537 -let a539 = a538 -let a540 = a539 -let a541 = a540 -let a542 = a541 -let a543 = a542 -let a544 = a543 -let a545 = a544 -let a546 = a545 -let a547 = a546 -let a548 = a547 -let a549 = a548 -let a550 = a549 -let a551 = a550 -let a552 = a551 -let a553 = a552 -let a554 = a553 -let a555 = a554 -let a556 = a555 -let a557 = a556 -let a558 = a557 -let a559 = a558 -let a560 = a559 -let a561 = a560 -let a562 = a561 -let a563 = a562 -let a564 = a563 -let a565 = a564 -let a566 = a565 -let a567 = a566 -let a568 = a567 -let a569 = a568 -let a570 = a569 -let a571 = a570 -let a572 = a571 -let a573 = a572 -let a574 = a573 -let a575 = a574 -let a576 = a575 -let a577 = a576 -let a578 = a577 -let a579 = a578 -let a580 = a579 -let a581 = a580 -let a582 = a581 -let a583 = a582 -let a584 = a583 -let a585 = a584 -let a586 = a585 -let a587 = a586 -let a588 = a587 -let a589 = a588 -let a590 = a589 -let a591 = a590 -let a592 = a591 -let a593 = a592 -let a594 = a593 -let a595 = a594 -let a596 = a595 -let a597 = a596 -let a598 = a597 -let a599 = a598 -let a600 = a599 -let a601 = a600 -let a602 = a601 -let a603 = a602 -let a604 = a603 -let a605 = a604 -let a606 = a605 -let a607 = a606 -let a608 = a607 -let a609 = a608 -let a610 = a609 -let a611 = a610 -let a612 = a611 -let a613 = a612 -let a614 = a613 -let a615 = a614 -let a616 = a615 -let a617 = a616 -let a618 = a617 -let a619 = a618 -let a620 = a619 -let a621 = a620 -let a622 = a621 -let a623 = a622 -let a624 = a623 -let a625 = a624 -let a626 = a625 -let a627 = a626 -let a628 = a627 -let a629 = a628 -let a630 = a629 -let a631 = a630 -let a632 = a631 -let a633 = a632 -let a634 = a633 -let a635 = a634 -let a636 = a635 -let a637 = a636 -let a638 = a637 -let a639 = a638 -let a640 = a639 -let a641 = a640 -let a642 = a641 -let a643 = a642 -let a644 = a643 -let a645 = a644 -let a646 = a645 -let a647 = a646 -let a648 = a647 -let a649 = a648 -let a650 = a649 -let a651 = a650 -let a652 = a651 -let a653 = a652 -let a654 = a653 -let a655 = a654 -let a656 = a655 -let a657 = a656 -let a658 = a657 -let a659 = a658 -let a660 = a659 -let a661 = a660 -let a662 = a661 -let a663 = a662 -let a664 = a663 -let a665 = a664 -let a666 = a665 -let a667 = a666 -let a668 = a667 -let a669 = a668 -let a670 = a669 -let a671 = a670 -let a672 = a671 -let a673 = a672 -let a674 = a673 -let a675 = a674 -let a676 = a675 -let a677 = a676 -let a678 = a677 -let a679 = a678 -let a680 = a679 -let a681 = a680 -let a682 = a681 -let a683 = a682 -let a684 = a683 -let a685 = a684 -let a686 = a685 -let a687 = a686 -let a688 = a687 -let a689 = a688 -let a690 = a689 -let a691 = a690 -let a692 = a691 -let a693 = a692 -let a694 = a693 -let a695 = a694 -let a696 = a695 -let a697 = a696 -let a698 = a697 -let a699 = a698 -let a700 = a699 -let a701 = a700 -let a702 = a701 -let a703 = a702 -let a704 = a703 -let a705 = a704 -let a706 = a705 -let a707 = a706 -let a708 = a707 -let a709 = a708 -let a710 = a709 -let a711 = a710 -let a712 = a711 -let a713 = a712 -let a714 = a713 -let a715 = a714 -let a716 = a715 -let a717 = a716 -let a718 = a717 -let a719 = a718 -let a720 = a719 -let a721 = a720 -let a722 = a721 -let a723 = a722 -let a724 = a723 -let a725 = a724 -let a726 = a725 -let a727 = a726 -let a728 = a727 -let a729 = a728 -let a730 = a729 -let a731 = a730 -let a732 = a731 -let a733 = a732 -let a734 = a733 -let a735 = a734 -let a736 = a735 -let a737 = a736 -let a738 = a737 -let a739 = a738 -let a740 = a739 -let a741 = a740 -let a742 = a741 -let a743 = a742 -let a744 = a743 -let a745 = a744 -let a746 = a745 -let a747 = a746 -let a748 = a747 -let a749 = a748 -let a750 = a749 -let a751 = a750 -let a752 = a751 -let a753 = a752 -let a754 = a753 -let a755 = a754 -let a756 = a755 -let a757 = a756 -let a758 = a757 -let a759 = a758 -let a760 = a759 -let a761 = a760 -let a762 = a761 -let a763 = a762 -let a764 = a763 -let a765 = a764 -let a766 = a765 -let a767 = a766 -let a768 = a767 -let a769 = a768 -let a770 = a769 -let a771 = a770 -let a772 = a771 -let a773 = a772 -let a774 = a773 -let a775 = a774 -let a776 = a775 -let a777 = a776 -let a778 = a777 -let a779 = a778 -let a780 = a779 -let a781 = a780 -let a782 = a781 -let a783 = a782 -let a784 = a783 -let a785 = a784 -let a786 = a785 -let a787 = a786 -let a788 = a787 -let a789 = a788 -let a790 = a789 -let a791 = a790 -let a792 = a791 -let a793 = a792 -let a794 = a793 -let a795 = a794 -let a796 = a795 -let a797 = a796 -let a798 = a797 -let a799 = a798 -let a800 = a799 -let a801 = a800 -let a802 = a801 -let a803 = a802 -let a804 = a803 -let a805 = a804 -let a806 = a805 -let a807 = a806 -let a808 = a807 -let a809 = a808 -let a810 = a809 -let a811 = a810 -let a812 = a811 -let a813 = a812 -let a814 = a813 -let a815 = a814 -let a816 = a815 -let a817 = a816 -let a818 = a817 -let a819 = a818 -let a820 = a819 -let a821 = a820 -let a822 = a821 -let a823 = a822 -let a824 = a823 -let a825 = a824 -let a826 = a825 -let a827 = a826 -let a828 = a827 -let a829 = a828 -let a830 = a829 -let a831 = a830 -let a832 = a831 -let a833 = a832 -let a834 = a833 -let a835 = a834 -let a836 = a835 -let a837 = a836 -let a838 = a837 -let a839 = a838 -let a840 = a839 -let a841 = a840 -let a842 = a841 -let a843 = a842 -let a844 = a843 -let a845 = a844 -let a846 = a845 -let a847 = a846 -let a848 = a847 -let a849 = a848 -let a850 = a849 -let a851 = a850 -let a852 = a851 -let a853 = a852 -let a854 = a853 -let a855 = a854 -let a856 = a855 -let a857 = a856 -let a858 = a857 -let a859 = a858 -let a860 = a859 -let a861 = a860 -let a862 = a861 -let a863 = a862 -let a864 = a863 -let a865 = a864 -let a866 = a865 -let a867 = a866 -let a868 = a867 -let a869 = a868 -let a870 = a869 -let a871 = a870 -let a872 = a871 -let a873 = a872 -let a874 = a873 -let a875 = a874 -let a876 = a875 -let a877 = a876 -let a878 = a877 -let a879 = a878 -let a880 = a879 -let a881 = a880 -let a882 = a881 -let a883 = a882 -let a884 = a883 -let a885 = a884 -let a886 = a885 -let a887 = a886 -let a888 = a887 -let a889 = a888 -let a890 = a889 -let a891 = a890 -let a892 = a891 -let a893 = a892 -let a894 = a893 -let a895 = a894 -let a896 = a895 -let a897 = a896 -let a898 = a897 -let a899 = a898 -let a900 = a899 -let a901 = a900 -let a902 = a901 -let a903 = a902 -let a904 = a903 -let a905 = a904 -let a906 = a905 -let a907 = a906 -let a908 = a907 -let a909 = a908 -let a910 = a909 -let a911 = a910 -let a912 = a911 -let a913 = a912 -let a914 = a913 -let a915 = a914 -let a916 = a915 -let a917 = a916 -let a918 = a917 -let a919 = a918 -let a920 = a919 -let a921 = a920 -let a922 = a921 -let a923 = a922 -let a924 = a923 -let a925 = a924 -let a926 = a925 -let a927 = a926 -let a928 = a927 -let a929 = a928 -let a930 = a929 -let a931 = a930 -let a932 = a931 -let a933 = a932 -let a934 = a933 -let a935 = a934 -let a936 = a935 -let a937 = a936 -let a938 = a937 -let a939 = a938 -let a940 = a939 -let a941 = a940 -let a942 = a941 -let a943 = a942 -let a944 = a943 -let a945 = a944 -let a946 = a945 -let a947 = a946 -let a948 = a947 -let a949 = a948 -let a950 = a949 -let a951 = a950 -let a952 = a951 -let a953 = a952 -let a954 = a953 -let a955 = a954 -let a956 = a955 -let a957 = a956 -let a958 = a957 -let a959 = a958 -let a960 = a959 -let a961 = a960 -let a962 = a961 -let a963 = a962 -let a964 = a963 -let a965 = a964 -let a966 = a965 -let a967 = a966 -let a968 = a967 -let a969 = a968 -let a970 = a969 -let a971 = a970 -let a972 = a971 -let a973 = a972 -let a974 = a973 -let a975 = a974 -let a976 = a975 -let a977 = a976 -let a978 = a977 -let a979 = a978 -let a980 = a979 -let a981 = a980 -let a982 = a981 -let a983 = a982 -let a984 = a983 -let a985 = a984 -let a986 = a985 -let a987 = a986 -let a988 = a987 -let a989 = a988 -let a990 = a989 -let a991 = a990 -let a992 = a991 -let a993 = a992 -let a994 = a993 -let a995 = a994 -let a996 = a995 -let a997 = a996 -let a998 = a997 -let a999 = a998 diff --git a/tools/lsp-bench/projects/one_small_file/one_small_file.mligo b/tools/lsp-bench/projects/one_small_file/one_small_file.mligo deleted file mode 100644 index 567cbc5d68..0000000000 --- a/tools/lsp-bench/projects/one_small_file/one_small_file.mligo +++ /dev/null @@ -1,7 +0,0 @@ -let a : int = Option.unopt None - -let i_am_type_error = (1 : string) - -let t = List.length [a] - -let z = t + a diff --git a/tools/lsp-bench/projects/submodules/checker b/tools/lsp-bench/projects/submodules/checker deleted file mode 160000 index 0e43aef9d6..0000000000 --- a/tools/lsp-bench/projects/submodules/checker +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0e43aef9d64fc5f4e0b0952f11d252c8e91820b2 diff --git a/tools/lsp-bench/src/Bench.hs b/tools/lsp-bench/src/Bench.hs deleted file mode 100644 index 62e6c400e4..0000000000 --- a/tools/lsp-bench/src/Bench.hs +++ /dev/null @@ -1,26 +0,0 @@ -{-# OPTIONS_GHC -Wno-orphans #-} -module Bench (main) where - -import Universum - -import Criterion.Main - -import Bench.Completion -import Bench.Complex -import Bench.Diagnostics -import Bench.Hovers -import Bench.References - --- Makefile contains instructions for launching benchmarks. --- Keep in mind that `benchLspSession` takes about 250ms for an empty session. --- Close VSCode to get more accurate results (more free RAM, less random CPU usage). -main :: IO () -main = defaultMain - $ bench_simple_hovers - <> bench_sequence_hovers - <> bench_simple_diagnostics - <> bench_diagnostics_edits - <> bench_simple_references - <> bench_sequence_references - <> bench_simple_completions - <> bench_complex diff --git a/tools/lsp-bench/src/Bench/Completion.hs b/tools/lsp-bench/src/Bench/Completion.hs deleted file mode 100644 index df84af0450..0000000000 --- a/tools/lsp-bench/src/Bench/Completion.hs +++ /dev/null @@ -1,113 +0,0 @@ -module Bench.Completion - ( CompletionRequest (..), - requestCompletion, - bench_simple_completions, - ) -where - -import Universum hiding ((^.)) - -import Bench.Util -import Criterion -import Language.LSP.Protocol.Lens qualified as LspLens -import Language.LSP.Protocol.Types qualified as LSP -import Language.LSP.Test qualified as LSP -import Lens.Micro ((^.)) - - -data CompletionRequest = CompletionRequest - { -- | Absolute file path to ligo project - crProject :: FilePath, - -- | path to file (relative to project) - crFile :: Doc, - -- | line/column as in VSCode (cursor is at the start of the word we want to get completion) - crPos :: (LSP.UInt, LSP.UInt), - -- | What completions do we expect? - crExpectedSubset :: [Text] - } - deriving stock (Show) - -requestCompletion :: CompletionRequest -> LSP.Session [LSP.CompletionItem] -requestCompletion cr@CompletionRequest {..} = do - doc <- getDoc crFile - completions <- LSP.getCompletions doc (LSP.Position (line - 1) (col - 1)) - mapM_ (checkContains completions) crExpectedSubset - return completions - where - (line, col) = crPos - - checkContains completions element = - unless (any ((== element) . (^. LspLens.label)) completions) - $ fail (toString element <> " not found in completions for " <> show cr) - - -simpleCompletionBench :: CompletionRequest -> Benchmark -simpleCompletionBench cr@CompletionRequest {..} = - benchLspSession OnDocumentLink - (show crFile <> "/" <> show crPos) - crProject - $ requestCompletion cr - -completionsOneSmallFile :: [CompletionRequest] -completionsOneSmallFile = - [ CompletionRequest - { crProject = projectWithOneSmallFile - , crFile = FileDoc "one_small_file.mligo" - , crPos = (5,14) - , crExpectedSubset = ["cons", "fold"] - } - , CompletionRequest - { crProject = projectWithOneSmallFile - , crFile = FileDoc "one_small_file.mligo" - , crPos = (7,14) - , crExpectedSubset = ["abs", "assert"] - } - ] - -completionsOneBigFile :: [CompletionRequest] -completionsOneBigFile = - [ CompletionRequest - { crProject = projectWithOneBigFile - , crFile = FileDoc "one_big_file.mligo" - , crPos = (9,14) - , crExpectedSubset = ["a005", "a007"] - } - , CompletionRequest - { crProject = projectWithOneBigFile - , crFile = FileDoc "one_big_file.mligo" - , crPos = (777,14) - , crExpectedSubset = ["a771", "a772"] - } - ] - -completionsChecker :: [CompletionRequest] -completionsChecker = - [ - CompletionRequest - { crProject = projectChecker - , crFile = FileDoc "avl.mligo" - , crPos = (637,23) - , crExpectedSubset = ["branch", "balance_bottom_up", "bytes"] - } - , CompletionRequest - { crProject = projectChecker - , crFile = FileDoc "fa2Ledger.mligo" - , crPos = (65,40) - , crExpectedSubset = ["ledger", "ledger_issue", "ledger_withdraw"] - } - , CompletionRequest - { crProject = projectChecker - , crFile = FileDoc "sliceList.mligo" - , crPos = (66,30) - , crExpectedSubset = ["auctions", "avl_del"] - } - ] - -bench_simple_completions :: [Benchmark] -bench_simple_completions = - [ bgroup - "Completions/simple" - [ simpleCompletionBench cr - | cr <- completionsOneSmallFile <> completionsOneBigFile <> completionsChecker - ] - ] diff --git a/tools/lsp-bench/src/Bench/Complex.hs b/tools/lsp-bench/src/Bench/Complex.hs deleted file mode 100644 index 5b69b68fa0..0000000000 --- a/tools/lsp-bench/src/Bench/Complex.hs +++ /dev/null @@ -1,62 +0,0 @@ -module Bench.Complex - ( bench_complex, - ) -where - -import Universum - -import Bench.References -import Bench.Util -import Criterion - -bench_complex :: [Benchmark] -bench_complex = - [ bgroup - "Complex benchmarks" - [ complexBenchBigFileReferencesEdits - , complexBenchBigFileReferencesKeystrokes - ] - ] - --- we need reindexing here --- Optionally we can simulate keystrokes. It's a bit expensive itself, --- but we could still see the impact of our optimisations. --- If reindexing happen on each update (and not before references request), we do a lot extra work - -complexBenchBigFileReferencesEdits, complexBenchBigFileReferencesKeystrokes :: Benchmark -(complexBenchBigFileReferencesEdits, complexBenchBigFileReferencesKeystrokes) = - let (_, _, edits, keystrokes) = withBothEditsAndKeystrokes complexBenchBigFileReferences in - (edits, keystrokes) - where - complexBenchBigFileReferences _ insertFuncName insert = - benchLspSession OnDocumentLink ("one_big_file.mligo/" <> insertFuncName) projectWithOneBigFile $ do - doc <- OpenedDoc <$> openLigoDoc "one_big_file.mligo" - let rrFile = doc - rrProject = projectWithOneBigFile - refs1 <- - requestReferences $ - ReferencesRequest -- a022 - { rrProject, - rrFile, - rrPos = (24, 15), - rrExpectedAmount = 2 - } - insert doc (1001, 1) "let q1 = 1234 + a023" - refs2 <- - requestReferences $ - ReferencesRequest -- a023 - { rrProject, - rrFile, - rrPos = (25, 15), - rrExpectedAmount = 3 - } - insert doc (1002, 1) "let q2 = 5678 + a024 + a024" - refs3 <- - requestReferences $ - ReferencesRequest -- a024 - { rrProject, - rrFile, - rrPos = (26, 15), - rrExpectedAmount = 4 - } - pure (refs1, refs2, refs3) diff --git a/tools/lsp-bench/src/Bench/Diagnostics.hs b/tools/lsp-bench/src/Bench/Diagnostics.hs deleted file mode 100644 index b33335e680..0000000000 --- a/tools/lsp-bench/src/Bench/Diagnostics.hs +++ /dev/null @@ -1,158 +0,0 @@ -module Bench.Diagnostics (waitDiagnostics, bench_simple_diagnostics, bench_diagnostics_edits) where - -import Universum hiding ((^.)) - -import Criterion -import Data.Default -import Language.LSP.Protocol.Types qualified as LSP -import Language.LSP.Test qualified as LSP - -import Bench.Util - -data ExpectedDiagnosticsNumber = ExpectedDiagnosticsNumber - { expectedErrors :: Int - , expectedWarnings :: Int - , expectedInfos :: Int - , expectedHints :: Int - } deriving (Eq, Show) - -instance Default ExpectedDiagnosticsNumber - where - def = ExpectedDiagnosticsNumber 0 0 0 0 - -data DiagnosticsRequest = DiagnosticsRequest - { drProject :: FilePath - -- ^ Absolute file path to ligo project - , drFile :: Doc - -- ^ We'll open a doc so LSP server will process us and give us diagnostics - , drExpected :: Maybe ExpectedDiagnosticsNumber - -- ^ How many errors/warninbgs/etc we expect? @Nothing@ if we don't want to make assertions - } deriving Show - -waitDiagnostics :: DiagnosticsPullingMethod -> DiagnosticsRequest -> LSP.Session [LSP.Diagnostic] -waitDiagnostics pullingMethod dr@DiagnosticsRequest {..} = do - tdi <- getDoc drFile -- We just want to trigger TextDocumentDidOpen in case the doc was not opened before - diagnostics <- pullDiagnostics tdi pullingMethod - whenJust drExpected $ \expectedNumbers -> - let diagnosticTypes :: [(String, ExpectedDiagnosticsNumber -> Int, LSP.DiagnosticSeverity)] - diagnosticTypes = - [ ("error", expectedErrors, LSP.DiagnosticSeverity_Error), - ("warning", expectedWarnings, LSP.DiagnosticSeverity_Warning), - ("info", expectedInfos, LSP.DiagnosticSeverity_Information), - ("hint", expectedHints, LSP.DiagnosticSeverity_Hint) - ] - in for_ diagnosticTypes $ \(name, f, s) -> - let actual = length $ filter (\x -> x._severity == Just s) diagnostics - expected = f expectedNumbers - in unless (actual == expected) $ - fail $ - "Request " - <> show dr - <> " returned unexpected amount of " - <> name - <> "s: " - <> show actual - return diagnostics - -simpleDiagnosticsBench :: DiagnosticsRequest -> Benchmark -simpleDiagnosticsBench dr@DiagnosticsRequest {..} = - -- Pulling method in these benchmarks has non effect - -- since we don't do any modifications in the target file - benchLspSession - OnDocumentLink - (show drFile) - drProject - do waitDiagnostics OnDocumentLink dr - -bench_simple_diagnostics :: [Benchmark] -bench_simple_diagnostics = - [ bgroup "Diagnostics/simple" - [ simpleDiagnosticsBench dr - | dr <- - [ DiagnosticsRequest - { drProject = projectWithOneSmallFile - , drFile = FileDoc "one_small_file.mligo" - , drExpected = Just $ def {expectedErrors = 1} -- i_am_type_error - } - , DiagnosticsRequest - { drProject = projectWithOneBigFile - , drFile = FileDoc "one_big_file.mligo" - , drExpected = Just def - } - , DiagnosticsRequest - { drProject = projectChecker - , drFile = FileDoc "sliceList.mligo" - , drExpected = Just def - } - ] - ] - ] - --- Sorry for so long lines -benchDiagnosticsOneSmallFileEditsOnDoc, benchDiagnosticsOneSmallFileKeystrokesOnDoc, benchDiagnosticsOneSmallFileEditsOnDocumentLink, benchDiagnosticsOneSmallFileKeystrokesOnDocumentLink :: Benchmark -(benchDiagnosticsOneSmallFileEditsOnDoc, benchDiagnosticsOneSmallFileKeystrokesOnDoc, benchDiagnosticsOneSmallFileEditsOnDocumentLink, benchDiagnosticsOneSmallFileKeystrokesOnDocumentLink) = - withBothEditsAndKeystrokes benchDiagnosticsOneSmallFile - where - benchDiagnosticsOneSmallFile pullingMethod insertFuncName insert = - benchLspSession pullingMethod ("one_small_file.mligo/" <> insertFuncName <> "/" <> show pullingMethod) projectWithOneSmallFile $ do - doc <- OpenedDoc <$> openLigoDoc "one_small_file.mligo" - let drFile = doc - drProject = projectWithOneSmallFile - diags1 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 1}} -- i_am_type_error - insert doc (8,1) "let the_type_error = (2 : string)" - diags2 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 2}} - insert doc (4,1) "let another_type_error = (3 : string)" - diags3 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 3}} - pure (diags1, diags2, diags3) - -benchDiagnosticsOneBigFileEditsOnDoc, benchDiagnosticsOneBigFileKeystrokesOnDoc, benchDiagnosticsOneBigFileEditsOnDocumentLink, benchDiagnosticsOneBigFileKeystrokesOnDocumentLink :: Benchmark -(benchDiagnosticsOneBigFileEditsOnDoc, benchDiagnosticsOneBigFileKeystrokesOnDoc, benchDiagnosticsOneBigFileEditsOnDocumentLink, benchDiagnosticsOneBigFileKeystrokesOnDocumentLink) = - withBothEditsAndKeystrokes benchDiagnosticsOneSmallFile - where - benchDiagnosticsOneSmallFile pullingMethod insertFuncName insert = - benchLspSession pullingMethod ("one_big_file.mligo/" <> insertFuncName <> "/" <> show pullingMethod) projectWithOneBigFile $ do - doc <- OpenedDoc <$> openLigoDoc "one_big_file.mligo" - let drFile = doc - drProject = projectWithOneBigFile - diags1 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 0}} - insert doc (8,1) "let the_type_error = (2 : string)" - diags2 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 1}} - insert doc (4,1) "let another_type_error = (3 : string)" - diags3 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 2}} - pure (diags1, diags2, diags3) - -benchDiagnosticsCheckerEditsOnDocumentLink, benchDiagnosticsCheckerKeystrokesOnDocumentLink :: Benchmark -(benchDiagnosticsCheckerEditsOnDocumentLink, benchDiagnosticsCheckerKeystrokesOnDocumentLink) = - let (_, _, edits, keystrokes) = withBothEditsAndKeystrokes benchDiagnosticsChecker - in (edits, keystrokes) - where - benchDiagnosticsChecker _ insertFuncName insert = - benchLspSession OnDocumentLink ("avl.mligo/" <> insertFuncName) projectChecker do - let pullingMethod = OnDocumentLink - doc <- OpenedDoc <$> openLigoDoc "avl.mligo" - let drFile = doc - drProject = projectChecker - diags1 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 0}} - insert doc (703,1) "let the_type_error = (2 : string)" - diags2 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 1}} - insert doc (342,1) "let another_type_error = (3 : string)" - diags3 <- waitDiagnostics pullingMethod DiagnosticsRequest {drFile, drProject, drExpected = Just $ def {expectedErrors = 2}} - pure (diags1, diags2, diags3) - - -bench_diagnostics_edits :: [Benchmark] -bench_diagnostics_edits = - [ bgroup - "Diagnostics/edits" - [ benchDiagnosticsOneSmallFileEditsOnDoc - , benchDiagnosticsOneSmallFileKeystrokesOnDoc - , benchDiagnosticsOneBigFileEditsOnDoc - , benchDiagnosticsOneBigFileKeystrokesOnDoc - , benchDiagnosticsOneSmallFileEditsOnDocumentLink - , benchDiagnosticsOneSmallFileKeystrokesOnDocumentLink - , benchDiagnosticsOneBigFileEditsOnDocumentLink - , benchDiagnosticsOneBigFileKeystrokesOnDocumentLink - , benchDiagnosticsCheckerEditsOnDocumentLink - , benchDiagnosticsCheckerKeystrokesOnDocumentLink - ] - ] diff --git a/tools/lsp-bench/src/Bench/Hovers.hs b/tools/lsp-bench/src/Bench/Hovers.hs deleted file mode 100644 index c3b88de2e5..0000000000 --- a/tools/lsp-bench/src/Bench/Hovers.hs +++ /dev/null @@ -1,140 +0,0 @@ -{-# OPTIONS_GHC -Wno-orphans #-} -{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} -{-# OPTIONS_GHC -Wno-deprecations #-} - -module Bench.Hovers - ( HoverRequest (..), - requestHover, - bench_simple_hovers, - bench_sequence_hovers, - ) -where - -import Universum - -import Bench.Util -import Criterion -import Data.Row.Records (Label (..), pattern (:+), pattern (:==)) -import Data.Text qualified as T -import Language.LSP.Protocol.Types qualified as LSP -import Language.LSP.Test qualified as LSP - -data HoverRequest = HoverRequest - { -- | Absolute file path to ligo project - hrProject :: FilePath, - -- | path to file (relative to project) - hrFile :: Doc, - -- | line/column as in VSCode (cursor is at the start of the word we want to get hover) - hrPos :: (LSP.UInt, LSP.UInt), - -- | Thing that we're hovering. To check that position is correct, we're checking that this is a - -- prefix of the hover content - hrExpectedName :: Text - } - deriving stock (Show) - -requestHover :: HoverRequest -> LSP.Session LSP.Hover -requestHover hr@HoverRequest {..} = do - doc <- getDoc hrFile - LSP.getHover doc (LSP.Position (line - 1) (col - 1)) >>= \case - Nothing -> fail $ "No hover for " <> show hr - Just result@(LSP.Hover {_contents = LSP.InR (LSP.InR [LSP.MarkedString (LSP.InR ((_ :: Label "language") :== "cameligo" :+ _ :== msg))])}) - | hrExpectedName `T.isPrefixOf` msg -> return result - otherHover -> fail $ "Hover for " <> show hr <> " is malformed (expected MarkedString): " <> show otherHover - where - (line, col) = hrPos - -bench_simple_hovers :: [Benchmark] -bench_simple_hovers = - [ bgroup - "Hovers/simple" - [ simpleHoverBench hr - | hr <- hoversOneBigFile <> hoversChecker - ] - ] - -simpleHoverBench :: HoverRequest -> Benchmark -simpleHoverBench hr@HoverRequest {..} = - benchLspSession OnDocumentLink - (show hrFile <> "/" <> toString hrExpectedName) - hrProject - $ requestHover hr - -hoversOneBigFile :: [HoverRequest] -hoversOneBigFile = - [ HoverRequest - { hrProject = projectWithOneBigFile, - hrFile = FileDoc "one_big_file.mligo", - hrPos = (2, 12), - hrExpectedName = "a000" - }, - HoverRequest - { hrProject = projectWithOneBigFile, - hrFile = FileDoc "one_big_file.mligo", - hrPos = (103, 12), - hrExpectedName = "a101" - }, - HoverRequest - { hrProject = projectWithOneBigFile, - hrFile = FileDoc "one_big_file.mligo", - hrPos = (604, 12), - hrExpectedName = "a602" - }, - HoverRequest - { hrProject = projectWithOneBigFile, - hrFile = FileDoc "one_big_file.mligo", - hrPos = (905, 12), - hrExpectedName = "a903" - } - ] - -hoversChecker :: [HoverRequest] -hoversChecker = - [ - HoverRequest - { hrProject = projectChecker, - hrFile = FileDoc "sliceList.mligo", - hrPos = (29, 7), - hrExpectedName = "slice_list_bounds" - }, - HoverRequest - { hrProject = projectChecker, - hrFile = FileDoc "sliceList.mligo", - hrPos = (192, 17), - hrExpectedName = "storage" - }, - HoverRequest - { hrProject = projectChecker, - hrFile = FileDoc "sliceList.mligo", - hrPos = (163, 55), - hrExpectedName = "slice_list_youngest_ptr" - }, - HoverRequest - { hrProject = projectChecker, - hrFile = FileDoc "sliceList.mligo", - hrPos = (144, 21), - hrExpectedName = "slice_list_remove" - } - ] - --- request many hovers from a file in one session --- to check that our caching works correctly. It's expected that --- the result will be close to case when we ask for one hover. -bench_sequence_hovers :: [Benchmark] -bench_sequence_hovers = - [ benchSequence BenchmarkSequence - { bsName = "Hovers/sequence" - , bsRequests = hoversOneBigFile - , bsGetRequestDoc = hrFile - , bsSetRequestDoc = \doc hr -> hr {hrFile = doc} - , bsRunRequest = requestHover - , bsProject = projectWithOneBigFile - } - , benchSequence BenchmarkSequence - { bsName = "Hovers/sequence" - , bsRequests = hoversChecker - , bsGetRequestDoc = hrFile - , bsSetRequestDoc = \doc hr -> hr {hrFile = doc} - , bsRunRequest = requestHover - , bsProject = projectChecker - } - ] diff --git a/tools/lsp-bench/src/Bench/References.hs b/tools/lsp-bench/src/Bench/References.hs deleted file mode 100644 index 165527e4c9..0000000000 --- a/tools/lsp-bench/src/Bench/References.hs +++ /dev/null @@ -1,119 +0,0 @@ -module Bench.References - ( ReferencesRequest(..) - , requestReferences - , bench_simple_references - , bench_sequence_references - ) where - -import Universum - -import Criterion -import Language.LSP.Protocol.Types qualified as LSP -import Language.LSP.Test qualified as LSP - -import Bench.Util - -data ReferencesRequest = ReferencesRequest - { rrProject :: FilePath - -- ^ Absolute file path to ligo project - , rrFile :: Doc - -- ^ path to file (relative to project) - , rrPos :: (LSP.UInt, LSP.UInt) - -- ^ line/column as in VSCode (cursor is at the start of the word we want to get references) - , rrExpectedAmount :: Int - -- ^ number of references we expect, including definition - } deriving stock Show - -requestReferences :: ReferencesRequest -> LSP.Session [LSP.Location] -requestReferences rr@ReferencesRequest{..} = do - doc <- getDoc rrFile - refs <- LSP.getReferences doc (LSP.Position (line - 1) (col - 1)) True - if length refs == rrExpectedAmount - then return refs - else fail $ "Request " <> show rr <> " returned unexpected amount of references: " - <> show (length refs) - where - (line, col) = rrPos - -bench_simple_references :: [Benchmark] -bench_simple_references = - [ bgroup "References/simple" - [ simpleReferencesBench rr - | rr <- referencesOneBigFile <> referencesChecker - ] - ] - -simpleReferencesBench :: ReferencesRequest -> Benchmark -simpleReferencesBench rr@ReferencesRequest{..} = - benchLspSession OnDocumentLink - (show rrFile <> "/" <> show rrPos) - rrProject - $ requestReferences rr - -referencesOneBigFile :: [ReferencesRequest] -referencesOneBigFile = - [ ReferencesRequest -- a012 - { rrProject = projectWithOneBigFile - , rrFile = FileDoc "one_big_file.mligo" - , rrPos = (13, 5) - , rrExpectedAmount = 2 - } - , ReferencesRequest -- a013 - { rrProject = projectWithOneBigFile - , rrFile = FileDoc "one_big_file.mligo" - , rrPos = (13, 5) - , rrExpectedAmount = 2 - } - , ReferencesRequest -- a014 - { rrProject = projectWithOneBigFile - , rrFile = FileDoc "one_big_file.mligo" - , rrPos = (13, 5) - , rrExpectedAmount = 2 - } - ] - -referencesChecker :: [ReferencesRequest] -referencesChecker = - [ - ReferencesRequest -- ref_peek_front - { rrProject = projectChecker - , rrFile = FileDoc "avl.mligo" - , rrPos = (535, 9) - , rrExpectedAmount = 4 - } - , ReferencesRequest -- parent_ptr - { rrProject = projectChecker - , rrFile = FileDoc "avl.mligo" - , rrPos = (477, 7) - , rrExpectedAmount = 6 - } - , ReferencesRequest -- left - { rrProject = projectChecker - , rrFile = FileDoc "avl.mligo" - , rrPos = (359, 7) - , rrExpectedAmount = 7 - } - ] - --- request many references from a file in one session --- to check that our caching works correctly. It's expected that --- the result will be close to case when we ask for one reference. -bench_sequence_references :: [Benchmark] -bench_sequence_references = - [ benchSequence BenchmarkSequence - { bsName = "References/sequence" - , bsRequests = referencesOneBigFile - , bsGetRequestDoc = rrFile - , bsSetRequestDoc = \doc rr -> rr {rrFile = doc} - , bsRunRequest = requestReferences - , bsProject = projectWithOneBigFile - } - , benchSequence BenchmarkSequence - { bsName = "References/sequence" - , bsRequests = referencesChecker - , bsGetRequestDoc = rrFile - , bsSetRequestDoc = \doc rr -> rr {rrFile = doc} - , bsRunRequest = requestReferences - , bsProject = projectChecker - } - ] diff --git a/tools/lsp-bench/src/Bench/Util.hs b/tools/lsp-bench/src/Bench/Util.hs deleted file mode 100644 index 7b4f62ca24..0000000000 --- a/tools/lsp-bench/src/Bench/Util.hs +++ /dev/null @@ -1,191 +0,0 @@ -module Bench.Util - ( - benchLspSession, - getDoc, - Doc (..), - insertToDoc, - insertToDocKeystrokes, - openLigoDoc, - projectWithOneBigFile, - projectWithOneSmallFile, - projectChecker, - DiagnosticsPullingMethod(..), - pullDiagnostics, - withBothEditsAndKeystrokes, - BenchmarkSequence(..), - benchSequence, - ) -where - -import Prelude qualified -import Universum hiding ((^.)) - -import Criterion -import Data.Aeson qualified as Aeson -import Data.Aeson.QQ.Simple (aesonQQ) -import Data.Row.Records ((.+), (.==)) -import Language.LSP.Protocol.Capabilities qualified as LSP -import Language.LSP.Protocol.Lens qualified as LspLens -import Language.LSP.Protocol.Message qualified as LSP -import Language.LSP.Protocol.Types qualified as LSP -import Language.LSP.Test (SessionConfig (logStdErr, messageTimeout), lspConfig) -import Language.LSP.Test qualified as LSP -import Lens.Micro ((^.)) -import System.Directory (canonicalizePath) -import System.Environment (lookupEnv) -import System.IO.Unsafe (unsafePerformIO) - - --- one can set LIGO_LSP_TEST_EXE env var before testing/benchmarking to test a different lsp server --- with our requests -serverCommand :: String -serverCommand = - unsafePerformIO $ - fromMaybe "ligo lsp --disable-lsp-requests-logging all-capabilities" - <$> lookupEnv "LIGO_LSP_TEST_EXE" -{-# NOINLINE serverCommand #-} - -projectWithOneBigFile :: FilePath -projectWithOneBigFile = unsafePerformIO $ canonicalizePath "projects/one_big_file/" -{-# NOINLINE projectWithOneBigFile #-} - -projectWithOneSmallFile :: FilePath -projectWithOneSmallFile = unsafePerformIO $ canonicalizePath "projects/one_small_file/" -{-# NOINLINE projectWithOneSmallFile #-} - -projectChecker :: FilePath -projectChecker = unsafePerformIO $ canonicalizePath "projects/submodules/checker/src/" -{-# NOINLINE projectChecker #-} - -openLigoDoc :: FilePath -> LSP.Session LSP.TextDocumentIdentifier -openLigoDoc fp = LSP.openDoc fp "ligo" - -benchLspSession :: - (NFData a) => - DiagnosticsPullingMethod -> - String -> - FilePath -> - LSP.Session a -> - Benchmark -benchLspSession pullingMethod description project session = - bench description $ - nfIO $ - LSP.runSessionWithConfig - LSP.defaultConfig - { logStdErr = True - -- 10 minutes should be enough - , messageTimeout = 600 - , lspConfig - } - serverCommand - (LSP.capsForVersion $ LSP.LSPVersion 3 0) - project - session - where - lspConfig = - case pullingMethod of - OnDoc -> Just - [aesonQQ| - { - "ligoLanguageServer": { - "diagnosticsPullMode": "on doc update (can be slow)" - } - } - |] - OnDocumentLink -> Nothing - -getDoc :: Doc -> LSP.Session LSP.TextDocumentIdentifier -getDoc (OpenedDoc tdi) = pure tdi -getDoc (FileDoc path) = openLigoDoc path - -data Doc - = -- | Document on disc to be opened (path relative to project) - FileDoc String - | -- | Document that was already opened in this session - OpenedDoc LSP.TextDocumentIdentifier - deriving Eq - -instance Prelude.Show Doc where - show (FileDoc s) = s - show (OpenedDoc uri) = show uri - - -insertToDoc, insertToDocKeystrokes :: Doc -> (LSP.UInt, LSP.UInt) -> Text -> LSP.Session () -insertToDoc doc (line, col) text = - getDoc doc >>= \tdi -> - LSP.changeDoc tdi [LSP.TextDocumentContentChangeEvent $ LSP.InL $ #range .== LSP.Range pos pos .+ #rangeLength .== Nothing .+ #text .== text] - where - pos = LSP.Position (line - 1) (col - 1) - --- | Like insertToDoc but simulates typing -insertToDocKeystrokes doc (line, col) text = - getDoc doc >>= \tdi -> - for_ (Universum.zip (toString text) [col ..]) $ - \(char, activeCol) -> insertToDoc (OpenedDoc tdi) (line, activeCol) (one char) - -data DiagnosticsPullingMethod - = OnDoc - | OnDocumentLink - -instance Prelude.Show DiagnosticsPullingMethod where - show = \case - OnDoc -> "on_doc" - OnDocumentLink -> "on_document_link" - -{-# ANN pullDiagnostics ("HLint: ignore Redundant fmap" :: String) #-} -pullDiagnostics :: LSP.TextDocumentIdentifier -> DiagnosticsPullingMethod -> LSP.Session [LSP.Diagnostic] -pullDiagnostics tdi = \case - OnDoc -> do - _ <- let params = Aeson.Null in LSP.sendRequest (LSP.SMethod_CustomMethod $ Proxy @"DebugEcho") params - -- After we edited a document multiple times, the LSP server might produce multiple publish diagnostics - -- notifications - firstMessage <- LSP.waitForDiagnostics - otherDiagnosticMessages <- many LSP.publishDiagnosticsNotification - echoResponse <- LSP.response (LSP.SMethod_CustomMethod $ Proxy @"DebugEcho") - unless (echoResponse ^. LspLens.result == Right (Aeson.String "DebugEchoResponse")) - $ fail "Expected DebugEchoResponse" - case nonEmpty otherDiagnosticMessages of - Nothing -> pure firstMessage - Just messages -> pure $ last messages ^. (LspLens.params . LspLens.diagnostics) - OnDocumentLink -> do - _ <- let params = LSP.DocumentLinkParams Nothing Nothing tdi in LSP.sendRequest LSP.SMethod_TextDocumentDocumentLink params - firstMessage <- LSP.waitForDiagnostics - fmap nonEmpty (many LSP.publishDiagnosticsNotification) >>= \case - Nothing -> pure firstMessage - Just messages -> pure $ last messages ^. (LspLens.params . LspLens.diagnostics) - -withBothEditsAndKeystrokes - :: ( DiagnosticsPullingMethod - -> String - -> (Doc -> (LSP.UInt, LSP.UInt) -> Text -> LSP.Session ()) - -> a - ) -> (a,a,a,a) -withBothEditsAndKeystrokes f = - ( f OnDoc "edits" insertToDoc - , f OnDoc "keystrokes" insertToDocKeystrokes - , f OnDocumentLink "edits" insertToDoc - , f OnDocumentLink "keystrokes" insertToDocKeystrokes - ) - -data BenchmarkSequence :: Type -> Type where - BenchmarkSequence :: NFData a => - { bsName :: String - , bsRequests :: [request] - , bsGetRequestDoc :: request -> Doc - , bsSetRequestDoc :: Doc -> request -> request - , bsRunRequest :: request -> LSP.Session a - , bsProject :: FilePath - } -> BenchmarkSequence request - --- Runs multiple similar requests for one file (opening this file only once). -benchSequence :: BenchmarkSequence request -> Benchmark -benchSequence BenchmarkSequence {..} = - -- Picking "OnDocumentLink" here because it's faster. Other pulling methods - -- would be measured in diagnostics benches. - benchLspSession OnDocumentLink (bsName <> "/" <> file) bsProject $ do - doc <- getDoc (FileDoc file) - mapM (bsRunRequest . bsSetRequestDoc (OpenedDoc doc)) bsRequests - where - file = case map bsGetRequestDoc bsRequests of - FileDoc f : otherFiles | all (== FileDoc f) otherFiles -> f - _ -> error "Expected a same FileDoc for all files" diff --git a/tools/lsp-bench/stack.yaml b/tools/lsp-bench/stack.yaml deleted file mode 100644 index df0aeeb0ad..0000000000 --- a/tools/lsp-bench/stack.yaml +++ /dev/null @@ -1,39 +0,0 @@ -resolver: - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/5.yaml - -packages: -- . -# Dependency packages to be pulled from upstream that are not in the resolver. -# These entries can reference officially published versions as well as -# forks / in-progress versions pinned to a git hash. For example: -# -# extra-deps: -# - acme-missiles-0.3 -# - git: https://github.com/commercialhaskell/stack.git -# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# -extra-deps: [] - -# Override default flag values for local packages and extra-deps -# flags: {} - -# Extra package databases containing global packages -# extra-package-dbs: [] - -# Control whether we use the GHC we find on the path -# system-ghc: true -# -# Require a specific version of Stack, using version ranges -# require-stack-version: -any # Default -# require-stack-version: ">=2.9" -# -# Override the architecture used by Stack, especially useful on Windows -# arch: i386 -# arch: x86_64 -# -# Extra directories used by Stack for building -# extra-include-dirs: [/path/to/dir] -# extra-lib-dirs: [/path/to/dir] -# -# Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor diff --git a/tools/lsp-bench/stack.yaml.lock b/tools/lsp-bench/stack.yaml.lock deleted file mode 100644 index 1ad530a88b..0000000000 --- a/tools/lsp-bench/stack.yaml.lock +++ /dev/null @@ -1,13 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - sha256: 1d5fb7e344e76dd2c8958e3061d4e4dabb50a1355e6ff02e7d0e4f754c0adf47 - size: 640015 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/5.yaml - original: - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/5.yaml From c232d291bc99610c77b6ef6f05e519555075c266 Mon Sep 17 00:00:00 2001 From: EduardoRFS Date: Thu, 3 Oct 2024 16:15:14 -0300 Subject: [PATCH 2/3] remove haskell --- .gitmodules | 4 --- danger/hlint.rb | 87 ------------------------------------------------- flake.nix | 47 -------------------------- 3 files changed, 138 deletions(-) delete mode 100644 danger/hlint.rb diff --git a/.gitmodules b/.gitmodules index 287b90d208..56adb6a829 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,10 +2,6 @@ path = vendors/tezos-ligo url = https://gitlab.com/ligolang/tezos-ligo.git branch = v21-ligo -[submodule "tools/lsp-bench/projects/submodules/checker"] - path = tools/lsp-bench/projects/submodules/checker - url = https://github.com/marigold-dev/checker-ligo.git - branch = main [submodule "vendors/lltz"] path = vendors/lltz url = https://github.com/trilitech/lltz.git diff --git a/danger/hlint.rb b/danger/hlint.rb deleted file mode 100644 index 832f4356cc..0000000000 --- a/danger/hlint.rb +++ /dev/null @@ -1,87 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Oxhead Alpha -# SPDX-License-Identifier: LicenseRef-MIT-OA - -require 'shellwords' - -# Lints Haskell files inside the project using HLint -def lint(files, options = {}) - final_options = options.merge(json: true) - - issues = files - .map { |file| Shellwords.escape(file) } - .map do |file| - out = `hlint lint #{file} --no-exit-code #{to_hlint_options(final_options)}` - if $?.success? then - out - else - fail 'Hlint checks failed, please check the logs' - "[]" - end - end - .reject { |s| s == '' } - .map { |lint_result| JSON.parse(lint_result).flatten } - .flatten - - send_inline_comment(issues) - -end - -def send_inline_comment(results) - dir = "#{Dir.pwd}/" - results.each do |r| - filename = r['file'].gsub(dir, '') - - prompt = r['severity'] == 'Suggestion' || r['severity'] == 'Warning' ? 'Why Not' : '' - prompt = r['severity'] == 'Error' ? 'Error description' : prompt - - message = <<~HEREDOC - - :warning: Found "#{r['hint']}" - - ```haskell - #{r['from']} - ``` - - #{prompt} - - ```haskell - #{r['to']} - ``` - HEREDOC - - markdown(message, file: filename, line: r['startLine']) - end -end - -def to_hlint_options(options = {}) - options. - # filter not null - reject { |_key, value| value.nil? }. - # map booleans arguments equal true - map { |key, value| value.is_a?(TrueClass) ? [key, ''] : [key, value] }. - # map booleans arguments equal false - map { |key, value| value.is_a?(FalseClass) ? ["no-#{key}", ''] : [key, value] }. - # replace underscore by hyphen - map { |key, value| [key.to_s.tr('_', '-'), value] }. - # prepend '--' into the argument - map { |key, value| ["--#{key}", value] }. - # reduce everything into a single string - reduce('') { |args, option| "#{args} #{option[0]} #{option[1]}" }. - # strip leading spaces - strip -end - -# get all affected files by the changes in the current diff -affected_files = git.added_files + git.modified_files - -# limit files to .hs files -haskell_files = affected_files.select { |file| file.end_with?('.hs') && File.exist?(file) } - -# avoid overwriting and keep the values of duplicate 'hint' keys separate -hlint_options = - {:hint => 'tools/debugger/.hlint.yaml'} - .merge('hint' => 'tools/debugger/.hlint-universum.yaml') - .merge('ignore' => "'Parse error'") - -# run hlint on the files and comment inline in the PR -lint haskell_files, hlint_options diff --git a/flake.nix b/flake.nix index e45a8f647d..6ae8b11490 100644 --- a/flake.nix +++ b/flake.nix @@ -13,21 +13,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # haskell - stackage = { - url = "github:input-output-hk/stackage.nix"; - flake = false; - }; - hackage = { - url = "github:input-output-hk/hackage.nix"; - flake = false; - }; - haskell-nix = { - url = "github:input-output-hk/haskell.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.hackage.follows = "hackage"; - inputs.stackage.follows = "stackage"; - }; ocaml-overlay = { url = "github:nix-ocaml/nix-overlays"; inputs.nixpkgs.follows = "nixpkgs"; @@ -57,7 +42,6 @@ inherit system; overlays = [ build-yarn-package.overlays.default - haskell-nix.overlay ocaml-overlay.overlays.default (import ./nix/overlay.nix) (_: prev: @@ -81,37 +65,6 @@ settings.global.excludes = ["_build" "result" ".direnv" "vendors/*" "vendored-dune/*"]; }; - - # Wrap stack to work with our haskell.nix integration. - # - no-nix: we don't want stack's nix integration - # --system-ghc: use the existing GHC on PATH (provided by haskell.nix) - # --no-install-ghc : don't try to install GHC if no matching GHC found on PATH - stack-wrapped = pkgs.symlinkJoin { - name = "stack"; # will be available as the usual `stack` in terminal - paths = [pkgs.stack]; - buildInputs = [pkgs.makeWrapper]; - postBuild = '' - wrapProgram $out/bin/stack \ - --add-flags "\ - --no-nix \ - --system-ghc \ - --no-install-ghc \ - " - ''; - }; - - haskellShell = name: drv: - drv.passthru.project.shellFor { - inherit name; - - # FIXME: https://github.com/input-output-hk/haskell.nix/issues/1885 - # Adding [exactDeps = true] to avoid the build failure, this ensures - # that cabal doesn't choose alternate plans, so that *all* dependencies - # are provided by nix. - exactDeps = true; - - buildInputs = [stack-wrapped]; - }; in { packages = { ligo = ligo; From 632b561343a01f6b9d52ba46f45ba2258913cc3c Mon Sep 17 00:00:00 2001 From: EduardoRFS Date: Thu, 3 Oct 2024 16:25:46 -0300 Subject: [PATCH 3/3] update the flake lock --- flake.lock | 666 +---------------------------------------------------- 1 file changed, 1 insertion(+), 665 deletions(-) diff --git a/flake.lock b/flake.lock index 5eadb87c7f..a4c811372b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "HTTP": { - "flake": false, - "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "HTTP", - "type": "github" - } - }, "build-yarn-package": { "inputs": { "nixpkgs": [ @@ -36,90 +20,6 @@ "type": "github" } }, - "cabal-32": { - "flake": false, - "locked": { - "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", - "owner": "haskell", - "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", - "type": "github" - } - }, - "cabal-34": { - "flake": false, - "locked": { - "lastModified": 1645834128, - "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", - "owner": "haskell", - "repo": "cabal", - "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", - "type": "github" - } - }, - "cabal-36": { - "flake": false, - "locked": { - "lastModified": 1669081697, - "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", - "owner": "haskell", - "repo": "cabal", - "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cardano-shell": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1672831974, - "narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "45f2638735f8cdc40fe302742b79f248d23eb368", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "hkm/gitlab-fix", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -156,23 +56,6 @@ "type": "github" } }, - "ghc-8.6.5-iohk": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, "grace": { "flake": false, "locked": { @@ -189,304 +72,6 @@ "type": "github" } }, - "hackage": { - "flake": false, - "locked": { - "lastModified": 1727915231, - "narHash": "sha256-tBDL+S07XAs3vMh08CeijOzzk2m+CMKhBkMkIMtOuz4=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "f3ff858d82042429a59fd5443e1dd5dd8981b8d2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "haskell-nix": { - "inputs": { - "HTTP": "HTTP", - "cabal-32": "cabal-32", - "cabal-34": "cabal-34", - "cabal-36": "cabal-36", - "cardano-shell": "cardano-shell", - "flake-compat": "flake-compat", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "hackage": [ - "hackage" - ], - "hls-1.10": "hls-1.10", - "hls-2.0": "hls-2.0", - "hls-2.2": "hls-2.2", - "hls-2.3": "hls-2.3", - "hls-2.4": "hls-2.4", - "hls-2.5": "hls-2.5", - "hls-2.6": "hls-2.6", - "hls-2.7": "hls-2.7", - "hls-2.8": "hls-2.8", - "hls-2.9": "hls-2.9", - "hpc-coveralls": "hpc-coveralls", - "hydra": "hydra", - "iserv-proxy": "iserv-proxy", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003", - "nixpkgs-2105": "nixpkgs-2105", - "nixpkgs-2111": "nixpkgs-2111", - "nixpkgs-2205": "nixpkgs-2205", - "nixpkgs-2211": "nixpkgs-2211", - "nixpkgs-2305": "nixpkgs-2305", - "nixpkgs-2311": "nixpkgs-2311", - "nixpkgs-2405": "nixpkgs-2405", - "nixpkgs-unstable": "nixpkgs-unstable", - "old-ghc-nix": "old-ghc-nix", - "stackage": [ - "stackage" - ] - }, - "locked": { - "lastModified": 1727947987, - "narHash": "sha256-XnFVCPbvJsJoI+W4NTzIcc/IjhipG+ecHgaBwT5gDuE=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "a8026bdcfddfdaf7188a3b853461a542e6b68e60", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "hls-1.10": { - "flake": false, - "locked": { - "lastModified": 1680000865, - "narHash": "sha256-rc7iiUAcrHxwRM/s0ErEsSPxOR3u8t7DvFeWlMycWgo=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "b08691db779f7a35ff322b71e72a12f6e3376fd9", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "1.10.0.0", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.0": { - "flake": false, - "locked": { - "lastModified": 1687698105, - "narHash": "sha256-OHXlgRzs/kuJH8q7Sxh507H+0Rb8b7VOiPAjcY9sM1k=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "783905f211ac63edf982dd1889c671653327e441", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.0.0.1", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.2": { - "flake": false, - "locked": { - "lastModified": 1693064058, - "narHash": "sha256-8DGIyz5GjuCFmohY6Fa79hHA/p1iIqubfJUTGQElbNk=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "b30f4b6cf5822f3112c35d14a0cba51f3fe23b85", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.2.0.0", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.3": { - "flake": false, - "locked": { - "lastModified": 1695910642, - "narHash": "sha256-tR58doOs3DncFehHwCLczJgntyG/zlsSd7DgDgMPOkI=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "458ccdb55c9ea22cd5d13ec3051aaefb295321be", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.3.0.0", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.4": { - "flake": false, - "locked": { - "lastModified": 1699862708, - "narHash": "sha256-YHXSkdz53zd0fYGIYOgLt6HrA0eaRJi9mXVqDgmvrjk=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "54507ef7e85fa8e9d0eb9a669832a3287ffccd57", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.4.0.1", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.5": { - "flake": false, - "locked": { - "lastModified": 1701080174, - "narHash": "sha256-fyiR9TaHGJIIR0UmcCb73Xv9TJq3ht2ioxQ2mT7kVdc=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "27f8c3d3892e38edaef5bea3870161815c4d014c", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.5.0.0", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.6": { - "flake": false, - "locked": { - "lastModified": 1705325287, - "narHash": "sha256-+P87oLdlPyMw8Mgoul7HMWdEvWP/fNlo8jyNtwME8E8=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "6e0b342fa0327e628610f2711f8c3e4eaaa08b1e", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.6.0.0", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.7": { - "flake": false, - "locked": { - "lastModified": 1708965829, - "narHash": "sha256-LfJ+TBcBFq/XKoiNI7pc4VoHg4WmuzsFxYJ3Fu+Jf+M=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "50322b0a4aefb27adc5ec42f5055aaa8f8e38001", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.7.0.0", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.8": { - "flake": false, - "locked": { - "lastModified": 1715153580, - "narHash": "sha256-Vi/iUt2pWyUJlo9VrYgTcbRviWE0cFO6rmGi9rmALw0=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "dd1be1beb16700de59e0d6801957290bcf956a0a", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.8.0.0", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hls-2.9": { - "flake": false, - "locked": { - "lastModified": 1720003792, - "narHash": "sha256-qnDx8Pk0UxtoPr7BimEsAZh9g2WuTuMB/kGqnmdryKs=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "0c1817cb2babef0765e4e72dd297c013e8e3d12b", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "2.9.0.1", - "repo": "haskell-language-server", - "type": "github" - } - }, - "hpc-coveralls": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hydra": { - "inputs": { - "nix": "nix", - "nixpkgs": [ - "haskell-nix", - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1671755331, - "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", - "owner": "NixOS", - "repo": "hydra", - "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, - "iserv-proxy": { - "flake": false, - "locked": { - "lastModified": 1717479972, - "narHash": "sha256-7vE3RQycHI1YT9LHJ1/fUaeln2vIpYm6Mmn8FTpYeVo=", - "owner": "stable-haskell", - "repo": "iserv-proxy", - "rev": "2ed34002247213fc435d0062350b91bab920626e", - "type": "github" - }, - "original": { - "owner": "stable-haskell", - "ref": "iserv-syms", - "repo": "iserv-proxy", - "type": "github" - } - }, "lltz": { "flake": false, "locked": { @@ -503,220 +88,7 @@ "type": "github" } }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1661606874, - "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", - "owner": "NixOS", - "repo": "nix", - "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "2.11.0", - "repo": "nix", - "type": "github" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1657693803, - "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.05-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105": { - "locked": { - "lastModified": 1659914493, - "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111": { - "locked": { - "lastModified": 1659446231, - "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2205": { - "locked": { - "lastModified": 1685573264, - "narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "380be19fbd2d9079f677978361792cb25e8a3635", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2211": { - "locked": { - "lastModified": 1688392541, - "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2305": { - "locked": { - "lastModified": 1705033721, - "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-23.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2311": { - "locked": { - "lastModified": 1719957072, - "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-23.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2405": { - "locked": { - "lastModified": 1726447378, - "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-24.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1726583932, - "narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "658e7223191d2598641d50ee4e898126768fe847", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1718991812, "narHash": "sha256-myw2ur7Uenh4Vj91bjsZ1kl9zUurIFNnTzN7DSTlJDI=", @@ -752,54 +124,18 @@ "type": "github" } }, - "old-ghc-nix": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, "root": { "inputs": { "build-yarn-package": "build-yarn-package", "flake-utils": "flake-utils", "grace": "grace", - "hackage": "hackage", - "haskell-nix": "haskell-nix", "lltz": "lltz", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "ocaml-overlay": "ocaml-overlay", - "stackage": "stackage", "tezos-ligo": "tezos-ligo", "treefmt": "treefmt" } }, - "stackage": { - "flake": false, - "locked": { - "lastModified": 1727914262, - "narHash": "sha256-QNvtDrAz7nQmrS4g7SGoC26e5cUJ/NGCofrBxTKr04M=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "56521e9e2de675c7fbb4a2a29558dca0a4157c55", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828,