1
1
mirror of https://github.com/sdiehl/wiwinwlh.git synced 2024-07-07 08:36:30 +03:00

CI for Chapter 7

This commit is contained in:
sdiehl 2020-02-18 19:01:10 +00:00
parent d4d8cab3bd
commit 31191f9a77
5 changed files with 20 additions and 3 deletions

View File

@ -8,4 +8,8 @@
#ssh ec2 'sudo mv nav.js /srv/http/hask/nav.js'
rsync --progress tutorial.html ec2:~
rsync --progress tutorial.pdf ec2:~
rsync --progress tutorial_print.pdf ec2:~
ssh ec2 'sudo mv tutorial.html /srv/http/hask/index.html'
ssh ec2 'sudo mv tutorial_print.pdf /srv/http/hask/'
ssh ec2 'sudo mv tutorial.pdf /srv/http/hask/'

View File

@ -5,7 +5,7 @@ import qualified Data.ByteString.Char8 as S8
-- From pack
bstr1 :: S.ByteString
bstr1 = S.pack ("foo" :: String)
bstr1 = S.pack [102, 111, 111] -- ascii encoding of foo as [Word8]
-- From overloaded string literal.
bstr2 :: S.ByteString

9
src/07-text-bytestring/ci Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
stack exec ghc -- -e ":q" --interactive builder.hs
stack exec ghc -- -e ":q" --interactive bytestring.hs
#stack exec ghc -- -e ":q" --interactive overloadedlist.hs
stack exec ghc -- -e ":q" --interactive printf.hs
stack exec ghc -- -e ":q" --interactive regex.hs
stack exec ghc -- -e ":q" --interactive text.hs

View File

@ -2,10 +2,10 @@
{-# LANGUAGE TypeFamilies #-}
import qualified Data.Map as Map
import GHC.Exts (IsList(..))
import GHC.Exts (IsList (..))
instance (Ord k) => IsList (Map.Map k v) where
type Item (Map.Map k v) = (k,v)
type Item (Map.Map k v) = (k, v)
fromList = Map.fromList
toList = Map.toList

4
src/ci
View File

@ -24,6 +24,10 @@ echo -n "06-prelude .. "
cd 06-prelude && bash ci && cd ..
echo -e "\e[1;32mOK\e[0m"
echo -n "07-text-bytestring .. "
cd 07-text-bytestring && bash ci && cd ..
echo -e "\e[1;32mOK\e[0m"
echo -n "29-ghc .. "
cd 29-ghc && bash ci && cd ..
echo -e "\e[1;32mOK\e[0m"