Copyright | (c) Paul Schnapp 2023 |
---|---|
License | BSD3 |
Maintainer | Paul Schnapp <paul.schnapp@gmail.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A wrapper for heterogenous content to be used by other
Container
s.
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
ScopedTypeVariables
language extension and explicitly specify aforall m
in your function declaration (if a type-variable is being used) - Explicitly specify the type of your list of
ItemM
in 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])