packages feed

barbies 1.1.2.1 → 1.1.3.0

raw patch · 3 files changed

+14/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for barbies +## 1.1.3.0+  - `Wear` will raise a `TypeError` instead of getting+    stuck (Alex Peitsinis).+ ## 1.1.2.1   - Uploaded 1.1.2.0 was broken (missing `btraverseC`) 
barbies.cabal view
@@ -1,5 +1,5 @@ name:           barbies-version:        1.1.2.1+version:        1.1.3.0 synopsis:       Classes for working with types that can change clothes. description:    Types that are parametric on a functor are like Barbies that have an outfit for each role. This package provides the basic abstractions to work with them comfortably. category:       Data-structures
src/Data/Barbie/Internal/Wear.hs view
@@ -1,10 +1,13 @@-{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeFamilies         #-}+{-# LANGUAGE UndecidableInstances #-} module Data.Barbie.Internal.Wear   ( Wear, Bare, Covered   )  where +import GHC.TypeLits (ErrorMessage (..), TypeError)+ data Bare data Covered @@ -31,3 +34,8 @@ type family Wear t f a where   Wear Bare    f a = a   Wear Covered f a = f a+  Wear t       _ _ = TypeError (     'Text "`Wear` should only be used with "+                               ':<>: 'Text "`Bare` or `Covered`."+                               ':$$: 'Text "`" ':<>: 'ShowType t ':<>: 'Text "`"+                               ':<>: 'Text " is not allowed in this context."+                               )