GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> 
Prelude> 
Prelude> 
#############
## RESTART ##
#############
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4913.0
5832.0
2401.0
[(),(),()]
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main
4913.0
5832.0
2401.0


***Repl Killed***
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:1:26: error:
    ? Couldn't match expected type ■ea -> Bool■f
                  with actual type ■e[Integer]■f
    ? In the first argument of ■efilter■f, namely ■e[1000 .. 9999]■f
      In the second argument of ■e($)■f, namely ■efilter [1000 .. 9999]■f
      In the expression: mapM print $ filter [1000 .. 9999]
    ? Relevant bindings include
        main :: IO ([a] -> ())
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:1:1)
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:1:50: error:
    ? Couldn't match type ■eChar■f with ■e[Char]■f
      Expected type: Integer -> [String]
        Actual type: Integer -> String
    ? In the second argument of ■e(.)■f, namely ■eshow■f
      In the second argument of ■e(.)■f, namely ■emap read . show■f
      In the second argument of ■e(.)■f, namely ■esum . map read . show■f
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:1:50: error:
    ? Couldn't match type ■eChar■f with ■e[Char]■f
      Expected type: [String]
        Actual type: String
    ? In the second argument of ■e($)■f, namely ■eshow x■f
      In the expression: (== x) . sum . map read $ show x
      In the first argument of ■efilter■f, namely
        ■e(\ x -> (== x) . sum . map read $ show x)■f
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:1:45: error:
    ? Variable not in scope: ord :: Char -> Integer
    ? Perhaps you meant one of these:
        ■eor■f (imported from Prelude), ■eodd■f (imported from Prelude)
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
[]
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main
[]
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:45: error:
    ? Couldn't match expected type ■eString -> Bool■f
                  with actual type ■eBool■f
    ? The first argument of ($) takes one argument,
      but its type ■eBool■f has none
      In the expression: n ^ l == sum . map ord $ show n
      In a stmt of a list comprehension: n ^ l == sum . map ord $ show n
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:54: error:
    ? Couldn't match expected type ■ea0 -> t0 c0■f
                  with actual type ■e[Int]■f
    ? Possible cause: ■emap■f is applied to too many arguments
      In the second argument of ■e(.)■f, namely ■emap ord (show n)■f
      In the second argument of ■e(==)■f, namely ■esum . map ord (show n)■f
      In the expression: n ^ l == sum . map ord (show n)
    ? Relevant bindings include
        n :: a0 -> c0
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:29)
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:45: error:
    ? Couldn't match expected type ■e(a0 -> Int) -> Bool■f
                  with actual type ■eBool■f
    ? The first argument of ($) takes one argument,
      but its type ■eBool■f has none
      In the expression: n ^ l == sum . map ord . show $ n
      In a stmt of a list comprehension:
        n ^ l == sum . map ord . show $ n
    ? Relevant bindings include
        n :: a0 -> Int
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:29)
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main

***Repl Killed***

#############
## RESTART ##
#############
GHCi, version 8.0.1: http://www.haskell.orgPrelude> 
***Repl Closed***
/ghc/  :? for help]]]






#############
## RESTART ##
#############
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> /ghc/  :? for help]]]

<interactive>:3:1: error: parse error on input ■e/■f
*Main> 
*Main> 
*Main> main 


***Repl Killed***
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main

***Repl Killed***
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> (sum.map ord.show)1000
193
*Main> (sum.map ord.show)1111
196
*Main> (sum.map ord.show)1
49
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:1:70: error:
    ? Variable not in scope: word :: String -> [String]
    ? Perhaps you meant ■ewords■f (imported from Prelude)
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> (sum.map read.words.show)1
1
*Main> (sum.map read.words.show)1111
1111
*Main> (sum.map read.words.show)1111
1111
*Main> 
*Main> 
*Main> (sum.map read.words.show) 3
3
*Main> (sum.map read.words.show) 11
11
*Main> show 11
"11"
*Main> map head $ show 11

<interactive>:15:12: error:
    ? Couldn't match type ■eChar■f with ■e[b]■f
      Expected type: [[b]]
        Actual type: String
    ? In the second argument of ■e($)■f, namely ■eshow 11■f
      In the expression: map head $ show 11
      In an equation for ■eit■f: it = map head $ show 11
    ? Relevant bindings include it :: [b] (bound at <interactive>:15:1)
*Main> map take 1 $ show 11

<interactive>:16:1: error:
    ? Couldn't match expected type ■eString -> t■f
                  with actual type ■e[[a0] -> [a0]]■f
    ? The first argument of ($) takes one argument,
      but its type ■e[[a0] -> [a0]]■f has none
      In the expression: map take 1 $ show 11
      In an equation for ■eit■f: it = map take 1 $ show 11
    ? Relevant bindings include it :: t (bound at <interactive>:16:1)
*Main> map (take 1) $ show 11

<interactive>:17:16: error:
    ? Couldn't match type ■eChar■f with ■e[a]■f
      Expected type: [[a]]
        Actual type: String
    ? In the second argument of ■e($)■f, namely ■eshow 11■f
      In the expression: map (take 1) $ show 11
      In an equation for ■eit■f: it = map (take 1) $ show 11
    ? Relevant bindings include
        it :: [[a]] (bound at <interactive>:17:1)
*Main> map transpose $ show 11

<interactive>:18:5: error:
    Variable not in scope: transpose :: Char -> b
*Main> map show $ show 11
["'1'","'1'"]
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:1:70: error:
    ? Couldn't match type ■eChar■f with ■e[Char]■f
      Expected type: Integer -> [String]
        Actual type: Integer -> String
    ? In the second argument of ■e(.)■f, namely ■eshow . show■f
      In the second argument of ■e(.)■f, namely ■emap read . show . show■f
      In the expression: sum . map read . show . show
