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
Server.hs:63:11: | |
Couldn't match type ‘Network.Wreq.Response String’ with ‘[Char]’ | |
Expected type: Server UserAPI1 | |
Actual type: EitherT ServantErr IO [User] | |
:<|> EitherT ServantErr IO (Network.Wreq.Response String) | |
In the expression: return users1 :<|> liftIO myGet | |
In an equation for ‘server1’: | |
server1 = return users1 :<|> liftIO myGet | |
make: *** [default] Error 1 |
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 DeriveGeneric #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import Control.Monad.IO.Class |
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
type UserAPI1 = "users" :> Get '[JSON] [User] | |
:<|> "me" :> Get '[JSON] String |
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
-- Purpose: Calculate statistics for a CSV file / stream | |
import Data.List.Split | |
-- TODO Use quickCheck for tests | |
-- TODO Use lens library to get into records and data types | |
-- TODO Dynamically generate record from generator exe | |
data ColumnStat = Textual { count :: Int |