Skip to content

Commit

Permalink
chore: enable weeder, remove a weed
Browse files Browse the repository at this point in the history
Now that cborg (which is a dependency of weeder) works again for aarch64
(well-typed/cborg#307), we can reenable this
check.

We also remove one weed which has grown in the period when weeder was
disabled.

Signed-off-by: Ben Price <[email protected]>
  • Loading branch information
brprice committed Jun 19, 2023
1 parent d99d058 commit 1bbf55a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 2 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
// primerFlake.packages;

checks = {
inherit openapi-validate;
inherit weeder openapi-validate;
inherit primer-sqitch-test-sqlite;
}
// (pkgs.lib.optionalAttrs (system == "x86_64-linux")
Expand Down Expand Up @@ -511,8 +511,7 @@
cabal = "latest";
hlint = "latest";

# Broken.
#weeder = weederVersion;
weeder = weederVersion;

fourmolu = fourmoluVersion;

Expand Down
8 changes: 1 addition & 7 deletions primer/src/Primer/Typecheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ module Primer.Typecheck (
extendTypeDefCxt,
localTmVars,
localTyVars,
enhole,
eqType,
) where

Expand Down Expand Up @@ -95,7 +94,6 @@ import Optics (
traverseOf,
(%),
(^?),
_Just,
)
import Optics.Traversal (traversed)
import Primer.Core (
Expand Down Expand Up @@ -871,11 +869,7 @@ addChkMeta' set t e =
enholeT :: MonadFresh ID m => Type' () -> ExprT -> m ExprT
enholeT = enhole' equality

-- | As 'enholeT', but works on 'Expr'
enhole :: MonadFresh ID m => Type' () -> Expr -> m Expr
enhole = enhole' _Just

-- | A generic helper for 'enholeT' and 'enhole'
-- | A generic helper for 'enholeT' and (a hypothetical) @enhole = enhole' _Just@
enhole' :: (Is k A_Prism, MonadFresh ID m) => Optic' k NoIx a TypeCache -> Type' () -> Expr' (Meta a) b -> m (Expr' (Meta a) b)
enhole' p' t e =
let p = castOptic @A_Prism p'
Expand Down

0 comments on commit 1bbf55a

Please sign in to comment.