| Copyright | (c) Paul Schnapp 2023 |
|---|---|
| License | BSD3 |
| Maintainer | Paul Schnapp <paul.schnapp@gmail.com> |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
FULE.Container.Item
Description
A wrapper for heterogenous content to be used by other
Containers.
Documentation
A container for heterogenous items. This container lets items of different
types be used in the same aggregating container, like
ArrayedM, GridM, or
LayeredM.
When using ItemM you'll likely need to:
- Use the
ScopedTypeVariableslanguage extension and explicitly specify aforall min your function declaration (if a type-variable is being used) - Explicitly specify the type of your list of
ItemMin the call to the aggregating container and wrap the list in parentheses
For example:
{-# LANGUAGE ScopedTypeVariables #-}
import FULE
...
someFn :: forall m => m (ArrayedM m Widget)
someFn = return $
arrayedHoriz noPadding
([item someWidget
, item someContainer
, item someOtherWidget
]::[ItemM m Widget])