| 1 | -> Word16 |
|---|
| 2 | -> Word16 |
|---|
| 3 | -> Word16 |
|---|
| 4 | -> IPv6Address' |
|---|
| 5 | has only 8 |
|---|
| 6 | In the first argument of `print', namely |
|---|
| 7 | `(IPv6Address 1 0 0 1 0 0 0 1 0)' |
|---|
| 8 | In the expression: print (IPv6Address 1 0 0 1 0 0 0 1 0) |
|---|
| 9 | In an equation for `it': it = print (IPv6Address 1 0 0 1 0 0 0 1 0) |
|---|
| 10 | *Main> print (IPv6Address 1 0 0 1 0 0 0 1) |
|---|
| 11 | 1:::1:::1 |
|---|
| 12 | *Main> :r |
|---|
| 13 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 14 | Ok, modules loaded: Main. |
|---|
| 15 | *Main> print (IPv6Address 1 0 0 1 0 0 0 1) |
|---|
| 16 | 1::1::1 |
|---|
| 17 | *Main> let longestZeroSeq parts = groupBy ((==) `on` fst) zip parts [0..] |
|---|
| 18 | |
|---|
| 19 | <interactive>:1:42: Not in scope: `on' |
|---|
| 20 | *Main> import Data.Function |
|---|
| 21 | *Main Data.Function> let longestZeroSeq parts = groupBy ((==) `on` fst) zip part |
|---|
| 22 | s [0..] |
|---|
| 23 | |
|---|
| 24 | <interactive>:1:28: |
|---|
| 25 | The function `groupBy' is applied to four arguments, |
|---|
| 26 | but its type `(a0 -> a0 -> Bool) -> [a0] -> [[a0]]' has only two |
|---|
| 27 | In the expression: groupBy ((==) `on` fst) zip parts [0 .. ] |
|---|
| 28 | In an equation for `longestZeroSeq': |
|---|
| 29 | longestZeroSeq parts = groupBy ((==) `on` fst) zip parts [0 .. ] |
|---|
| 30 | *Main Data.Function> let longestZeroSeq parts = groupBy ((==) `on` fst) (zip par |
|---|
| 31 | ts [0..]) |
|---|
| 32 | *Main Data.Function> longestZeroSeq [1,2,0,0,0,1,0,0,2,0,0,0,0] |
|---|
| 33 | [[(1,0)],[(2,1)],[(0,2),(0,3),(0,4)],[(1,5)],[(0,6),(0,7)],[(2,8)],[(0,9),(0,10) |
|---|
| 34 | ,(0,11),(0,12)]] |
|---|
| 35 | *Main Data.Function> longestZeroSeq = fst $ maxBy length $ filter ((==0) . fst . |
|---|
| 36 | head) $ groupBy ((==) `on` fst) $ zip parts [0..] |
|---|
| 37 | |
|---|
| 38 | <interactive>:1:16: parse error on input `=' |
|---|
| 39 | *Main Data.Function> let longestZeroSeq = fst $ maxBy length $ filter ((==0) . f |
|---|
| 40 | st . head) $ groupBy ((==) `on` fst) $ zip parts [0..] |
|---|
| 41 | |
|---|
| 42 | <interactive>:1:28: Not in scope: `maxBy' |
|---|
| 43 | |
|---|
| 44 | <interactive>:1:103: Not in scope: `parts' |
|---|
| 45 | *Main Data.Function> let longestZeroSeq parts = fst $ maximumBy length $ filter |
|---|
| 46 | ((==0) . fst . head) $ groupBy ((==) `on` fst) $ zip parts [0..] |
|---|
| 47 | |
|---|
| 48 | <interactive>:1:44: |
|---|
| 49 | Couldn't match expected type `[a0] -> Ordering' |
|---|
| 50 | with actual type `Int' |
|---|
| 51 | Expected type: [a0] -> [a0] -> Ordering |
|---|
| 52 | Actual type: [a0] -> Int |
|---|
| 53 | In the first argument of `maximumBy', namely `length' |
|---|
| 54 | In the expression: maximumBy length |
|---|
| 55 | *Main Data.Function> let longestZeroSeq parts = fst $ maximumBy (comparing.lengt |
|---|
| 56 | h) $ filter ((==0) . fst . head) $ groupBy ((==) `on` fst) $ zip parts [0..] |
|---|
| 57 | |
|---|
| 58 | <interactive>:1:45: Not in scope: `comparing' |
|---|
| 59 | *Main Data.Function> import Data.List |
|---|
| 60 | *Main Data.Function Data.List> let longestZeroSeq parts = fst $ maximumBy (compa |
|---|
| 61 | ring.length) $ filter ((==0) . fst . head) $ groupBy ((==) `on` fst) $ zip parts |
|---|
| 62 | [0..] |
|---|
| 63 | |
|---|
| 64 | <interactive>:1:45: Not in scope: `comparing' |
|---|
| 65 | *Main Data.Function Data.List> import Data.Ord |
|---|
| 66 | *Main Data.Function Data.List Data.Ord> let longestZeroSeq parts = fst $ maximum |
|---|
| 67 | By (comparing.length) $ filter ((==0) . fst . head) $ groupBy ((==) `on` fst) $ |
|---|
| 68 | zip parts [0..] |
|---|
| 69 | |
|---|
| 70 | <interactive>:1:45: |
|---|
| 71 | Couldn't match expected type `Ordering' |
|---|
| 72 | with actual type `a0 -> Ordering' |
|---|
| 73 | Expected type: (a0 -> a1) -> a0 -> Ordering |
|---|
| 74 | Actual type: (a0 -> a1) -> a0 -> a0 -> Ordering |
|---|
| 75 | In the first argument of `(.)', namely `comparing' |
|---|
| 76 | In the first argument of `maximumBy', namely `(comparing . length)' |
|---|
| 77 | *Main Data.Function Data.List Data.Ord> let longestZeroSeq parts = fst $ maximum |
|---|
| 78 | By (comparing length) $ filter ((==0) . fst . head) $ groupBy ((==) `on` fst) $ |
|---|
| 79 | zip parts [0..] |
|---|
| 80 | |
|---|
| 81 | <interactive>:1:34: |
|---|
| 82 | Couldn't match expected type `(a0, b0)' |
|---|
| 83 | with actual type `[(b1, b2)]' |
|---|
| 84 | In the second argument of `($)', namely |
|---|
| 85 | `maximumBy (comparing length) |
|---|
| 86 | $ filter ((== 0) . fst . head) |
|---|
| 87 | $ groupBy ((==) `on` fst) $ zip parts [0 .. ]' |
|---|
| 88 | In the expression: |
|---|
| 89 | fst |
|---|
| 90 | $ maximumBy (comparing length) |
|---|
| 91 | $ filter ((== 0) . fst . head) |
|---|
| 92 | $ groupBy ((==) `on` fst) $ zip parts [0 .. ] |
|---|
| 93 | In an equation for `longestZeroSeq': |
|---|
| 94 | longestZeroSeq parts |
|---|
| 95 | = fst |
|---|
| 96 | $ maximumBy (comparing length) |
|---|
| 97 | $ filter ((== 0) . fst . head) |
|---|
| 98 | $ groupBy ((==) `on` fst) $ zip parts [0 .. ] |
|---|
| 99 | *Main Data.Function Data.List Data.Ord> let longestZeroSeq parts = maximumBy (co |
|---|
| 100 | mparing length) $ filter ((==0) . fst . head) $ groupBy ((==) `on` fst) $ zip pa |
|---|
| 101 | rts [0..] |
|---|
| 102 | *Main Data.Function Data.List Data.Ord> longestZeroSeq [1,0,0,0,0,0,1,0,0,1,0] |
|---|
| 103 | [(0,1),(0,2),(0,3),(0,4),(0,5)] |
|---|
| 104 | *Main Data.Function Data.List Data.Ord> let longestZeroSeq parts = $ maximumBy ( |
|---|
| 105 | comparing length) $ filter ((==0) . fst . head) $ groupBy ((==) `on` fst) $ zip |
|---|
| 106 | parts [0..] |
|---|
| 107 | *Main Data.Function Data.List Data.Ord> :r |
|---|
| 108 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 109 | |
|---|
| 110 | IpAddress.hs:32:46: Not in scope: `go' |
|---|
| 111 | |
|---|
| 112 | IpAddress.hs:35:26: |
|---|
| 113 | Illegal view pattern: length -> maxZeroLen |
|---|
| 114 | Use -XViewPatterns to enable view patterns |
|---|
| 115 | |
|---|
| 116 | IpAddress.hs:35:45: |
|---|
| 117 | Illegal view pattern: snd . head -> maxZeroAt |
|---|
| 118 | Use -XViewPatterns to enable view patterns |
|---|
| 119 | |
|---|
| 120 | IpAddress.hs:35:79: Not in scope: `comparing' |
|---|
| 121 | |
|---|
| 122 | IpAddress.hs:35:143: Not in scope: `on' |
|---|
| 123 | Failed, modules loaded: none. |
|---|
| 124 | Prelude Data.Function Data.List Data.Ord> r |
|---|
| 125 | |
|---|
| 126 | <interactive>:1:1: Not in scope: `r' |
|---|
| 127 | Prelude Data.Function Data.List Data.Ord> :r |
|---|
| 128 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 129 | |
|---|
| 130 | IpAddress.hs:35:46: Not in scope: `go' |
|---|
| 131 | |
|---|
| 132 | IpAddress.hs:38:143: Not in scope: `on' |
|---|
| 133 | Failed, modules loaded: none. |
|---|
| 134 | Prelude Data.Function Data.List Data.Ord> |
|---|
| 135 | ghc.exe: panic! (the 'impossible' happened) |
|---|
| 136 | (GHC version 7.0.3 for i386-unknown-mingw32): |
|---|
| 137 | thread blocked indefinitely in an MVar operation |
|---|
| 138 | |
|---|
| 139 | Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug |
|---|
| 140 | |
|---|
| 141 | |
|---|
| 142 | C:\Users\porges\Desktop\H>ghci IpAddress.hs |
|---|
| 143 | GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help |
|---|
| 144 | Loading package ghc-prim ... linking ... done. |
|---|
| 145 | Loading package integer-gmp ... linking ... done. |
|---|
| 146 | Loading package base ... linking ... done. |
|---|
| 147 | Loading package ffi-1.0 ... linking ... done. |
|---|
| 148 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 149 | |
|---|
| 150 | IpAddress.hs:35:46: Not in scope: `go' |
|---|
| 151 | |
|---|
| 152 | IpAddress.hs:38:143: Not in scope: `on' |
|---|
| 153 | Failed, modules loaded: none. |
|---|
| 154 | Prelude> :l test.hs |
|---|
| 155 | [1 of 1] Compiling Main ( test.hs, interpreted ) |
|---|
| 156 | |
|---|
| 157 | test.hs:3:44: Not in scope: `maximumBy' |
|---|
| 158 | |
|---|
| 159 | test.hs:3:55: Not in scope: `comparing' |
|---|
| 160 | |
|---|
| 161 | test.hs:3:105: Not in scope: `groupBy' |
|---|
| 162 | |
|---|
| 163 | test.hs:3:119: Not in scope: `on' |
|---|
| 164 | |
|---|
| 165 | test.hs:3:135: Not in scope: `parts' |
|---|
| 166 | Failed, modules loaded: none. |
|---|
| 167 | Prelude> :r |
|---|
| 168 | [1 of 1] Compiling Main ( test.hs, interpreted ) |
|---|
| 169 | |
|---|
| 170 | test.hs:6:119: Not in scope: `on' |
|---|
| 171 | |
|---|
| 172 | test.hs:6:135: Not in scope: `parts' |
|---|
| 173 | Failed, modules loaded: none. |
|---|
| 174 | Prelude> :r |
|---|
| 175 | [1 of 1] Compiling Main ( test.hs, interpreted ) |
|---|
| 176 | |
|---|
| 177 | test.hs:7:119: Not in scope: `on' |
|---|
| 178 | Failed, modules loaded: none. |
|---|
| 179 | Prelude> :q |
|---|
| 180 | Leaving GHCi. |
|---|
| 181 | |
|---|
| 182 | C:\Users\porges\Desktop\H>ghci IpAddress.hs |
|---|
| 183 | GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help |
|---|
| 184 | Loading package ghc-prim ... linking ... done. |
|---|
| 185 | Loading package integer-gmp ... linking ... done. |
|---|
| 186 | Loading package base ... linking ... done. |
|---|
| 187 | Loading package ffi-1.0 ... linking ... done. |
|---|
| 188 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 189 | |
|---|
| 190 | IpAddress.hs:35:46: Not in scope: `go' |
|---|
| 191 | |
|---|
| 192 | IpAddress.hs:38:143: Not in scope: `on' |
|---|
| 193 | Failed, modules loaded: none. |
|---|
| 194 | Prelude> :r |
|---|
| 195 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 196 | |
|---|
| 197 | IpAddress.hs:35:46: Not in scope: `go' |
|---|
| 198 | |
|---|
| 199 | IpAddress.hs:38:143: Not in scope: `on' |
|---|
| 200 | Failed, modules loaded: none. |
|---|
| 201 | Prelude> :r |
|---|
| 202 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 203 | |
|---|
| 204 | IpAddress.hs:34:46: Not in scope: `go' |
|---|
| 205 | |
|---|
| 206 | IpAddress.hs:37:26: |
|---|
| 207 | Illegal view pattern: length -> maxZeroLen |
|---|
| 208 | Use -XViewPatterns to enable view patterns |
|---|
| 209 | |
|---|
| 210 | IpAddress.hs:37:45: |
|---|
| 211 | Illegal view pattern: snd . head -> maxZeroAt |
|---|
| 212 | Use -XViewPatterns to enable view patterns |
|---|
| 213 | |
|---|
| 214 | IpAddress.hs:37:143: Not in scope: `on' |
|---|
| 215 | Failed, modules loaded: none. |
|---|
| 216 | Prelude> :r |
|---|
| 217 | [1 of 1] Compiling Main ( IpAddress.hs, interpreted ) |
|---|
| 218 | |
|---|
| 219 | IpAddress.hs:35:46: Not in scope: `go' |
|---|
| 220 | |
|---|
| 221 | IpAddress.hs:38:143: Not in scope: `on' |
|---|
| 222 | Failed, modules loaded: none. |
|---|
| 223 | Prelude> |
|---|
| 224 | Prelude> let maxZeroSeq parts = |
|---|
| 225 | ghc.exe: panic! (the 'impossible' happened) |
|---|
| 226 | (GHC version 7.0.3 for i386-unknown-mingw32): |
|---|
| 227 | thread blocked indefinitely in an MVar operation |
|---|
| 228 | |
|---|
| 229 | Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug |
|---|