diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-10-11 23:30:56 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-10-11 23:30:56 +0200 |
commit | 80a6150610182eefa0deb1f0932d3b780456ca09 (patch) | |
tree | 4471a8ffecfc527d6b9c2a5c48e445e7a4d6a74f /frontend/app/Form/Internal.hs | |
parent | 2e0cf98254976e443ea7f693961fc105ed6cf563 (diff) |
use backend REST library for frontend
Diffstat (limited to 'frontend/app/Form/Internal.hs')
-rw-r--r-- | frontend/app/Form/Internal.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/app/Form/Internal.hs b/frontend/app/Form/Internal.hs index 2274c63..35d59e7 100644 --- a/frontend/app/Form/Internal.hs +++ b/frontend/app/Form/Internal.hs @@ -6,12 +6,12 @@ module Form.Internal ) where -import Data.Text qualified as T import Miso +import Miso.String (MisoString, null, strip) data Form i o = Form { view :: i -> [View i], - fill :: i -> Either String o + fill :: i -> Either MisoString o } instance Functor (Form i) where @@ -63,8 +63,8 @@ runForm form i = class IsEmpty i where isEmpty :: i -> Bool -instance IsEmpty T.Text where - isEmpty = T.null . T.strip +instance IsEmpty MisoString where + isEmpty = Miso.String.null . strip optional :: (IsEmpty i) => Form i o -> Form i (Maybe o) optional form = |