Failed, modules loaded: none.
Prelude> (map(read.show).show) 11
[*** Exception: Prelude.read: no parse
Prelude> (map(read.\x->[x]).show) 11

<interactive>:22:6: error:
    Pattern syntax in expression context: read .\ x -> [x]
    Did you mean to enable TypeApplications?
Prelude> (map(read.(\x->[x])).show) 11
[*** Exception: Prelude.read: no parse
Prelude> (map(read.(\x->[x])).show) 11
[*** Exception: Prelude.read: no parse
Prelude> (map((\x->[x])).show) 11
["1","1"]
Prelude> (map(read.(\x->[x])).show) 11
[*** Exception: Prelude.read: no parse
Prelude> (map ord.show) 11

<interactive>:27:6: error:
    ? Variable not in scope: ord :: Char -> b
    ? Perhaps you meant one of these:
        ■eor■f (imported from Prelude), ■eodd■f (imported from Prelude)
Prelude> (map ord.show) 11

<interactive>:28:6: error:
    ? Variable not in scope: ord :: Char -> b
    ? Perhaps you meant one of these:
        ■eor■f (imported from Prelude), ■eodd■f (imported from Prelude)
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:70: error:
    ? Couldn't match type ■eChar■f with ■e[Char]■f
      Expected type: Integer -> [String]
        Actual type: Integer -> String
    ? In the second argument of ■e(.)■f, namely ■eshow . show■f
      In the second argument of ■e(.)■f, namely ■emap read . show . show■f
      In the expression: sum . map read . show . show
Failed, modules loaded: none.
Prelude> (map ord.show) 11

<interactive>:30:6: error:
    ? Variable not in scope: ord :: Char -> b
    ? Perhaps you meant one of these:
        ■eor■f (imported from Prelude), ■eodd■f (imported from Prelude)
Prelude> :m Data.Caar

<no location info>: error:
    Could not find module ■eData.Caar■f
    Perhaps you meant Data.Char (from base-4.9.0.0)
Prelude> :m Data.Char
Prelude Data.Char> (map ord.show) 11
[49,49]
Prelude Data.Char> (map ((-48).ord).show) 11

<interactive>:34:1: error:
    ? Non type-variable argument in the constraint: Num (Int -> b)
      (Use FlexibleContexts to permit this)
    ? When checking the inferred type
        it :: forall b. Num (Int -> b) => [b]
Prelude Data.Char> (map ord.show) 11
[49,49]
Prelude Data.Char> (sum .map ord.show) 11
98
Prelude Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> (sum.map ord.show) 11
98
*Main Data.Char> (sum.map ord.show) 11
98
*Main Data.Char> (sum.map ord.show) 00
48
*Main Data.Char> (sum.map ord.show) 0
48
*Main Data.Char> (sum.map ord.show) 01
49
*Main Data.Char> (sum.map ord.show) 10
97
*Main Data.Char> [..2]

<interactive>:44:2: error: parse error on input ■e..■f
*Main Data.Char> [0..2]
[0,1,2]
*Main Data.Char> [..2]

<interactive>:46:2: error: parse error on input ■e..■f
*Main Data.Char> (sum.map ord.show) 10
97
*Main Data.Char> (sum.map ord.show) 00
48
*Main Data.Char> (sum.map ord.show) 00
48
*Main Data.Char> show 00
"0"
*Main Data.Char> (sum.map ord.show) 00
48
*Main Data.Char> (sum.map ord.show) 0
48
*Main Data.Char> (sum.map ord.show) 1111
196
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> (sum.map ord.show) 111
147
*Main Data.Char> main 

***Repl Killed***



#############
## RESTART ##
#############
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> (sum.map ord.show)4913
209
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:11: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■eprint■f
      prevents the constraint ■e(Show a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Show a, Show b) => Show (Either a b)
          -- Defined in ■eData.Either■f
        instance Show Ordering -- Defined in ■eGHC.Show■f
        instance Show Integer -- Defined in ■eGHC.Show■f
        ...plus 23 others
        ...plus 45 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the first argument of ■emapM■f, namely ■eprint■f
      In the expression: mapM print
      In the expression:
        mapM print
        $ take
            3
            [n |
               l <- [1 .. ],
               n <- [1000 .. 9999],
               n == ((^ l) . (- 192) sum . map ord . show) n]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:38: error:
    ? Ambiguous type variable ■ea0■f arising from the arithmetic sequence ■e1000 .. 9999■f
      prevents the constraint ■e(Enum a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Enum Ordering -- Defined in ■eGHC.Enum■f
        instance Enum Integer -- Defined in ■eGHC.Enum■f
        instance Enum () -- Defined in ■eGHC.Enum■f
        ...plus six others
        ...plus 8 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:39: error:
    ? Ambiguous type variable ■ea0■f arising from the literal ■e1000■f
      prevents the constraint ■e(Num a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Num Integer -- Defined in ■eGHC.Num■f
        instance Num Double -- Defined in ■eGHC.Float■f
        instance Num Float -- Defined in ■eGHC.Float■f
        ...plus two others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: 1000
      In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:51: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■e==■f
      prevents the constraint ■e(Eq a0)■f from being solved.
      Relevant bindings include
        n :: a0
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:35)
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Eq a, Eq b) => Eq (Either a b)
          -- Defined in ■eData.Either■f
        instance Eq Ordering -- Defined in ■eGHC.Classes■f
        instance Eq Integer
          -- Defined in ■einteger-gmp-1.0.0.1:GHC.Integer.Type■f
        ...plus 23 others
        ...plus 44 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: n == ((^ l) . (- 192) sum . map ord . show) n
      In a stmt of a list comprehension:
        n == ((^ l) . (- 192) sum . map ord . show) n
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:61: error:
    ? No instance for (Num ((t0 a1 -> a1) -> [Int] -> a0))
        arising from a use of syntactic negation
        (maybe you haven't applied a function to enough arguments?)
    ? In the expression: - 192
      In the first argument of ■e(.)■f, namely ■e(- 192) sum■f
      In the second argument of ■e(.)■f, namely
        ■e(- 192) sum . map ord . show■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:66: error:
    ? Ambiguous type variable ■ea1■f arising from a use of ■esum■f
      prevents the constraint ■e(Num a1)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea1■f should be.
      These potential instances exist:
        instance Num Integer -- Defined in ■eGHC.Num■f
        instance Num Double -- Defined in ■eGHC.Float■f
        instance Num Float -- Defined in ■eGHC.Float■f
        ...plus two others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the first argument of ■e- 192■f, namely ■esum■f
      In the first argument of ■e(.)■f, namely ■e(- 192) sum■f
      In the second argument of ■e(.)■f, namely
        ■e(- 192) sum . map ord . show■f
Failed, modules loaded: none.
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:11: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■eprint■f
      prevents the constraint ■e(Show a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Show a, Show b) => Show (Either a b)
          -- Defined in ■eData.Either■f
        instance Show Ordering -- Defined in ■eGHC.Show■f
        instance Show Integer -- Defined in ■eGHC.Show■f
        ...plus 23 others
        ...plus 45 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the first argument of ■emapM■f, namely ■eprint■f
      In the expression: mapM print
      In the expression:
        mapM print
        $ take
            3
            [n |
               l <- [1 .. ],
               n <- [1000 .. 9999],
               n == ((^ l) . (- 192) sum . map ord . show) n]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:38: error:
    ? Ambiguous type variable ■ea0■f arising from the arithmetic sequence ■e1000 .. 9999■f
      prevents the constraint ■e(Enum a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Enum Ordering -- Defined in ■eGHC.Enum■f
        instance Enum Integer -- Defined in ■eGHC.Enum■f
        instance Enum () -- Defined in ■eGHC.Enum■f
        ...plus six others
        ...plus 8 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:39: error:
    ? Ambiguous type variable ■ea0■f arising from the literal ■e1000■f
      prevents the constraint ■e(Num a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Num Integer -- Defined in ■eGHC.Num■f
        instance Num Double -- Defined in ■eGHC.Float■f
        instance Num Float -- Defined in ■eGHC.Float■f
        ...plus two others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: 1000
      In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:51: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■e==■f
      prevents the constraint ■e(Eq a0)■f from being solved.
      Relevant bindings include
        n :: a0
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:35)
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Eq a, Eq b) => Eq (Either a b)
          -- Defined in ■eData.Either■f
        instance Eq Ordering -- Defined in ■eGHC.Classes■f
        instance Eq Integer
          -- Defined in ■einteger-gmp-1.0.0.1:GHC.Integer.Type■f
        ...plus 23 others
        ...plus 44 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: n == ((^ l) . (- 192) sum . map ord . show) n
      In a stmt of a list comprehension:
        n == ((^ l) . (- 192) sum . map ord . show) n
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:61: error:
    ? No instance for (Num ((t0 a1 -> a1) -> [Int] -> a0))
        arising from a use of syntactic negation
        (maybe you haven't applied a function to enough arguments?)
    ? In the expression: - 192
      In the first argument of ■e(.)■f, namely ■e(- 192) sum■f
      In the second argument of ■e(.)■f, namely
        ■e(- 192) sum . map ord . show■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:66: error:
    ? Ambiguous type variable ■ea1■f arising from a use of ■esum■f
      prevents the constraint ■e(Num a1)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea1■f should be.
      These potential instances exist:
        instance Num Integer -- Defined in ■eGHC.Num■f
        instance Num Double -- Defined in ■eGHC.Float■f
        instance Num Float -- Defined in ■eGHC.Float■f
        ...plus two others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the first argument of ■e- 192■f, namely ■esum■f
      In the first argument of ■e(.)■f, namely ■e(- 192) sum■f
      In the second argument of ■e(.)■f, namely
        ■e(- 192) sum . map ord . show■f
Failed, modules loaded: none.
Prelude> (sum.map ord.show)4913 

<interactive>:5:10: error:
    ? Variable not in scope: ord :: Char -> c
    ? Perhaps you meant one of these:
        ■eor■f (imported from Prelude), ■eodd■f (imported from Prelude)
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:11: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■eprint■f
      prevents the constraint ■e(Show a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Show a, Show b) => Show (Either a b)
          -- Defined in ■eData.Either■f
        instance Show Ordering -- Defined in ■eGHC.Show■f
        instance Show Integer -- Defined in ■eGHC.Show■f
        ...plus 23 others
        ...plus 45 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the first argument of ■emapM■f, namely ■eprint■f
      In the expression: mapM print
      In the expression:
        mapM print
        $ take
            3
            [n |
               l <- [1 .. ],
               n <- [1000 .. 9999],
               n == ((^ l) . (- 192) . sum . map ord . show) n]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:38: error:
    ? Ambiguous type variable ■ea0■f arising from the arithmetic sequence ■e1000 .. 9999■f
      prevents the constraint ■e(Enum a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Enum Ordering -- Defined in ■eGHC.Enum■f
        instance Enum Integer -- Defined in ■eGHC.Enum■f
        instance Enum () -- Defined in ■eGHC.Enum■f
        ...plus six others
        ...plus 8 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) . sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:39: error:
    ? Ambiguous type variable ■ea0■f arising from the literal ■e1000■f
      prevents the constraint ■e(Num a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Num Integer -- Defined in ■eGHC.Num■f
        instance Num Double -- Defined in ■eGHC.Float■f
        instance Num Float -- Defined in ■eGHC.Float■f
        ...plus two others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: 1000
      In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:51: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■e==■f
      prevents the constraint ■e(Eq a0)■f from being solved.
      Relevant bindings include
        n :: a0
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:35)
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Eq a, Eq b) => Eq (Either a b)
          -- Defined in ■eData.Either■f
        instance Eq Ordering -- Defined in ■eGHC.Classes■f
        instance Eq Integer
          -- Defined in ■einteger-gmp-1.0.0.1:GHC.Integer.Type■f
        ...plus 23 others
        ...plus 44 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression:
        n == ((^ l) . (- 192) . sum . map ord . show) n
      In a stmt of a list comprehension:
        n == ((^ l) . (- 192) . sum . map ord . show) n
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) . sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:61: error:
    ? No instance for (Num (Int -> a0))
        arising from a use of syntactic negation
        (maybe you haven't applied a function to enough arguments?)
    ? In the first argument of ■e(.)■f, namely ■e(- 192)■f
      In the second argument of ■e(.)■f, namely
        ■e(- 192) . sum . map ord . show■f
      In the expression: (^ l) . (- 192) . sum . map ord . show
Failed, modules loaded: none.
Prelude> 
Prelude> 
Prelude> 
Prelude> (sum.map ord.show)4913

<interactive>:10:10: error:
    ? Variable not in scope: ord :: Char -> c
    ? Perhaps you meant one of these:
        ■eor■f (imported from Prelude), ■eodd■f (imported from Prelude)
Prelude> :m Data.Char
Prelude Data.Char> (sum.map ord.show)4913
209
Prelude Data.Char> ((-192).sum.map ord.show)4913

<interactive>:13:1: error:
    ? Non type-variable argument in the constraint: Num (Int -> c)
      (Use FlexibleContexts to permit this)
    ? When checking the inferred type
        it :: forall c. Num (Int -> c) => c
Prelude Data.Char> ((+-192).sum.map ord.show)4913

<interactive>:14:3: error:
    ? Variable not in scope: (+-) :: Int -> Integer -> c
    ? Perhaps you meant one of these:
        ■e++■f (imported from Prelude), ■e+■f (imported from Prelude),
        ■e-■f (imported from Prelude)
Prelude Data.Char> ((--192).sum.map ord.show)4913

<interactive>:15:31: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Prelude Data.Char> ((~-192).sum.map ord.show)4913

<interactive>:16:3: error:
    ? Variable not in scope: (~-) :: Int -> Integer -> c
    ? Perhaps you meant ■e-■f (imported from Prelude)
Prelude Data.Char> (((-)192).sum.map ord.show)4913
-17
Prelude Data.Char>((192-).sum.map ord.show)4913

<interactive>:18:24: error: parse error on input ■e)■f
Prelude Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:11: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■eprint■f
      prevents the constraint ■e(Show a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Show a, Show b) => Show (Either a b)
          -- Defined in ■eData.Either■f
        instance Show Ordering -- Defined in ■eGHC.Show■f
        instance Show Integer -- Defined in ■eGHC.Show■f
        ...plus 23 others
        ...plus 45 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the first argument of ■emapM■f, namely ■eprint■f
      In the expression: mapM print
      In the expression:
        mapM print
        $ take
            3
            [n |
               l <- [1 .. ],
               n <- [1000 .. 9999],
               n == ((^ l) . (- 192) . sum . map ord . show) n]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:38: error:
    ? Ambiguous type variable ■ea0■f arising from the arithmetic sequence ■e1000 .. 9999■f
      prevents the constraint ■e(Enum a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Enum Ordering -- Defined in ■eGHC.Enum■f
        instance Enum Integer -- Defined in ■eGHC.Enum■f
        instance Enum () -- Defined in ■eGHC.Enum■f
        ...plus six others
        ...plus 8 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) . sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:39: error:
    ? Ambiguous type variable ■ea0■f arising from the literal ■e1000■f
      prevents the constraint ■e(Num a0)■f from being solved.
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance Num Integer -- Defined in ■eGHC.Num■f
        instance Num Double -- Defined in ■eGHC.Float■f
        instance Num Float -- Defined in ■eGHC.Float■f
        ...plus two others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression: 1000
      In the expression: [1000 .. 9999]
      In a stmt of a list comprehension: n <- [1000 .. 9999]

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:51: error:
    ? Ambiguous type variable ■ea0■f arising from a use of ■e==■f
      prevents the constraint ■e(Eq a0)■f from being solved.
      Relevant bindings include
        n :: a0
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:35)
      Probable fix: use a type annotation to specify what ■ea0■f should be.
      These potential instances exist:
        instance (Eq a, Eq b) => Eq (Either a b)
          -- Defined in ■eData.Either■f
        instance Eq Ordering -- Defined in ■eGHC.Classes■f
        instance Eq Integer
          -- Defined in ■einteger-gmp-1.0.0.1:GHC.Integer.Type■f
        ...plus 23 others
        ...plus 44 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    ? In the expression:
        n == ((^ l) . (- 192) . sum . map ord . show) n
      In a stmt of a list comprehension:
        n == ((^ l) . (- 192) . sum . map ord . show) n
      In the second argument of ■etake■f, namely
        ■e[n |
            l <- [1 .. ],
            n <- [1000 .. 9999],
            n == ((^ l) . (- 192) . sum . map ord . show) n]■f

C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs:2:61: error:
    ? No instance for (Num (Int -> a0))
        arising from a use of syntactic negation
        (maybe you haven't applied a function to enough arguments?)
    ? In the first argument of ■e(.)■f, namely ■e(- 192)■f
      In the second argument of ■e(.)■f, namely
        ■e(- 192) . sum . map ord . show■f
      In the expression: (^ l) . (- 192) . sum . map ord . show
Failed, modules loaded: none.
Prelude Data.Char> (-192).sum.map ord.show)4913

<interactive>:20:24: error: parse error on input ■e)■f
Prelude Data.Char> ((-192).sum.map ord.show)4913

<interactive>:21:1: error:
    ? Non type-variable argument in the constraint: Num (Int -> c)
      (Use FlexibleContexts to permit this)
    ? When checking the inferred type
        it :: forall c. Num (Int -> c) => c
Prelude Data.Char> ((+192).sum.map ord.show)4913
401
Prelude Data.Char> ((.-192).sum.map ord.show)4913

<interactive>:23:3: error:
    ? Variable not in scope: (.-) :: Int -> Integer -> c
    ? Perhaps you meant one of these:
        ■e.■f (imported from Prelude), ■e-■f (imported from Prelude)
Prelude Data.Char> ((negate 192).sum.map ord.show)4913

<interactive>:24:1: error:
    ? Non type-variable argument in the constraint: Num (Int -> c)
      (Use FlexibleContexts to permit this)
    ? When checking the inferred type
        it :: forall c. Num (Int -> c) => c
Prelude Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> ((\x->(x-192)^l).sum.map ord.show)4913

<interactive>:27:15: error: Variable not in scope: l :: Integer
*Main Data.Char> ((\x->(x-192)^2).sum.map ord.show)4913
289
*Main Data.Char> ((\x->(x-192)^4).sum.map ord.show)4913
83521
*Main Data.Char> ((\x->(x-192)^3).sum.map ord.show)4913
4913
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> main 
4913
5832
2401
[(),(),()]
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> main
4913
5832
2401
[(),(),()]
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> main
4913
5832
2401
[(),(),()]
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> main
4913
5832
2401
[(),(),()]
*Main Data.Char> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main Data.Char> main

***Repl Killed***
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> 
Prelude> 
***Repl Killed***
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> 
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main

***Repl Killed***
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main
2401
4913
5832
[(),(),()]
*Main> n==((\x->(x-192)^l).sum.map ord.show)n

<interactive>:3:1: error: Variable not in scope: n :: Int

<interactive>:3:18: error: Variable not in scope: l :: Integer

<interactive>:3:38: error: Variable not in scope: n :: ()
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> n==(sum.map ord.show)n-192

<interactive>:5:1: error: Variable not in scope: n :: Int

<interactive>:5:22: error: Variable not in scope: n :: ()
*Main> main 
2401
4913
5832
[(),(),()]
*Main> 'a' - 'a'

<interactive>:7:1: error:
    ? No instance for (Num Char) arising from a use of ■e-■f
    ? In the expression: 'a' - 'a'
      In an equation for ■eit■f: it = 'a' - 'a'
*Main> 'a' + 'a'

<interactive>:8:1: error:
    ? No instance for (Num Char) arising from a use of ■e+■f
    ? In the expression: 'a' + 'a'
      In an equation for ■eit■f: it = 'a' + 'a'
*Main> 'a' + 1

<interactive>:9:1: error:
    ? No instance for (Num Char) arising from a use of ■e+■f
    ? In the expression: 'a' + 1
      In an equation for ■eit■f: it = 'a' + 1
*Main> fromEnum 'a]'

<interactive>:10:12: error: parse error on input ■e]■f
*Main> fromEnum 'a'
97
*Main> fromEnum '0'
48
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\snippets\golf.hs, interpreted )
Ok, modules loaded: Main.
*Main> main
2401
4913
5832
[(),(),()]
*Main> 
#############
## RESTART ##
#############
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs, interpreted )
Ok, modules loaded: Main.
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs:42:1: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Failed, modules loaded: none.
Prelude> [1..10]
[1,2,3,4,5,6,7,8,9,10]
Prelude> f i = (== 0) . (`mod` i)
Prelude> filter (f 2) [1..10]
[2,4,6,8,10]
Prelude> filter (f 3) [1..10]
[3,6,9]
Prelude> filter (f 2) . filter (f 3) $ [1..10]
[6]
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs:39:11: error:
    ? Couldn't match expected type ■eInt -> Int -> a0■f
                  with actual type ■eInt■f
    ? The function ■esolve■f is applied to three arguments,
      but its type ■e(Int, Int, Int) -> Int■f has only one
      In the second argument of ■e($)■f, namely ■esolve x y z■f
      In a stmt of a 'do' block: print $ solve x y z

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs:39:17: error:
    ? Couldn't match expected type ■e(Int, Int, Int)■f
                  with actual type ■eInt■f
    ? In the first argument of ■esolve■f, namely ■ex■f
      In the second argument of ■e($)■f, namely ■esolve x y z■f
      In a stmt of a 'do' block: print $ solve x y z
