From 28dc12fdd44220f6e4beca37a4b0712c47b81c55 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Wed, 3 Jul 2019 14:14:29 +0200 Subject: [PATCH 1/2] chore(release): fix sync-versions --- sync-versions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync-versions.hs b/sync-versions.hs index eccf58721..3fec57df5 100755 --- a/sync-versions.hs +++ b/sync-versions.hs @@ -1,5 +1,5 @@ #!/usr/bin/env stack --- stack runghc --package libyaml +-- stack runghc --package libyaml --package aeson --package unordered-containers --package text {-# LANGUAGE OverloadedStrings , LambdaCase From 551c4cb23cb9243acca793b3430e8732754336bb Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Wed, 3 Jul 2019 14:32:58 +0200 Subject: [PATCH 2/2] fix(home): fix build --- src/Handler/Home.hs | 10 +++++----- src/Handler/Utils/Table/Cells.hs | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Handler/Home.hs b/src/Handler/Home.hs index 73c9dd8ee..53cde3d91 100644 --- a/src/Handler/Home.hs +++ b/src/Handler/Home.hs @@ -40,9 +40,9 @@ homeOpenCourses = do colonnade = mconcat [ -- dbRow sortable (Just "term") (i18nCell MsgTerm) $ \DBRow{ dbrOutput=Entity{entityVal = course} } -> - textCell $ toMessage $ courseTerm course + msgCell $ courseTerm course , sortable (Just "school") (i18nCell MsgCourseSchool) $ \DBRow{ dbrOutput=Entity{entityVal = course} } -> - textCell $ toMessage $ courseSchool course + msgCell $ courseSchool course , sortable (Just "course") (i18nCell MsgCourse) $ \DBRow{ dbrOutput=Entity{entityVal = course} } -> do let tid = courseTerm course ssh = courseSchool course @@ -215,11 +215,11 @@ homeUpcomingExams uid = do return r dbtColonnade = dbColonnade $ mconcat [ sortable (Just "term") (i18nCell MsgTerm) $ \DBRow{ dbrOutput = view lensCourse -> Entity _ Course{..} } -> - textCell $ display courseTerm + msgCell courseTerm , sortable (Just "school") (i18nCell MsgCourseSchool) $ \DBRow{ dbrOutput = view lensCourse -> Entity _ Course{..} } -> - textCell $ display courseSchool + msgCell courseSchool , sortable (Just "course") (i18nCell MsgCourse) $ \DBRow{ dbrOutput = view lensCourse -> Entity _ Course{..} } -> - anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR) (toWidget $ display courseShorthand) + anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR) (toWgt courseShorthand) -- continue here , sortable (Just "name") (i18nCell MsgExamName) $ \DBRow{ dbrOutput } -> do let Entity _ Exam{..} = view lensExam dbrOutput diff --git a/src/Handler/Utils/Table/Cells.hs b/src/Handler/Utils/Table/Cells.hs index 2e8e53db8..3bae746a8 100644 --- a/src/Handler/Utils/Table/Cells.hs +++ b/src/Handler/Utils/Table/Cells.hs @@ -71,6 +71,8 @@ ifCell decision cTrue cFalse x linkEmptyCell :: IsDBTable m a => Route UniWorX -> Widget -> DBCell m a linkEmptyCell link wgt = linkEitherCell link (wgt,mempty) +msgCell :: (ToMessage t, IsDBTable m a) => t -> DBCell m a +msgCell = textCell . toMessage -- Recall: for line numbers, use dbRow