mirror of
https://github.com/sdiehl/wiwinwlh.git
synced 2024-08-16 23:40:41 +03:00
CI for Chapter 7
This commit is contained in:
parent
d4d8cab3bd
commit
31191f9a77
@ -8,4 +8,8 @@
|
|||||||
#ssh ec2 'sudo mv nav.js /srv/http/hask/nav.js'
|
#ssh ec2 'sudo mv nav.js /srv/http/hask/nav.js'
|
||||||
|
|
||||||
rsync --progress tutorial.html ec2:~
|
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.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/'
|
||||||
|
@ -5,7 +5,7 @@ import qualified Data.ByteString.Char8 as S8
|
|||||||
|
|
||||||
-- From pack
|
-- From pack
|
||||||
bstr1 :: S.ByteString
|
bstr1 :: S.ByteString
|
||||||
bstr1 = S.pack ("foo" :: String)
|
bstr1 = S.pack [102, 111, 111] -- ascii encoding of foo as [Word8]
|
||||||
|
|
||||||
-- From overloaded string literal.
|
-- From overloaded string literal.
|
||||||
bstr2 :: S.ByteString
|
bstr2 :: S.ByteString
|
||||||
|
9
src/07-text-bytestring/ci
Executable file
9
src/07-text-bytestring/ci
Executable 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
|
@ -2,10 +2,10 @@
|
|||||||
{-# LANGUAGE TypeFamilies #-}
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
|
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import GHC.Exts (IsList(..))
|
import GHC.Exts (IsList (..))
|
||||||
|
|
||||||
instance (Ord k) => IsList (Map.Map k v) where
|
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
|
fromList = Map.fromList
|
||||||
toList = Map.toList
|
toList = Map.toList
|
||||||
|
|
||||||
|
4
src/ci
4
src/ci
@ -24,6 +24,10 @@ echo -n "06-prelude .. "
|
|||||||
cd 06-prelude && bash ci && cd ..
|
cd 06-prelude && bash ci && cd ..
|
||||||
echo -e "\e[1;32mOK\e[0m"
|
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 .. "
|
echo -n "29-ghc .. "
|
||||||
cd 29-ghc && bash ci && cd ..
|
cd 29-ghc && bash ci && cd ..
|
||||||
echo -e "\e[1;32mOK\e[0m"
|
echo -e "\e[1;32mOK\e[0m"
|
||||||
|
Loading…
Reference in New Issue
Block a user