Commit 9edffc46 authored by Paul Brinkmeier's avatar Paul Brinkmeier
Browse files

Make single-word filenames CamelCase

parent afea7189
Pipeline #174664 failed with stage
in 4 minutes and 16 seconds
____________________________________________________
/ You tread upon my patience. \
\ -- William Shakespeare, "Henry IV" /
----------------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
_________________________________________
< Caution: Keep out of reach of children. >
-----------------------------------------
^__^ /
_______/(oo) /
/( /(__)
* | w----||
|| ||
identifier _________________________________________
<
identifier Caution
:
identifier Keep
identifier out
identifier of
identifier reach
identifier of
identifier children
.
>
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-
^
identifier __
^
/
identifier _______
/
(
identifier oo
)
/
/
(
/
(
identifier __
)
*
|
identifier w
--
--
||
||
||
EOF
data Rope a
= Leaf [a]
| Inner (Rope a) Int (Rope a)
deriving (Show)
instance Foldable Rope where
foldr f init (Leaf xs) = foldr f init xs
foldr f init (Inner l _ r) = foldr f (foldr f init r) l
instance Traversable Rope where
sequenceA (Leaf xs ) = pure Leaf <*> sequenceA xs
sequenceA (Inner l w r) = pure Inner <*> sequenceA l <*> pure w <*> sequenceA r
ropeSplitAt :: Int -> Rope a -> (Rope a, Rope a)
ropeSplitAt n (Leaf xs ) = (Leaf (take n xs), Leaf (drop n xs))
ropeSplitAt n (Inner l w r)
| n == w = (l, r)
| n < w
= let (splitL, splitR) = ropeSplitAt n l
in (splitL, Inner splitR (ropeLength splitR) r)
| otherwise
= let (splitL, splitR) = ropeSplitAt (n - w) r
in (Inner l w splitL, splitR)
identifier data
identifier Rope
identifier a
=
identifier Leaf
[
identifier a
]
|
identifier Inner
(
identifier Rope
identifier a
)
identifier Int
(
identifier Rope
identifier a
)
identifier deriving
(
identifier Show
)
identifier instance
identifier Foldable
identifier Rope
identifier where
identifier foldr
identifier f
identifier init
(
identifier Leaf
identifier xs
)
=
identifier foldr
identifier f
identifier init
identifier xs
identifier foldr
identifier f
identifier init
(
identifier Inner
identifier l
identifier _
identifier r
)
=
identifier foldr
identifier f
(
identifier foldr
identifier f
identifier init
identifier r
)
identifier l
identifier instance
identifier Traversable
identifier Rope
identifier where
identifier sequenceA
(
identifier Leaf
identifier xs
)
=
identifier pure
identifier Leaf
<
*
>
identifier sequenceA
identifier xs
identifier sequenceA
(
identifier Inner
identifier l
identifier w
identifier r
)
=
identifier pure
identifier Inner
<
*
>
identifier sequenceA
identifier l
<
*
>
identifier pure
identifier w
<
*
>
identifier sequenceA
identifier r
identifier ropeSplitAt
:
:
identifier Int
-
>
identifier Rope
identifier a
-
>
(
identifier Rope
identifier a
,
identifier Rope
identifier a
)
identifier ropeSplitAt
identifier n
(
identifier Leaf
identifier xs
)
=
(
identifier Leaf
(
identifier take
identifier n
identifier xs
)
,
identifier Leaf
(
identifier drop
identifier n
identifier xs
)
)
identifier ropeSplitAt
identifier n
(
identifier Inner
identifier l
identifier w
identifier r
)
|
identifier n
==
identifier w
=
(
identifier l
,
identifier r
)
|
identifier n
<
identifier w
=
identifier let
(
identifier splitL
,
identifier splitR
)
=
identifier ropeSplitAt
identifier n
identifier l
identifier in
(
identifier splitL
,
identifier Inner
identifier splitR
(
identifier ropeLength
identifier splitR
)
identifier r
)
|
identifier otherwise
=
identifier let
(
identifier splitL
,
identifier splitR
)
=
identifier ropeSplitAt
(
identifier n
-
identifier w
)
identifier r
identifier in
(
identifier Inner
identifier l
identifier w
identifier splitL
,
identifier splitR
)
EOF
foo_
_
____
a_b_c_d_e
adsf
as!df
11foo
identifier foo_
identifier _
identifier ____
identifier a_b_c_d_e
identifier adsf
identifier as
!
identifier df
integer literal 11
identifier foo
EOF
>>>=>>>>> >
++=+===
+&&&=&&&
|||||
/=//=
>>>=
>>>
>>
>
++
=
+=
==
+
&&
&=
&&
&
||
||
|
/=
/
/=
EOF
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment