chunk_id
large_stringlengths
7
11
question_id
large_stringlengths
4
8
language
large_stringclasses
1 value
chunk_index
int64
0
6
chunk_text
large_stringlengths
127
3.8k
sparse_text
large_stringlengths
120
5.55k
dense_vector
listlengths
3.58k
3.58k
sparse_indices
listlengths
2
238
sparse_values
listlengths
2
238
export_source
large_stringclasses
1 value
48652821_c1
48652821
haskell
1
-> *) where <*> :: f (a -> b) -> f a -> f b which kind of looks like a monad, but I don't really understand the weird syntax/semantics on the consuming end. Should I think of these as just another function (with a weird infix alias?). Here is a specific line exhibiting several of the examples from above: mate :: Rando...
-> *) where <*> :: f (a -> b) -> f a -> f b which kind of looks like a monad, but I don't really understand the weird syntax/semantics on the consuming end. Should I think of these as just another function (with a weird infix alias?). Here is a specific line exhibiting several of the examples from above: mate :: Rando...
[ -0.0002422332763671875, 0.01348876953125, 0.003753662109375, -0.007232666015625, 0.0021514892578125, 0.026123046875, -0.00012302398681640625, -0.00897216796875, 0.0191650390625, -0.03076171875, 0.0267333984375, -0.004730224609375, -0.00055694580078125, -0.00848388671875, -0.0157470703125...
[ 33079, 661, 7440, 1639, 1984, 1238, 11, 876, 10, 8562, 33342, 1884, 2667, 712, 2301, 18, 6183, 28219, 179459, 6002, 86531, 5765, 109109, 18588, 214, 3564, 5351, 6097, 15700, 32354, 23, 55923, 55109, 13315, 80788, 70, 27781, 29968, 39643, ...
[ 0.1759033203125, 0.132568359375, 0.0643310546875, 0.1192626953125, 0.0594482421875, 0.1439208984375, 0.0543212890625, 0.124755859375, 0.070068359375, 0.0273590087890625, 0.1358642578125, 0.08477783203125, 0.13818359375, 0.181396484375, 0.017547607421875, 0.06854248046875, 0.013183593...
embed
32016256_c0
32016256
haskell
0
Title: Stack init package not found Problem title: Stack init package not found Tags: haskell, cabal, haskell-stack Problem: Stack init package not found When trying to build an existing project with Stack I got errors like bv not found - Genesis requires >=0.3 && <0.4 && -any - exp requires -any during stack init . Th...
Stack init package not found Stack init package not found haskell cabal haskell-stack Stack Genesis Stack init package not found When trying to build an existing project with Stack I got errors like during stack init . The packages are all installed in a sandbox and are from hackage. I'm almost sure Stack doesn't look ...
[ -0.01287841796875, 0.0111083984375, -0.00170135498046875, 0.014892578125, -0.007568359375, -0.0025634765625, 0.01422119140625, 0.008544921875, 0.0037994384765625, 0.007720947265625, 0.01165771484375, -0.027587890625, 0.0031890869140625, 0.00701904296875, 0.01318359375, 0.00592041015625...
[ 6512, 2594, 23, 217, 98169, 959, 14037, 1556, 142508, 109524, 590, 172335, 31577, 45367, 144573, 13452, 678, 18499, 1884, 20271, 177261, 20600, 19096, 11728, 1295, 85526, 4588, 6713, 3934, 15400, 831, 18, 7413, 19048, 51042 ]
[ 0.205810546875, 0.1805419921875, 0.1395263671875, 0.1790771484375, 0.247802734375, 0.057708740234375, 0.1593017578125, 0.1072998046875, 0.2071533203125, 0.2266845703125, 0.1668701171875, 0.1583251953125, 0.048492431640625, 0.1490478515625, 0.115966796875, 0.1256103515625, 0.043457031...
embed
61716677_c0
61716677
haskell
0
Title: Haskell Garbage collection fails to reclaim sufficient space Problem title: Haskell Garbage collection fails to reclaim sufficient space Tags: haskell Problem: Haskell Garbage collection fails to reclaim sufficient space I'm new to Haskell and i am doing a higher order function homework while using Hugs.Wanted t...
Haskell Garbage collection fails to reclaim sufficient space Haskell Garbage collection fails to reclaim sufficient space haskell Haskell Garbage Haskell Garbage collection fails to reclaim sufficient space I'm new to Haskell and i am doing a higher order function homework while using Hugs.Wanted to know if there is a ...
[ -0.00933837890625, 0.0169677734375, -0.002685546875, 0.003814697265625, -0.0184326171875, 0.00140380859375, -0.03271484375, 0.0054931640625, 0.0020294189453125, 0.0002288818359375, 0.013916015625, -0.0196533203125, -0.0050048828125, 0.0004863739013671875, 0.008056640625, -0.00546264648...
[ 20625, 142508, 6389, 402, 429, 42486, 35782, 456, 164779, 129980, 32628, 1556, 7, 47, 3525, 77546, 12989, 32354, 5368, 18244, 99926, 83, 30022, 6863, 30513, 177, 2967, 18151, 18499 ]
[ 0.166015625, 0.2276611328125, 0.11865234375, 0.2281494140625, 0.091064453125, 0.209228515625, 0.1907958984375, 0.1004638671875, 0.2188720703125, 0.193603515625, 0.1873779296875, 0.1234130859375, 0.13671875, 0.05242919921875, 0.052459716796875, 0.087158203125, 0.1292724609375, 0.118...
embed
13596335_c0
13596335
haskell
0
Title: Converting expression to pointfree style (Haskell) Problem title: Converting expression to pointfree style (Haskell) Tags: pointfree, functional-programming, haskell Problem: Converting expression to pointfree style (Haskell) I wrote this code and I have to rewrite it to the pointfree style: num_of_occ ele list ...
Converting expression to pointfree style (Haskell) Converting expression to pointfree style (Haskell) pointfree functional-programming haskell Converting Haskell num_of_occ Converting expression to pointfree style (Haskell) I wrote this code and I have to rewrite it to the pointfree style: So I did this: It works. Than...
[ -0.011962890625, 0.01123046875, 0.00140380859375, 0.005218505859375, 0.0157470703125, 0.01129150390625, -0.002166748046875, -0.0145263671875, 0.0026397705078125, -0.041259765625, -0.026123046875, 0.0169677734375, 0.01708984375, 0.0189208984375, -0.023681640625, -0.014892578125, 0.006...
[ 814, 125195, 6275, 32087, 20623, 6495, 142508, 1916, 47, 123309, 28966, 1556, 20625, 13269, 4390, 31, 10060, 54397, 18151, 456, 434, 18781, 903, 43240, 6777, 22027, 18, 44691, 13315, 111, 17569 ]
[ 0.076171875, 0.19091796875, 0.093017578125, 0.1766357421875, 0.18359375, 0.021453857421875, 0.1693115234375, 0.00091552734375, 0.0126953125, 0.1015625, 0.046783447265625, 0.060882568359375, 0.05877685546875, 0.0947265625, 0.110107421875, 0.0465087890625, 0.0963134765625, 0.02865600...
embed
74416145_c0
74416145
haskell
0
Title: Sort array of tuples by 2nd element then by first element in Haskell Problem title: Sort array of tuples by 2nd element then by first element in Haskell Tags: generics, haskell, sorting, tuples Problem: Sort array of tuples by 2nd element then by first element in Haskell I am trying to sort this array of tuples ...
Sort array of tuples by 2nd element then by first element in Haskell Sort array of tuples by 2nd element then by first element in Haskell generics haskell sorting tuples Sort Haskell Sort array of tuples by 2nd element then by first element in Haskell I am trying to sort this array of tuples by the 2nd element but if t...
[ 0.011474609375, 0.0146484375, -0.0115966796875, 0.0015411376953125, -0.002899169921875, 0.0067138671875, -0.02197265625, -0.0179443359375, -0.00095367431640625, -0.0054931640625, -0.005401611328125, 0.01507568359375, 0.01177978515625, -0.00168609619140625, -0.014404296875, -0.001625061...
[ 53666, 10298, 53, 370, 99726, 390, 116, 2208, 12830, 7068, 5117, 23, 20625, 142508, 189534, 1556, 12096, 111, 31577, 80854, 154186, 105950, 3444, 35509, 5773, 106, 271, 4734, 7413, 175199, 15044 ]
[ 0.204833984375, 0.132568359375, 0.07666015625, 0.1376953125, 0.2320556640625, 0.067138671875, 0.1444091796875, 0.097900390625, 0.157470703125, 0.0400390625, 0.0986328125, 0.03375244140625, 0.125732421875, 0.2330322265625, 0.14208984375, 0.097412109375, 0.2191162109375, 0.0133361816...
embed
44036924_c0
44036924
haskell
0
Title: In a Haskell script, how does one programatically obtain the type signature of a function? Problem title: In a Haskell script, how does one programatically obtain the type signature of a function? Tags: function, haskell, signature, types Problem: In a Haskell script, how does one programatically obtain the type...
In a Haskell script, how does one programatically obtain the type signature of a function? In a Haskell script, how does one programatically obtain the type signature of a function? function haskell signature types Data.Typeable Test.HUnit a Haskell TestCase TestList TestLabel my_script.hs GHCi www.haskell.org Compilin...
[ 0.00933837890625, 0.00469970703125, -0.0198974609375, 0.015625, -0.01300048828125, -0.01416015625, 0.00933837890625, 0.006011962890625, -0.000507354736328125, -0.01336669921875, 0.0003528594970703125, -0.0205078125, -0.027099609375, -0.0011444091796875, 0.009765625, 0.01251220703125, ...
[ 20625, 142508, 26499, 3642, 3919, 18, 71407, 113054, 70, 10644, 138256, 32354, 360, 111, 1556, 52895, 11809, 196707, 2886, 8647, 27204, 6773, 441, 6991, 154663, 4063, 759, 32032, 127, 527, 73265, 14, 10557, 15612, 49725, 12321, 25619, 60457, ...
[ 0.1265869140625, 0.228759765625, 0.201171875, 0.054168701171875, 0.1434326171875, 0.08709716796875, 0.10003662109375, 0.13623046875, 0.045257568359375, 0.2449951171875, 0.256103515625, 0.168701171875, 0.030029296875, 0.035186767578125, 0.106689453125, 0.1630859375, 0.07452392578125, ...
embed
8712814_c0
8712814
haskell
0
Title: Haskell filter function error Problem title: Haskell filter function error Tags: haskell Problem: Haskell filter function error I want to list all integers that divide n. This is a homework question. So far I have done this. divisors :: Int -> [Int] divisors n | n < 1 = [] | otherwise = filter (\n -> n `mod` x =...
Haskell filter function error Haskell filter function error haskell Haskell Haskell filter function error I want to list all integers that divide n. This is a homework question. So far I have done this. I know this is wrong, but I am not getting the right filter predicate. I don't know how the syntax is for doing this....
[ -0.0196533203125, 0.031005859375, 0.0028228759765625, -0.025146484375, 0.00011682510375976562, 0.00994873046875, 0.004486083984375, -0.00927734375, 0.004119873046875, -0.0244140625, 0.0026092529296875, -0.0201416015625, 0.005615234375, -0.007354736328125, -0.0167236328125, 0.0010528564...
[ 20625, 142508, 46312, 32354, 18499, 1556, 3444, 47, 5303, 756, 892, 26255, 450, 101637, 653, 5368, 18244, 9655, 2060, 3714, 44691, 7108, 1653, 2063, 6002, 86531, 53418, 4527, 2811, 80854, 106 ]
[ 0.1260986328125, 0.218994140625, 0.239501953125, 0.192138671875, 0.19384765625, 0.1317138671875, 0.1092529296875, 0.1004638671875, 0.1905517578125, 0.11767578125, 0.1387939453125, 0.15625, 0.05078125, 0.217529296875, 0.1572265625, 0.0183258056640625, 0.09454345703125, 0.01296997070...
embed
58193911_c0
58193911
haskell
0
Title: How does the :: operator syntax work in the context of bounded typeclass? Problem title: How does the :: operator syntax work in the context of bounded typeclass? Tags: haskell Problem: How does the :: operator syntax work in the context of bounded typeclass? I'm learning Haskell and trying to understand the rea...
How does the :: operator syntax work in the context of bounded typeclass? How does the :: operator syntax work in the context of bounded typeclass? haskell How Input minBound::Int Output How does the :: operator syntax work in the context of bounded typeclass? I'm learning Haskell and trying to understand the reasoning...
[ 0.00726318359375, -0.02490234375, 0.0196533203125, -0.003875732421875, -0.000553131103515625, 0.02587890625, 0.01116943359375, -0.0047607421875, -0.0014190673828125, 0.004241943359375, 0.01904296875, -0.06396484375, 0.0166015625, -0.00799560546875, 0.002777099609375, -0.0286865234375, ...
[ 11249, 14602, 1984, 39933, 6002, 86531, 4488, 43701, 876, 167457, 10644, 67413, 1556, 142508, 360, 881, 12647, 7030, 12, 4153, 18, 13538, 23, 52080, 20625, 31635, 4331, 17006, 83, 34923, 3638, 1884, 8668, 22062, 903, 43240 ]
[ 0.04425048828125, 0.0208740234375, 0.220703125, 0.209228515625, 0.1553955078125, 0.1724853515625, 0.129150390625, 0.1427001953125, 0.07403564453125, 0.1466064453125, 0.1514892578125, 0.1729736328125, 0.1002197265625, 0.2200927734375, 0.0673828125, 0.1644287109375, 0.119140625, 0.17...
embed
12931544_c0
12931544
haskell
0
Title: How to evaluate an expression built out of an ADT Problem title: How to evaluate an expression built out of an ADT Tags: functional-programming, haskell Problem: How to evaluate an expression built out of an ADT Here's my ADT: data Ex a = I Integer --integer | Add (Ex a) (Ex a) --add | Variable a --variable | De...
How to evaluate an expression built out of an ADT How to evaluate an expression built out of an ADT functional-programming haskell How ADT Integer Add Variable How to evaluate an expression built out of an ADT Here's my ADT: And here's my evaluate function: How do I continue eval for Variable and Def ?
[ -0.0235595703125, 0.0079345703125, 0.000598907470703125, 0.0341796875, 0.01385498046875, -0.00121307373046875, -0.0037078857421875, -0.0006561279296875, 0.0159912109375, -0.010009765625, -0.0135498046875, -0.02294921875, 0.0157470703125, 0.0164794921875, 0.01708984375, -0.0093994140625...
[ 11249, 151575, 13, 125195, 88303, 1810, 111, 62, 41072, 47, 123309, 28966, 1556, 142508, 44401, 29117, 84572, 2886, 759, 3688, 32354, 21342, 28, 1405, 136, 85535 ]
[ 0.059295654296875, 0.2115478515625, 0.09228515625, 0.235107421875, 0.151123046875, 0.1343994140625, 0.06884765625, 0.1131591796875, 0.2161865234375, 0.04656982421875, 0.1021728515625, 0.073486328125, 0.10369873046875, 0.192626953125, 0.1754150390625, 0.12841796875, 0.137451171875, ...
embed
51062960_c0
51062960
haskell
0
Title: How can I negate a user defined Integer? Problem title: How can I negate a user defined Integer? Tags: haskell Problem: How can I negate a user defined Integer? I have data Weight = Fin Integer | Inf deriving (Eq, Ord, Show) negate :: Weight -> Weight negate Inf = error "negative infinity not supported" I want n...
How can I negate a user defined Integer? How can I negate a user defined Integer? haskell How Integer Weight Fin Inf Ord Show Equations How can I negate a user defined Integer? I have I want negate Fin (-1) = Fin 1 . So I further define But this gives error How can I fix it? Thank you!
[ -0.01611328125, -0.0068359375, -0.0032501220703125, 0.004150390625, -0.0283203125, 0.0208740234375, 0.0152587890625, -0.0015716552734375, 0.024169921875, 0.00836181640625, -0.014892578125, -0.0201416015625, 0.01239013671875, -0.0008544921875, 0, -0.00592041015625, 0.0218505859375, ...
[ 11249, 831, 87, 90584, 13, 38937, 61924, 44401, 1556, 142508, 150533, 13316, 46757, 35379, 17367, 13722, 71, 765, 3444, 110218, 2203, 106, 53333, 76199, 18499, 30022 ]
[ 0.06219482421875, 0.05987548828125, 0.0277099609375, 0.2274169921875, 0.1898193359375, 0.1650390625, 0.1947021484375, 0.217529296875, 0.112060546875, 0.192138671875, 0.22705078125, 0.2205810546875, 0.1346435546875, 0.15283203125, 0.09039306640625, 0.144775390625, 0.00909423828125, ...
embed
46142689_c0
46142689
haskell
0
Title: What does the star (*) in instance documentation mean? Problem title: What does the star (*) in instance documentation mean? Tags: monad-transformers, haddock, haskell Problem: What does the star (*) in instance documentation mean? In the MonadState doc page , there's a star (*) inside the ReaderT type of the Mo...
What does the star (*) in instance documentation mean? What does the star (*) in instance documentation mean? monad-transformers haddock haskell What ReaderT MonadState What does the star (*) in instance documentation mean? In the MonadState doc page , there's a star (*) inside the ReaderT type of the MonadState instan...
[ 0.01336669921875, -0.0185546875, 0.0218505859375, -0.0076904296875, -0.01141357421875, -0.0037841796875, -0.0123291015625, -0.00836181640625, -0.0079345703125, 0.007476806640625, 0.0169677734375, -0.002166748046875, -0.0257568359375, -0.0026702880859375, -0.007415771484375, -0.01977539...
[ 4865, 70, 6057, 80019, 23, 110527, 209806, 29459, 2667, 712, 215175, 1902, 138414, 1556, 142508, 122636, 618, 60331, 71, 135206, 13, 14602, 51584, 9191, 10, 46132, 10644, 20653, 31344, 2685, 110, 2367 ]
[ 0.033782958984375, 0.034881591796875, 0.2310791015625, 0.1800537109375, 0.046173095703125, 0.2457275390625, 0.227294921875, 0.1300048828125, 0.0882568359375, 0.126953125, 0.1624755859375, 0.0660400390625, 0.150390625, 0.07672119140625, 0.173583984375, 0.2088623046875, 0.1610107421875...
embed
37006362_c0
37006362
haskell
0
Title: How to get a decimal string from a Double instead of scientific notation in Haskell? Problem title: How to get a decimal string from a Double instead of scientific notation in Haskell? Tags: number-formatting, haskell Problem: How to get a decimal string from a Double instead of scientific notation in Haskell? I...
How to get a decimal string from a Double instead of scientific notation in Haskell? How to get a decimal string from a Double instead of scientific notation in Haskell? number-formatting haskell a How Double Haskell How to get a decimal string from a Double instead of scientific notation in Haskell? I need to divide a...
[ -0.0093994140625, -0.0076904296875, -0.003570556640625, -0.005767822265625, 0.0247802734375, 0.0098876953125, -0.006683349609375, -0.008544921875, 0.00701904296875, 0.0162353515625, -0.0027923583984375, -0.0062255859375, -0.01165771484375, 0.005615234375, -0.00860595703125, 0.011840820...
[ 11249, 47, 2046, 32380, 2749, 79315, 1295, 10, 107172, 64457, 57456, 110, 22062, 20625, 142508, 23, 14012, 51727, 1916, 1556, 87, 3871, 101637, 5303, 101935, 390, 805, 28412, 27781, 27489, 49903, 54, 903, 25647, 6183, 77947 ]
[ 0.093017578125, 0.0670166015625, 0.1419677734375, 0.21630859375, 0.2095947265625, 0.25146484375, 0.118408203125, 0.046539306640625, 0.245849609375, 0.179443359375, 0.182373046875, 0.13818359375, 0.0875244140625, 0.14404296875, 0.2420654296875, 0.04779052734375, 0.1080322265625, 0.1...
embed
32789535_c0
32789535
haskell
0
Title: Filter out null string in a list of lists Problem title: Filter out null string in a list of lists Tags: list, haskell, function, filter Problem: Filter out null string in a list of lists Currently I have this function: removeNull strList = filter (not . null) strList But I need to use map (I assume) to apply it...
Filter out null string in a list of lists Filter out null string in a list of lists list haskell function filter Filter Filter out null string in a list of lists Currently I have this function: But I need to use map (I assume) to apply it to a list of lists, but I'm getting type errors. In GHCi, the functions filters t...
[ 0.01483154296875, 0.0087890625, -0.0016632080078125, 0.005859375, -0.02294921875, -0.00341796875, 0.0322265625, -0.0015869140625, 0.007598876953125, 0.03662109375, -0.0023345947265625, -0.0341796875, -0.00921630859375, 0.0155029296875, -0.0260009765625, 0.00112152099609375, 0.0191650...
[ 128896, 1810, 56574, 79315, 23, 5303, 111, 1556, 142508, 32354, 46312, 22288, 41591, 59911, 10644, 18499, 527, 73265, 14, 26785, 903, 18 ]
[ 0.20263671875, 0.131591796875, 0.2156982421875, 0.238525390625, 0.068359375, 0.2186279296875, 0.069580078125, 0.1102294921875, 0.204833984375, 0.12744140625, 0.1925048828125, 0.149658203125, 0.06585693359375, 0.08270263671875, 0.169921875, 0.1376953125, 0.00299072265625, 0.06030273...
embed
58173811_c1
58173811
haskell
1
2, 25, 1] (1,25,4,2) where 4 is number of time lowest record is broken and 2 is number of time highest record is broken *Main> solve [3, 4, 21, 36, 10, 28, 35, 5, 24, 42] (3,42,0,4) where 0 is number of time lowest record is broken and 4 is number of times highest record is broken The first number is no. of scores The...
2, 25, 1] (1,25,4,2) where 4 is number of time lowest record is broken and 2 is number of time highest record is broken *Main> solve [3, 4, 21, 36, 10, 28, 35, 5, 24, 42] (3,42,0,4) where 0 is number of time lowest record is broken and 4 is number of times highest record is broken The first number is no. of scores The...
[ -0.024169921875, 0.0021209716796875, -0.026611328125, -0.000156402587890625, -0.00909423828125, 0.0224609375, -0.006439208984375, 0.00872802734375, 0.00604248046875, 0.00421142578125, 0.003875732421875, -0.01214599609375, 0.01239013671875, 0.03955078125, 0.01123046875, -0.02001953125, ...
[ 116, 4, 714, 106, 268, 2858, 2588, 617, 10461, 7440, 201, 83, 14012, 111, 1733, 459, 25617, 17164, 148431, 167375, 661, 168793, 2740, 86869, 122101, 21416, 4039, 209, 29835, 2273, 190, 744, 4828, 15, 82449, 216969, 29557, 757, 20028, 5117...
[ 0.141357421875, 0.060394287109375, 0.2509765625, 0.119384765625, 0.090576171875, 0.0290679931640625, 0.23291015625, 0.179931640625, 0.1397705078125, 0.04815673828125, 0.2205810546875, 0.053466796875, 0.1846923828125, 0.0677490234375, 0.1336669921875, 0.10986328125, 0.1553955078125, ...
embed
63163440_c1
63163440
haskell
1
2 others ...plus 15 instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In the second argument of ‘($)’, namely ‘note1 []’ In a stmt of a 'do' block: print $ note1 [] In the expression: do putStrLn "someFunc" putStrLn $ show (1) putStrLn $ show $ length ("a" :: String) putStrLn $ ...
2 others ...plus 15 instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In the second argument of ‘($)’, namely ‘note1 []’ In a stmt of a 'do' block: print $ note1 [] In the expression: do putStrLn "someFunc" putStrLn $ show (1) putStrLn $ show $ length ("a" :: String) putStrLn $ ...
[ 0.019775390625, -0.0211181640625, -0.00164031982421875, 0.0269775390625, 0.005706787109375, 0.0191650390625, -0.01116943359375, 0.009521484375, 0.0152587890625, -0.00616455078125, -0.008056640625, -0.036865234375, 0.00133514404296875, -0.00079345703125, 0.00186920166015625, -0.01092529...
[ 116, 27060, 153, 32108, 423, 110527, 3784, 1810, 4390, 70820, 52895, 420, 35662, 7804, 80973, 116071, 768, 17932, 10750, 4369, 48345, 418, 360, 6138, 18, 246, 46389, 28412, 3650, 20537, 125195, 54, 3884, 71713, 866, 19, 43452, 97249, 58, ...
[ 0.026702880859375, 0.0860595703125, 0.021270751953125, 0.06024169921875, 0.112548828125, 0.2078857421875, 0.040771484375, 0.1253662109375, 0.150634765625, 0.16748046875, 0.1800537109375, 0.06378173828125, 0.1961669921875, 0.1090087890625, 0.1102294921875, 0.1326904296875, 0.031463623...
embed
12288318_c0
12288318
haskell
0
Title: Read a file line by line Problem title: Read a file line by line Tags: haskell Problem: Read a file line by line I'm trying to read a file line by line, but I don't know how to stop when I reach the EOF. I have this code: readWholeFile = do inputFile <- openFile "example.txt" ReadMode readALine inputFile readALi...
Read a file line by line Read a file line by line haskell Read example.txt ReadMode Exception Read a file line by line I'm trying to read a file line by line, but I don't know how to stop when I reach the EOF. I have this code: and it obviously always terminata raising an exception. How can I solve? Edit: exact error m...
[ -0.004608154296875, -0.005584716796875, 0.009765625, 0.01141357421875, 0.01129150390625, 0.0194091796875, 0.0125732421875, 0.006988525390625, -0.00445556640625, -0.039306640625, -0.0028228759765625, -0.013671875, -0.01177978515625, -0.003936767578125, 0.031494140625, -0.0068359375, 0...
[ 4764, 11435, 13315, 390, 10, 1556, 142508, 27781, 124326, 9083, 112, 5443, 63928, 31577, 47, 12301, 18, 3714, 3642, 7279, 3229, 58359, 70, 241, 82341, 765, 903, 18151, 171259, 11343, 121011, 11, 40129, 131527, 86869, 24763, 18499, 26008 ]
[ 0.19384765625, 0.150634765625, 0.15234375, 0.11572265625, 0.030517578125, 0.133544921875, 0.2401123046875, 0.1512451171875, 0.1632080078125, 0.160400390625, 0.0931396484375, 0.079345703125, 0.1741943359375, 0.07794189453125, 0.004364013671875, 0.2069091796875, 0.001007080078125, 0....
embed
33601026_c0
33601026
haskell
0
Title: Haskell - Parse error on input &#x27;=&#x27; Problem title: Haskell - Parse error on input &#x27;=&#x27; Tags: haskell Problem: Haskell - Parse error on input '=' getFloat :: IO Float main = do putStr "Enter question number: " xs <- getLine if (xs == 3) then do main2 else main2 main2 = pricePizza :: Double -> Do...
Haskell - Parse error on input &#x27;=&#x27; Haskell - Parse error on input &#x27;=&#x27; haskell Haskell Parse Float Enter main2 Double Haskell - Parse error on input '=' Why doesn't this work?
[ 0.0157470703125, 0.01611328125, -0.004486083984375, -0.005767822265625, 0.00909423828125, 0.01287841796875, -0.00179290771484375, -0.00146484375, 0.014892578125, 0.0003681182861328125, -0.013916015625, -0.004302978515625, 0.01446533203125, -0.00946044921875, 0.001190185546875, 0.014648...
[ 20625, 142508, 2392, 184, 18499, 98, 107730, 3768, 1369, 20, 6, 74, 1556, 38699, 257, 60816, 5201, 304, 107172, 44084, 22027, 18, 903, 4488 ]
[ 0.158447265625, 0.258056640625, 0.1551513671875, 0.151123046875, 0.2196044921875, 0.0948486328125, 0.2239990234375, 0.1435546875, 0.1856689453125, 0.0160369873046875, 0.01465606689453125, 0.00041747093200683594, 0.140380859375, 0.168212890625, 0.075927734375, 0.1763916015625, 0.15344...
embed
40541247_c0
40541247
haskell
0
Title: Haskell: How to pretty print number of seconds as a date and time? Problem title: Haskell: How to pretty print number of seconds as a date and time? Tags: timestamp, seconds, haskell, date Problem: Haskell: How to pretty print number of seconds as a date and time? I have an integral value that is the number of s...
Haskell: How to pretty print number of seconds as a date and time? Haskell: How to pretty print number of seconds as a date and time? timestamp seconds haskell date Haskell How Int32 Char Haskell: How to pretty print number of seconds as a date and time? I have an integral value that is the number of seconds since the ...
[ -0.01324462890625, -0.007354736328125, 0.01251220703125, 0.01434326171875, -0.00958251953125, -0.0019683837890625, -0.003753662109375, 0.00701904296875, 0.0019989013671875, -0.0238037109375, -0.0020599365234375, -0.0390625, -0.01434326171875, 0.0213623046875, -0.0250244140625, 0.002441...
[ 20625, 142508, 11249, 28875, 28412, 14012, 94131, 237, 5622, 136, 1733, 47, 590, 2676, 1556, 360, 18, 6460, 21656, 10, 28970, 34292, 16792, 43816, 3581, 831, 140992, 892, 1505, 3444, 7639, 14135, 39116, 2886, 30646, 1884 ]
[ 0.1312255859375, 0.23388671875, 0.058685302734375, 0.169677734375, 0.20703125, 0.148681640625, 0.27587890625, 0.10565185546875, 0.150390625, 0.1275634765625, 0.1697998046875, 0.02215576171875, 0.0614013671875, 0.10443115234375, 0.1131591796875, 0.0210113525390625, 0.04132080078125, ...
embed
41036325_c1
41036325
haskell
1
) Dependency tree exhaustively searched. <<<< Cabal errors end My app/package name in .cabal file is html-parse and the current version is 0.0.0.3. It looks like my own package is listed as a dependency with a constraint of ==0.0.0.3 , but there is another pacakge on hackage that has the same name but different version...
) Dependency tree exhaustively searched. <<<< Cabal errors end My app/package name in .cabal file is html-parse and the current version is 0.0.0.3. It looks like my own package is listed as a dependency with a constraint of ==0.0.0.3 , but there is another pacakge on hackage that has the same name but different version...
[ 0.0120849609375, 0.021240234375, -0.002197265625, 0.0086669921875, -0.0005950927734375, 0.018798828125, -0.0185546875, -0.004302978515625, 0.028564453125, 0.00022411346435546875, -0.0137939453125, -0.033935546875, 0.0174560546875, 0.019775390625, 0.0177001953125, -0.0000748634338378906...
[ 1388, 262, 26885, 27771, 53201, 146353, 5844, 33938, 234015, 30438, 289, 18499, 3564, 2646, 4027, 64, 29102, 4588, 9351, 5, 408, 3571, 11435, 83, 7693, 9, 2500, 184, 43581, 11389, 89678, 170179, 33342, 1884, 10002, 98169, 145870, 237, 42548...
[ 0.051361083984375, 0.1549072265625, 0.2344970703125, 0.1712646484375, 0.2430419921875, 0.0733642578125, 0.011993408203125, 0.0758056640625, 0.0299072265625, 0.2401123046875, 0.239013671875, 0.195068359375, 0.10394287109375, 0.002960205078125, 0.228515625, 0.02117919921875, 0.19909667...
embed
19042548_c0
19042548
haskell
0
Title: how to sumit html form with haskell Problem title: how to sumit html form with haskell Tags: haskell, html Problem: how to sumit html form with haskell I have a tedious sequence of operations that i would like to automate with Haskell. It involves automatically clicking on a checkbox and then pushing a button. T...
how to sumit html form with haskell how to sumit html form with haskell haskell html how to sumit html form with haskell I have a tedious sequence of operations that i would like to automate with Haskell. It involves automatically clicking on a checkbox and then pushing a button. Then on the next page there's a radio b...
[ -0.000152587890625, 0.005523681640625, -0.006500244140625, -0.00823974609375, -0.0084228515625, 0.01373291015625, -0.003204345703125, 0.0308837890625, 0.0162353515625, -0.0478515625, 0.02001953125, -0.0213623046875, 0.004638671875, -0.003326416015625, -0.005645751953125, -0.01831054687...
[ 3642, 47, 166, 4007, 7693, 3173, 678, 1556, 142508, 5670, 944, 41018, 1884, 11408, 13, 20625, 83687, 191082, 18158, 12765, 11728, 25944, 77679, 11737, 9191, 5977, 136, 6626, 98441, 2704, 16750, 114137, 61972, 35773, 10484, 4527, 121413, 18151...
[ 0.06103515625, 0.0272369384765625, 0.158447265625, 0.22412109375, 0.2218017578125, 0.22509765625, 0.11376953125, 0.135009765625, 0.2099609375, 0.052886962890625, 0.0210113525390625, 0.097412109375, 0.004608154296875, 0.1494140625, 0.003936767578125, 0.1072998046875, 0.00091552734375,...
embed
20362684_c0
20362684
haskell
0
Title: Haskell multiline interactive mode Problem title: Haskell multiline interactive mode Tags: ide, ghci, haskell Problem: Haskell multiline interactive mode In python, there exists many IDEs which let you do this. >>> if (a==5): print "Yes" else: print "No" But in haskell's GHCi: Prelude> do <interactive>:2:1: Empt...
Haskell multiline interactive mode Haskell multiline interactive mode ide ghci haskell Haskell Yes Prelude Empty Haskell multiline interactive mode In python, there exists many IDEs which let you do this. But in haskell's GHCi: It does not work. Is there any IDE which lets you do multiline commands in interactive mode....
[ -0.0142822265625, -0.00933837890625, 0.0106201171875, 0.014404296875, -0.0181884765625, 0.0263671875, 0.003265380859375, 0.0012969970703125, 0.00042724609375, -0.018798828125, 0.000055789947509765625, -0.0126953125, -0.00897216796875, 0.006378173828125, -0.00494384765625, -0.0020751953...
[ 20625, 142508, 6024, 2256, 212398, 13736, 5415, 31380, 318, 1556, 32635, 1914, 822, 112, 31678, 939, 17198, 50828, 32316, 5941, 36497, 2633, 54, 903, 527, 73265, 14, 14602, 959, 4488, 75101, 23, 107419, 152, 24854, 136, 831, 27211, 1407, ...
[ 0.1768798828125, 0.2410888671875, 0.2005615234375, 0.251708984375, 0.229736328125, 0.173583984375, 0.16455078125, 0.09027099609375, 0.1346435546875, 0.1556396484375, 0.0684814453125, 0.03759765625, 0.124267578125, 0.008941650390625, 0.1263427734375, 0.05010986328125, 0.077392578125, ...
embed
6141191_c0
6141191
haskell
0
Title: Extract list elements between lists in Haskell Problem title: Extract list elements between lists in Haskell Tags: components, extract, haskell, list Problem: Extract list elements between lists in Haskell I have the following list: [[a,b,c], [d,e,f], [g,h,i]] and would like to get the following (e.g. if I extra...
Extract list elements between lists in Haskell Extract list elements between lists in Haskell components extract haskell list Extract Haskell Extract list elements between lists in Haskell I have the following list: and would like to get the following (e.g. if I extract 0th element of a list within the list): I've been...
[ -0.0010986328125, 0.00087738037109375, 0.01495361328125, 0.0220947265625, -0.002685546875, 0.0152587890625, 0.002410888671875, -0.0030517578125, 0.01141357421875, 0.0166015625, -0.0118408203125, -0.0186767578125, 0.003997802734375, 0.02099609375, -0.0159912109375, -0.00701904296875, ...
[ 31501, 15390, 5303, 80854, 17721, 7, 23, 20625, 142508, 82761, 125663, 1556, 87, 765, 25632, 1884, 2046, 757, 927, 12830, 111, 28032, 19048, 54, 100, 1632, 238, 420, 177, 127, 14, 1146, 2389, 2203, 10, 831, 48903, 32354, 4488, 756, 450,...
[ 0.209228515625, 0.11376953125, 0.2095947265625, 0.2003173828125, 0.2275390625, 0.023162841796875, 0.048858642578125, 0.150146484375, 0.2313232421875, 0.1756591796875, 0.2349853515625, 0.1470947265625, 0.000823974609375, 0.007110595703125, 0.07354736328125, 0.06427001953125, 0.0793457...
embed
43822016_c0
43822016
haskell
0
Title: Function that checks if all vowels in a string are capital letters Problem title: Function that checks if all vowels in a string are capital letters Tags: haskell Problem: Function that checks if all vowels in a string are capital letters Check::String->Bool Check = undefined I can use only list comprehension an...
Function that checks if all vowels in a string are capital letters Function that checks if all vowels in a string are capital letters haskell Check::String Bool Check charfound::Char x:xs Function that checks if all vowels in a string are capital letters I can use only list comprehension and I can use only Base Functio...
[ -0.004180908203125, 0.0006866455078125, -0.00244140625, 0.0167236328125, 0.00201416015625, 0.0218505859375, 0.0177001953125, -0.0169677734375, 0.012939453125, 0.01904296875, 0.0047607421875, -0.04541015625, 0.01055908203125, 0.0035400390625, -0.031494140625, 0.010986328125, 0.0128173...
[ 28670, 10763, 450, 12765, 7, 2174, 756, 2244, 8420, 79315, 621, 10323, 120820, 23, 1556, 142508, 38679, 71713, 2460, 929, 21441, 151645, 84068, 1022, 425, 831, 4527, 4734, 5303, 46683, 3220, 44978, 103835, 32354, 3714, 3642, 54, 442, 195625...
[ 0.16845703125, 0.10107421875, 0.0260009765625, 0.2156982421875, 0.059661865234375, 0.110107421875, 0.1253662109375, 0.1845703125, 0.219482421875, 0.2413330078125, 0.0811767578125, 0.2109375, 0.1944580078125, 0.046112060546875, 0.1461181640625, 0.2335205078125, 0.20849609375, 0.1071...
embed
7978191_c0
7978191
haskell
0
Title: How to make a type with restrictions Problem title: How to make a type with restrictions Tags: dependent-type, haskell Problem: How to make a type with restrictions For example I want to make a type MyType of integer triples. But not just Cartesian product of three Integer, I want the type to represent all (x, y...
How to make a type with restrictions How to make a type with restrictions dependent-type haskell How MyType How to make a type with restrictions For example I want to make a type MyType of integer triples. But not just Cartesian product of three Integer, I want the type to represent all (x, y, z) such that x + y + z = ...
[ -0.03857421875, -0.0019378662109375, -0.006500244140625, 0.016845703125, 0.00335693359375, 0.01458740234375, -0.01123046875, 0.01171875, 0.0245361328125, -0.02490234375, 0.002105712890625, -0.029296875, 0.02392578125, -0.0003108978271484375, -0.005767822265625, 0.00048065185546875, 0...
[ 11249, 3249, 10644, 678, 185190, 7, 47, 108750, 50986, 1556, 142508, 2646, 196707, 10, 3444, 111, 892, 1505, 162738, 106274, 39209, 12996, 17262, 44401, 70, 33636, 756, 113, 97, 1022, 997, 2203, 190, 54, 17368, 425, 64549, 25251, 62, 335,...
[ 0.068359375, 0.1304931640625, 0.256591796875, 0.1846923828125, 0.237060546875, 0.0859375, 0.0237884521484375, 0.1680908203125, 0.17333984375, 0.14501953125, 0.1922607421875, 0.165283203125, 0.2666015625, 0.03729248046875, 0.08447265625, 0.027984619140625, 0.087890625, 0.08459472656...
embed
24395881_c0
24395881
haskell
0
Title: How do I specify a type variable used in an inline type, is the same as a type variable used in a function definition? Problem title: How do I specify a type variable used in an inline type, is the same as a type variable used in a function definition? Tags: type-variables, type-inference, haskell Problem: How d...
How do I specify a type variable used in an inline type, is the same as a type variable used in a function definition? How do I specify a type variable used in an inline type, is the same as a type variable used in a function definition? type-variables type-inference haskell SomeException How Nothing Just Maybe Either ...
[ 0.01055908203125, 0.01104736328125, -0.00823974609375, -0.00250244140625, -0.0028533935546875, -0.00921630859375, -0.0164794921875, -0.006744384765625, 0.006500244140625, -0.0179443359375, 0.0220947265625, -0.01092529296875, 0.0137939453125, -0.00909423828125, 0.0032501220703125, -0.00...
[ 11249, 40140, 18929, 10644, 77336, 11814, 23, 2256, 5701, 32354, 80934, 21690, 19736, 69988, 1556, 142508, 31384, 63928, 182747, 9563, 83425, 2480, 90911, 191147, 187781, 60075, 13, 89829, 100582, 33022, 137565, 1264, 34831, 131527, 17780, 22631,...
[ 0.006011962890625, 0.16455078125, 0.096435546875, 0.2236328125, 0.25341796875, 0.1165771484375, 0.06463623046875, 0.1502685546875, 0.1195068359375, 0.1407470703125, 0.14892578125, 0.13134765625, 0.055328369140625, 0.130615234375, 0.07415771484375, 0.1878662109375, 0.015869140625, 0...
embed
25576184_c0
25576184
haskell
0
Title: Why is it possible to sleep / pause execution in Haskell if it&#x27;s purely functional? Problem title: Why is it possible to sleep / pause execution in Haskell if it&#x27;s purely functional? Tags: haskell Problem: Why is it possible to sleep / pause execution in Haskell if it's purely functional? I saw Haskell...
Why is it possible to sleep / pause execution in Haskell if it&#x27;s purely functional? Why is it possible to sleep / pause execution in Haskell if it&#x27;s purely functional? haskell Why Haskell Why is it possible to sleep / pause execution in Haskell if it's purely functional? I saw Haskell has a sleep function cal...
[ 0.01806640625, 0.006072998046875, 0.0152587890625, -0.00335693359375, 0.0013580322265625, 0.00032806396484375, 0.0128173828125, -0.0137939453125, -0.00640869140625, -0.04638671875, 0.00927734375, -0.0030059814453125, -0.027099609375, 0.006500244140625, 0.0050048828125, 0.0216064453125,...
[ 44084, 7722, 60268, 248, 76968, 71924, 1830, 20625, 142508, 2174, 3768, 34166, 538, 123309, 47, 1556, 83, 442, 23, 24124, 32354, 35839, 112, 5259, 27131, 163812, 39116, 4657, 3642, 765, 6044, 1884, 903, 3365, 141636, 21543, 132283 ]
[ 0.11669921875, 0.167236328125, 0.2366943359375, 0.07745361328125, 0.20458984375, 0.1575927734375, 0.0438232421875, 0.1396484375, 0.2607421875, 0.046966552734375, 0.057708740234375, 0.107666015625, 0.03375244140625, 0.19482421875, 0.061767578125, 0.109130859375, 0.01812744140625, 0....
embed
27231260_c0
27231260
haskell
0
Title: How to start a console program from another console program? Problem title: How to start a console program from another console program? Tags: command-line, console, haskell Problem: How to start a console program from another console program? I would like to know how to start a console program B (using generate...
How to start a console program from another console program? How to start a console program from another console program? command-line console haskell another How How to start a console program from another console program? I would like to know how to start a console program B (using generated command line instruction)...
[ -0.015380859375, -0.0074462890625, -0.0027008056640625, 0.035400390625, -0.0098876953125, 0.00994873046875, -0.00274658203125, 0.005767822265625, 0.0113525390625, -0.046875, -0.0037994384765625, -0.00007295608520507812, -0.00701904296875, 0.022216796875, -0.00799560546875, -0.019897460...
[ 11249, 47, 4034, 10, 130250, 1528, 1295, 15700, 75101, 2256, 1556, 142508, 3714, 3642, 335, 223, 139392, 13315, 188336, 51042, 20625, 62, 38937, 78974, 134620, 138755, 137356 ]
[ 0.0888671875, 0.065185546875, 0.1754150390625, 0.057037353515625, 0.2205810546875, 0.205078125, 0.1328125, 0.1424560546875, 0.14111328125, 0.0906982421875, 0.1055908203125, 0.21142578125, 0.0028076171875, 0.0689697265625, 0.08758544921875, 0.01275634765625, 0.059417724609375, 0.079...
embed
9187732_c0
9187732
haskell
0
Title: Higher Order Function in Haskell Problem title: Higher Order Function in Haskell Tags: haskell Problem: Higher Order Function in Haskell I have written the following code. I know that a higher order function is a function that takes in another function and returns a function as a result. But I can't clearly dist...
Higher Order Function in Haskell Higher Order Function in Haskell haskell Higher Order Haskell Higher Order Function in Haskell I have written the following code. I know that a higher order function is a function that takes in another function and returns a function as a result. But I can't clearly distinguish a functi...
[ -0.00110626220703125, -0.006805419921875, -0.000774383544921875, -0.004730224609375, 0.00677490234375, 0.01507568359375, -0.000782012939453125, -0.0294189453125, 0.003570556640625, 0.01409912109375, 0.0028228759765625, -0.03125, -0.009033203125, -0.017578125, -0.0106201171875, -0.01306...
[ 19694, 56, 81206, 28670, 10763, 23, 20625, 142508, 1556, 59121, 25632, 18151, 3714, 10, 77546, 12989, 32354, 83, 51776, 15700, 136, 30646, 16750, 831, 18, 123019, 157167, 1495, 2174, 442, 707, 959, 2071, 12096, 7413, 1810 ]
[ 0.1590576171875, 0.135009765625, 0.2344970703125, 0.1796875, 0.0289459228515625, 0.1207275390625, 0.1414794921875, 0.254150390625, 0.1221923828125, 0.031768798828125, 0.05633544921875, 0.10595703125, 0.04522705078125, 0.0396728515625, 0.203857421875, 0.250732421875, 0.212158203125, ...
embed
22752556_c1
22752556
haskell
1
trees: myE2 :: Expr myE2 = Add (Lit 4) (Sub (Lit 4) (Lit 2)) Prints out as: *Main> putStr(draw myE2 0) (+) ---4.0 | --- (-) ---4.0 | ---2.0 Which is what I intended, however, more complicated trees such as: myExpr :: Expr myExpr = (Add (Add (Sub (Mul (Lit 4) (X)) (Lit 1)) (Lit 4)) (Lit 6)) Print out as: *Main> putStr(...
trees: myE2 :: Expr myE2 = Add (Lit 4) (Sub (Lit 4) (Lit 2)) Prints out as: *Main> putStr(draw myE2 0) (+) ---4.0 | --- (-) ---4.0 | ---2.0 Which is what I intended, however, more complicated trees such as: myExpr :: Expr myExpr = (Add (Add (Sub (Mul (Lit 4) (X)) (Lit 1)) (Lit 4)) (Lit 6)) Print out as: *Main> putStr(...
[ -0.0003185272216796875, -0.005035400390625, -0.003936767578125, -0.01214599609375, 0.01007080078125, 0.02294921875, 0.000682830810546875, -0.0244140625, 0.0047607421875, 0.0026702880859375, 0.00982666015625, -0.0286865234375, 0.0198974609375, 0.007171630859375, 0.007720947265625, -0.00...
[ 1360, 90, 759, 647, 304, 1984, 60075, 42, 2203, 29117, 866, 217, 13956, 96472, 4958, 39754, 1810, 237, 168793, 3884, 71713, 86905, 757, 22183, 151152, 9, 73011, 179140, 49903, 1286, 96704, 19279, 10287, 4028, 50657, 1542, 4879, 35914, 80019...
[ 0.23681640625, 0.131591796875, 0.1402587890625, 0.142333984375, 0.1995849609375, 0.07379150390625, 0.14404296875, 0.1756591796875, 0.0247955322265625, 0.1851806640625, 0.067626953125, 0.09765625, 0.177490234375, 0.189208984375, 0.10589599609375, 0.1986083984375, 0.131591796875, 0.0...
embed
39393984_c0
39393984
haskell
0
Title: issue with printing in haskell and function declaration Problem title: issue with printing in haskell and function declaration Tags: haskell Problem: issue with printing in haskell and function declaration this is my code: sumDig i = if (i == 0) then 0 else ((mod i 10) + somaDig ((i-(mod i 10)/10))) main = do pr...
issue with printing in haskell and function declaration issue with printing in haskell and function declaration haskell issue with printing in haskell and function declaration this is my code: it's not working and I dont know why... it doesn't compile and the compiler message is not helping the function is just to sum ...
[ -0.0238037109375, 0.000522613525390625, -0.00081634521484375, -0.003662109375, -0.00640869140625, 0.004791259765625, -0.01318359375, 0.00360107421875, -0.00067138671875, -0.0224609375, 0.018310546875, -0.037109375, 0.0037384033203125, -0.0087890625, 0.0003032684326171875, 0.00248718261...
[ 31089, 678, 2448, 1916, 23, 1556, 142508, 136, 32354, 21635, 903, 18151, 959, 20697, 13319, 3714, 15400, 22027, 18, 9969, 1340, 34759, 26008, 120592, 47, 10554, 756, 124850, 34475, 14012, 37638, 2203, 106, 997, 116, 138, 305, 14602, 17368, ...
[ 0.120849609375, 0.058746337890625, 0.1695556640625, 0.0833740234375, 0.0721435546875, 0.1507568359375, 0.233642578125, 0.092041015625, 0.170654296875, 0.1702880859375, 0.00689697265625, 0.122314453125, 0.09375, 0.140380859375, 0.080078125, 0.06378173828125, 0.02130126953125, 0.0456...
embed
41388746_c2
41388746
haskell
2
ghc-7.10.3","-rtsopts"] in /tmp/stack16245/ ExitFailure 1 Type help for available commands. Press enter to force a rebuild. Now I am not sure why this happens but I think my database settings are wrong Code signals: Yesod, x86_64-linux, ghc-tinfo6-7.10.3, ghc-7.10.3, libHSrts.a, Scav.o, R_X86_64_32S, Compact.o, mblock_...
ghc-7.10.3","-rtsopts"] in /tmp/stack16245/ ExitFailure 1 Type help for available commands. Press enter to force a rebuild. Now I am not sure why this happens but I think my database settings are wrong Code signals: Yesod, x86_64-linux, ghc-tinfo6-7.10.3, ghc-7.10.3, libHSrts.a, Scav.o, R_X86_64_32S, Compact.o, mblock_...
[ -0.0008544921875, 0.0091552734375, -0.0037841796875, 0.0208740234375, -0.00933837890625, 0.0133056640625, -0.033935546875, -0.01214599609375, -0.0159912109375, -0.0107421875, -0.00433349609375, -0.025146484375, -0.00396728515625, 0.0133056640625, -0.00066375732421875, 0.005340576171875...
[ 31380, 238, 16709, 10179, 363, 3198, 7, 2146, 933, 2676, 590, 2594, 2485, 304, 4633, 5443, 217, 17647, 379, 3408, 106, 60457, 4358, 19882, 75101, 21072, 30957, 37772, 456, 177149, 9077, 15400, 903, 96276, 5351, 759, 63399, 53550, 621, 446...
[ 0.1441650390625, 0.154052734375, 0.05743408203125, 0.16064453125, 0.136474609375, 0.11669921875, 0.0291900634765625, 0.1497802734375, 0.128662109375, 0.139892578125, 0.061492919921875, 0.0894775390625, 0.1220703125, 0.04486083984375, 0.184326171875, 0.1436767578125, 0.15673828125, ...
embed
27609062_c0
27609062
haskell
0
Title: What is the difference between mapM_ and mapM in Haskell? Problem title: What is the difference between mapM_ and mapM in Haskell? Tags: haskell Problem: What is the difference between mapM_ and mapM in Haskell? I've already checked Hoogle, http://hackage.haskell.org/package/base-4.7.0.1/docs/Prelude.html#v:mapM...
What is the difference between mapM_ and mapM in Haskell? What is the difference between mapM_ and mapM in Haskell? haskell What mapM_ Haskell putStrLn.show What is the difference between mapM_ and mapM in Haskell? I've already checked Hoogle, http://hackage.haskell.org/package/base-4.7.0.1/docs/Prelude.html#v:mapM , w...
[ 0.00177764892578125, 0.00244140625, 0.01220703125, 0.01611328125, -0.0079345703125, 0.014404296875, 0.005706787109375, -0.001556396484375, 0.00168609619140625, 0.0047607421875, 0.00244140625, -0.0274658203125, 0.0034942626953125, 0.03173828125, -0.0034637451171875, -0.003326416015625, ...
[ 70, 60212, 17721, 22288, 594, 454, 136, 20625, 142508, 23, 1556, 4865, 3884, 71713, 866, 19, 31374, 12765, 152488, 133, 139509, 4588, 10557, 29102, 37382, 102014, 822, 112, 62346, 124962, 7, 50339, 4527 ]
[ 0.029022216796875, 0.16943359375, 0.067138671875, 0.1759033203125, 0.180419921875, 0.1279296875, 0.04736328125, 0.1129150390625, 0.2193603515625, 0.006988525390625, 0.0859375, 0.002960205078125, 0.09033203125, 0.0970458984375, 0.006500244140625, 0.05999755859375, 0.1024169921875, 0...
embed
45018107_c0
45018107
haskell
0
Title: convert bit to int forward with foldr Problem title: convert bit to int forward with foldr Tags: haskell Problem: convert bit to int forward with foldr bit array right to left, e.g. [0,1,0,1] = 10 can be read with: binToInt = foldr (\x xs -> x + 2 * xs) 0 I would like to read it left to right, e.g. [1,0,1,0] = 1...
convert bit to int forward with foldr convert bit to int forward with foldr haskell Couldn convert bit to int forward with foldr bit array right to left, e.g. [0,1,0,1] = 10 can be read with: I would like to read it left to right, e.g. [1,0,1,0] = 10 I thought this would work: however I get the error: what am I doing w...
[ -0.020751953125, 0.0155029296875, -0.01251220703125, -0.0118408203125, -0.023681640625, 0.03173828125, -0.0029449462890625, -0.0002040863037109375, 0.013427734375, -0.035400390625, 0.006256103515625, -0.0022735595703125, 0.0023193359375, 0.0181884765625, 0.013427734375, -0.022216796875...
[ 96760, 4785, 47, 23, 18, 40225, 678, 18344, 7569, 1556, 142508, 191147, 10298, 53, 7108, 25737, 2389, 206808, 76172, 209, 12301, 1884, 177, 17569, 4488, 18499, 444, 20594, 44691, 10932, 39531, 6953, 16750, 2394, 7763, 4153 ]
[ 0.1754150390625, 0.19677734375, 0.1295166015625, 0.146240234375, 0.1497802734375, 0.251953125, 0.075439453125, 0.154296875, 0.228759765625, 0.1187744140625, 0.212890625, 0.0234527587890625, 0.1148681640625, 0.0777587890625, 0.12353515625, 0.1480712890625, 0.059295654296875, 0.10266...
embed
29712710_c1
29712710
haskell
1
of liftPoly to liftPoly a b = withPolymorphic b a then 7.10 is happy. What's going on here? Is 7.10 supposed to be stricter when dealing with polymorphic functions somehow? It doesn't appear to be the monomorphism restriction since everything has a signature. Code signals: liftPoly, Polymorphic, LANGUAGE, DataKinds, E...
of liftPoly to liftPoly a b = withPolymorphic b a then 7.10 is happy. What's going on here? Is 7.10 supposed to be stricter when dealing with polymorphic functions somehow? It doesn't appear to be the monomorphism restriction since everything has a signature. Code signals: liftPoly, Polymorphic, LANGUAGE, DataKinds, E...
[ 0.0103759765625, 0.01544189453125, 0.007659912109375, 0.00176239013671875, -0.00122833251953125, 0.0084228515625, 0.00179290771484375, -0.0166015625, -0.00130462646484375, -0.0133056640625, 0.021728515625, -0.00921630859375, 0.007781982421875, 0.00157928466796875, 0.0025634765625, -0.0...
[ 111, 60520, 7192, 538, 47, 876, 2203, 678, 178851, 1771, 2861, 963, 83, 17723, 7730, 3688, 134598, 81113, 56, 184017, 35874, 32354, 108975, 22460, 8780, 185190, 26818, 1556, 138256, 28864, 26073, 7, 63306, 3358, 98064, 75930, 11809, 7250, 1...
[ 0.03326416015625, 0.2332763671875, 0.1734619140625, 0.239990234375, 0.05230712890625, 0.05548095703125, 0.0176239013671875, 0.1068115234375, 0.210205078125, 0.0634765625, 0.1436767578125, 0.237548828125, 0.009979248046875, 0.205810546875, 0.00390625, 0.020904541015625, 0.038238525390...
embed
57362032_c0
57362032
haskell
0
Title: How to create critical section in Haskell? Problem title: How to create critical section in Haskell? Tags: haskell Problem: How to create critical section in Haskell? I have multiple "threads", they are running with forkIO . And I need to deal with mutual access, typical critical section/lock because they will s...
How to create critical section in Haskell? How to create critical section in Haskell? haskell How Haskell Map Scotty How to create critical section in Haskell? I have multiple "threads", they are running with forkIO . And I need to deal with mutual access, typical critical section/lock because they will share common Ma...
[ 0.000659942626953125, -0.004913330078125, 0.00836181640625, -0.012939453125, -0.00994873046875, -0.004119873046875, 0.002166748046875, 0.0089111328125, -0.00762939453125, -0.03466796875, -0.007568359375, -0.0091552734375, 0.00994873046875, 0.00860595703125, 0.0106201171875, 0.012939453...
[ 11249, 47, 28282, 130306, 40059, 23, 20625, 142508, 1556, 42719, 50695, 53, 765, 48716, 927, 39116, 51042, 678, 100, 92, 17780, 3871, 35142, 199849, 17203, 222201, 21135, 12008, 39210, 1221, 2811, 12301, 442, 7, 86997, 105233, 61687, 88996, ...
[ 0.10504150390625, 0.06475830078125, 0.1871337890625, 0.255859375, 0.28662109375, 0.06646728515625, 0.160888671875, 0.269775390625, 0.13427734375, 0.1710205078125, 0.1519775390625, 0.1524658203125, 0.00567626953125, 0.110107421875, 0.0170745849609375, 0.1513671875, 0.03167724609375, ...
embed
5942615_c0
5942615
haskell
0
Title: Fair concurrent `map` function in haskell? Problem title: Fair concurrent `map` function in haskell? Tags: non-deterministic, haskell, concurrency Problem: Fair concurrent `map` function in haskell? Say I am simulating a network of some sort, and have a function which broadcasts a value over a list of Chans: bro...
Fair concurrent `map` function in haskell? Fair concurrent `map` function in haskell? non-deterministic haskell concurrency Fair Receiver mapM_ Fair concurrent `map` function in haskell? Say I am simulating a network of some sort, and have a function which broadcasts a value over a list of Chans: This will "send" the d...
[ 0.0016326904296875, 0.0167236328125, 0.0225830078125, 0.00775146484375, -0.004913330078125, -0.008544921875, 0.0023956298828125, -0.010498046875, 0.01141357421875, -0.04345703125, 0.00323486328125, -0.01275634765625, 0.009521484375, 0.013916015625, 0.007598876953125, -0.003616333007812...
[ 34997, 133244, 62346, 32354, 23, 1556, 142508, 351, 112, 30524, 48242, 108636, 982, 93908, 14, 814, 22288, 594, 40226, 33120, 12096, 226347, 34292, 645, 5303, 30448, 7, 1221, 39285, 2053, 12638, 12989, 1884, 64457, 1419, 47, 756, 7864, 2978...
[ 0.2471923828125, 0.263427734375, 0.2449951171875, 0.18896484375, 0.048828125, 0.1519775390625, 0.242431640625, 0.1002197265625, 0.0294647216796875, 0.1253662109375, 0.0452880859375, 0.1826171875, 0.1251220703125, 0.1099853515625, 0.07745361328125, 0.09814453125, 0.1976318359375, 0....
embed
1199887_c0
1199887
haskell
0
Title: Implementing the last function Problem title: Implementing the last function Tags: haskell Problem: Implementing the last function I am trying to teach myself Haskell. One thing I have tried to do is to write an alternative function to return the last element of a list by recursing through the list until the tai...
Implementing the last function Implementing the last function haskell Implementing x:xs Implementing the last function I am trying to teach myself Haskell. One thing I have tried to do is to write an alternative function to return the last element of a list by recursing through the list until the tail is the empty set ...
[ 0.0013275146484375, 0.0196533203125, 0.01446533203125, 0.0027923583984375, 0.0019989013671875, 0.0169677734375, 0.007049560546875, -0.0081787109375, 0.0225830078125, -0.007415771484375, 0.03759765625, -0.0291748046875, 0.01806640625, 0.0062255859375, 0.01263427734375, 0.00897216796875,...
[ 153941, 70, 4568, 32354, 214, 1556, 142508, 1022, 12, 425, 7, 31577, 94957, 20625, 37842, 33022, 30700, 30646, 12830, 5303, 195625, 8305, 24189, 46741, 201505, 5423, 10336, 18499, 9790, 2499, 351, 33548, 939, 157666, 44691, 114551 ]
[ 0.237548828125, 0.068603515625, 0.259033203125, 0.2216796875, 0.024078369140625, 0.13720703125, 0.2144775390625, 0.0455322265625, 0.0252532958984375, 0.104248046875, 0.05029296875, 0.0212860107421875, 0.06512451171875, 0.10491943359375, 0.046661376953125, 0.04962158203125, 0.14257812...
embed
35122275_c0
35122275
haskell
0
Title: Way on generating a truth table for arbitrary number of variables Problem title: Way on generating a truth table for arbitrary number of variables Tags: haskell Problem: Way on generating a truth table for arbitrary number of variables How does one generate a truth table of all possible true/false combinations f...
Way on generating a truth table for arbitrary number of variables Way on generating a truth table for arbitrary number of variables haskell Way Way on generating a truth table for arbitrary number of variables How does one generate a truth table of all possible true/false combinations for an input like ["a", "b", "c"] ...
[ -0.001922607421875, 0.010009765625, -0.00592041015625, -0.00494384765625, -0.005859375, -0.004364013671875, 0.00148773193359375, -0.017822265625, -0.00021266937255859375, -0.0203857421875, -0.0177001953125, -0.00677490234375, 0.01214599609375, 0.0380859375, -0.0255126953125, 0.01141357...
[ 42261, 98, 12663, 85027, 23180, 100, 61799, 14012, 77336, 1556, 142508, 10, 1294, 11249, 14602, 1632, 139392, 111, 756, 7722, 29568, 64, 8710, 162515, 107730, 1884, 11, 275, 238, 7413, 6183, 7941, 5351, 1672, 195625, 5844, 360, 7077, 13538 ...
[ 0.1546630859375, 0.16015625, 0.17919921875, 0.247802734375, 0.271240234375, 0.04620361328125, 0.1246337890625, 0.05889892578125, 0.1998291015625, 0.1336669921875, 0.216064453125, 0.08807373046875, 0.022125244140625, 0.06024169921875, 0.01190185546875, 0.0143280029296875, 0.2113037109...
embed
52303645_c0
52303645
haskell
0
Title: intersect function in Haskell Problem title: intersect function in Haskell Tags: haskell Problem: intersect function in Haskell i did this function for intersect in haskell and it just doesnt work. i know that the aux works but the main one no. Help pleas myintersect :: Eq a => [a] -> [a] -> [a] myintersect a []...
intersect function in Haskell intersect function in Haskell haskell Haskell h1:t1 h:t h:intersectaux intersect function in Haskell i did this function for intersect in haskell and it just doesnt work. i know that the aux works but the main one no. Help pleas
[ 0, -0.0186767578125, 0.0213623046875, -0.00020503997802734375, -0.005340576171875, 0.0205078125, -0.0093994140625, -0.004547119140625, 0.000354766845703125, -0.022216796875, 0.018310546875, 0.01416015625, 0.01422119140625, 0.013916015625, 0.005767822265625, 0.003326416015625, 0.01965...
[ 1940, 7, 24762, 32354, 20625, 142508, 23, 1556, 1096, 82825, 18, 418, 10433, 10442, 6777, 903, 442, 1660, 22027, 4488, 3714, 2970, 43240, 1284, 5201, 110, 39527, 6221 ]
[ 0.2108154296875, 0.2158203125, 0.22998046875, 0.2069091796875, 0.1578369140625, 0.243896484375, 0.0506591796875, 0.152099609375, 0.1024169921875, 0.069091796875, 0.09808349609375, 0.058441162109375, 0.1727294921875, 0.150390625, 0.044952392578125, 0.09197998046875, 0.0014286041259765...
embed
48254995_c0
48254995
haskell
0
Title: Remove duplicates of pairs in a list Problem title: Remove duplicates of pairs in a list Tags: function, tuples, haskell, list Problem: Remove duplicates of pairs in a list I am familiar with the nub function on lists containing numbers, characters, or strings, but can someone explain to me how I can use the nub...
Remove duplicates of pairs in a list Remove duplicates of pairs in a list function tuples haskell list Remove Data.List Remove duplicates of pairs in a list I am familiar with the nub function on lists containing numbers, characters, or strings, but can someone explain to me how I can use the nub function from Data.Lis...
[ 0.00167083740234375, 0.00921630859375, 0.0228271484375, -0.0052490234375, 0.00457763671875, 0.0087890625, 0.00518798828125, -0.008056640625, 0.0040283203125, -0.0294189453125, -0.009765625, -0.006256103515625, 0.025634765625, 0.00152587890625, -0.0238037109375, 0.01806640625, 0.01428...
[ 181139, 171763, 1636, 111, 80836, 7, 23, 10, 5303, 32354, 370, 99726, 1556, 142508, 11809, 5, 154663, 16031, 70, 315, 275, 98, 70541, 101935, 124850, 79315, 73342, 3642, 831, 4527, 1295, 89536, 47, 1957, 3444, 87388, 756, 7440, 22799, 197...
[ 0.193603515625, 0.2763671875, 0.1932373046875, 0.1414794921875, 0.280029296875, 0.1534423828125, 0.0789794921875, 0.029998779296875, 0.2320556640625, 0.1951904296875, 0.0888671875, 0.0855712890625, 0.11474609375, 0.2100830078125, 0.1514892578125, 0.0283050537109375, 0.2298583984375, ...
embed
58814553_c0
58814553
haskell
0
Title: How does Haskell compile the large numbers? Problem title: How does Haskell compile the large numbers? Tags: haskell, ghc Problem: How does Haskell compile the large numbers? I would just like to know how it works at compilation time. GHC, for its interpreter, uses the GMP library to generate and manipulate very...
How does Haskell compile the large numbers? How does Haskell compile the large numbers? haskell ghc How Haskell How does Haskell compile the large numbers? I would just like to know how it works at compilation time. GHC, for its interpreter, uses the GMP library to generate and manipulate very large numbers, but an exe...
[ -0.00933837890625, 0.00665283203125, 0.015380859375, 0.005035400390625, 0, 0.02783203125, -0.0240478515625, 0.0026092529296875, 0.016357421875, -0.007720947265625, -0.00946044921875, -0.0157470703125, 0.01446533203125, 0.0257568359375, -0.00112152099609375, 0.00628662109375, -0.00872...
[ 11249, 14602, 20625, 142508, 9969, 1340, 70, 21334, 101935, 1556, 31380, 238, 1884, 3714, 3642, 442, 43240, 98352, 1733, 527, 73265, 100, 29481, 56, 4527, 9088, 35773, 47, 139392, 136, 45258, 4552, 71924, 2886, 375, 5974, 390, 959, 50960, ...
[ 0.1221923828125, 0.10888671875, 0.169921875, 0.28173828125, 0.201171875, 0.183837890625, 0.052886962890625, 0.161865234375, 0.216552734375, 0.1436767578125, 0.10223388671875, 0.0936279296875, 0.02703857421875, 0.04638671875, 0.0653076171875, 0.0213165283203125, 0.10443115234375, 0....
embed
7493094_c0
7493094
haskell
0
Title: Class Instances and ambiguous occurence in Haskell Problem title: Class Instances and ambiguous occurence in Haskell Tags: instance, haskell, ambiguous Problem: Class Instances and ambiguous occurence in Haskell Here is the code: data Tree t = NilT | Node t (Tree t) (Tree t) instance Show (Tree t) where show Nil...
Class Instances and ambiguous occurence in Haskell Class Instances and ambiguous occurence in Haskell instance haskell ambiguous Instances Haskell Tree NilT Node Show Class Instances and ambiguous occurence in Haskell Here is the code: how to use "show" in "t show" with the default setting and use "show" with the tree ...
[ 0.012451171875, -0.006500244140625, 0.02197265625, 0.01544189453125, 0.015625, -0.00122833251953125, -0.004974365234375, -0.00506591796875, -0.002105712890625, 0.0028228759765625, -0.025146484375, -0.031982421875, 0.0157470703125, 0.017333984375, 0.005401611328125, -0.00408935546875, ...
[ 35014, 360, 116071, 136, 920, 12282, 10821, 74918, 6620, 20625, 142508, 110527, 1556, 101344, 77175, 618, 438, 112, 17367, 18151, 3642, 4527, 31374, 18, 7639, 678, 114977, 53550, 53201, 2053, 80934, 34475, 35978 ]
[ 0.20458984375, 0.0318603515625, 0.1739501953125, 0.051513671875, 0.1160888671875, 0.17578125, 0.09893798828125, 0.1290283203125, 0.054229736328125, 0.1241455078125, 0.2125244140625, 0.17431640625, 0.1033935546875, 0.1356201171875, 0.06256103515625, 0.0914306640625, 0.06695556640625, ...
embed
57237438_c0
57237438
haskell
0
Title: how does Haskell code works without applying the parameter? Problem title: how does Haskell code works without applying the parameter? Tags: haskell Problem: how does Haskell code works without applying the parameter? I encountered the following Haskell code: trafficController :: Double -> Picture trafficControl...
how does Haskell code works without applying the parameter? how does Haskell code works without applying the parameter? haskell Haskell Double Picture how does Haskell code works without applying the parameter? I encountered the following Haskell code: I ran and it worked. But how can it be coz the 't' parameter was ne...
[ -0.0142822265625, 0.0052490234375, 0.0096435546875, 0.006744384765625, 0.01287841796875, -0.0048828125, -0.00009918212890625, -0.003997802734375, -0.0068359375, -0.019775390625, -0.00238037109375, -0.0230712890625, -0.0081787109375, 0.0027313232421875, 0.00732421875, -0.001617431640625...
[ 3642, 14602, 20625, 142508, 18151, 43240, 15490, 59911, 171859, 1556, 107172, 158656, 214, 190647, 13028, 79786, 831, 18, 509, 8306, 190659 ]
[ 0.06109619140625, 0.054931640625, 0.1300048828125, 0.248779296875, 0.1876220703125, 0.146240234375, 0.14794921875, 0.1041259765625, 0.1907958984375, 0.09814453125, 0.1138916015625, 0.146484375, 0.03125, 0.03704833984375, 0.1143798828125, 0.1134033203125, 0.010498046875, 0.133056640...
embed
16964732_c0
16964732
haskell
0
Title: Haskell do notation to bind Problem title: Haskell do notation to bind Tags: haskell, do-notation Problem: Haskell do notation to bind I´am trying to desugar a do statement in Haskell. I have found some examples here on SO but wasn´t able to apply them to my case. Only thing I can think of is a heavy nested let ...
Haskell do notation to bind Haskell do notation to bind haskell do-notation Haskell nt1 nt2 Node Haskell do notation to bind I´am trying to desugar a do statement in Haskell. I have found some examples here on SO but wasn´t able to apply them to my case. Only thing I can think of is a heavy nested let statement, which ...
[ -0.0223388671875, 0.001983642578125, 0.00933837890625, -0.0023193359375, 0.01239013671875, 0.0255126953125, -0.00518798828125, -0.0167236328125, 0.017578125, -0.048095703125, -0.007476806640625, -0.052978515625, -0.00811767578125, 0.0025177001953125, 0.00970458984375, 0.000503540039062...
[ 20625, 142508, 54, 110, 22062, 47, 68557, 1556, 157, 660, 418, 304, 438, 112, 31577, 224, 1970, 63805, 27781, 15969, 59911, 7225, 5351, 99162, 8512, 71, 2633, 37202, 32233, 110608, 22836, 5608, 91995, 107730, 40039 ]
[ 0.1356201171875, 0.21142578125, 0.164794921875, 0.1605224609375, 0.1051025390625, 0.0777587890625, 0.2293701171875, 0.1346435546875, 0.1485595703125, 0.07861328125, 0.0170440673828125, 0.046295166015625, 0.113037109375, 0.04473876953125, 0.0003662109375, 0.06854248046875, 0.093627929...
embed
17907186_c2
17907186
haskell
2
rate 4,064,658,288 bytes per MUT second Productivity 30.8% of total user, 29.3% of total elapsed Which is awful. Not only is Code signals: Data.Text, Text.XML.Light, qualified, Data.Foldable, Data.Monoid, -N1, Improving, Text, XML, Data.Text.Lazy.Builder, LANGUAGE, OverloadedStrings, Data.Text.Lazy, Tag, Artist, ToXML...
rate 4,064,658,288 bytes per MUT second Productivity 30.8% of total user, 29.3% of total elapsed Which is awful. Not only is Code signals: Data.Text, Text.XML.Light, qualified, Data.Foldable, Data.Monoid, -N1, Improving, Text, XML, Data.Text.Lazy.Builder, LANGUAGE, OverloadedStrings, Data.Text.Lazy, Tag, Artist, ToXML...
[ -0.007293701171875, 0.0091552734375, 0.0118408203125, -0.0164794921875, 0.0009307861328125, 0.003082275390625, -0.0096435546875, 0.001312255859375, 0.0078125, -0.0194091796875, -0.017822265625, 0.0013275146484375, 0.00106048583984375, -0.0162353515625, 0.01055908203125, 0.021484375, ...
[ 34515, 201, 9016, 128191, 10057, 103064, 390, 1636, 117, 276, 17632, 17932, 73111, 54613, 53, 496, 11991, 3622, 38937, 13646, 11587, 28, 127966, 71, 130078, 83, 10, 434, 7844, 5, 11205, 4734, 28864, 26073, 7, 11809, 174379, 24129, 1542, 3...
[ 0.25048828125, 0.035125732421875, 0.09478759765625, 0.04425048828125, 0.104248046875, 0.144775390625, 0.156494140625, 0.09490966796875, 0.133056640625, 0.087158203125, 0.273681640625, 0.2349853515625, 0.19775390625, 0.1796875, 0.06622314453125, 0.09033203125, 0.1461181640625, 0.132...
embed
235148_c0
235148
haskell
0
Title: Implement zip using foldr Problem title: Implement zip using foldr Tags: haskell, combinators, functional-programming, fold Problem: Implement zip using foldr I'm currently on chapter 4 of Real World Haskell, and I'm trying to wrap my head around implementing foldl in terms of foldr . (Here's their code:) myFold...
Implement zip using foldr Implement zip using foldr haskell combinators functional-programming fold foldr Implement Implement zip using foldr I'm currently on chapter 4 of Real World Haskell, and I'm trying to wrap my head around implementing foldl in terms of foldr . (Here's their code:) I thought I'd try to implement...
[ -0.01129150390625, -0.000713348388671875, -0.0028533935546875, 0.0106201171875, -0.02099609375, 0.02587890625, -0.0223388671875, -0.00836181640625, -0.005645751953125, -0.0289306640625, -0.0108642578125, -0.006591796875, -0.0015411376953125, 0.0185546875, -0.00121307373046875, 0.016723...
[ 153941, 68330, 17368, 18344, 7569, 1556, 142508, 22321, 22230, 123309, 28966, 42822, 82424, 139539, 201, 5120, 6661, 20625, 31577, 137565, 10336, 29479, 20469, 69407, 18151, 17569, 9790, 5701, 61353, 18, 48903, 20662, 42658, 2071, 3853, 7722 ]
[ 0.230712890625, 0.263671875, 0.07598876953125, 0.1849365234375, 0.2386474609375, 0.10577392578125, 0.2071533203125, 0.1611328125, 0.0869140625, 0.1513671875, 0.1142578125, 0.1805419921875, 0.0205078125, 0.051239013671875, 0.079345703125, 0.11083984375, 0.1080322265625, 0.0916748046...
embed
27887249_c0
27887249
haskell
0
Title: Trying out &quot;cabal sandbox init&quot; and cabal not recognizing the command &quot;sandbox&quot; Problem title: Trying out &quot;cabal sandbox init&quot; and cabal not recognizing the command &quot;sandbox&quot; Tags: haskell, sandbox, cabal Problem: Trying out "cabal sandbox init" and cabal not recognizing t...
Trying out &quot;cabal sandbox init&quot; and cabal not recognizing the command &quot;sandbox&quot; Trying out &quot;cabal sandbox init&quot; and cabal not recognizing the command &quot;sandbox&quot; haskell sandbox cabal Trying Trying out "cabal sandbox init" and cabal not recognizing the command "sandbox" I'm trying ...
[ 0.01177978515625, 0.01263427734375, 0.0191650390625, 0.005828857421875, -0.00860595703125, 0.01373291015625, 0.0096435546875, 0.0198974609375, 0.0126953125, 0.0048828125, -0.0045166015625, -0.013916015625, -0.00106048583984375, 0.0198974609375, 0.0086669921875, -0.0118408203125, 0.00...
[ 40858, 1810, 408, 3571, 19096, 11728, 23, 217, 109524, 75530, 19, 75101, 43882, 1556, 142508, 959, 31577, 57143, 8781, 4165, 678, 14753, 15145, 18499, 9790, 44691 ]
[ 0.04010009765625, 0.007049560546875, 0.06982421875, 0.154052734375, 0.1136474609375, 0.184326171875, 0.034454345703125, 0.1214599609375, 0.2109375, 0.03619384765625, 0.0177001953125, 0.1689453125, 0.1292724609375, 0.050018310546875, 0.1593017578125, 0.0064697265625, 0.047332763671875...
embed
42356413_c0
42356413
haskell
0
Title: Error expected type with actual type in Haskell Problem title: Error expected type with actual type in Haskell Tags: functional-programming, types, haskell, compiler-errors Problem: Error expected type with actual type in Haskell I declared these types in Haskell : data Tree x = Node x (Tree x) (Tree x) |Leef de...
Error expected type with actual type in Haskell Error expected type with actual type in Haskell functional-programming types haskell compiler-errors d Error Haskell Tree Node Leef Show Color TreeRN Couldn Relevant test.hs:15:53 test.hs:15:51 test.hs:15:48 test.hs:15:37 test.hs:15:34 test.hs:15:23 test.hs:12:1 Some Fail...
[ 0.005523681640625, -0.00081634521484375, -0.0235595703125, 0.007415771484375, 0.007354736328125, 0.0113525390625, -0.03466796875, -0.00153350830078125, -0.016357421875, 0.01068115234375, -0.0113525390625, -0.010498046875, 0.0167236328125, 0.003631591796875, 0.00982666015625, 0.01586914...
[ 212059, 84751, 10644, 678, 8561, 20625, 142508, 123309, 28966, 52895, 1556, 9969, 34759, 188800, 104, 101344, 438, 112, 636, 4240, 17367, 51193, 50456, 191147, 133, 3034, 12221, 31690, 37374, 34605, 31384, 190355, 159978, 32354, 31089, 8562, 18...
[ 0.1790771484375, 0.186279296875, 0.1993408203125, 0.1005859375, 0.16796875, 0.1029052734375, 0.206298828125, 0.101318359375, 0.041229248046875, 0.1859130859375, 0.071044921875, 0.10205078125, 0.1072998046875, 0.1317138671875, 0.0843505859375, 0.2061767578125, 0.1092529296875, 0.025...
embed
4909896_c0
4909896
haskell
0
Title: When representing 2^n x 2^n matrices using quadtrees Problem title: When representing 2^n x 2^n matrices using quadtrees Tags: haskell, matrix, quadtree Problem: When representing 2^n x 2^n matrices using quadtrees I've just found the definition on my textbook and can't imagine what nexp is supposed to do/mean: ...
When representing 2^n x 2^n matrices using quadtrees When representing 2^n x 2^n matrices using quadtrees haskell matrix quadtree quadtrees When Show Num Mat When representing 2^n x 2^n matrices using quadtrees I've just found the definition on my textbook and can't imagine what nexp is supposed to do/mean: What is the...
[ 0.0186767578125, 0.00019741058349609375, 0.001556396484375, -0.0007781982421875, 0.0218505859375, 0.007110595703125, 0.014404296875, -0.009521484375, -0.00604248046875, -0.0040283203125, -0.01031494140625, -0.02978515625, -0.002685546875, -0.0130615234375, -0.029541015625, -0.003173828...
[ 14847, 33636, 214, 116, 8353, 19, 1022, 50944, 5170, 17368, 91526, 2921, 90, 1556, 142508, 62600, 17367, 52782, 7656, 80934, 7986, 14137, 18, 28987, 2367, 653, 83613, 134598, 47, 54, 282, 66, 4865, 83, 70, 60042, 111, 1984, 360 ]
[ 0.05316162109375, 0.2353515625, 0.031982421875, 0.1119384765625, 0.07000732421875, 0.050872802734375, 0.08782958984375, 0.162109375, 0.05242919921875, 0.055023193359375, 0.1417236328125, 0.22509765625, 0.0211181640625, 0.056427001953125, 0.1728515625, 0.212890625, 0.1041259765625, ...
embed
55152711_c0
55152711
haskell
0
Title: How to define range of natural numbers as chars in Haskell? Problem title: How to define range of natural numbers as chars in Haskell? Tags: haskell, filter Problem: How to define range of natural numbers as chars in Haskell? I tried: ['1','2',..] but this takes into account other characters also. I could do [1,...
How to define range of natural numbers as chars in Haskell? How to define range of natural numbers as chars in Haskell? haskell filter How Haskell How to define range of natural numbers as chars in Haskell? I tried: but this takes into account other characters also. I could do [1,2..] , But for my application I need to...
[ -0.00124359130859375, 0.0034942626953125, -0.0087890625, 0.012939453125, 0.00885009765625, 0.013671875, 0.0084228515625, -0.0011749267578125, 0.006744384765625, 0.007781982421875, -0.0108642578125, -0.01239013671875, -0.00152587890625, 0.01495361328125, -0.01513671875, 0.0107421875, ...
[ 11249, 61924, 37457, 6083, 101935, 237, 21441, 7, 23, 20625, 142508, 1556, 46312, 111, 37842, 15426, 124850, 5809, 133063, 38415, 12765, 81887, 1810, 756, 80854, 32628, 959, 9254 ]
[ 0.0416259765625, 0.1878662109375, 0.2027587890625, 0.234619140625, 0.1973876953125, 0.08587646484375, 0.209228515625, 0.1082763671875, 0.0540771484375, 0.1456298828125, 0.2364501953125, 0.1326904296875, 0.1495361328125, 0.02374267578125, 0.016204833984375, 0.03271484375, 0.1234130859...
embed
34324641_c0
34324641
haskell
0
Title: Functional programming: Curry &amp; Fold - what are the etymologies? Problem title: Functional programming: Curry &amp; Fold - what are the etymologies? Tags: scala, history, haskell, functional-programming Problem: Functional programming: Curry & Fold - what are the etymologies? Curry & Fold - what are the etym...
Functional programming: Curry &amp; Fold - what are the etymologies? Functional programming: Curry &amp; Fold - what are the etymologies? scala history haskell functional-programming Functional Curry Fold Functional programming: Curry & Fold - what are the etymologies? Curry & Fold - what are the etymologies in the pro...
[ 0.0234375, -0.0140380859375, 0.010498046875, -0.004058837890625, -0.004119873046875, 0.0068359375, -0.007354736328125, -0.0101318359375, 0.0042724609375, -0.01458740234375, 0.0194091796875, -0.0247802734375, -0.003265380859375, -0.00008249282836914062, -0.0013427734375, -0.005493164062...
[ 28670, 10763, 289, 56037, 449, 17065, 1294, 619, 25133, 74, 30077, 71, 2367, 82, 4650, 18709, 7, 146232, 32692, 1556, 142508, 123309, 28966, 214, 1528, 47148, 10422, 14941, 91084, 6097, 12840, 5264, 62548, 69407, 1902, 456, 11627, 2856, 128...
[ 0.09942626953125, 0.0960693359375, 0.06622314453125, 0.1474609375, 0.0994873046875, 0.148681640625, 0.236328125, 0.174560546875, 0.0994873046875, 0.0755615234375, 0.236572265625, 0.1888427734375, 0.00775146484375, 0.101806640625, 0.19873046875, 0.145263671875, 0.04461669921875, 0.1...
embed
51073535_c0
51073535
haskell
0
Title: Using map with function that has multiple arguments Problem title: Using map with function that has multiple arguments Tags: partial-application, map-function, list, haskell, higher-order-functions Problem: Using map with function that has multiple arguments Is it possible to use map with a function that takes m...
Using map with function that has multiple arguments Using map with function that has multiple arguments partial-application map-function list haskell higher-order-functions Using Using map with function that has multiple arguments Is it possible to use map with a function that takes multiple arguments? I want to use ma...
[ 0.0022430419921875, -0.01300048828125, 0.000640869140625, -0.008056640625, -0.0184326171875, 0.005645751953125, -0.0086669921875, -0.00106048583984375, 0.024658203125, -0.01202392578125, 0.00958251953125, -0.0205078125, 0.00469970703125, 0.022216796875, 0.00183868408203125, 0.008300781...
[ 345, 6953, 22288, 678, 32354, 450, 1556, 48716, 10750, 2878, 101687, 137175, 5303, 142508, 77546, 80596, 442, 7722, 47, 4527, 51776, 7, 3444, 17932, 136, 50960, 119140, 237, 1061, 1181, 151575, 13, 1238, 5701, 113, 97, 142424, 1284, 1022, ...
[ 0.09503173828125, 0.0239105224609375, 0.25048828125, 0.1258544921875, 0.2244873046875, 0.01068115234375, 0.1070556640625, 0.2332763671875, 0.25390625, 0.058837890625, 0.098388671875, 0.14404296875, 0.09918212890625, 0.21044921875, 0.033447265625, 0.1253662109375, 0.046844482421875, ...
embed
26678028_c0
26678028
haskell
0
Title: Parse error while running a simple Haskell program Problem title: Parse error while running a simple Haskell program Tags: haskell Problem: Parse error while running a simple Haskell program I have just started learning Haskell. I'm beginning by writing a simple function that takes two values n and x, and then d...
Parse error while running a simple Haskell program Parse error while running a simple Haskell program haskell Parse Haskell cell1 cell2 Parse error while running a simple Haskell program I have just started learning Haskell. I'm beginning by writing a simple function that takes two values n and x, and then displays two...
[ -0.02197265625, -0.000659942626953125, -0.006072998046875, 0.01446533203125, 0.005340576171875, 0.034912109375, -0.00171661376953125, -0.0015411376953125, 0.00897216796875, -0.0032196044921875, -0.0184326171875, -0.022705078125, 0.006988525390625, 0.006256103515625, -0.0016021728515625, ...
[ 2392, 184, 18499, 12960, 51042, 8781, 20625, 142508, 1528, 1556, 38750, 418, 304, 52080, 86595, 32562, 32354, 51776, 6626, 142424, 653, 136, 1022, 44116, 892, 1505, 7077, 678, 22027, 18, 11675, 13695, 163, 98, 107730, 1369, 123087 ]
[ 0.1546630859375, 0.1612548828125, 0.1978759765625, 0.08062744140625, 0.1348876953125, 0.1873779296875, 0.1461181640625, 0.218017578125, 0.153076171875, 0.13330078125, 0.154296875, 0.057098388671875, 0.14404296875, 0.05767822265625, 0.01904296875, 0.079345703125, 0.1168212890625, 0....
embed
26969494_c1
26969494
haskell
1
f (foldr f st x:xs) (foldr f st ys) LHS: foldr f st (x:xs ++ ys) = f x (foldr f st (xs++yx)) (by foldr.2) = f x (f (foldr f st xs) (foldr f st ys) ) (by ind. hyp) = f (f x (foldr f st xs)) (foldr f st ys) (by assosiativity of f) RHS: f (foldr f st x:xs) (foldr f st ys) = f (f x (foldr f st xs)) (foldr f st ys) (by fol...
f (foldr f st x:xs) (foldr f st ys) LHS: foldr f st (x:xs ++ ys) = f x (foldr f st (xs++yx)) (by foldr.2) = f x (f (foldr f st xs) (foldr f st ys) ) (by ind. hyp) = f (f x (foldr f st xs)) (foldr f st ys) (by assosiativity of f) RHS: f (foldr f st x:xs) (foldr f st ys) = f (f x (foldr f st xs)) (foldr f st ys) (by fol...
[ -0.00872802734375, 0.0021514892578125, 0.0078125, -0.016357421875, -0.01409912109375, -0.005340576171875, -0.01068115234375, 0.00148773193359375, -0.006317138671875, 0.0084228515625, 0.00213623046875, -0.00274658203125, -0.00830078125, 0.01019287109375, -0.003265380859375, -0.003768920...
[ 1238, 42822, 42, 6138, 1022, 12, 425, 7, 113, 339, 38131, 18344, 7569, 37223, 2203, 53, 1272, 10461, 420, 2752, 2119, 254, 63927, 68416, 294, 15, 127298, 135989, 4935, 29954, 16401, 18878, 98869, 9077, 903, 83, 35604, 4358, 72694, 26785, ...
[ 0.1859130859375, 0.1658935546875, 0.1170654296875, 0.1824951171875, 0.0784912109375, 0.03271484375, 0.09503173828125, 0.1011962890625, 0.1307373046875, 0.073974609375, 0.2034912109375, 0.1572265625, 0.185546875, 0.1927490234375, 0.038848876953125, 0.044464111328125, 0.044189453125, ...
embed
76963566_c0
76963566
haskell
0
Title: Access a json values by their key Problem title: Access a json values by their key Tags: haskell, aeson Problem: Access a json values by their key I want to get a value from a json object using a key let nm = case rep_json of Object v -> case HM.lookup "names" v of Just endps -> Just v _ -> Nothing _ -> Nothing ...
Access a json values by their key Access a json values by their key haskell aeson Access rep_json Object HM.lookup Just Nothing Access a json values by their key I want to get a value from a json object using a key This doesn't work, I get this error Couldn't match type: Data.Aeson.KeyMap.KeyMap Value with: HashMap k0 ...
[ -0.01165771484375, -0.00982666015625, -0.013916015625, -0.0017242431640625, -0.017822265625, -0.0020294189453125, 0.0169677734375, 0.0306396484375, -0.00909423828125, -0.0037841796875, -0.00262451171875, 0.031982421875, 0.000774383544921875, -0.00567626953125, 0.016845703125, -0.001579...
[ 40266, 1647, 1681, 142424, 390, 2363, 22799, 10, 1556, 142508, 90, 191, 10958, 170, 134549, 46592, 64747, 2037, 9563, 182747, 3444, 2046, 34292, 1295, 36746, 17368, 22027, 18, 4488, 903, 18499, 191147, 14858, 10644, 11809, 284, 162429, 166179...
[ 0.1805419921875, 0.1290283203125, 0.2235107421875, 0.213623046875, 0.1431884765625, 0.1412353515625, 0.2568359375, 0.068115234375, 0.1180419921875, 0.20947265625, 0.08355712890625, 0.188720703125, 0.166259765625, 0.1094970703125, 0.1673583984375, 0.158935546875, 0.134033203125, 0.1...
embed
7863420_c0
7863420
haskell
0
Title: Haskell data type Problem title: Haskell data type Tags: haskell, types Problem: Haskell data type Let's say that I have a type like this (that works): data WAE = Num Float | Id String | With [(String, WAE)] WAE -- This works, but I want to define it as below deriving(Eq, Read, Show) I want a type like this (doe...
Haskell data type Haskell data type haskell types Haskell WAE Num Float Read Show Haskell data type Let's say that I have a type like this (that works): I want a type like this (doesn't work): Why can't I do that in Haskell? Any ideas in achieveing a similar effect?
[ 0.0224609375, -0.0027008056640625, 0.003082275390625, 0.00872802734375, 0.0074462890625, 0.0035858154296875, 0.00848388671875, -0.00372314453125, -0.005279541015625, -0.0255126953125, -0.0125732421875, -0.027587890625, -0.00274658203125, -0.0167236328125, -0.0108642578125, 0.0034942626...
[ 20625, 142508, 2053, 10644, 1556, 52895, 4336, 647, 52782, 38699, 257, 4764, 17367, 765, 1884, 903, 86673, 43240, 3444, 246, 90, 19, 18, 4488, 44084, 831, 54, 450, 23, 25647, 69307, 21373, 21543 ]
[ 0.143310546875, 0.2344970703125, 0.15576171875, 0.227294921875, 0.1473388671875, 0.155517578125, 0.139404296875, 0.11090087890625, 0.1474609375, 0.1640625, 0.04425048828125, 0.1859130859375, 0.1527099609375, 0.0261383056640625, 0.1278076171875, 0.09417724609375, 0.0177154541015625, ...
embed
79117401_c2
79117401
haskell
2
ai, LANGUAGE, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, DeriveGeneric, DeriveAnyClass, Network.Wai, Network.Wai.Logger, Network.HTTP.Types.Status, Network.Wai.Middleware.RequestLogger, Healthy, Bool, Generic, ToJSON, App, HealthcheckR, GET, _app, Handler, Value, HealthCheck, Good, Logger, _loggerSe...
ai, LANGUAGE, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, DeriveGeneric, DeriveAnyClass, Network.Wai, Network.Wai.Logger, Network.HTTP.Types.Status, Network.Wai.Middleware.RequestLogger, Healthy, Bool, Generic, ToJSON, App, HealthcheckR, GET, _app, Handler, Value, HealthCheck, Good, Logger, _loggerSe...
[ 0.01116943359375, 0.02099609375, -0.0004711151123046875, 0.00860595703125, 0.0172119140625, 0.01251220703125, 0.00640869140625, -0.012451171875, -0.01141357421875, 0.007293701171875, 0.0234375, 0.0233154296875, 0.0032806396484375, -0.0035247802734375, -0.0164794921875, -0.0048522949218...
[ 1300, 4, 3358, 98064, 75930, 9578, 63033, 297, 71713, 5180, 19559, 172, 31583, 31, 1636, 196631, 6495, 7, 142508, 60457, 919, 1191, 25720, 1310, 5844, 135932, 12259, 299, 140803, 28997, 5, 22489, 14, 113972, 1505, 18544, 23658, 196707, 1352...
[ 0.2705078125, 0.10888671875, 0.1146240234375, 0.219970703125, 0.191650390625, 0.1385498046875, 0.2213134765625, 0.0943603515625, 0.17529296875, 0.138427734375, 0.15283203125, 0.1298828125, 0.1854248046875, 0.079345703125, 0.1033935546875, 0.243408203125, 0.11572265625, 0.0394897460...
embed
26209354_c0
26209354
haskell
0
Title: Using Functions of `a` on `newtype a` Problem title: Using Functions of `a` on `newtype a` Tags: haskell, newtype Problem: Using Functions of `a` on `newtype a` Let's say I have the following newtype : newtype Foo = Foo Integer deriving (Eq, Show) Is there a concise way to add two Foo 's: (Foo 10) + (Foo 5) == F...
Using Functions of `a` on `newtype a` Using Functions of `a` on `newtype a` haskell newtype Using Functions Foo Integer Show Using Functions of `a` on `newtype a` Let's say I have the following newtype : newtype Foo = Foo Integer deriving (Eq, Show) Is there a concise way to add two Foo 's: (Foo 10) + (Foo 5) == Foo 15...
[ -0.01055908203125, -0.016357421875, 0.008544921875, 0.022216796875, 0.00323486328125, 0.0137939453125, 0.00823974609375, -0.0026397705078125, 0.0113525390625, -0.041748046875, 0.0030670166015625, -0.0255126953125, -0.00970458984375, 0.01214599609375, -0.004302978515625, -0.055908203125...
[ 345, 6953, 28670, 10763, 111, 11, 98, 54936, 50986, 10, 1556, 142508, 3525, 9572, 31, 44401, 17367, 25632, 16406, 6496, 864, 318, 184, 3917, 15190, 6626, 242, 27591, 209, 997, 21162, 69112, 423, 2046, 18389, 190, 193844, 7722, 72546, 4527...
[ 0.127685546875, 0.06658935546875, 0.19287109375, 0.1458740234375, 0.1636962890625, 0.2017822265625, 0.0987548828125, 0.1497802734375, 0.3017578125, 0.2020263671875, 0.107666015625, 0.206787109375, 0.1519775390625, 0.20703125, 0.1619873046875, 0.1798095703125, 0.1549072265625, 0.054...
embed
40576231_c0
40576231
haskell
0
Title: Would like to import splitOn without using Cabal or Stack Problem title: Would like to import splitOn without using Cabal or Stack Tags: ghc, ghci, haskell Problem: Would like to import splitOn without using Cabal or Stack I would like to import splitOn without using Cabal or Stack. Is that possible? It GHCi ref...
Would like to import splitOn without using Cabal or Stack Would like to import splitOn without using Cabal or Stack ghc ghci haskell splitOn Cabal Data.Text Would Stack Data.List.Split Data.Split Would like to import splitOn without using Cabal or Stack I would like to import splitOn without using Cabal or Stack. Is th...
[ -0.009765625, -0.00061798095703125, -0.004913330078125, 0.016845703125, -0.0244140625, 0.00112152099609375, 0.0203857421875, -0.000629425048828125, -0.00029754638671875, -0.018798828125, 0.00150299072265625, -0.0322265625, -0.0068359375, 0.015869140625, 0.0115966796875, 0.0000619888305...
[ 154559, 1884, 24927, 65450, 20320, 15490, 17368, 30438, 289, 6512, 2594, 31380, 238, 318, 1556, 142508, 11809, 174379, 154663, 31923, 4353, 7722, 527, 73265, 14, 128120, 11737, 29954, 707, 105237, 28032 ]
[ 0.0255889892578125, 0.05242919921875, 0.2225341796875, 0.254638671875, 0.278564453125, 0.088623046875, 0.0293426513671875, 0.1270751953125, 0.1156005859375, 0.133544921875, 0.113037109375, 0.08203125, 0.042449951171875, 0.09716796875, 0.110107421875, 0.203125, 0.0968017578125, 0.15...
embed
27942977_c0
27942977
haskell
0
Title: Why I get &quot;Not in scope&quot; exception message? Problem title: Why I get &quot;Not in scope&quot; exception message? Tags: haskell Problem: Why I get "Not in scope" exception message? I learn Haskell. My code: main = do args <- getArgs if length args < 2 then putStrLn invalidCallingSignature else dispatch ...
Why I get &quot;Not in scope&quot; exception message? Why I get &quot;Not in scope&quot; exception message? haskell Why Not But Exception src3.hs:22:48 Why I get "Not in scope" exception message? I learn Haskell. My code: I am confused by exception I get for last code row. Why I get it?
[ 0.00058746337890625, 0.031982421875, -0.01397705078125, 0.016845703125, 0.017822265625, 0.01373291015625, 0.01904296875, 0.025390625, 0.00823974609375, -0.007415771484375, -0.0033111572265625, -0.017578125, -0.00182342529296875, 0.00933837890625, 0.0081787109375, -0.0054931640625, 0....
[ 44084, 87, 2046, 122116, 23, 70820, 41502, 131527, 26008, 1556, 142508, 11205, 4966, 5443, 63928, 19437, 34605, 30698, 20625, 18151, 55681, 4568, 15555, 442 ]
[ 0.1146240234375, 0.016021728515625, 0.0628662109375, 0.210693359375, 0.177490234375, 0.2349853515625, 0.0236358642578125, 0.2081298828125, 0.10211181640625, 0.070556640625, 0.1923828125, 0.1280517578125, 0.09375, 0.050262451171875, 0.168212890625, 0.0028076171875, 0.044281005859375, ...
embed
4761367_c0
4761367
haskell
0
Title: explain how to use this specific function of foldl Problem title: explain how to use this specific function of foldl Tags: haskell Problem: explain how to use this specific function of foldl sum :: (Num a) => [a] -> a sum xs = foldl (\acc x -> acc + x) 0 xs foldl is folds the list up from the left side. So first...
explain how to use this specific function of foldl explain how to use this specific function of foldl haskell Num explain how to use this specific function of foldl foldl is folds the list up from the left side. So first we get the acc=0 and put the list xs to x ,then doing the function ->acc+x .After calculation, we g...
[ -0.01214599609375, 0.0032806396484375, 0.01544189453125, 0.005218505859375, -0.000766754150390625, 0.0274658203125, -0.002716064453125, 0.0225830078125, 0.0093994140625, -0.02099609375, 0.008056640625, -0.044921875, 0.010009765625, 0.000591278076171875, 0.00360107421875, -0.00817871093...
[ 73342, 3642, 4527, 903, 29458, 32354, 18344, 20469, 47, 1556, 142508, 52782, 111, 83, 42822, 7, 5303, 1257, 1295, 25737, 5609, 5117, 50015, 145407, 1022, 33079, 10060, 1328, 425, 74481, 2046, 3525, 105950, 15400, 5351, 16750, 34292, 35509, ...
[ 0.1201171875, 0.07513427734375, 0.1767578125, 0.1063232421875, 0.177490234375, 0.19970703125, 0.2001953125, 0.2607421875, 0.046844482421875, 0.1124267578125, 0.2158203125, 0.1861572265625, 0.06134033203125, 0.0816650390625, 0.209228515625, 0.047760009765625, 0.161376953125, 0.09460...
embed
31421237_c0
31421237
haskell
0
Title: @(_:_), how does it work in pattern matching Problem title: @(_:_), how does it work in pattern matching Tags: haskell Problem: @(_:_), how does it work in pattern matching This is an example taken from o' reilly - real world haskell . maybeReview alist = do title <- lookup1 "title" alist return (MovieReview tit...
@(_:_), how does it work in pattern matching @(_:_), how does it work in pattern matching haskell _:_ lookup1 MovieReview Just Nothing @(_:_), how does it work in pattern matching This is an example taken from o' reilly - real world haskell . How does the @ symbol work here in the line, How does it match a non-empty va...
[ -0.0185546875, 0.013916015625, -0.00634765625, -0.01544189453125, 0.003387451171875, 0.01287841796875, 0.00384521484375, 0.0033111572265625, 0.002227783203125, 0.0181884765625, 0.040771484375, 0.0107421875, 0.005767822265625, -0.01019287109375, 0.0030975341796875, 0.0030517578125, -0...
[ 1374, 454, 12, 3642, 14602, 4488, 103510, 14858, 214, 442, 1556, 142508, 6713, 2037, 10348, 4332, 22751, 9563, 182747, 23, 27781, 36, 114833, 2773, 8999, 11249, 26582, 13315, 351, 33548, 939, 34292 ]
[ 0.19287109375, 0.08917236328125, 0.03118896484375, 0.048492431640625, 0.017578125, 0.076904296875, 0.182861328125, 0.1806640625, 0.0489501953125, 0.004302978515625, 0.0906982421875, 0.1639404296875, 0.020751953125, 0.0650634765625, 0.060394287109375, 0.019927978515625, 0.153076171875...
embed
46137356_c0
46137356
haskell
0
Title: Is there an inplace map function for mutable vectors? Problem title: Is there an inplace map function for mutable vectors? Tags: vector, haskell Problem: Is there an inplace map function for mutable vectors? If I have a mutable vector (with type IOVector a for example), is there a map-like function that can modi...
Is there an inplace map function for mutable vectors? Is there an inplace map function for mutable vectors? vector haskell IOVector Is there an inplace map function for mutable vectors? If I have a mutable vector (with type IOVector a for example), is there a map-like function that can modify the elements in place? The...
[ -0.017822265625, 0.01287841796875, 0.0004329681396484375, 0.0026397705078125, 0.00494384765625, 0.0107421875, -0.01953125, -0.01458740234375, -0.005706787109375, -0.003082275390625, -0.00078582763671875, -0.0150146484375, 0.01043701171875, -0.004241943359375, -0.01165771484375, 0.00292...
[ 2071, 2685, 142, 23, 23935, 22288, 32354, 100, 842, 22819, 22834, 22230, 173, 18770, 1556, 142508, 87, 31719, 13, 765, 10644, 10, 83, 5062, 831, 2811, 40383, 80854, 3687, 98169, 87344, 1284, 903, 4734, 1632, 12830, 1733, 151117, 4527, 126...
[ 0.034027099609375, 0.080322265625, 0.07073974609375, 0.156005859375, 0.1846923828125, 0.2333984375, 0.22021484375, 0.0599365234375, 0.160888671875, 0.20166015625, 0.1983642578125, 0.150390625, 0.17626953125, 0.20654296875, 0.10699462890625, 0.1986083984375, 0.13671875, 0.1188964843...
embed
67265683_c0
67265683
haskell
0
Title: Bibtex parser in Haskell Problem title: Bibtex parser in Haskell Tags: bibtex, haskell Problem: Bibtex parser in Haskell I am using parser bibtex for Haskell ( https://hackage.haskell.org/package/bibtex ). The parser works great. But I cannot parse special characters (like "P{\u{a}}lt{\u{a}}nea"). I need the cha...
Bibtex parser in Haskell Bibtex parser in Haskell bibtex haskell Bibtex Haskell Bibtex parser in Haskell I am using parser bibtex for Haskell ( https://hackage.haskell.org/package/bibtex ). The parser works great. But I cannot parse special characters (like "P{\u{a}}lt{\u{a}}nea"). I need the characters to be encoded U...
[ 0.0026092529296875, 0.0247802734375, 0.00933837890625, -0.01373291015625, -0.0023040771484375, 0.004241943359375, -0.000789642333984375, -0.005523681640625, -0.013916015625, 0.00445556640625, -0.007354736328125, -0.00653076171875, 0.028564453125, -0.006683349609375, -0.00145721435546875,...
[ 1843, 275, 24371, 366, 2189, 23, 20625, 142508, 333, 1556, 17368, 100, 139509, 4588, 10557, 1478, 29102, 82095, 43240, 6782, 4966, 87, 53418, 184, 5361, 124850, 5062, 683, 24854, 41872, 34, 11, 1277, 86, 3871, 70, 47, 186, 22, 40899, 34...
[ 0.138427734375, 0.15625, 0.2890625, 0.2008056640625, 0.18994140625, 0.0765380859375, 0.1719970703125, 0.266845703125, 0.1240234375, 0.132568359375, 0.07861328125, 0.014190673828125, 0.141845703125, 0.0445556640625, 0.10009765625, 0.045989990234375, 0.1231689453125, 0.1517333984375,...
embed
30951060_c0
30951060
haskell
0
Title: Persistent typeclass instances for existing libraries ADT&#x27;s Problem title: Persistent typeclass instances for existing libraries ADT&#x27;s Tags: yesod, typeclass, persistent, haskell Problem: Persistent typeclass instances for existing libraries ADT's I'm trying to insert all data in a Status with Persiste...
Persistent typeclass instances for existing libraries ADT&#x27;s Persistent typeclass instances for existing libraries ADT&#x27;s yesod typeclass persistent haskell Persistent ADT Status PersistEntity Persistent typeclass instances for existing libraries ADT's I'm trying to insert all data in a Status with Persistent. ...
[ 0.0002994537353515625, 0.03857421875, -0.0126953125, 0.007354736328125, -0.01287841796875, 0.0303955078125, -0.006103515625, -0.0201416015625, 0.00592041015625, -0.0419921875, -0.00067138671875, 0.0093994140625, -0.0025177001953125, 0.0022735595703125, -0.00830078125, 0.017822265625, ...
[ 57309, 2581, 18, 10644, 67413, 110527, 100, 144573, 35773, 10484, 62, 41072, 3768, 2422, 23722, 70560, 2517, 1556, 142508, 56504, 271, 7768, 2481, 87, 31577, 183540, 756, 2053, 678, 83, 70, 28, 1544, 525, 3917, 3249, 2940, 52895, 28032, 4...
[ 0.2025146484375, 0.199951171875, 0.183837890625, 0.1748046875, 0.224853515625, 0.263671875, 0.0653076171875, 0.171142578125, 0.1485595703125, 0.019927978515625, 0.0982666015625, 0.22314453125, 0.05267333984375, 0.12109375, 0.173828125, 0.2264404296875, 0.0816650390625, 0.0860595703...
embed
10304519_c0
10304519
haskell
0
Title: OpenGL mouse listener return Problem title: OpenGL mouse listener return Tags: mouse, haskell, opengl Problem: OpenGL mouse listener return I'm trying to use the mouse listener in Haskell using OpenGL and have run into a problem. Apparently the return given for the x and y coordinates is a GLint. The problem is ...
OpenGL mouse listener return OpenGL mouse listener return mouse haskell opengl OpenGL OpenGL mouse listener return I'm trying to use the mouse listener in Haskell using OpenGL and have run into a problem. Apparently the return given for the x and y coordinates is a GLint. The problem is in then using these because I ne...
[ -0.003936767578125, 0.01068115234375, 0.007293701171875, -0.033447265625, 0.0242919921875, 0.03271484375, 0.020263671875, -0.0113525390625, -0.005706787109375, -0.007110595703125, 0.015625, -0.033935546875, 0.0052490234375, -0.03759765625, -0.007232666015625, -0.0078125, -0.029663085...
[ 13527, 78703, 114669, 44632, 56, 30646, 1556, 142508, 9803, 11016, 4527, 20625, 11675, 2967, 34475, 1022, 136, 113, 176866, 90, 83, 10, 90799, 4288, 17368, 6097, 3871, 52347, 257, 60552, 366, 6953, 108975, 30022, 121392, 15400, 23, 18, 756,...
[ 0.1451416015625, 0.1998291015625, 0.2064208984375, 0.251220703125, 0.1431884765625, 0.2147216796875, 0.1385498046875, 0.237548828125, 0.112060546875, 0.13916015625, 0.0175628662109375, 0.1405029296875, 0.019378662109375, 0.0960693359375, 0.0509033203125, 0.08770751953125, 0.124389648...
embed
3611656_c0
3611656
haskell
0
Title: Haskell IO with non English characters Problem title: Haskell IO with non English characters Tags: localization, io, unicode, locale, haskell Problem: Haskell IO with non English characters Look at this , i am try appendFile "out" $ show 'д' 'д' is character from Russian alphabet. After that "out" file contains:...
Haskell IO with non English characters Haskell IO with non English characters localization io unicode locale haskell Haskell English Haskell IO with non English characters Look at this , i am try 'д' is character from Russian alphabet. After that "out" file contains: How i understand is the unicode numeric code of char...
[ 0.00457763671875, -0.007171630859375, 0.021728515625, 0.005157470703125, 0.0015869140625, 0.020263671875, -0.01153564453125, 0.00946044921875, -0.016845703125, 0.0186767578125, 0.007537841796875, -0.044921875, 0.01129150390625, 0.0038299560546875, -0.004608154296875, -0.01141357421875,...
[ 20625, 142508, 17780, 678, 351, 14941, 124850, 4000, 47691, 22995, 60347, 112, 29096, 1556, 60818, 444, 9790, 526, 83, 62816, 1295, 102374, 229231, 24372, 6056, 11435, 70541, 11249, 28219, 70, 54744, 238, 18151, 44084, 96276, 2046, 3638, 1881...
[ 0.1171875, 0.206298828125, 0.2017822265625, 0.07025146484375, 0.1376953125, 0.1265869140625, 0.13720703125, 0.1533203125, 0.04058837890625, 0.2001953125, 0.1883544921875, 0.1488037109375, 0.1715087890625, 0.117919921875, 0.0191650390625, 0.00531005859375, 0.1177978515625, 0.2049560...
embed
26960272_c0
26960272
haskell
0
Title: Operations on tuples for each position individually Problem title: Operations on tuples for each position individually Tags: tuples, haskell, mapping Problem: Operations on tuples for each position individually i want to do operations on tuples for each position individually. for example pair_of_sums (a1,b1) (a2...
Operations on tuples for each position individually Operations on tuples for each position individually tuples haskell mapping Operations pair_of_sums sum_and_multiplication Operations on tuples for each position individually i want to do operations on tuples for each position individually. for example or more general ...
[ 0.0002269744873046875, 0.00634765625, 0.008056640625, 0.0262451171875, -0.0181884765625, 0.006805419921875, -0.009765625, -0.0045166015625, 0.0203857421875, -0.0179443359375, 0.0033721923828125, -0.0023956298828125, 0.00567626953125, 0.009765625, -0.01019287109375, 0.0031585693359375, ...
[ 102203, 7, 98, 370, 99726, 100, 12638, 19069, 11651, 1556, 142508, 291, 26783, 80836, 4390, 10321, 10554, 2940, 144227, 182867, 17, 3444, 54, 41018, 27781, 4537, 3917, 3249, 442, 16610, 56, 1884 ]
[ 0.2100830078125, 0.032012939453125, 0.1402587890625, 0.1497802734375, 0.2364501953125, 0.0728759765625, 0.0849609375, 0.1832275390625, 0.0965576171875, 0.1221923828125, 0.2059326171875, 0.10406494140625, 0.076171875, 0.1651611328125, 0.033966064453125, 0.1026611328125, 0.126586914062...
embed
21221007_c0
21221007
haskell
0
Title: Having Trouble with tuples in Haskell Problem title: Having Trouble with tuples in Haskell Tags: tuples, list, haskell Problem: Having Trouble with tuples in Haskell i have this function: pairs :: [a] -> [(a,a)] pairs xs = zip xs (tail xs) and i have to write another one, based on Pairs, that returns True if at ...
Having Trouble with tuples in Haskell Having Trouble with tuples in Haskell tuples list haskell Having Trouble Haskell Ord Bool Having Trouble with tuples in Haskell i have this function: and i have to write another one, based on Pairs, that returns True if at least one pair of tuples is in an ascending order (e.g (2,3...
[ 0.004913330078125, 0.02392578125, 0.0081787109375, -0.00421142578125, -0.005523681640625, 0.023681640625, -0.006439208984375, -0.03515625, 0.005828857421875, 0.0103759765625, 0.0184326171875, 0.0206298828125, 0.01177978515625, -0.00005793571472167969, -0.0026702880859375, 0.01843261718...
[ 171855, 119671, 2661, 678, 370, 99726, 20625, 142508, 23, 5303, 1556, 35379, 2460, 929, 765, 903, 32354, 33022, 15700, 35509, 37897, 4295, 30646, 87599, 2174, 19713, 1632, 80836, 83, 82800, 12989, 155761, 81887, 15400, 44691 ]
[ 0.1015625, 0.1815185546875, 0.1654052734375, 0.12060546875, 0.1727294921875, 0.26513671875, 0.156494140625, 0.234375, 0.05096435546875, 0.1390380859375, 0.1431884765625, 0.1314697265625, 0.075439453125, 0.14404296875, 0.050933837890625, 0.0196533203125, 0.1610107421875, 0.105407714...
embed
43201525_c0
43201525
haskell
0
Title: Generate FFI call using Template Haskell Problem title: Generate FFI call using Template Haskell Tags: haskell, template-haskell, haskell-frames Problem: Generate FFI call using Template Haskell In the Frames library , one has a readTable function, that generates a record type based on a CSV file. Is it possible...
Generate FFI call using Template Haskell Generate FFI call using Template Haskell haskell template-haskell haskell-frames Template ccall Generate FFI Haskell c_foo Generate FFI call using Template Haskell In the Frames library , one has a readTable function, that generates a record type based on a CSV file. Is it possi...
[ 0.0234375, -0.0010833740234375, -0.00872802734375, 0.014404296875, -0.00653076171875, 0.00177764892578125, 0.03076171875, -0.007720947265625, -0.0019683837890625, -0.06005859375, -0.0084228515625, -0.033447265625, -0.0281982421875, 0.0035247802734375, 0.007568359375, -0.0137939453125, ...
[ 155370, 563, 22724, 11782, 17368, 196631, 20625, 142508, 1556, 110934, 10557, 160328, 501, 85763, 3584, 31, 42557, 35773, 12301, 618, 2886, 32354, 139392, 17164, 10644, 35509, 43486, 11435, 2071, 7722, 1884, 110613, 24927, 51, 115840, 20767, 18...
[ 0.1527099609375, 0.08270263671875, 0.257080078125, 0.2091064453125, 0.031158447265625, 0.265869140625, 0.1151123046875, 0.216064453125, 0.1090087890625, 0.19482421875, 0.0760498046875, 0.1597900390625, 0.0810546875, 0.22802734375, 0.1688232421875, 0.0697021484375, 0.1517333984375, ...
embed
46727155_c0
46727155
haskell
0
Title: Reverse list of lists using foldr Haskell Problem title: Reverse list of lists using foldr Haskell Tags: haskell, list, fold Problem: Reverse list of lists using foldr Haskell I'm trying to reverse list of lists in Haskell by using foldr. There is an example of what I want to do: > reverse'' [[1,2,3],[3,4,5]] [[...
Reverse list of lists using foldr Haskell Reverse list of lists using foldr Haskell haskell list fold foldr Reverse Haskell acum1 Reverse list of lists using foldr Haskell I'm trying to reverse list of lists in Haskell by using foldr. There is an example of what I want to do: And my code (it is not working): My IDE rep...
[ -0.01611328125, 0.0130615234375, 0.00159454345703125, 0.00823974609375, -0.012939453125, 0.0103759765625, 0.0040283203125, 0.01324462890625, 0.002166748046875, -0.0145263671875, 0.004364013671875, -0.01055908203125, 0.01287841796875, -0.005401611328125, -0.001800537109375, -0.007202148...
[ 853, 37676, 5303, 111, 7, 17368, 18344, 7569, 20625, 142508, 1556, 42822, 9176, 418, 31577, 39531, 184, 27781, 18151, 959, 20697, 36497, 117729, 18499, 4034, 17932 ]
[ 0.085693359375, 0.232421875, 0.1890869140625, 0.071533203125, 0.056671142578125, 0.06494140625, 0.1451416015625, 0.2125244140625, 0.1207275390625, 0.2139892578125, 0.116943359375, 0.15478515625, 0.120361328125, 0.036468505859375, 0.0307159423828125, 0.1795654296875, 0.1273193359375, ...
embed
55104286_c0
55104286
haskell
0
Title: Get rid of show String in instance Show for polymorphic type Problem title: Get rid of show String in instance Show for polymorphic type Tags: haskell Problem: Get rid of show String in instance Show for polymorphic type I have a type kinda data T a = T a I want to declare Show instance for this type, something ...
Get rid of show String in instance Show for polymorphic type Get rid of show String in instance Show for polymorphic type haskell Get Show Get rid of show String in instance Show for polymorphic type I have a type kinda data T a = T a I want to declare Show instance for this type, something like But I don't want to cal...
[ -0.006439208984375, 0.011962890625, 0.010498046875, 0.027099609375, -0.01220703125, 0.0003490447998046875, 0.0247802734375, -0.01019287109375, 0.010498046875, 0.00439453125, -0.004180908203125, -0.0311279296875, -0.0184326171875, 0.025634765625, -0.01507568359375, -0.00604248046875, ...
[ 20779, 31351, 111, 7639, 23351, 214, 23, 110527, 17367, 100, 35874, 178851, 10644, 1556, 142508, 8562, 2053, 384, 10, 159978, 18, 3444, 11782, 14050, 927, 6, 3871, 78301, 66747, 29806, 6044 ]
[ 0.054595947265625, 0.153564453125, 0.0870361328125, 0.268798828125, 0.2198486328125, 0.1065673828125, 0.0229034423828125, 0.259521484375, 0.276123046875, 0.047576904296875, 0.1923828125, 0.177734375, 0.1744384765625, 0.1187744140625, 0.2037353515625, 0.007110595703125, 0.112060546875...
embed
29958541_c1
29958541
haskell
1
; cursor++) { buffer[cursor%20] = buffer[(cursor+20-5)%20] + buffer[(cursor+20-10)%20] - buffer[(cursor+20-15)%20]; } printf("%d\n", buffer[n%20]); return 0; } $ ./a.out 9999999 5000001 My C implementation uses O(n) time and O(1) space. But it looks like my haskell implementation is using O(n) space. Why is Haskell abl...
; cursor++) { buffer[cursor%20] = buffer[(cursor+20-5)%20] + buffer[(cursor+20-10)%20] - buffer[(cursor+20-15)%20]; } printf("%d\n", buffer[n%20]); return 0; } $ ./a.out 9999999 5000001 My C implementation uses O(n) time and O(1) space. But it looks like my haskell implementation is using O(n) space. Why is Haskell abl...
[ -0.0264892578125, 0.0164794921875, -0.021728515625, 0.0140380859375, -0.005615234375, -0.0022430419921875, -0.011962890625, -0.00433349609375, 0.0004444122314453125, -0.035888671875, 0.0167236328125, -0.0111083984375, 0.0218505859375, 0.016845703125, -0.00738525390625, -0.0020446777343...
[ 2819, 13810, 42, 37223, 373, 18234, 86927, 117654, 1328, 1549, 10342, 997, 132, 9193, 13386, 28412, 420, 71, 19, 30646, 757, 51912, 3650, 64, 11, 6056, 483, 65040, 2101, 188735, 313, 208124, 4527, 180, 1733, 136, 27750, 32628, 33342, 759,...
[ 0.0679931640625, 0.2056884765625, 0.123779296875, 0.250244140625, 0.1005859375, 0.212890625, 0.150634765625, 0.1275634765625, 0.0224761962890625, 0.0692138671875, 0.1221923828125, 0.0230560302734375, 0.03106689453125, 0.111083984375, 0.149169921875, 0.145751953125, 0.055816650390625,...
embed
32768787_c2
32768787
haskell
2
.2.2, MissingH >= 1.3.0.1 -- hs-source-dirs: default-language: Haskell2010 I've also tried my own version of the several scripts linked below, but get the same error: #!/bin/bash Code signals: How, Haskell, Hackage, Resolving, Could, MyPackage-0.1.0.2, base-4.7.0.1, installed-e4b, MyPackage, base-4.8.1.0, Dependency, M...
.2.2, MissingH >= 1.3.0.1 -- hs-source-dirs: default-language: Haskell2010 I've also tried my own version of the several scripts linked below, but get the same error: #!/bin/bash Code signals: How, Haskell, Hackage, Resolving, Could, MyPackage-0.1.0.2, base-4.7.0.1, installed-e4b, MyPackage, base-4.8.1.0, Dependency, M...
[ -0.00775146484375, 0.024169921875, 0.00031280517578125, -0.0032958984375, 0.000820159912109375, 0.0103759765625, 0.005401611328125, -0.00958251953125, -0.01251220703125, -0.000446319580078125, 0.0079345703125, -0.017822265625, 0.0169677734375, 0.0081787109375, 0.00191497802734375, -0.0...
[ 5, 70147, 16771, 214, 841, 977, 41491, 102014, 1096, 7, 60427, 936, 114977, 196651, 20625, 142508, 11436, 37842, 10002, 11389, 40368, 26499, 5701, 18499, 38, 7568, 87109, 28864, 26073, 11249, 52922, 4588, 132944, 191147, 2646, 205956, 133684, ...
[ 0.015350341796875, 0.2293701171875, 0.17822265625, 0.1822509765625, 0.1947021484375, 0.00665283203125, 0.1544189453125, 0.18212890625, 0.067138671875, 0.049072265625, 0.1646728515625, 0.1112060546875, 0.21044921875, 0.225341796875, 0.1468505859375, 0.2489013671875, 0.172119140625, ...
embed
55323267_c0
55323267
haskell
0
Title: &quot;case of&quot; executing sequence weird in haskell Problem title: &quot;case of&quot; executing sequence weird in haskell Tags: haskell Problem: "case of" executing sequence weird in haskell I'm writing a function to filter the first qualified value from a list in Haskell. I tried out the function base on f...
&quot;case of&quot; executing sequence weird in haskell &quot;case of&quot; executing sequence weird in haskell haskell Bool x:xs "case of" executing sequence weird in haskell I'm writing a function to filter the first qualified value from a list in Haskell. I tried out the function base on filter function, but I don't...
[ 0.0029449462890625, 0.0201416015625, -0.0181884765625, 0.0048828125, 0.00848388671875, -0.01153564453125, 0.010986328125, 0.002288818359375, 0.026611328125, -0.00116729736328125, 0.02294921875, 0.034912109375, -0.005340576171875, -0.00787353515625, 0.0012054443359375, 0.00799560546875,...
[ 58437, 111, 41502, 71924, 214, 40, 944, 3956, 179459, 23, 1556, 142508, 2460, 929, 1022, 425, 7, 32562, 32354, 46312, 5117, 217225, 34292, 1295, 5303, 20625, 37842, 3647, 3714, 3642, 70, 11675, 15190, 144851, 12638, 7225, 134234, 207263, 38...
[ 0.20458984375, 0.2049560546875, 0.012481689453125, 0.22802734375, 0.0609130859375, 0.0831298828125, 0.157958984375, 0.0909423828125, 0.2406005859375, 0.05035400390625, 0.1553955078125, 0.2330322265625, 0.0469970703125, 0.134765625, 0.0897216796875, 0.06939697265625, 0.060882568359375...
embed
62559907_c1
62559907
haskell
1
Bonus question: Assuming this is indeed a monad, are there any monoids k besides the free [a] monoid for which Map k is a monad? There are certainly counterexamples: i.e. monoids k for which Map k is not a monad. For instance, with the same monad instance for Map (Sum Int) , QuickCheck finds a counterexample to the as...
Bonus question: Assuming this is indeed a monad, are there any monoids k besides the free [a] monoid for which Map k is a monad? There are certainly counterexamples: i.e. monoids k for which Map k is not a monad. For instance, with the same monad instance for Map (Sum Int) , QuickCheck finds a counterexample to the as...
[ -0.015625, -0.004486083984375, 0.01446533203125, 0.0078125, -0.0014190673828125, 0.01239013671875, -0.01129150390625, 0.00830078125, 0.0185546875, 0.020751953125, 0.00592041015625, -0.0093994140625, -0.00537109375, 0.0228271484375, 0.0186767578125, 0.0101318359375, -0.004669189453125...
[ 38663, 9655, 66596, 903, 160463, 2667, 712, 22460, 30185, 472, 4092, 11, 532, 42719, 10, 68782, 105416, 3355, 302, 99726, 83, 959, 5701, 110527, 316, 360, 18, 89038, 202567, 33209, 166027, 3760, 27165, 347, 6396, 1022, 1096, 757, 138, 330...
[ 0.1063232421875, 0.03363037109375, 0.009613037109375, 0.095947265625, 0.03363037109375, 0.1717529296875, 0.202392578125, 0.1602783203125, 0.1861572265625, 0.1529541015625, 0.154296875, 0.08209228515625, 0.1822509765625, 0.213134765625, 0.0286865234375, 0.03515625, 0.125244140625, 0...
embed
18427445_c0
18427445
haskell
0
Title: Why do some Data.List.Split functions use `Int` and others `Integral a`? Problem title: Why do some Data.List.Split functions use `Int` and others `Integral a`? Tags: haskell Problem: Why do some Data.List.Split functions use `Int` and others `Integral a`? Here are the type signatures of chunksOf and splitPlaces...
Why do some Data.List.Split functions use `Int` and others `Integral a`? Why do some Data.List.Split functions use `Int` and others `Integral a`? haskell Why Data.List.Split Integral Why do some Data.List.Split functions use `Int` and others `Integral a`? Here are the type signatures of chunksOf and splitPlaces from Da...
[ -0.00225830078125, -0.0076904296875, 0.0026092529296875, 0.000667572021484375, -0.0322265625, 0.01336669921875, 0.004974365234375, -0.00921630859375, 0.00933837890625, 0.0255126953125, -0.005828857421875, -0.0322265625, -0.002777099609375, 0.01318359375, 0.00384521484375, -0.0051574707...
[ 44084, 3060, 11809, 154663, 31923, 4353, 32354, 4527, 4153, 18, 27060, 67, 5739, 141, 10, 1556, 142508, 204681, 54, 5, 11853, 10644, 138256, 7839, 1224, 132887, 136, 65450, 683, 143, 5170, 1295, 5062, 360, 12960, 70, 1286, 189534 ]
[ 0.1417236328125, 0.0704345703125, 0.13232421875, 0.167236328125, 0.07763671875, 0.1861572265625, 0.1895751953125, 0.0889892578125, 0.122314453125, 0.187744140625, 0.07672119140625, 0.1126708984375, 0.1204833984375, 0.0634765625, 0.1658935546875, 0.10174560546875, 0.2088623046875, 0...
embed
52288773_c0
52288773
haskell
0
Title: Haskell catch function without parameters Problem title: Haskell catch function without parameters Tags: parameters, function, haskell Problem: Haskell catch function without parameters As an exercise working on own module for generating HTML, JS etc. If I got: putHtml (attrib, input) | attrib == "setTitle" = se...
Haskell catch function without parameters Haskell catch function without parameters parameters function haskell Haskell Haskell catch function without parameters As an exercise working on own module for generating HTML, JS etc. If I got: and I were to call this without params like: putHtml the compiler will obviously c...
[ 0.00848388671875, 0.007293701171875, -0.004852294921875, -0.017822265625, -0.003662109375, -0.0130615234375, 0.013671875, -0.01202392578125, 0.0086669921875, -0.0081787109375, -0.00701904296875, -0.0269775390625, -0.0184326171875, -0.01226806640625, 0.01483154296875, -0.006805419921875...
[ 20625, 142508, 105556, 32354, 15490, 171859, 1556, 7, 81979, 10002, 88996, 12663, 19097, 64977, 4163, 11782, 121, 4432, 3884, 841, 18, 7237, 9969, 34759, 171259, 186992, 55681, 678, 171, 217, 3674 ]
[ 0.13427734375, 0.2132568359375, 0.25634765625, 0.202392578125, 0.182861328125, 0.2413330078125, 0.13330078125, 0.0086669921875, 0.058868408203125, 0.04949951171875, 0.1055908203125, 0.029052734375, 0.16748046875, 0.07135009765625, 0.05712890625, 0.1041259765625, 0.1380615234375, 0....
embed
67725211_c0
67725211
haskell
0
Title: How to add a City to test data with data type Problem title: How to add a City to test data with data type Tags: haskell Problem: How to add a City to test data with data type So I am trying to add another city to the test data and would like to maintain the cities in alphabetical order. The test data and data t...
How to add a City to test data with data type How to add a City to test data with data type haskell How City Show Read Amsterdam Athens Berlin Brussels Bucharest London Madrid Paris Rome Sofia Vienna Warsaw How to add a City to test data with data type So I am trying to add another city to the test data and would like ...
[ 0.0018310546875, 0.007293701171875, 0.0020751953125, 0.00933837890625, 0.00958251953125, -0.0159912109375, -0.01348876953125, -0.004669189453125, 0.0146484375, 0.01251220703125, 0.006378173828125, -0.0264892578125, 0.00799560546875, 0.00445556640625, -0.0186767578125, -0.00521850585937...
[ 11249, 15190, 10, 6406, 47, 3034, 2053, 678, 10644, 1556, 142508, 17367, 4764, 21391, 94100, 7, 10271, 80781, 18363, 147, 525, 9020, 8884, 7270, 51651, 80748, 181103, 34210, 15519, 31577, 15700, 26349, 1884, 76104, 70, 162708, 229231, 12989, ...
[ 0.0670166015625, 0.1966552734375, 0.10546875, 0.2186279296875, 0.08746337890625, 0.233154296875, 0.184814453125, 0.11181640625, 0.212158203125, 0.141845703125, 0.231201171875, 0.198974609375, 0.1815185546875, 0.2047119140625, 0.17724609375, 0.0252685546875, 0.18017578125, 0.1555175...
embed
29785373_c0
29785373
haskell
0
Title: Invalid argument hGetContents in Haskell Problem title: Invalid argument hGetContents in Haskell Tags: haskell, ghci Problem: Invalid argument hGetContents in Haskell I'm trying to sort a list of ints and print them out, but am receiving this exception: Exception: <stdin>: hGetContents: invalid argument (Bad fil...
Invalid argument hGetContents in Haskell Invalid argument hGetContents in Haskell haskell ghci Data.List Invalid Haskell Exception Bad Invalid argument hGetContents in Haskell I'm trying to sort a list of ints and print them out, but am receiving this exception: The program:
[ -0.00022983551025390625, 0.01507568359375, -0.0033111572265625, -0.0011138916015625, -0.00518798828125, 0.0380859375, 0.01611328125, -0.01611328125, -0.01312255859375, -0.0152587890625, 0.01025390625, -0.020751953125, -0.01312255859375, 0.003326416015625, 0.019775390625, -0.02392578125...
[ 360, 7013, 10750, 1096, 724, 126, 11935, 25352, 7, 23, 20625, 142508, 1556, 31380, 318, 11809, 154663, 5443, 63928, 12745, 31577, 12096, 5303, 111, 933, 28412, 1810, 217063, 903, 131527, 1528 ]
[ 0.005096435546875, 0.121826171875, 0.15087890625, 0.13525390625, 0.10906982421875, 0.1497802734375, 0.1124267578125, 0.20263671875, 0.054962158203125, 0.09002685546875, 0.13916015625, 0.224853515625, 0.1126708984375, 0.0810546875, 0.09625244140625, 0.0745849609375, 0.10888671875, 0...
embed
11744527_c0
11744527
haskell
0
Title: How can I poll files, sockets or handles to become readable/writable in Haskell? Problem title: How can I poll files, sockets or handles to become readable/writable in Haskell? Tags: haskell Problem: How can I poll files, sockets or handles to become readable/writable in Haskell? How could I watch several files/...
How can I poll files, sockets or handles to become readable/writable in Haskell? How can I poll files, sockets or handles to become readable/writable in Haskell? haskell How Haskell How can I poll files, sockets or handles to become readable/writable in Haskell? How could I watch several files/sockets from Haskell and ...
[ 0.00274658203125, 0.0034332275390625, 0.01458740234375, -0.006622314453125, -0.01556396484375, 0.00066375732421875, 0.0169677734375, -0.0155029296875, -0.007476806640625, -0.022216796875, 0.0250244140625, -0.0294189453125, 0.0101318359375, 0.01275634765625, 0.00112152099609375, -0.0018...
[ 11249, 831, 160, 1181, 102158, 221, 27853, 34831, 24209, 12301, 2886, 5429, 14, 22819, 20625, 142508, 1556, 87, 47, 64, 23, 5809, 39544, 40368, 991, 1295, 40485, 36849, 5877, 141, 168861, 5623, 7710, 1632, 86997, 11435, 11343, 46389, 177953...
[ 0.058349609375, 0.055023193359375, 0.1904296875, 0.2177734375, 0.18017578125, 0.061187744140625, 0.138916015625, 0.161376953125, 0.10498046875, 0.14892578125, 0.1129150390625, 0.07781982421875, 0.05218505859375, 0.1163330078125, 0.1396484375, 0.231201171875, 0.095947265625, 0.01071...
embed
52786263_c1
52786263
haskell
1
the type of go , it's not some arbitrary MonadState instance, it's just StateT . If I replace return () with StateT $ (\s -> ((), s)) then that give the compiler the extra info it needs but that's a little off-putting too. Is there a way to just tell the compiler the type signature of go , including the fact that the ...
the type of go , it's not some arbitrary MonadState instance, it's just StateT . If I replace return () with StateT $ (\s -> ((), s)) then that give the compiler the extra info it needs but that's a little off-putting too. Is there a way to just tell the compiler the type signature of go , including the fact that the ...
[ -0.0101318359375, -0.0012359619140625, 0.0001201629638671875, -0.0208740234375, -0.00445556640625, -0.01470947265625, -0.02685546875, -0.030029296875, -0.005950927734375, -0.0286865234375, 0.00183868408203125, 0.0216064453125, 0.0024871826171875, 0.00518798828125, -0.01324462890625, 0....
[ 70, 10644, 111, 738, 60331, 71, 135206, 13, 110527, 22836, 618, 91995, 30646, 3650, 41872, 33079, 60494, 91, 9969, 34759, 4173, 3004, 27117, 10176, 5773, 3917, 14192, 138256, 77336, 5701, 1810, 56, 32354, 28864, 26073, 27131, 46674, 712, 21...
[ 0.029083251953125, 0.2230224609375, 0.0592041015625, 0.19091796875, 0.1177978515625, 0.08502197265625, 0.133544921875, 0.075439453125, 0.1102294921875, 0.1634521484375, 0.1458740234375, 0.1357421875, 0.237060546875, 0.124755859375, 0.0885009765625, 0.0260162353515625, 0.0323791503906...
embed
8422547_c0
8422547
haskell
0
Title: How to write special characters like new line, and format output of haddock Problem title: How to write special characters like new line, and format output of haddock Tags: haskell, haddock Problem: How to write special characters like new line, and format output of haddock I would like to format my haddock docu...
How to write special characters like new line, and format output of haddock How to write special characters like new line, and format output of haddock haskell haddock How How to write special characters like new line, and format output of haddock I would like to format my haddock documentation as I do with javadoc, so...
[ -0.0211181640625, 0.007781982421875, -0.00408935546875, -0.0130615234375, -0.00738525390625, 0.008544921875, 0.003265380859375, 0.01129150390625, -0.002655029296875, 0.014404296875, -0.0084228515625, -0.031005859375, -0.0032806396484375, 0.004791259765625, -0.01806640625, 0.01354980468...
[ 11249, 47, 33022, 5361, 124850, 1884, 3525, 13315, 136, 9384, 140992, 1902, 138414, 111, 1556, 142508, 209806, 678, 79, 34952, 238, 183540, 7693, 1108, 11322, 46622, 56, 29786, 136951, 59279, 3642, 10, 36356 ]
[ 0.114013671875, 0.03228759765625, 0.2271728515625, 0.2236328125, 0.232666015625, 0.1724853515625, 0.1326904296875, 0.1734619140625, 0.0462646484375, 0.219970703125, 0.2100830078125, 0.1468505859375, 0.2440185546875, 0.038238525390625, 0.14306640625, 0.220458984375, 0.2425537109375, ...
embed
5293898_c1
5293898
haskell
1
onKeyboard canvas window `on` destroyEvent $ do liftIO mainQuit return False mainGUI onKeyboard :: DrawingArea -> EventM EKey Bool onKeyboard canvas = do liftIO $ do drawWin <- widgetGetDrawWindow canvas canvas `on` exposeEvent $ do liftIO $renderWithDrawable drawWin (myDraw 20) return False widgetQueueDraw canvas ret...
onKeyboard canvas window `on` destroyEvent $ do liftIO mainQuit return False mainGUI onKeyboard :: DrawingArea -> EventM EKey Bool onKeyboard canvas = do liftIO $ do drawWin <- widgetGetDrawWindow canvas canvas `on` exposeEvent $ do liftIO $renderWithDrawable drawWin (myDraw 20) return False widgetQueueDraw canvas ret...
[ -0.0128173828125, 0.006561279296875, 0.006103515625, -0.0181884765625, 0.0022430419921875, -0.0025177001953125, 0.0107421875, -0.00732421875, -0.0003662109375, -0.01953125, -0.00131988525390625, -0.045166015625, 0.0042724609375, 0.0167236328125, -0.0208740234375, -0.0001916885375976562...
[ 98, 162429, 24351, 831, 4079, 76896, 191, 1135, 163684, 192134, 3650, 60520, 17780, 5201, 96010, 30646, 22225, 43578, 568, 1984, 18186, 14775, 1283, 33079, 36943, 594, 241, 2460, 929, 2203, 54, 79442, 92049, 148631, 126, 81456, 24293, 172554,...
[ 0.1800537109375, 0.28369140625, 0.2470703125, 0.1142578125, 0.22314453125, 0.1766357421875, 0.1856689453125, 0.00762939453125, 0.224853515625, 0.152587890625, 0.032684326171875, 0.1705322265625, 0.1839599609375, 0.078125, 0.0726318359375, 0.06854248046875, 0.032562255859375, 0.1525...
embed
41628606_c0
41628606
haskell
0
Title: How to use a custom haddock executable to generate documentation with stack? Problem title: How to use a custom haddock executable to generate documentation with stack? Tags: haddock, haskell, haskell-stack Problem: How to use a custom haddock executable to generate documentation with stack? I'm working on a new...
How to use a custom haddock executable to generate documentation with stack? How to use a custom haddock executable to generate documentation with stack? haddock haskell haskell-stack How How to use a custom haddock executable to generate documentation with stack? I'm working on a new theme for Haddock and want to try ...
[ -0.01177978515625, 0.00701904296875, -0.0020599365234375, -0.0002040863037109375, -0.007415771484375, 0.022705078125, -0.0211181640625, -0.0069580078125, -0.00156402587890625, -0.0233154296875, -0.00653076171875, -0.01239013671875, -0.01251220703125, -0.010009765625, 0.0093994140625, -...
[ 11249, 4527, 114122, 1902, 138414, 71924, 2886, 47, 139392, 209806, 678, 177261, 10, 1556, 142508, 590, 2594, 20697, 3525, 73986, 28129, 9790, 2773, 77635, 831, 222495, 1957, 2499, 153837, 35829, 14520, 141, 3934, 759, 436, 139909, 18, 4358 ]
[ 0.06787109375, 0.1158447265625, 0.223388671875, 0.1873779296875, 0.263916015625, 0.192626953125, 0.16845703125, 0.0301055908203125, 0.1722412109375, 0.2344970703125, 0.13427734375, 0.2071533203125, 0.0081787109375, 0.1014404296875, 0.1666259765625, 0.102783203125, 0.0821533203125, ...
embed
32930394_c0
32930394
haskell
0
Title: Haskell data structure that is efficient for swapping elements? Problem title: Haskell data structure that is efficient for swapping elements? Tags: data-structures, haskell Problem: Haskell data structure that is efficient for swapping elements? I am looking for a Haskell data structure that stores an ordered l...
Haskell data structure that is efficient for swapping elements? Haskell data structure that is efficient for swapping elements? data-structures haskell Haskell Vector Haskell data structure that is efficient for swapping elements? I am looking for a Haskell data structure that stores an ordered list of elements and tha...
[ -0.00115966796875, 0.030029296875, -0.01416015625, -0.0033111572265625, 0.003387451171875, 0.0014801025390625, -0.022216796875, -0.0172119140625, -0.0019683837890625, -0.002044677734375, 0.01611328125, -0.00286865234375, 0.00135040283203125, 0.0012969970703125, -0.0247802734375, 0.0107...
[ 20625, 142508, 2053, 45646, 450, 83, 93766, 100, 68062, 26783, 80854, 32, 137656, 1556, 2609, 18770, 16487, 4343, 12989, 5303, 1733, 24500, 45964, 99, 80836, 61799, 31913, 28032, 959, 11, 171259, 28282, 3525, 22834, 22230, 903 ]
[ 0.1549072265625, 0.23681640625, 0.142822265625, 0.2288818359375, 0.0543212890625, 0.0555419921875, 0.235107421875, 0.083251953125, 0.2159423828125, 0.15087890625, 0.193115234375, 0.006439208984375, 0.141845703125, 0.123046875, 0.15576171875, 0.1695556640625, 0.041046142578125, 0.11...
embed
33345045_c1
33345045
haskell
1
GHCI I get these errors: ghci> :l Pay.hs [1 of 1] Compiling Main ( Pay.hs, interpreted ) Pay.hs:9:19: Not in scope: `x' Pay.hs:11:22: Not in scope: `x' Pat.hs:11:24: Not in scope: `is' Perhaps you meant one of these: `xs' (line 9), `id' (imported from Prelude) Pay.hs:12:22: Not in scope: `x' Pay.hs:12:24: Not in scope...
GHCI I get these errors: ghci> :l Pay.hs [1 of 1] Compiling Main ( Pay.hs, interpreted ) Pay.hs:9:19: Not in scope: `x' Pay.hs:11:22: Not in scope: `x' Pat.hs:11:24: Not in scope: `is' Perhaps you meant one of these: `xs' (line 9), `id' (imported from Prelude) Pay.hs:12:22: Not in scope: `x' Pay.hs:12:24: Not in scope...
[ 0.025634765625, -0.0036773681640625, -0.0164794921875, -0.0023040771484375, -0.01177978515625, 0.02978515625, 0.00994873046875, 0.005767822265625, 0.01025390625, -0.0206298828125, -0.018310546875, -0.03076171875, 0.002044677734375, -0.0098876953125, 0.006622314453125, -0.00552368164062...
[ 41877, 17304, 87, 2046, 6097, 18499, 7, 31380, 318, 2740, 141, 17166, 5, 127, 68252, 111, 106, 15612, 49725, 12321, 29481, 1126, 23988, 11205, 70820, 425, 19993, 24070, 9876, 25732, 164, 181799, 131148, 2256, 77816, 532, 95349, 1914, 822, ...
[ 0.1810302734375, 0.219482421875, 0.05145263671875, 0.0511474609375, 0.0802001953125, 0.2313232421875, 0.0811767578125, 0.1534423828125, 0.197509765625, 0.06829833984375, 0.083251953125, 0.1986083984375, 0.009246826171875, 0.14599609375, 0.013336181640625, 0.070068359375, 0.0447998046...
embed
26304046_c0
26304046
haskell
0
Title: Haskell repeated use of fromIntegral when adding Problem title: Haskell repeated use of fromIntegral when adding Tags: haskell, type-conversion Problem: Haskell repeated use of fromIntegral when adding I have a number of Word8 values that I am adding together. Because this could result in an overflow, the result...
Haskell repeated use of fromIntegral when adding Haskell repeated use of fromIntegral when adding haskell type-conversion Haskell Word8 Word16 Haskell repeated use of fromIntegral when adding I have a number of Word8 values that I am adding together. Because this could result in an overflow, the result needs to be a Wo...
[ -0.0052490234375, -0.00726318359375, 0.000713348388671875, 0.023681640625, -0.03076171875, 0.0145263671875, -0.0225830078125, -0.006500244140625, -0.003173828125, -0.0179443359375, 0.003692626953125, -0.034423828125, 0, 0.01458740234375, -0.01080322265625, -0.01129150390625, 0.000427...
[ 20625, 142508, 119140, 297, 4527, 1295, 67, 5739, 141, 154107, 1556, 10644, 46354, 22543, 1019, 2485, 111, 4153, 3229, 14012, 142424, 25842, 645, 118664, 16750, 27117, 11522, 3917, 15190, 25632, 6, 29786, 3055, 18151, 17306 ]
[ 0.126708984375, 0.2047119140625, 0.193603515625, 0.017120361328125, 0.08990478515625, 0.1715087890625, 0.1168212890625, 0.135498046875, 0.09942626953125, 0.1473388671875, 0.132080078125, 0.1448974609375, 0.1129150390625, 0.10333251953125, 0.17041015625, 0.1953125, 0.02081298828125, ...
embed
40919795_c0
40919795
haskell
0
Title: Is it possible to switch off the strictness analyzer on GHC? Problem title: Is it possible to switch off the strictness analyzer on GHC? Tags: haskell, lazy-evaluation Problem: Is it possible to switch off the strictness analyzer on GHC? It shows ghci is lazy all round below, ghci > let x = trace "1" 1 in x + x ...
Is it possible to switch off the strictness analyzer on GHC? Is it possible to switch off the strictness analyzer on GHC? haskell lazy-evaluation GHC Is it possible to switch off the strictness analyzer on GHC? It shows ghci is lazy all round below, Running the code below after compilation shows default ghc is enhanced...
[ 0.0059814453125, 0.00469970703125, 0.03515625, 0.000926971435546875, 0.00390625, -0.0089111328125, -0.001556396484375, 0.004302978515625, -0.0113525390625, 0.02099609375, 0.00135040283203125, -0.005706787109375, 0.005706787109375, -0.0015716552734375, 0.003875732421875, 0.0279541015625...
[ 7722, 101089, 5773, 81113, 7432, 7968, 53, 4383, 527, 73265, 98, 1556, 142508, 21, 3285, 159258, 31380, 318, 83, 68807, 35064, 18151, 98352, 114977, 238, 156856, 15400, 16750, 47143, 5701, 50717, 670, 2389, 157, 144225, 115081 ]
[ 0.1292724609375, 0.1365966796875, 0.184814453125, 0.23388671875, 0.1162109375, 0.1043701171875, 0.0972900390625, 0.1666259765625, 0.07550048828125, 0.208984375, 0.012603759765625, 0.07086181640625, 0.19580078125, 0.0799560546875, 0.14501953125, 0.1180419921875, 0.103271484375, 0.11...
embed
50136713_c0
50136713
haskell
0
Title: Reading an INI file using monads Problem title: Reading an INI file using monads Tags: haskell Problem: Reading an INI file using monads I am a trying to read an INI file with haskell using monads. Here is my code : import Control.Monad import Data.Ini main = do config <- readIniFile "configs/config.ini" port <-...
Reading an INI file using monads Reading an INI file using monads haskell monads Control.Monad Data.Ini Reading INI config.ini NETWORK Either Reading an INI file using monads I am a trying to read an INI file with haskell using monads. Here is my code : In my limited understanding, config and port would be of type Eith...
[ -0.0213623046875, 0.002471923828125, -0.006439208984375, 0.00787353515625, 0.007781982421875, -0.005828857421875, -0.00274658203125, -0.0189208984375, -0.00075531005859375, -0.034912109375, 0.004730224609375, -0.005340576171875, -0.0087890625, -0.0272216796875, 0.0228271484375, 0.00723...
[ 104951, 99085, 11435, 17368, 2667, 712, 7, 1556, 142508, 27131, 46674, 11809, 114683, 153837, 943, 17777, 9319, 31577, 12301, 18151, 84046, 100094, 136, 11469, 2806, 111, 10644, 4565, 11249, 831, 4527, 34292, 678, 17780, 22631 ]
[ 0.162109375, 0.271240234375, 0.135986328125, 0.06005859375, 0.1195068359375, 0.1866455078125, 0.09197998046875, 0.1241455078125, 0.21484375, 0.1470947265625, 0.09210205078125, 0.0369873046875, 0.2047119140625, 0.1942138671875, 0.2353515625, 0.009918212890625, 0.2081298828125, 0.021...
embed
52051203_c1
52051203
haskell
1
to my code I tried to reload the file I got this error. Not in scope: data constructor ‘M’ This confused me at first but this post explains that I was defining a type constructor not a data constructor. Anyway, I feel like I am going down a rabbit hole that may or may not have the solution and I figured I'd post the q...
to my code I tried to reload the file I got this error. Not in scope: data constructor ‘M’ This confused me at first but this post explains that I was defining a type constructor not a data constructor. Anyway, I feel like I am going down a rabbit hole that may or may not have the solution and I figured I'd post the q...
[ -0.004180908203125, 0.0157470703125, 0.0033111572265625, 0.01171875, 0.00958251953125, 0.009033203125, 0.0031890869140625, 0.0084228515625, -0.00153350830078125, -0.043212890625, -0.002105712890625, -0.0296630859375, -0.0001544952392578125, -0.0140380859375, 0.01055908203125, 0.0033569...
[ 47, 759, 18151, 37842, 456, 63033, 11435, 903, 18499, 11205, 23, 70820, 2053, 64549, 748, 594, 55681, 5117, 13204, 10644, 959, 126786, 12319, 108564, 29806, 645, 2646, 33342, 13315, 2472, 2256, 5701, 1919, 65572, 3871, 3249, 11675, 527, 732...
[ 0.17578125, 0.1080322265625, 0.2275390625, 0.057861328125, 0.087646484375, 0.191162109375, 0.1427001953125, 0.0249786376953125, 0.1998291015625, 0.1295166015625, 0.1092529296875, 0.21337890625, 0.1337890625, 0.1998291015625, 0.112548828125, 0.1761474609375, 0.007354736328125, 0.000...
embed
26980225_c0
26980225
haskell
0
Title: How does Monad conform to the composition of function Problem title: How does Monad conform to the composition of function Tags: haskell Problem: How does Monad conform to the composition of function I know the functions are all about composition. For example, if I have an arrow from A to B and an arrow from B t...
How does Monad conform to the composition of function How does Monad conform to the composition of function haskell How Monad How does Monad conform to the composition of function I know the functions are all about composition. For example, if I have an arrow from A to B and an arrow from B to C, composition means I al...
[ -0.0159912109375, 0.0033111572265625, 0.0296630859375, 0.04931640625, 0.00482177734375, 0.01275634765625, 0.01611328125, 0.019287109375, 0.005645751953125, 0.004119873046875, 0.005615234375, -0.007781982421875, -0.0026092529296875, -0.0035400390625, 0.005615234375, -0.0277099609375, ...
[ 11249, 14602, 60331, 71, 19911, 47, 166577, 32354, 1556, 142508, 111, 118201, 1295, 62, 335, 136, 313, 26950, 30813, 1369, 10644, 83, 347, 44357, 10, 876, 44084, 105950, 3688, 15400, 959, 33079, 39, 10422 ]
[ 0.1043701171875, 0.0660400390625, 0.2303466796875, 0.2060546875, 0.225341796875, 0.1072998046875, 0.2337646484375, 0.181396484375, 0.137939453125, 0.2393798828125, 0.039215087890625, 0.1632080078125, 0.049346923828125, 0.030059814453125, 0.038818359375, 0.0174713134765625, 0.02452087...
embed
19348316_c0
19348316
haskell
0
Title: Using type variable from declaration in function Problem title: Using type variable from declaration in function Tags: haskell Problem: Using type variable from declaration in function I'm quite new to Haskell and I'm trying to use a type variable from the function declaration in the creation (not quite sure wha...
Using type variable from declaration in function Using type variable from declaration in function haskell declaration Using x::a Using type variable from declaration in function I'm quite new to Haskell and I'm trying to use a type variable from the function declaration in the creation (not quite sure what to call this...
[ 0.004241943359375, 0.003021240234375, -0.0087890625, -0.00628662109375, 0.0025787353515625, -0.0198974609375, -0.01416015625, 0.0118408203125, 0.00787353515625, -0.0299072265625, 0.019775390625, -0.0081787109375, -0.00170135498046875, -0.0177001953125, 0.023681640625, 0.001701354980468...
[ 345, 10644, 77336, 1295, 21635, 1363, 32354, 1556, 142508, 1022, 12, 11, 23, 3525, 20625, 31577, 4527, 166635, 17164, 18151, 2967, 527, 73265, 17378, 10, 83, 959, 70820, 98, 4568, 13315, 163846 ]
[ 0.0711669921875, 0.2332763671875, 0.255615234375, 0.08740234375, 0.1947021484375, 0.03216552734375, 0.17041015625, 0.1026611328125, 0.1693115234375, 0.058563232421875, 0.037017822265625, 0.1014404296875, 0.0980224609375, 0.00885009765625, 0.0711669921875, 0.0419921875, 0.084533691406...
embed
65507352_c0
65507352
haskell
0
Title: Slice a list in haskell with specific indexes Problem title: Slice a list in haskell with specific indexes Tags: list, haskell Problem: Slice a list in haskell with specific indexes I have this list: [[0,4,1,4],[1,12,1,4],[2,8,1,4],[3,54,2,4],[4,1,2,2]] I also have another list: [2,3] -- Represents the indexes i...
Slice a list in haskell with specific indexes Slice a list in haskell with specific indexes list haskell Slice Slice a list in haskell with specific indexes I have this list: I also have another list: [2,3] -- Represents the indexes i want to get from each sublist Output should be like: Another example: List : Indexes ...
[ -0.01068115234375, -0.000782012939453125, 0.01513671875, 0.0260009765625, -0.0262451171875, -0.01519775390625, -0.0184326171875, 0.02197265625, 0.0235595703125, 0.01611328125, -0.006134033203125, -0.0206298828125, -0.010498046875, 0.02392578125, -0.0111083984375, -0.002410888671875, ...
[ 159, 13348, 5303, 23, 1556, 142508, 678, 29458, 63262, 90, 10, 765, 903, 15700, 155761, 55247, 3444, 2046, 1295, 12638, 1614, 6562, 13538, 7077, 5608, 186, 1884, 27781, 32036, 31471, 2389 ]
[ 0.0302734375, 0.2203369140625, 0.2335205078125, 0.055633544921875, 0.1405029296875, 0.2196044921875, 0.0736083984375, 0.1612548828125, 0.1900634765625, 0.07568359375, 0.0250701904296875, 0.028900146484375, 0.0261077880859375, 0.025634765625, 0.1146240234375, 0.134521484375, 0.0665283...
embed
69091022_c2
69091022
haskell
2
:\\ghcup\\msys64\\mingw64\\include\\OpenBLAS" --extra-lib-dirs="C:\\ghcup\\msys64\\mingw64\\bin" Code signals: hmatrix, Numeric.LinearAlgebra, cabalhmatrix-0.1.0.0, How, Windows, mingw-w64-x86_64-openblas, msys64, mingw64, OpenBLAS, Main, Resolving, Build, ghc-8.10.7, hmatrix-0.20.2, exe:cabalhmatrix, Starting, Failed,...
:\\ghcup\\msys64\\mingw64\\include\\OpenBLAS" --extra-lib-dirs="C:\\ghcup\\msys64\\mingw64\\bin" Code signals: hmatrix, Numeric.LinearAlgebra, cabalhmatrix-0.1.0.0, How, Windows, mingw-w64-x86_64-openblas, msys64, mingw64, OpenBLAS, Main, Resolving, Build, ghc-8.10.7, hmatrix-0.20.2, exe:cabalhmatrix, Starting, Failed,...
[ 0.006317138671875, -0.005645751953125, 0.00182342529296875, -0.004791259765625, 0.0185546875, -0.006622314453125, -0.0086669921875, 0.005584716796875, -0.002166748046875, 0.0128173828125, -0.01458740234375, -0.03564453125, 0.00408935546875, -0.0167236328125, 0.0036773681640625, 0.00616...
[ 152, 9486, 33874, 39, 94924, 13307, 14578, 434, 217028, 103264, 571, 46705, 4210, 112779, 5612, 936, 7, 441, 7568, 28864, 26073, 12, 1096, 192, 87427, 93511, 1771, 5, 93232, 429, 2844, 109524, 127, 9, 102014, 99929, 11249, 3773, 46996, 15...
[ 0.052825927734375, 0.09375, 0.2059326171875, 0.05950927734375, 0.1510009765625, 0.2301025390625, 0.1412353515625, 0.1754150390625, 0.1834716796875, 0.16455078125, 0.140625, 0.267578125, 0.0146942138671875, 0.18896484375, 0.2275390625, 0.1612548828125, 0.0272979736328125, 0.00460815...
embed
23907602_c0
23907602
haskell
0
Title: Matching messages to handlers by type Problem title: Matching messages to handlers by type Tags: haskell, event-handling, pattern-matching, messaging Problem: Matching messages to handlers by type I have a large open set of message types and a list of handlers Message -> IO () , each expecting a certain type of ...
Matching messages to handlers by type Matching messages to handlers by type haskell event-handling pattern-matching messaging Matching Message Dynamic Matching messages to handlers by type I have a large open set of message types and a list of handlers Message -> IO () , each expecting a certain type of message and ign...
[ 0.01483154296875, 0.007049560546875, -0.001739501953125, 0.0089111328125, -0.01708984375, -0.0181884765625, -0.0233154296875, 0.01129150390625, 0.004241943359375, -0.0419921875, -0.01251220703125, -0.037841796875, 0.01611328125, 0.005218505859375, -0.00057220458984375, 0.00872802734375...
[ 67407, 214, 89914, 47, 35863, 7, 390, 10644, 1556, 142508, 19732, 54885, 103510, 98753, 115288, 48205, 73327, 21068, 21334, 9803, 5423, 26008, 52895, 5303, 4588, 17780, 12638, 41206, 24233, 47438, 756, 27060, 3871, 32354, 2499, 74157, 6011, 5...
[ 0.246337890625, 0.09466552734375, 0.2091064453125, 0.128662109375, 0.21923828125, 0.087646484375, 0.0867919921875, 0.2247314453125, 0.094482421875, 0.2064208984375, 0.05230712890625, 0.142578125, 0.138671875, 0.213623046875, 0.1025390625, 0.15380859375, 0.12890625, 0.1041259765625,...
embed
41362003_c1
41362003
haskell
1
users <- (query_ conn "select id, first_name, second_name, team from users" :: IO [User]); json (users !! id) }’ In a stmt of a 'do' block: get "/users/:id" $ do { id <- param "id"; users <- (query_ conn "select id, first_name, second_name, team from users" :: IO [User]); json (users !! id) } how to fix that? Also how...
users <- (query_ conn "select id, first_name, second_name, team from users" :: IO [User]); json (users !! id) }’ In a stmt of a 'do' block: get "/users/:id" $ do { id <- param "id"; users <- (query_ conn "select id, first_name, second_name, team from users" :: IO [User]); json (users !! id) } how to fix that? Also how...
[ -0.004364013671875, 0.00946044921875, -0.004852294921875, 0.0208740234375, -0.0126953125, 0.0235595703125, -0.0103759765625, -0.006622314453125, -0.017822265625, -0.0537109375, 0.0185546875, -0.0167236328125, -0.0191650390625, 0.00543212890625, 0.01080322265625, 0.005615234375, 0.003...
[ 72095, 4426, 9, 944, 1294, 158, 19, 7, 100184, 3447, 5117, 11627, 17932, 7175, 1295, 17780, 1062, 2189, 1647, 1681, 223, 1314, 6506, 360, 6138, 39, 18, 246, 46389, 2046, 64, 12, 532, 3650, 54, 121, 56128, 3642, 30022, 450, 27875, 1075...
[ 0.27880859375, 0.115478515625, 0.117431640625, 0.1070556640625, 0.1102294921875, 0.0897216796875, 0.06231689453125, 0.0322265625, 0.1298828125, 0.1556396484375, 0.042510986328125, 0.0992431640625, 0.1075439453125, 0.162841796875, 0.1134033203125, 0.1507568359375, 0.0902099609375, 0...
embed
29468407_c0
29468407
haskell
0
Title: Haskell function definition Problem title: Haskell function definition Tags: haskell Problem: Haskell function definition I'm having trouble defining a function in Haskell. What I want to do is input a variable of type EnvV and one of type Store and return a State type variable: type Variable = String type Z = I...
Haskell function definition Haskell function definition haskell Haskell EnvV Store State Variable Integer Bool Location Haskell function definition I'm having trouble defining a function in Haskell. What I want to do is input a variable of type EnvV and one of type Store and return a State type variable:
[ -0.019287109375, -0.00457763671875, -0.00494384765625, 0.00775146484375, 0.00787353515625, 0.00811767578125, -0.019287109375, -0.017578125, -0.005157470703125, -0.01953125, 0.002105712890625, -0.00836181640625, -0.00506591796875, -0.00714111328125, -0.004486083984375, -0.00439453125, ...
[ 20625, 142508, 32354, 80934, 1556, 357, 334, 856, 14934, 22836, 84572, 2886, 44401, 2460, 929, 90788, 19441, 63134, 13204, 449, 10, 23, 3444, 107730, 77336, 111, 10644, 136, 30646 ]
[ 0.146728515625, 0.269775390625, 0.256103515625, 0.1822509765625, 0.1348876953125, 0.08355712890625, 0.1243896484375, 0.2178955078125, 0.2119140625, 0.154541015625, 0.1573486328125, 0.07757568359375, 0.1551513671875, 0.1229248046875, 0.22314453125, 0.2332763671875, 0.00331306457519531...
embed
46332245_c2
46332245
haskell
2
0 par 0.047s 0.047s 0.0001s 0.0009s Gen 1 7 colls, 0 par 0.055s 0.055s 0.0079s 0.0147s INIT time 0.000s ( 0.000s elapsed) MUT time 0.298s ( 0.301s elapsed) GC time 0.102s ( 0.102s elapsed) EXIT time 0.001s ( 0.001s elapsed) Total time 0.406s ( 0.405s elapsed) %GC time 25.1% (25.2% elapsed) Alloc rate 585,308,888 bytes...
0 par 0.047s 0.047s 0.0001s 0.0009s Gen 1 7 colls, 0 par 0.055s 0.055s 0.0079s 0.0147s INIT time 0.000s ( 0.000s elapsed) MUT time 0.298s ( 0.301s elapsed) GC time 0.102s ( 0.102s elapsed) EXIT time 0.001s ( 0.001s elapsed) Total time 0.406s ( 0.405s elapsed) %GC time 25.1% (25.2% elapsed) Alloc rate 585,308,888 bytes...
[ -0.004058837890625, 0.00921630859375, 0.01287841796875, 0.009033203125, 0.0028533935546875, 0.013427734375, -0.02099609375, -0.0167236328125, 0.00836181640625, 0.00151824951171875, 0.009033203125, 0.00811767578125, -0.000560760498046875, 0.0025177001953125, 0, -0.00994873046875, 0.00...
[ 757, 366, 89678, 13330, 7, 34479, 167713, 15937, 106, 361, 122907, 4, 11663, 6, 37509, 22377, 128497, 87, 157684, 1733, 8557, 28, 127966, 16, 276, 17632, 126175, 16665, 127089, 6746, 69657, 107754, 9550, 29426, 6371, 33867, 150744, 121254, ...
[ 0.1680908203125, 0.2015380859375, 0.1082763671875, 0.1790771484375, 0.0908203125, 0.102783203125, 0.09747314453125, 0.2213134765625, 0.171875, 0.108642578125, 0.1663818359375, 0.0209503173828125, 0.08184814453125, 0.09149169921875, 0.009857177734375, 0.049224853515625, 0.041870117187...
embed
17247880_c2
17247880
haskell
2
AppT ArrowT (VarT a_1627405973)) (ConT GHC.Types.Int)))]) [InstanceD [] (AppT (ConT Ghci3.C') (AppT ListT (VarT a_1627406161))) []] If reify won't work, is there a workaround, other than listing the associate type synonyms manually? This Code signals: Language.Haskell.TH, Getting, Haskell, GHCi, www.haskell.org, Prelud...
AppT ArrowT (VarT a_1627405973)) (ConT GHC.Types.Int)))]) [InstanceD [] (AppT (ConT Ghci3.C') (AppT ListT (VarT a_1627406161))) []] If reify won't work, is there a workaround, other than listing the associate type synonyms manually? This Code signals: Language.Haskell.TH, Getting, Haskell, GHCi, www.haskell.org, Prelud...
[ 0.00025177001953125, 0.0084228515625, -0.00823974609375, 0.00494384765625, -0.0213623046875, 0.0054931640625, 0.0079345703125, 0.00079345703125, 0.01324462890625, -0.01080322265625, -0.00274658203125, -0.0257568359375, -0.0169677734375, 0.00958251953125, 0.002960205078125, -0.006500244...
[ 5659, 618, 1172, 15555, 81827, 10, 10837, 117525, 191304, 21320, 11935, 527, 73265, 196707, 18, 32149, 116071, 397, 39179, 55112, 318, 363, 32036, 2485, 3768, 150744, 151525, 4263, 456, 40383, 23742, 4488, 67688, 5303, 30699, 67, 10644, 16466...
[ 0.17919921875, 0.199462890625, 0.082763671875, 0.1756591796875, 0.1090087890625, 0.058349609375, 0.0731201171875, 0.0679931640625, 0.10595703125, 0.0819091796875, 0.08056640625, 0.030975341796875, 0.130615234375, 0.222412109375, 0.06439208984375, 0.0050048828125, 0.138916015625, 0....
embed