Failed, modules loaded: none.
Prelude> length . filter (f 2) . filter (f 3) $ [1..10]

<interactive>:10:18: error:
    Variable not in scope: f :: Integer -> Integer -> Bool

<interactive>:10:33: error:
    Variable not in scope: f :: Integer -> Integer -> Bool
Prelude> f i = (== 0) . (`mod` i)
Prelude> length . filter (f 2) . filter (f 3) $ [1..10]
1
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs:39:11: error:
    ? Couldn't match expected type ■eInt -> Int -> a0■f
                  with actual type ■eInt■f
    ? The function ■esolve■f is applied to three arguments,
      but its type ■e(Int, Int, Int) -> Int■f has only one
      In the second argument of ■e($)■f, namely ■esolve x y z■f
      In a stmt of a 'do' block: print $ solve x y z

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs:39:17: error:
    ? Couldn't match expected type ■e(Int, Int, Int)■f
                  with actual type ■eInt■f
    ? In the first argument of ■esolve■f, namely ■ex■f
      In the second argument of ■e($)■f, namely ■esolve x y z■f
      In a stmt of a 'do' block: print $ solve x y z
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395a.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 1 1 10

<interactive>:15:1: error:
    ? Couldn't match expected type ■eInteger -> Integer -> Integer -> t■f
                  with actual type ■eIO ()■f
    ? The function ■emain■f is applied to three arguments,
      but its type ■eIO ()■f has none
      In the expression: main 1 1 10
      In an equation for ■eit■f: it = main 1 1 10
    ? Relevant bindings include it :: t (bound at <interactive>:15:1)
