This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module MealPlan where | |
| import Network.Http.StatusHelpers | |
| import qualified Grocery.Types as GT | |
| import Grocery.ListHelpers | |
| import Types | |
| import qualified Login.StateMachine as Login | |
| import Login.Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Main where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Data.Monoid | |
| data Average a = Average { sum :: a, count :: a } deriving (Show) | |
| instance (Fractional a) => Monoid (Average a) where | |
| mempty = Average (fromIntegral 0) (fromIntegral 0) | |
| mappend (Average s1 c1) (Average s2 c2) = Average (s1 + s2) (c1 + c2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Data.Monoid | |
| data Average a = Average { sum :: a, count :: a } deriving (Show) | |
| instance (Fractional a) => Monoid (Average a) where | |
| mempty = Average (fromIntegral 0) (fromIntegral 0) | |
| mappend (Average s1 c1) (Average s2 c2) = Average (s1 + s2) (c1 + c2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DeriveGeneric #-} | |
| module StrawPoll.Types where | |
| import GHC.Generics | |
| import Data.Aeson | |
| data Poll = Poll String | |
| data Counter = Counter { count :: Int } deriving (Show, Generic) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Initial strawpollhs.cabal generated by cabal init. For further | |
| -- documentation, see http://haskell.org/cabal/users-guide/ | |
| name: strawpollhs | |
| version: 0.1.0.0 | |
| license-file: LICENSE | |
| author: Chris Schneider | |
| maintainer: chris@christopher-schneider.com | |
| build-type: Simple | |
| cabal-version: >=1.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Control.Concurrent (threadDelay) | |
| import Business.Types | |
| import JavaScript.JQuery | |
| import Data.Default | |
| import Prelude hiding (div) | |
| import Blaze.React |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE OverloadedStrings #-} | |
| module Main where | |
| import Data.Aeson | |
| import Data.ByteString.Lazy.Char8 | |
| import Data.Maybe | |
| import Debug.Trace | |
| import Data.Vector | |
| import qualified Data.Text as T |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Business.Types | |
| import Prelude hiding (div) | |
| import Blaze.React | |
| import qualified Text.Blaze.Event as E | |
| import qualified Text.Blaze.Event.Keycode as Keycode | |
| import qualified Text.Blaze.Html5 as H | |
| import qualified Text.Blaze.Html5.Attributes as A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Main where | |
| import Business.Types | |
| import Data.IORef | |
| import Servant.API | |
| import Servant.Server | |
| import Network.Wai.Handler.Warp | |
| import Control.Monad.Trans (liftIO) |