Skip to content

Commit

Permalink
Simplify: tweak a docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
raehik committed Oct 12, 2024
1 parent 32c2aac commit 0a1f368
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Rerefined/Simplify.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ type family TrySimplifyLoop p mp where
-- couldn't simplify
TrySimplifyLoop p Nothing = Nothing

type AssertSimplified p = AssertSimplified' p (TrySimplify p)

-- | Assert that a predicate may not be trivially simplified.
--
-- Returns the empty constraint on success, else emits a pretty type error.
--
-- Useful e.g. if you'd like to make sure a user isn't writing silly predicates.
type AssertSimplified p = AssertSimplified' p (TrySimplify p)

type family AssertSimplified' p mp' :: Constraint where
AssertSimplified' p Nothing = ()
AssertSimplified' p (Just p') = TypeError
Expand Down

0 comments on commit 0a1f368

Please sign in to comment.