Skip to content

Commit

Permalink
Cosmetic improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
re-xyr committed May 21, 2022
1 parent 5668dc3 commit 5316f4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Cleff/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ tryErrorJust f m = (Right <$> m) `catchError` \e -> maybe (throwError e) (pure .
type ExcUid = Int

-- | Exception wrapper used in 'runError' in order not to conflate error types with exception types.
data ErrorExc = ErrorExc {-# UNPACK #-} !ExcUid Any
data ErrorExc = ErrorExc !ExcUid Any
deriving anyclass (Exception)

instance Show ErrorExc where
Expand Down
4 changes: 2 additions & 2 deletions src/Cleff/Internal/Rec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ take (Rec off _ arr) = Rec 0 len $ runPrimArray do
class (e :: Effect) :> (es :: [Effect]) where
-- | Get the index of the element.
reifyIndex :: Int
reifyIndex = unreifiable "Elem" "Cleff.Internal.Rec.reifyIndex" "the index of an element of a type-level list"
reifyIndex = unreifiable "Elem" "Cleff.Internal.Rec.reifyIndex" "the index of an effect in the effect stack"
infix 0 :>

-- | The element closer to the head takes priority.
Expand All @@ -153,7 +153,7 @@ class KnownList es => Subset (es :: [Effect]) (es' :: [Effect]) where
-- | Get a list of indices of the elements.
reifyIndices :: [Int]
reifyIndices = unreifiable
"Subset" "Cleff.Internal.Rec.reifyIndices" "the index of multiple elements of a type-level list"
"Subset" "Cleff.Internal.Rec.reifyIndices" "the indices of a subset of the effect stack"

instance Subset '[] es where
reifyIndices = []
Expand Down

0 comments on commit 5316f4e

Please sign in to comment.