*Main> main
1 1 10
10
*Main> main 
2 3 9
1
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395b.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
1
1
[1,2,3,4,5,6,7,8,9,10]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395b.hs:40:32: error:
    ? Couldn't match type ■e[Char]■f with ■eChar■f
      Expected type: [Int] -> [Char]
        Actual type: [Int] -> [String]
    ? In the second argument of ■e(.)■f, namely ■emap show■f
      In the second argument of ■e(.)■f, namely
        ■eintersperse ' ' . map show■f
      In the expression: putStrLn . intersperse ' ' . map show
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
1 1
1
1 2 3 4 5 6 7 8 9 10
*Main> [0..2]
[0,1,2]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
7
4 3 7 6 9 1 2
2 3 9 6 7 1 4
*Main> main 
8
6 1 4 2 5 6 9 2
2 1 6 2 5 4 9 6
*Main> [1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:44:1: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:50:9: error:
    ? Couldn't match expected type ■eInt
                                    -> [(Int, Int)] -> [Int] -> Maybe Int■f
                  with actual type ■eMaybe Integer■f
    ? Possible cause: ■eJust■f is applied to too many arguments
      In the expression: Just 2
      In an equation for ■esolve■f: solve = Just 2
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
YES
2
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:61:1: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Failed, modules loaded: none.
Prelude> foldl1 (==) [1,1,1]

<interactive>:38:14: error:
    ? No instance for (Num Bool) arising from the literal ■e1■f
    ? In the expression: 1
      In the second argument of ■efoldl1■f, namely ■e[1, 1, 1]■f
      In the expression: foldl1 (==) [1, 1, 1]
Prelude> foldl (==0) 0 [1,1,1]

<interactive>:39:8: error:
    ? Couldn't match type ■eBool■f with ■eInteger -> a■f
      Expected type: a -> Integer -> a
        Actual type: a -> Bool
    ? In the first argument of ■efoldl■f, namely ■e(== 0)■f
      In the expression: foldl (== 0) 0 [1, 1, 1]
      In an equation for ■eit■f: it = foldl (== 0) 0 [1, 1, 1]
    ? Relevant bindings include it :: a (bound at <interactive>:39:1)
Prelude> all (==1) [1,1,1]
True
Prelude> all (==1) [1,1,2]
False
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:54:8: error:
    ? Variable not in scope: solve' :: Graph -> Maybe Int
    ? Perhaps you meant ■esolve■f (line 52)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:54:8: error:
    ? Couldn't match expected type ■eMaybe Int■f
                  with actual type ■eGraph -> Table Int■f
    ? In the expression: solve' $ buildG (1, v) $ es ++ reverse es
      In the expression:
        if uniColor cs then
            Just 1
        else
            solve' $ buildG (1, v) $ es ++ reverse es
      In an equation for ■esolve■f:
          solve v es cs
            = if uniColor cs then
                  Just 1
              else
                  solve' $ buildG (1, v) $ es ++ reverse es
            where
                uniColor (c : cs) = all (== c) cs
                solve' g = outdegree
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:71:1: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Failed, modules loaded: none.
Prelude> foldl (==0) 0 [1,1,1]

<interactive>:45:8: error:
    ? Couldn't match type ■eBool■f with ■eInteger -> a■f
      Expected type: a -> Integer -> a
        Actual type: a -> Bool
    ? In the first argument of ■efoldl■f, namely ■e(== 0)■f
      In the expression: foldl (== 0) 0 [1, 1, 1]
      In an equation for ■eit■f: it = foldl (== 0) 0 [1, 1, 1]
    ? Relevant bindings include it :: a (bound at <interactive>:45:1)
Prelude> 
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:58:24: error:
    ? Expecting one more argument to ■eArray Int■f
      Expected a type, but ■eArray Int■f has kind ■e* -> *■f
    ? In the type signature:
        solve' :: Graph -> Array Int -> Maybe Int
      In an equation for ■esolve■f:
          solve v es cs
            = if uniColor cs then
                  Just 1
              else
                  solve' graph $ listArray (1, v) cs
            where
                uniColor (c : cs) = all (== c) cs
                graph = buildG (1, v) $ es ++ reverse es
                solve' :: Graph -> Array Int -> Maybe Int
                solve' graph color
                  = if cntDiffColor maxDegEdges == cntDiffColor es then
                        Just maxDegNode
                    else
                        Nothing
                  where
                      maxDegNode
                        = fst . maximumBy (compare `on` snd) . assocs $ outdegree graph
                      maxDegEdges = map ... $ graph ! maxDegNode
                      ....
Failed, modules loaded: none.
Prelude> 
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:58:24: error:
    ? Expecting one more argument to ■eArray Int■f
      Expected a type, but ■eArray Int■f has kind ■e* -> *■f
    ? In the type signature:
        solve' :: Graph -> Array Int -> Maybe Int
      In an equation for ■esolve■f:
          solve v es cs
            = if uniColor cs then
                  Just 1
              else
                  solve' graph $ listArray (1, v) cs
            where
                uniColor (c : cs) = all (== c) cs
                graph = buildG (1, v) $ es ++ reverse es
                solve' :: Graph -> Array Int -> Maybe Int
                solve' graph color
                  = if cntDiffColor maxDegEdges == cntDiffColor es then
                        Just maxDegNode
                    else
                        Nothing
                  where
                      maxDegNode
                        = fst . maximumBy (compare `on` snd) . assocs $ outdegree graph
                      maxDegEdges = map ... $ graph ! maxDegNode
                      ....
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:52:17: error:
    Multi-way if-expressions need MultiWayIf turned on
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:61:48: error:
    Variable not in scope: color :: Array i a0

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:61:61: error:
    Variable not in scope: color :: Array i1 a0
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main
4
1 2
2 3
3 4
1 2 1 1
*** Exception: Maybe.fromJust: Nothing
*Main> main
NO
*Main> main
*** Exception: Maybe.fromJust: Nothing
*Main> 3
1 2
2 3
1 2 3
*Main| *Main| *Main| *Main| *Main| *Main| 
<interactive>:57:1: error:
    ? Non type-variable argument
        in the constraint: Num
                             (t -> t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7)
      (Use FlexibleContexts to permit this)
    ? When checking the inferred type
        it :: forall t t1 t2 t3 t4 t5 t6 t7.
              (Num (t -> t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7), Num t6, Num t5,
               Num t4, Num t3, Num t2, Num t1, Num t) =>
              t7
*Main> 
*Main> 
*Main> 
*Main> 3
1 2
2 3
1 2 3
*Main| *Main| *Main| *Main| *Main| *Main| 
<interactive>:67:1: error:
    ? Non type-variable argument
        in the constraint: Num
                             (t -> t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7)
      (Use FlexibleContexts to permit this)
    ? When checking the inferred type
        it :: forall t t1 t2 t3 t4 t5 t6 t7.
              (Num (t -> t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7), Num t6, Num t5,
               Num t4, Num t3, Num t2, Num t1, Num t) =>
              t7
*Main> main 
*** Exception: Maybe.fromJust: Nothing
*Main> 
*Main> 
*Main> main 
3
1 2
2 3
1 2 3
*** Exception: Maybe.fromJust: Nothing
*Main> 
*Main> 
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
*** Exception: Maybe.fromJust: Nothing
*Main> 
*Main> 
*Main> main 
*** Exception: C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:57:5-34: Non-exhaustive patterns in function uniColor

*Main> min 

<interactive>:84:1: error:
    ? No instance for (Show (a0 -> a0 -> a0))
        arising from a use of ■eprint■f
        (maybe you haven't applied a function to enough arguments?)
    ? In the first argument of ■eprint■f, namely ■eit■f
      In a stmt of an interactive GHCi command: print it
*Main> main 
*** Exception: Maybe.fromJust: Nothing
*Main> main 
1 1 1 1
 1
YES
1
*Main>  1
1
*Main> 
*Main> 
*Main> 
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 1 1 1
YES
1
*Main> main
4
1 2
2 3
3 4
1 2 1 1
NO
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
array (1,4) [(1,[2,2]),(2,[3,3]),(3,[4,4]),(4,[])]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:43:11: error:
    ? Variable not in scope: outdegrees :: Graph -> a0
    ? Perhaps you meant ■eoutdegree■f (imported from Data.Graph)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:43:11: error:
    ? Variable not in scope: outdegrees :: Graph -> a0
    ? Perhaps you meant ■eoutdegree■f (imported from Data.Graph)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
array (1,4) [(1,2),(2,2),(3,2),(4,0)]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 1 2 1 1

<interactive>:102:1: error:
    ? Non type-variable argument
        in the constraint: Num (t -> t1 -> t2 -> t3)
      (Use FlexibleContexts to permit this)
    ? When checking the inferred type
        it :: forall t t1 t2 t3.
              (Num (t -> t1 -> t2 -> t3), Num t2, Num t1, Num t) =>
              t3
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
array (1,4) [(1,1),(2,2),(3,2),(4,1)]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
NO
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
3
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:69:5: error:
    parse error on input ■e.■f
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:58:18: error:
    Variable not in scope: maxDegEdges :: [(Int, Int)]

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:58:33: error:
    ? Couldn't match expected type ■eInt■f
                  with actual type ■e[(Int, Int)] -> Int■f
    ? Probable cause: ■ecntDiffColor■f is applied to too few arguments
      In the second argument of ■e(==)■f, namely ■ecntDiffColor■f
      In the expression: cntDiffColor maxDegEdges == cntDiffColor
      In a stmt of a pattern guard for
                     a multi-way if alternative:
        cntDiffColor maxDegEdges == cntDiffColor

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:58:54: error:
    ? Variable not in scope: maxDegNode :: Int
    ? Perhaps you meant ■emaxDiffNode■f (line 68)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:58:18: error:
    ? Couldn't match expected type ■e[(Int, Int)]■f
                  with actual type ■eInt■f
    ? In the first argument of ■ecntDiffColor■f, namely ■emaxDiffNode■f
      In the first argument of ■e(==)■f, namely ■ecntDiffColor maxDiffNode■f
      In the expression:
        cntDiffColor maxDiffNode == cntDiffColor (edges graph)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:67:47: error:
    parse error on input ■e]■f
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:69:28: error:
    ? Couldn't match type ■e[e0]■f with ■eArray Int Integer -> t■f
      Expected type: Array i0 e0 -> Array Int Integer -> t
        Actual type: Array i0 e0 -> [e0]
    ? In the first argument of ■emaximum■f, namely ■eelems■f
      In the expression: maximum elems
      In the expression: maximum elems $ diffEdgeHist
    ? Relevant bindings include
        maxDiffEdges :: t
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs:69:5)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
3
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\cfr2\cfr2395c.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2
2 3
3 4
1 2 1 1
YES
2
*Main> main 
3
1 2
2 3
1 2 3
YES
2
*Main> main 
4
1 2
2 3
3 4
1 2 1 2
NO
*Main> 
#############
## RESTART ##
#############
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010a.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010a.hs:42:1: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010a.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010a.hs:46:9: error:
    ? Couldn't match expected type ■e[Int] -> Bool■f
                  with actual type ■eBool■f
    ? Possible cause: ■eeven■f is applied to too many arguments
      In the first argument of ■e(.)■f, namely ■eeven length■f
      In the expression: even length . filter odd
      In an equation for ■esolve■f: solve = even length . filter odd
