Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marc Coiffier
BHR
Commits
2e31f847
Commit
2e31f847
authored
Sep 30, 2018
by
Marc Coiffier
Browse files
Try a release for the capricon interpreter
parent
d45177d7
Changes
11
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
2e31f847
...
...
@@ -57,6 +57,7 @@ script:
branches
:
only
:
-
master
-
capricon
-
/^v\d+(\.\d+)*(-\S*)?$/
deploy
:
...
...
@@ -65,6 +66,7 @@ deploy:
file
:
-
curly~$TRAVIS_OS_NAME~$HOST_ARCH.tar.xz
-
curly-gateway~$TRAVIS_OS_NAME~$HOST_ARCH.tar.xz
-
capricon~$TRAVIS_OS_NAME~$HOST_ARCH.tar.xz
skip_cleanup
:
true
on
:
tags
:
true
...
...
Makefile
View file @
2e31f847
...
...
@@ -10,9 +10,12 @@ endif
ifdef
PREFIX
STACK_FLAGS
+=
--local-install-root
$(PREFIX)
endif
ifndef
TARGETS
TARGETS
:=
curly
endif
build
:
stack build
$(STACK_FLAGS)
stack build
$(STACK_FLAGS)
$(TARGETS)
doc
:
STACK_FLAGS += --haddock
doc
:
build
...
...
misc
/ChangeLog.md
→
capricon
/ChangeLog.md
View file @
2e31f847
File moved
misc
/LICENSE
→
capricon
/LICENSE
View file @
2e31f847
File moved
misc
/Setup.hs
→
capricon
/Setup.hs
View file @
2e31f847
File moved
misc/misc
.cabal
→
capricon/capricon
.cabal
View file @
2e31f847
-- Initial misc.cabal generated by cabal init. For further documentation,
-- see http://haskell.org/cabal/users-guide/
name:
misc
version: 0.
1.0.0
name:
capricon
version: 0.
5.4
-- synopsis:
-- description:
license: GPL-3
...
...
@@ -28,16 +28,16 @@ executable capricon
default-extensions: RebindableSyntax
-- other-modules:
-- other-extensions:
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,definitive-base >=2.6 && <2.7, definitive-parser, misc, hreadline, directory, filepath
ghc-options: -Wincomplete-patterns -Wname-shadowing -Werror
hs-source-dirs: exe
default-language: Haskell2010
executable coinche
main-is: Coinche.hs
default-extensions: RebindableSyntax
-- other-modules:
-- other-extensions:
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7, definitive-parser, misc, random, random-shuffle
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,definitive-base >=2.6 && <2.7, definitive-parser, capricon, hreadline, directory, filepath
ghc-options: -Wincomplete-patterns -Wname-shadowing -Werror
hs-source-dirs: exe
default-language: Haskell2010
-- executable coinche
-- main-is: Coinche.hs
-- default-extensions: RebindableSyntax
-- -- other-modules:
-- -- other-extensions:
-- build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7, definitive-parser, misc, random, random-shuffle
-- ghc-options: -Wincomplete-patterns -Wname-shadowing -Werror
-- hs-source-dirs: exe
-- default-language: Haskell2010
misc
/exe/CaPriCon.hs
→
capricon
/exe/CaPriCon.hs
View file @
2e31f847
...
...
@@ -343,6 +343,11 @@ showDir = lens _showDir (\x y -> x { _showDir = y })
outputHandle
::
Lens'
COCState
Handle
outputHandle
=
lens
_outputHandle
(
\
x
y
->
x
{
_outputHandle
=
y
})
htmlQuote
=
foldMap
qChar
where
qChar
'<'
=
"<"
qChar
'>'
=
">"
qChar
'&'
=
"&"
qChar
c
=
[
c
]
stringWords
=
fromBlank
where
fromBlank
(
c
:
t
)
|
c
`
elem
`
"
\n\t\r
"
=
fromBlank
t
|
c
==
'"'
=
fromQuote
id
t
...
...
@@ -398,17 +403,18 @@ runCOCBuiltin COCB_Open = do
xs
<-
lift
(
try
(
return
[]
)
(
try
(
readString
f
)
(
readString
(
f
+
".md"
))
>>=
maybe
undefined
return
.
matches
Just
literate
))
runStackState
(
put
(
StackProg
xs
:
t
))
_
->
return
()
where
literate
=
intercalate
[
":
\n
"
]
<$>
sepBy'
(
cmdline
(
s
ingle
'>'
)
<+?
cmdline
(
several
"
"
)
where
literate
=
intercalate
[
":
\n
"
]
<$>
sepBy'
(
cmdline
(
s
everal
"> "
)
<+?
cmdline
(
several
"
$>
"
)
<+?
commentline
)
(
single
'
\n
'
)
wrapLabel
hide
x
=
"<label class=
\"
hide-label
\"
><input type=
\"
checkbox
\"
class=
\"
capricon-hide
\"
checked=
\"
checked
\"
/><span class=
\"
capricon-"
+
hide
+
"
\"
></span><span class=
\"
capricon-reveal
\"
>"
+
x
+
"</span></label>"
wrapResult
x
l
=
(
":<div class=
\"
capricon-"
+
x
+
"result
\"
>"
)
:
l
+
[
":</div>"
]
cmdline
pre
=
map
(
\
x
->
(
":"
+
wrapLabel
"hideparagraph"
(
"<pre class=
\"
capricon capricon-paragraph
\"
>
\n
"
+
intercalate
"
\n
"
(
map
fst
x
)
+
"
\n
</pre>"
))
:
wrapResult
"paragraph"
(
foldMap
snd
x
))
(
sepBy1'
go
(
single
'
\n
'
))
wrapResult
tag
x
l
=
(
":<"
+
tag
+
" class=
\"
capricon-"
+
x
+
"result
\"
>"
)
:
l
+
[
":</"
+
tag
+
">"
]
cmdline
pre
=
map
(
\
x
->
(
":"
+
wrapLabel
"hideparagraph"
(
"<pre class=
\"
capricon capricon-paragraph
\"
>"
+
htmlQuote
(
intercalate
"
\n
"
(
map
fst
x
))
+
"</pre>"
))
:
wrapResult
"div"
"paragraph"
(
foldMap
snd
x
))
(
sepBy1'
go
(
single
'
\n
'
))
where
go
=
do
pre
;
many'
(
noneOf
"
\n
"
)
<&>
\
x
->
(
x
,
stringWords
x
)
commentline
=
map
(
foldMap
(
pure
.
(
':'
:
)
<|>
\
(
x
,
t
)
->
t
+
[
':'
:
(
wrapLabel
"hidestache"
$
"<
pr
e class=
\"
capricon
\"
>"
+
x
+
"</
pr
e>"
)]))
$
(
<*
lookingAt
eol
)
commentline
=
map
(
foldMap
(
pure
.
(
':'
:
)
<|>
\
(
x
,
t
)
->
t
+
[
':'
:
(
wrapLabel
"hidestache"
$
"<
cod
e class=
\"
capricon
\"
>"
+
htmlQuote
x
+
"</
cod
e>"
)]))
$
(
<*
lookingAt
eol
)
$
many'
(
map
Left
(
many1'
(
noneOf
"{
\n
"
<+?
(
fill
'{'
$
single
'{'
<*
lookingAt
(
noneOf
"{"
))))
<+?
map
Right
(
between
(
several
"{{"
)
(
several
"}}"
)
(
many1'
(
noneOf
"}"
<+?
fill
'}'
(
single
'{'
<*
lookingAt
(
noneOf
"}"
)))
<&>
\
x
->
(
x
,
wrapResult
""
(
stringWords
x
)))))
(
many1'
(
noneOf
"}"
<+?
fill
'}'
(
single
'{'
<*
lookingAt
(
noneOf
"}"
)))
<&>
\
x
->
(
x
,
wrapResult
"span"
""
(
stringWords
x
)))))
runCOCBuiltin
COCB_ToInt
=
runStackState
$
modify
$
\
case
...
...
misc
/exe/Coinche.hs
→
capricon
/exe/Coinche.hs
View file @
2e31f847
File moved
misc
/src/Algebra/Monad/Concatenative.hs
→
capricon
/src/Algebra/Monad/Concatenative.hs
View file @
2e31f847
File moved
scripts/ci/inline/script
View file @
2e31f847
...
...
@@ -29,5 +29,5 @@ case "$BUILD" in
done
;;
esac
scripts/ci/build-package curly curly-gateway
scripts/ci/build-package curly curly-gateway
capricon
set
+ex
stack.yaml
View file @
2e31f847
...
...
@@ -35,22 +35,23 @@ resolver: lts-9.10
# A package marked 'extra-dep: true' will only be built if demanded by a
# non-dependency (i.e. a user package), and its test suites and benchmarks
# will not be run. This is useful for tweaking upstream packages.
packages
:
-
definitive-base
-
definitive-parser
-
definitive-network
-
definitive-filesystem
-
hreadline
-
curly-kademlia
-
curly-core
-
curly-system
-
curly
-
curly-gateway
# - grow
-
misc
packages
:
[]
# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps
:
[
AES-0.2.9
,
kademlia-1.1.0.0
]
extra-deps
:
-
AES-0.2.9
-
kademlia-1.1.0.0
-
./curly
-
./capricon
-
./definitive-base
-
./definitive-parser
-
./definitive-network
-
./definitive-filesystem
-
./hreadline
-
./curly-kademlia
-
./curly-core
-
./curly-system
-
./curly-gateway
# Override default flag values for local packages and extra-deps
# flags: {}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment