small change to help syntax highlighing
This commit is contained in:
parent
aed9254393
commit
13663cdea4
1 changed files with 14 additions and 15 deletions
29
src/Day7.hs
29
src/Day7.hs
|
@ -81,21 +81,6 @@ import Protolude
|
||||||
import qualified Data.Set as Set
|
import qualified Data.Set as Set
|
||||||
import Text.Parsec
|
import Text.Parsec
|
||||||
|
|
||||||
testInput :: Text
|
|
||||||
testInput = "pbga (66)\n\
|
|
||||||
\xhth (57)\n\
|
|
||||||
\ebii (61)\n\
|
|
||||||
\havc (66)\n\
|
|
||||||
\ktlj (57)\n\
|
|
||||||
\fwft (72) -> ktlj, cntj, xhth\n\
|
|
||||||
\qoyq (66)\n\
|
|
||||||
\padx (45) -> pbga, havc, qoyq\n\
|
|
||||||
\tknk (41) -> ugml, padx, fwft\n\
|
|
||||||
\jptl (61)\n\
|
|
||||||
\ugml (68) -> gyxo, ebii, jptl\n\
|
|
||||||
\gyxo (61)\n\
|
|
||||||
\cntj (57)"
|
|
||||||
|
|
||||||
data Node = Node { name :: Text
|
data Node = Node { name :: Text
|
||||||
, weight :: Int
|
, weight :: Int
|
||||||
, sons :: [Text]
|
, sons :: [Text]
|
||||||
|
@ -133,3 +118,17 @@ parseNode =
|
||||||
<*> (char '(' *> int <* char ')')
|
<*> (char '(' *> int <* char ')')
|
||||||
<*> sonsP
|
<*> sonsP
|
||||||
|
|
||||||
|
testInput :: Text
|
||||||
|
testInput = "pbga (66)\n\
|
||||||
|
\xhth (57)\n\
|
||||||
|
\ebii (61)\n\
|
||||||
|
\havc (66)\n\
|
||||||
|
\ktlj (57)\n\
|
||||||
|
\fwft (72) -> ktlj, cntj, xhth\n\
|
||||||
|
\qoyq (66)\n\
|
||||||
|
\padx (45) -> pbga, havc, qoyq\n\
|
||||||
|
\tknk (41) -> ugml, padx, fwft\n\
|
||||||
|
\jptl (61)\n\
|
||||||
|
\ugml (68) -> gyxo, ebii, jptl\n\
|
||||||
|
\gyxo (61)\n\
|
||||||
|
\cntj (57)\n"
|
||||||
|
|
Loading…
Reference in a new issue