Failed, modules loaded: none.
Prelude> even 3
False
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010a.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
3
1 2 3
NO
*Main> main 
YES
*Main> 
*Main> 
*Main> main 
3
NO
*Main> main 
3
1 2 3
YES
*Main> main 
5
1 2 3 4 5
NO
*Main> all (==0) [0,0,0]
True
*Main> all (==0) [0,0,1]
False
*Main> all (==0) [0,0,-1]
False
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:51:1: error:
    parse error on input ■ereadInt1■f
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010a.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:52:1: error:
    parse error on input ■ereadInt1■f
Failed, modules loaded: none.
Prelude> take 10 $ cycle [1..5]
[1,2,3,4,5,1,2,3,4,5]
Prelude> take 10 $ cycle [1..5]
[1,2,3,4,5,1,2,3,4,5]
Prelude> maximum [1..4]
4
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:53:20: error:
    ? Couldn't match expected type ■eInt■f with actual type ■ea0 -> c0■f
    ? Probable cause: ■emaxi■f is applied to too few arguments
      In the first argument of ■etake■f, namely ■emaxi■f
      In the expression: take maxi
      In the expression: take maxi $ cycle ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:23: error:
    ? Couldn't match expected type ■ea -> Maybe c■f
                  with actual type ■eMaybe Int■f
    ? Possible cause: ■efindIndex■f is applied to too many arguments
      In the second argument of ■e(.)■f, namely
        ■efindIndex (== maximum ns) ns■f
      In the expression: fromJust . findIndex (== maximum ns) ns
      In an equation for ■emaxi■f:
          maxi = fromJust . findIndex (== maximum ns) ns
    ? Relevant bindings include
        maxi :: a -> c
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:5)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> reduce [1,2,3,4,5]

<interactive>:23:8: error:
    ? Couldn't match expected type ■eInt■f with actual type ■e[Integer]■f
    ? In the first argument of ■ereduce■f, namely ■e[1, 2, 3, 4, ....]■f
      In the expression: reduce [1, 2, 3, 4, ....]
      In an equation for ■eit■f: it = reduce [1, 2, 3, ....]
*Main> reduce 5 [1,2,3,4,5]
[1,2,3,4]
*Main> reduce 5 [5,1,2,3,4,5]
[]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> reduce 5 [5,1,2,3,4,5]
[5,1,2,3,4]
*Main> reduce 5 [5,1,2,3,4]
[5,1,2,3,4]
*Main> reduce 5 [1,2,3,4,5]
[5,1,2,3,4]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:23: error:
    ? No instance for (Num (Maybe Int)) arising from a use of ■e+■f
    ? In the second argument of ■e($)■f, namely
        ■efindIndex (== maximum ns) ns + 1■f
      In the expression: fromJust $ findIndex (== maximum ns) ns + 1
      In an equation for ■emaxi■f:
          maxi = fromJust $ findIndex (== maximum ns) ns + 1
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:12: error:
    ? No instance for (Num (Maybe Int -> Int))
        arising from a use of ■e+■f
        (maybe you haven't applied a function to enough arguments?)
    ? In the expression: 1 + 2 fromJust
      In the expression: 1 + 2 fromJust $ findIndex (== maximum ns) ns
      In an equation for ■emaxi■f:
          maxi = 1 + 2 fromJust $ findIndex (== maximum ns) ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:16: error:
    ? No instance for (Num ((Maybe a0 -> a0) -> Maybe Int -> Int))
        arising from the literal ■e2■f
        (maybe you haven't applied a function to enough arguments?)
    ? In the expression: 2
      In the second argument of ■e(+)■f, namely ■e2 fromJust■f
      In the expression: 1 + 2 fromJust
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:12: error:
    ? No instance for (Num (Maybe Int -> Int))
        arising from a use of ■e+■f
        (maybe you haven't applied a function to enough arguments?)
    ? In the expression: 1 + fromJust
      In the expression: 1 + fromJust $ findIndex (== maximum ns) ns
      In an equation for ■emaxi■f:
          maxi = 1 + fromJust $ findIndex (== maximum ns) ns
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> reduce 5 [1,2,3,4,5]
[1,2,3,4,5]
*Main> reduce 5 [3,4,5,2,3]
[2,3,3,4,5]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> reduce 5 [3,4,5,2,3]
[-1,-1,0,0,0]
*Main> reduce 5 [3,4,5,1,2]
[0,0,0,0,0]
*Main> reduce 5 [6,9,12,10,8]
[-9,-6,-3,-5,-7]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> reduce 5 [6,9,12,10,8]
[9,6,3,5,7]
*Main> main 
5
6 9 12 10 8
YES
*Main> main 
4
1 2 3 1
NO
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
5
1 2 3 4 5
YES
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:49:15: error:
    ? Couldn't match expected type ■eInt -> b■f with actual type ■eInt■f
    ? In the expression: pre
      In the first argument of ■emap■f, namely ■e(- pre)■f
      In the expression: map (- pre) ns
    ? Relevant bindings include
        ns' :: [b]
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:49:3)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
5
1 2 3 4 5
YES
*Main> main 
5
16 17 18 19 20
YES
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
4
1 2 3 1
NO
*Main> sum [1..10000]
50005000
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
5
4 5 1 2 3
YES
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:41:19: error:
    ? Couldn't match expected type ■eInt64■f with actual type ■eInt■f
    ? In the first argument of ■esolve■f, namely ■en■f
      In the second argument of ■e($)■f, namely ■esolve n ns■f
      In a stmt of a 'do' block: myprint $ solve n ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:41:21: error:
    ? Couldn't match type ■eInt■f with ■eInt64■f
      Expected type: [Int64]
        Actual type: [Int]
    ? In the second argument of ■esolve■f, namely ■ens■f
      In the second argument of ■e($)■f, namely ■esolve n ns■f
      In a stmt of a 'do' block: myprint $ solve n ns
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:54:35: error:
    Variable not in scope: reduce :: Int64 -> t a -> t a
Failed, modules loaded: none.
Prelude> [1..5] ++ [1]
[1,2,3,4,5,1]
Prelude> $ [1,2,3,4,1]

<interactive>:60:1: error:
    parse error on input ■e$■f
    Perhaps you intended to use TemplateHaskell
Prelude> zipWith(-) (take 5 . drop 1 $ cycle )

<interactive>:61:31: error:
    ? Couldn't match expected type ■e[c]■f
                  with actual type ■e[a0] -> [a0]■f
    ? Probable cause: ■ecycle■f is applied to too few arguments
      In the second argument of ■e($)■f, namely ■ecycle■f
      In the second argument of ■ezipWith■f, namely
        ■e(take 5 . drop 1 $ cycle)■f
      In the expression: zipWith (-) (take 5 . drop 1 $ cycle)
    ? Relevant bindings include
        it :: [c] -> [c] (bound at <interactive>:61:1)
Prelude> zipWith(-) (take 5 . drop 1 $ cycle [1,2,3,4,1]) [1,2,3,4,1]
[1,1,1,-3,0]
Prelude> zipWith(-) (take 5 . drop 1 $ cycle [1,2,3,4,1]) [1,2,3,4,1]
[1,1,1,-3,0]
Prelude> zipWith(-) (take 5 . drop 1 $ cycle [1,2,3,4]) [1,2,3,4]
[1,1,1,-3]
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> diff 5 [6,9,12,10,8]
[3,3,-2,-2,-2]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:41:19: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the first argument of ■esolve■f, namely ■en■f
      In the second argument of ■e($)■f, namely ■esolve n ns■f
      In a stmt of a 'do' block: myprint $ solve n ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:41:21: error:
    ? Couldn't match type ■eInt64■f with ■eInt■f
      Expected type: [Int]
        Actual type: [Int64]
    ? In the second argument of ■esolve■f, namely ■ens■f
      In the second argument of ■e($)■f, namely ■esolve n ns■f
      In a stmt of a 'do' block: myprint $ solve n ns
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:72:37: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the first argument of ■etake■f, namely ■en■f
      In the first argument of ■e(.)■f, namely ■etake n■f
      In the expression: take n . drop (maxi + 1)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:64:21: error:
    ? Couldn't match type ■eInt■f with ■eInt64■f
      Expected type: [Int64]
        Actual type: [Int]
    ? In the first argument of ■esolve'■f, namely ■ens'■f
      In the expression: solve' ns'
      In an equation for ■esolve■f:
          solve n ns
            = solve' ns'
            where
                pre = sum [1 .. n] * (minimum ns `div` sum [1 .. n])
                ns' = map (flip (-) pre) ns
                solve' ns
                  = if
                    | all (== 0) ns -> True
                    | minimum ns <= 0 -> False
                    | otherwise -> solve' $ reduce n ns
                  where
                      reduce :: Int -> [Int64] -> [Int64]
                      reduce n ns
                        = zipWith (-) (take n . drop (maxi + 1) $ cycle ns) ...
                        where
                            ...

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:65:23: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the second argument of ■e(*)■f, namely
        ■e(minimum ns `div` sum [1 .. n])■f
      In the expression: sum [1 .. n] * (minimum ns `div` sum [1 .. n])
      In an equation for ■epre■f:
          pre = sum [1 .. n] * (minimum ns `div` sum [1 .. n])

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:65:40: error:
    ? Couldn't match expected type ■eInt64■f with actual type ■eInt■f
    ? In the second argument of ■ediv■f, namely ■esum [1 .. n]■f
      In the second argument of ■e(*)■f, namely
        ■e(minimum ns `div` sum [1 .. n])■f
      In the expression: sum [1 .. n] * (minimum ns `div` sum [1 .. n])

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:66:28: error:
    ? Couldn't match type ■eInt64■f with ■eInt■f
      Expected type: [Int]
        Actual type: [Int64]
    ? In the second argument of ■emap■f, namely ■ens■f
      In the expression: map (flip (-) pre) ns
      In an equation for ■ens'■f: ns' = map (flip (-) pre) ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:72:73: error:
    ? Couldn't match expected type ■eInt64■f with actual type ■eInt■f
    ? In the expression: n
      In the third argument of ■ezipWith■f, namely ■e[1 .. n]■f
      In the expression:
        zipWith (-) (take n . drop (maxi + 1) $ cycle ns) [1 .. n]
Failed, modules loaded: none.
Prelude>
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:70:42: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the first argument of ■ereduce■f, namely ■en■f
      In the second argument of ■e($)■f, namely ■ereduce n ns■f
      In the expression: solve' $ reduce n ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:72:73: error:
    ? Couldn't match expected type ■eInt64■f with actual type ■eInt■f
    ? In the expression: n
      In the third argument of ■ezipWith■f, namely ■e[1 .. n]■f
      In the expression:
        zipWith (-) (take n . drop (maxi + 1) $ cycle ns) [1 .. n]
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:70:42: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the first argument of ■ereduce■f, namely ■en■f
      In the second argument of ■e($)■f, namely ■ereduce n ns■f
      In the expression: solve' $ reduce n ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:72:73: error:
    ? Couldn't match expected type ■eInt64■f with actual type ■eInt■f
    ? In the expression: n
      In the third argument of ■ezipWith■f, namely ■e[1 .. n]■f
      In the expression:
        zipWith (-) (take n . drop (maxi + 1) $ cycle ns) [1 .. n]
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:72:37: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the first argument of ■etake■f, namely ■en■f
      In the first argument of ■e(.)■f, namely ■etake n■f
      In the expression: take n . drop (maxi + 1)
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:64:21: error:
    ? Couldn't match type ■eInt■f with ■eInt64■f
      Expected type: [Int64]
        Actual type: [Int]
    ? In the first argument of ■esolve'■f, namely ■ens'■f
      In the expression: solve' ns'
      In an equation for ■esolve■f:
          solve n ns
            = solve' ns'
            where
                pre = sum [1 .. n] * (minimum ns `div` sum [1 .. n])
                ns' = map (flip (-) pre) ns
                solve' ns
                  = if
                    | all (== 0) ns -> True
                    | minimum ns <= 0 -> False
                    | otherwise -> solve' $ reduce n ns
                  where
                      reduce :: Int -> [Int64] -> [Int64]
                      reduce n ns
                        = zipWith (-) (take n . drop (maxi + 1) $ cycle ns) ...
                        where
                            ...

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:65:23: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the second argument of ■e(*)■f, namely
        ■e(minimum ns `div` sum [1 .. n])■f
      In the expression: sum [1 .. n] * (minimum ns `div` sum [1 .. n])
      In an equation for ■epre■f:
          pre = sum [1 .. n] * (minimum ns `div` sum [1 .. n])

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:65:40: error:
    ? Couldn't match expected type ■eInt64■f with actual type ■eInt■f
    ? In the second argument of ■ediv■f, namely ■esum [1 .. n]■f
      In the second argument of ■e(*)■f, namely
        ■e(minimum ns `div` sum [1 .. n])■f
      In the expression: sum [1 .. n] * (minimum ns `div` sum [1 .. n])

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:66:28: error:
    ? Couldn't match type ■eInt64■f with ■eInt■f
      Expected type: [Int]
        Actual type: [Int64]
    ? In the second argument of ■emap■f, namely ■ens■f
      In the expression: map (flip (-) pre) ns
      In an equation for ■ens'■f: ns' = map (flip (-) pre) ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:72:73: error:
    ? Couldn't match expected type ■eInt64■f with actual type ■eInt■f
    ? In the expression: n
      In the third argument of ■ezipWith■f, namely ■e[1 .. n]■f
      In the expression:
        zipWith (-) (take n . drop (maxi + 1) $ cycle ns) [1 .. n]
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
5
6 12 9 10 8
NO
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> and 1 2

<interactive>:79:1: error:
    ? Couldn't match expected type ■eInteger -> t■f
                  with actual type ■eBool■f
    ? The function ■eand■f is applied to two arguments,
      but its type ■et0 Bool -> Bool■f has only one
      In the expression: and 1 2
      In an equation for ■eit■f: it = and 1 2
    ? Relevant bindings include it :: t (bound at <interactive>:79:1)
*Main> True and False

<interactive>:80:1: error:
    ? Couldn't match expected type ■e([Bool] -> Bool) -> Bool -> t■f
                  with actual type ■eBool■f
    ? The function ■eTrue■f is applied to two arguments,
      but its type ■eBool■f has none
      In the expression: True and False
      In an equation for ■eit■f: it = True and False
    ? Relevant bindings include it :: t (bound at <interactive>:80:1)
*Main> True && False
False
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:57:32: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the first argument of ■ediff■f, namely ■en■f
      In the second argument of ■e($)■f, namely ■ediff n ns■f
      In the expression: maximum $ diff n ns

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:58:32: error:
    ? Couldn't match expected type ■eInt■f with actual type ■eInt64■f
    ? In the first argument of ■ediff■f, namely ■en■f
      In the second argument of ■e($)■f, namely ■ediff n ns■f
      In the expression: minimum $ diff n ns
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> main 
5
4 5 1 2 3
YES
*Main> main 
5
6 9 12 19 8
NO
*Main> main 
5
6 9 12 19 8
NO
*Main> main 
5
6 9 12 10 8
YES
*Main> main 
4
1 2 3 1
NO
*Main> diff 5 $ diff 5 [6,9,12,10,8]
[0,-5,0,0,5]
*Main> diff 5 $ diff 5 [11,9,7,10,8]
[0,5,-5,5,-5]
*Main> diff 5 $ diff 5 [3,6,9,12,15]
[0,0,0,-15,15]
*Main> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:52:15: error:
    ? Couldn't match expected type ■e[Int64] -> t■f
                  with actual type ■eBool■f
    ? The first argument of ($) takes one argument,
      but its type ■eBool■f has none
      In the expression:
        sumns `mod` sumn == 0
        &&
          maxdiff <= sumns `div` sumn
          &&
            mindiff >= sumns `div` sumn * (- 1) * (n - 1)
            && all (\ x -> x `mod` n == 0) diff n
        $ diff n ns
      In an equation for ■esolve'■f:
          solve' ns
            = sumns `mod` sumn == 0
              &&
                maxdiff <= sumns `div` sumn
                &&
                  mindiff >= sumns `div` sumn * (- 1) * (n - 1)
                  && all (\ x -> x `mod` n == 0) diff n
              $ diff n ns
            where
                sumns = sum ns
                maxdiff = maximum $ diff n ns
                mindiff = minimum $ diff n ns
    ? Relevant bindings include
        solve' :: [Int64] -> t
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:52:3)

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:8: error:
    ? Couldn't match expected type ■eInt64 -> Bool■f
                  with actual type ■eBool■f
    ? The function ■eall■f is applied to three arguments,
      but its type ■e(Int64 -> Bool) -> (Int64 -> Int64) -> Bool■f
      has only two
      In the second argument of ■e(&&)■f, namely
        ■eall (\ x -> x `mod` n == 0) diff n■f
      In the second argument of ■e(&&)■f, namely
        ■emindiff >= sumns `div` sumn * (- 1) * (n - 1)
         && all (\ x -> x `mod` n == 0) diff n■f

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:33: error:
    ? Couldn't match type ■e[Int64] -> [Int64]■f with ■eInt64■f
      Expected type: Int64 -> Int64
        Actual type: Int64 -> [Int64] -> [Int64]
    ? Probable cause: ■ediff■f is applied to too few arguments
      In the second argument of ■eall■f, namely ■ediff■f
      In the second argument of ■e(&&)■f, namely
        ■eall (\ x -> x `mod` n == 0) diff n■f
      In the second argument of ■e(&&)■f, namely
        ■emindiff >= sumns `div` sumn * (- 1) * (n - 1)
         && all (\ x -> x `mod` n == 0) diff n■f
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:52:15: error:
    ? Couldn't match expected type ■e[Int64] -> t■f
                  with actual type ■eBool■f
    ? The first argument of ($) takes one argument,
      but its type ■eBool■f has none
      In the expression:
        sumns `mod` sumn == 0
        &&
          maxdiff <= sumns `div` sumn
          &&
            mindiff >= sumns `div` sumn * (- 1) * (n - 1)
            && all (\ x -> x `mod` n == 0) . diff n
        $ diff n ns
      In an equation for ■esolve'■f:
          solve' ns
            = sumns `mod` sumn == 0
              &&
                maxdiff <= sumns `div` sumn
                &&
                  mindiff >= sumns `div` sumn * (- 1) * (n - 1)
                  && all (\ x -> x `mod` n == 0) . diff n
              $ diff n ns
            where
                sumns = sum ns
                maxdiff = maximum $ diff n ns
                mindiff = minimum $ diff n ns
    ? Relevant bindings include
        solve' :: [Int64] -> t
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:52:3)

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:8: error:
    ? Couldn't match expected type ■eBool■f
                  with actual type ■e[Int64] -> Bool■f
    ? Probable cause: ■e(.)■f is applied to too few arguments
      In the second argument of ■e(&&)■f, namely
        ■eall (\ x -> x `mod` n == 0) . diff n■f
      In the second argument of ■e(&&)■f, namely
        ■emindiff >= sumns `div` sumn * (- 1) * (n - 1)
         && all (\ x -> x `mod` n == 0) . diff n■f
      In the second argument of ■e(&&)■f, namely
        ■emaxdiff <= sumns `div` sumn
         &&
           mindiff >= sumns `div` sumn * (- 1) * (n - 1)
           && all (\ x -> x `mod` n == 0) . diff n■f
Failed, modules loaded: none.
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:52:15: error:
    ? Couldn't match expected type ■e[Int64] -> t■f
                  with actual type ■eBool■f
    ? The first argument of ($) takes one argument,
      but its type ■eBool■f has none
      In the expression:
        sumns `mod` sumn == 0
        &&
          maxdiff <= sumns `div` sumn
          &&
            mindiff >= sumns `div` sumn * (- 1) * (n - 1)
            && all (\ x -> x `mod` n == 0)
        $ diff n $ diff n ns
      In an equation for ■esolve'■f:
          solve' ns
            = sumns `mod` sumn == 0
              &&
                maxdiff <= sumns `div` sumn
                &&
                  mindiff >= sumns `div` sumn * (- 1) * (n - 1)
                  && all (\ x -> x `mod` n == 0)
              $ diff n $ diff n ns
            where
                sumns = sum ns
                maxdiff = maximum $ diff n ns
                mindiff = minimum $ diff n ns
    ? Relevant bindings include
        solve' :: [Int64] -> t
          (bound at C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:52:3)

C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs:55:8: error:
    ? Couldn't match expected type ■eBool■f
                  with actual type ■et0 Int64 -> Bool■f
    ? Probable cause: ■eall■f is applied to too few arguments
      In the second argument of ■e(&&)■f, namely
        ■eall (\ x -> x `mod` n == 0)■f
      In the second argument of ■e(&&)■f, namely
        ■emindiff >= sumns `div` sumn * (- 1) * (n - 1)
         && all (\ x -> x `mod` n == 0)■f
      In the second argument of ■e(&&)■f, namely
        ■emaxdiff <= sumns `div` sumn
         &&
           mindiff >= sumns `div` sumn * (- 1) * (n - 1)
           && all (\ x -> x `mod` n == 0)■f
Failed, modules loaded: none.
Prelude> :t all
all :: Foldable t => (a -> Bool) -> t a -> Bool
Prelude> 
when making flags consistent: warning:
    -O conflicts with --interactive; -O ignored.
[1 of 1] Compiling Main             ( C:\Users\y-haruki\OneDrive\hs\comprog\agc\agc010b.hs, interpreted )
Ok, modules loaded: Main.
*Main> 