Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
input-output-hk/pos-haskell-prototype
binary/test/Test/Pos/Binary/Helpers.hs
mit
identityTest :: forall a. (IdTestingRequiredClassesAlmost a) => (a -> Property) -> Spec identityTest fun = prop (typeName @a) fun where -- GHC 8.2.2 says the `Typeable x` constraint is not necessary, but won't compile -- this without it. typeName :: forall x. Typeable x => String typeName = show $ typeRep (Proxy @a)
335
identityTest :: forall a. (IdTestingRequiredClassesAlmost a) => (a -> Property) -> Spec identityTest fun = prop (typeName @a) fun where -- GHC 8.2.2 says the `Typeable x` constraint is not necessary, but won't compile -- this without it. typeName :: forall x. Typeable x => String typeName = show $ typeRep (Proxy @a)
335
identityTest fun = prop (typeName @a) fun where -- GHC 8.2.2 says the `Typeable x` constraint is not necessary, but won't compile -- this without it. typeName :: forall x. Typeable x => String typeName = show $ typeRep (Proxy @a)
247
false
true
0
9
70
94
49
45
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\x04E7' = "\x043E\x0308"
39
decomposeChar '\x04E7' = "\x043E\x0308"
39
decomposeChar '\x04E7' = "\x043E\x0308"
39
false
false
0
5
3
9
4
5
null
null
QuickChick/Luck
luck/examples-template/C.hs
mit
stmtGen :: Gen (Maybe [Stmt]) stmtGen = $(mkGenQ defFlags{_fileName="examples/C.luck", _maxUnroll=2}) tProxy1
109
stmtGen :: Gen (Maybe [Stmt]) stmtGen = $(mkGenQ defFlags{_fileName="examples/C.luck", _maxUnroll=2}) tProxy1
109
stmtGen = $(mkGenQ defFlags{_fileName="examples/C.luck", _maxUnroll=2}) tProxy1
79
false
true
0
10
10
47
25
22
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Disks/Resize.hs
mpl-2.0
-- | An optional request ID to identify requests. Specify a unique request ID -- so that if you must retry your request, the server will know to ignore -- the request if it has already been completed. For example, consider a -- situation where you make an initial request and the request times out. -- If you make the request again with the same request ID, the server can -- check if original operation with the same request ID was received, and -- if so, will ignore the second request. This prevents clients from -- accidentally creating duplicate commitments. The request ID must be a -- valid UUID with the exception that zero UUID is not supported -- (00000000-0000-0000-0000-000000000000). drRequestId :: Lens' DisksResize (Maybe Text) drRequestId = lens _drRequestId (\ s a -> s{_drRequestId = a})
807
drRequestId :: Lens' DisksResize (Maybe Text) drRequestId = lens _drRequestId (\ s a -> s{_drRequestId = a})
110
drRequestId = lens _drRequestId (\ s a -> s{_drRequestId = a})
64
true
true
0
9
138
57
34
23
null
null
tjakway/ghcjvm
compiler/prelude/THNames.hs
bsd-3-clause
-- data Exp = ... varEName, conEName, litEName, appEName, infixEName, infixAppName, sectionLName, sectionRName, lamEName, lamCaseEName, tupEName, unboxedTupEName, condEName, multiIfEName, letEName, caseEName, doEName, compEName, staticEName, unboundVarEName :: Name varEName = libFun (fsLit "varE") varEIdKey
334
varEName, conEName, litEName, appEName, infixEName, infixAppName, sectionLName, sectionRName, lamEName, lamCaseEName, tupEName, unboxedTupEName, condEName, multiIfEName, letEName, caseEName, doEName, compEName, staticEName, unboundVarEName :: Name varEName = libFun (fsLit "varE") varEIdKey
316
varEName = libFun (fsLit "varE") varEIdKey
56
true
true
2
7
58
65
50
15
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/UpdateChapCredentials.hs
mpl-2.0
-- | The secret key that the initiator (for example, the Windows client) must -- provide to participate in mutual CHAP with the target. -- -- The secret key must be between 12 and 16 bytes when encoded in UTF-8. uccSecretToAuthenticateInitiator :: Lens' UpdateChapCredentials Text uccSecretToAuthenticateInitiator = lens _uccSecretToAuthenticateInitiator (\ s a -> s{_uccSecretToAuthenticateInitiator = a})
406
uccSecretToAuthenticateInitiator :: Lens' UpdateChapCredentials Text uccSecretToAuthenticateInitiator = lens _uccSecretToAuthenticateInitiator (\ s a -> s{_uccSecretToAuthenticateInitiator = a})
194
uccSecretToAuthenticateInitiator = lens _uccSecretToAuthenticateInitiator (\ s a -> s{_uccSecretToAuthenticateInitiator = a})
125
true
true
0
9
55
43
25
18
null
null
mrakgr/futhark
src/Futhark/Representation/ExplicitMemory.hs
bsd-3-clause
noUniquenessReturns :: Returns u r -> Returns NoUniqueness r noUniquenessReturns (ReturnsArray bt shape _ summary) = ReturnsArray bt shape NoUniqueness summary
161
noUniquenessReturns :: Returns u r -> Returns NoUniqueness r noUniquenessReturns (ReturnsArray bt shape _ summary) = ReturnsArray bt shape NoUniqueness summary
161
noUniquenessReturns (ReturnsArray bt shape _ summary) = ReturnsArray bt shape NoUniqueness summary
100
false
true
0
7
22
49
23
26
null
null
Gurrt/software-testing
week-5/Lecture5.hs
mit
ample5 :: Grid example5 = [[1,0,0,0,0,0,0,0,0], [0,2,0,0,0,0,0,0,0], [0,0,3,0,0,0,0,0,0], [0,0,0,4,0,0,0,0,0], [0,0,0,0,5,0,0,0,0], [0,0,0,0,0,6,0,0,0], [0,0,0,0,0,0,7,0,0], [0,0,0,0,0,0,0,8,0], [0,0,0,0,0,0,0,0,9]]
331
example5 :: Grid example5 = [[1,0,0,0,0,0,0,0,0], [0,2,0,0,0,0,0,0,0], [0,0,3,0,0,0,0,0,0], [0,0,0,4,0,0,0,0,0], [0,0,0,0,5,0,0,0,0], [0,0,0,0,0,6,0,0,0], [0,0,0,0,0,0,7,0,0], [0,0,0,0,0,0,0,8,0], [0,0,0,0,0,0,0,0,9]]
329
example5 = [[1,0,0,0,0,0,0,0,0], [0,2,0,0,0,0,0,0,0], [0,0,3,0,0,0,0,0,0], [0,0,0,4,0,0,0,0,0], [0,0,0,0,5,0,0,0,0], [0,0,0,0,0,6,0,0,0], [0,0,0,0,0,0,7,0,0], [0,0,0,0,0,0,0,8,0], [0,0,0,0,0,0,0,0,9]]
312
false
true
0
6
129
287
187
100
null
null
CGenie/platform
shared/src/Unison/Typechecker/Context.hs
mit
-- | Apply the context to the input type, then convert any unsolved existentials -- to universals. generalizeExistentials :: Var v => Context v -> Type v -> Type v generalizeExistentials ctx t = foldr gen (apply ctx t) (unsolved ctx) where gen e t = if e `ABT.isFreeIn` t then Type.forall e (ABT.replace (Type.universal e) (Type.matchExistential e) t) else t -- don't bother introducing a forall if type variable is unused
446
generalizeExistentials :: Var v => Context v -> Type v -> Type v generalizeExistentials ctx t = foldr gen (apply ctx t) (unsolved ctx) where gen e t = if e `ABT.isFreeIn` t then Type.forall e (ABT.replace (Type.universal e) (Type.matchExistential e) t) else t -- don't bother introducing a forall if type variable is unused
347
generalizeExistentials ctx t = foldr gen (apply ctx t) (unsolved ctx) where gen e t = if e `ABT.isFreeIn` t then Type.forall e (ABT.replace (Type.universal e) (Type.matchExistential e) t) else t -- don't bother introducing a forall if type variable is unused
282
true
true
1
11
95
136
65
71
null
null
fpco/hlint
src/HSE/Util.hs
bsd-3-clause
isDot _ = False
15
isDot _ = False
15
isDot _ = False
15
false
false
0
4
3
10
4
6
null
null
yuttie/mash
Manipulator/Command/General.hs
bsd-3-clause
gcmdResetPipeline :: Monad m => Map String (Command m Bytes) -> GCommand m gcmdResetPipeline cmds = GCommand $ Command $ \st args -> case args of [] -> Right $ st { manipPipe = awaitForever yield , manipCtxCommands = cmds } _ -> Left $ CommandArgumentError args
311
gcmdResetPipeline :: Monad m => Map String (Command m Bytes) -> GCommand m gcmdResetPipeline cmds = GCommand $ Command $ \st args -> case args of [] -> Right $ st { manipPipe = awaitForever yield , manipCtxCommands = cmds } _ -> Left $ CommandArgumentError args
311
gcmdResetPipeline cmds = GCommand $ Command $ \st args -> case args of [] -> Right $ st { manipPipe = awaitForever yield , manipCtxCommands = cmds } _ -> Left $ CommandArgumentError args
236
false
true
0
13
96
102
51
51
null
null
green-haskell/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
smallEnoughToInline _ _ = False
33
smallEnoughToInline _ _ = False
33
smallEnoughToInline _ _ = False
33
false
false
0
5
6
11
5
6
null
null
NicolasDP/hs-memory
tests/Tests.hs
bsd-3-clause
allBackends :: [Backend] allBackends = enumFrom BackendByte
59
allBackends :: [Backend] allBackends = enumFrom BackendByte
59
allBackends = enumFrom BackendByte
34
false
true
0
5
6
17
9
8
null
null
fcostantini/QuickFuzz
src/Check.hs
gpl-3.0
propValgrindExec :: Show a => FilePath -> Cmd -> (a -> L.ByteString) -> FilePath -> a -> Property propValgrindExec filename pcmd encode outdir x = noShrinking $ monadicIO $ do let rep_filename = filename ++ ".vreport.out" run $ write (encode x) filename run $ execValgrind pcmd rep_filename size <- run $ getFileSize rep_filename case size of 0 -> assert True _ -> do run $ vreport x rep_filename filename outdir assert False
526
propValgrindExec :: Show a => FilePath -> Cmd -> (a -> L.ByteString) -> FilePath -> a -> Property propValgrindExec filename pcmd encode outdir x = noShrinking $ monadicIO $ do let rep_filename = filename ++ ".vreport.out" run $ write (encode x) filename run $ execValgrind pcmd rep_filename size <- run $ getFileSize rep_filename case size of 0 -> assert True _ -> do run $ vreport x rep_filename filename outdir assert False
526
propValgrindExec filename pcmd encode outdir x = noShrinking $ monadicIO $ do let rep_filename = filename ++ ".vreport.out" run $ write (encode x) filename run $ execValgrind pcmd rep_filename size <- run $ getFileSize rep_filename case size of 0 -> assert True _ -> do run $ vreport x rep_filename filename outdir assert False
428
false
true
0
14
172
167
77
90
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPSProxies/List.hs
mpl-2.0
-- | The maximum number of results per page that should be returned. If the -- number of available results is larger than \`maxResults\`, Compute -- Engine returns a \`nextPageToken\` that can be used to get the next page -- of results in subsequent list requests. Acceptable values are \`0\` to -- \`500\`, inclusive. (Default: \`500\`) thplMaxResults :: Lens' TargetHTTPSProxiesList Word32 thplMaxResults = lens _thplMaxResults (\ s a -> s{_thplMaxResults = a}) . _Coerce
487
thplMaxResults :: Lens' TargetHTTPSProxiesList Word32 thplMaxResults = lens _thplMaxResults (\ s a -> s{_thplMaxResults = a}) . _Coerce
149
thplMaxResults = lens _thplMaxResults (\ s a -> s{_thplMaxResults = a}) . _Coerce
95
true
true
0
10
87
50
28
22
null
null
pepeiborra/narradar
src/Narradar/Constraints/SAT/Solve.hs
bsd-3-clause
solveYices YicesOpts{..} cnf weighted val = do let nv = numVars cnf nc = numClauses cnf -- feed the problem to Yices cs = map (\c -> unwords (show maxWeight : map show c ++ ["0"] )) (clauses cnf) wcs = map (\(w,c) -> unwords (show w : map show c ++ ["0"])) weighted header = printf "p wcnf %d %d %d" nv (nc + length wcs) maxWeight opts = ["-e","-d","-ms", "-mw", show maxWeight] ++ maybe [] (\t -> ["-tm", show t]) timeout ( code, the_stdout, the_stderr ) <- readProcessWithExitCode "yices" opts (unlines $ header : wcs ++ cs) debug the_stderr mb_time <- either (\(e::SomeException) -> "") (\(t::Double) -> "(in " ++ show t ++ " seconds)") <$> (CE.try $ readIO (head $ words the_stderr)) case lines the_stdout of "sat" : xs : _ -> do debug ("satisfiable" ++ mb_time) return $ Just $ Sat $ array (Funsat.V 0, Funsat.V nv) [ (Funsat.V(abs x), x) | x <- map read (words xs)] _ -> do debug ("not satisfiable" ++ mb_time) return Nothing -- *** Funsat solver by simplification to vanilla Circuits
1,277
solveYices YicesOpts{..} cnf weighted val = do let nv = numVars cnf nc = numClauses cnf -- feed the problem to Yices cs = map (\c -> unwords (show maxWeight : map show c ++ ["0"] )) (clauses cnf) wcs = map (\(w,c) -> unwords (show w : map show c ++ ["0"])) weighted header = printf "p wcnf %d %d %d" nv (nc + length wcs) maxWeight opts = ["-e","-d","-ms", "-mw", show maxWeight] ++ maybe [] (\t -> ["-tm", show t]) timeout ( code, the_stdout, the_stderr ) <- readProcessWithExitCode "yices" opts (unlines $ header : wcs ++ cs) debug the_stderr mb_time <- either (\(e::SomeException) -> "") (\(t::Double) -> "(in " ++ show t ++ " seconds)") <$> (CE.try $ readIO (head $ words the_stderr)) case lines the_stdout of "sat" : xs : _ -> do debug ("satisfiable" ++ mb_time) return $ Just $ Sat $ array (Funsat.V 0, Funsat.V nv) [ (Funsat.V(abs x), x) | x <- map read (words xs)] _ -> do debug ("not satisfiable" ++ mb_time) return Nothing -- *** Funsat solver by simplification to vanilla Circuits
1,277
solveYices YicesOpts{..} cnf weighted val = do let nv = numVars cnf nc = numClauses cnf -- feed the problem to Yices cs = map (\c -> unwords (show maxWeight : map show c ++ ["0"] )) (clauses cnf) wcs = map (\(w,c) -> unwords (show w : map show c ++ ["0"])) weighted header = printf "p wcnf %d %d %d" nv (nc + length wcs) maxWeight opts = ["-e","-d","-ms", "-mw", show maxWeight] ++ maybe [] (\t -> ["-tm", show t]) timeout ( code, the_stdout, the_stderr ) <- readProcessWithExitCode "yices" opts (unlines $ header : wcs ++ cs) debug the_stderr mb_time <- either (\(e::SomeException) -> "") (\(t::Double) -> "(in " ++ show t ++ " seconds)") <$> (CE.try $ readIO (head $ words the_stderr)) case lines the_stdout of "sat" : xs : _ -> do debug ("satisfiable" ++ mb_time) return $ Just $ Sat $ array (Funsat.V 0, Funsat.V nv) [ (Funsat.V(abs x), x) | x <- map read (words xs)] _ -> do debug ("not satisfiable" ++ mb_time) return Nothing -- *** Funsat solver by simplification to vanilla Circuits
1,277
false
false
1
20
467
485
243
242
null
null
tranma/falling-turnip
common/World.hs
bsd-3-clause
water = 7
19
water = 7
19
water = 7
19
false
false
0
4
12
6
3
3
null
null
OpenXT/idl
rpcgen/Backend/C.hs
gpl-2.0
backend :: Backend backend = Backend { genServer = genServer_ , genClient = genClient_ }
107
backend :: Backend backend = Backend { genServer = genServer_ , genClient = genClient_ }
107
backend = Backend { genServer = genServer_ , genClient = genClient_ }
88
false
true
0
6
33
25
15
10
null
null
rsasse/tamarin-prover
lib/theory/src/Theory.hs
gpl-3.0
prettyEitherRestriction :: HighlightDocument d => (Side, Restriction) -> d prettyEitherRestriction (s, rstr) = kwRestriction <-> text (L.get rstrName rstr) <-> prettySide s <> colon $-$ (nest 2 $ doubleQuotes $ prettyLNFormula $ L.get rstrFormula rstr) $-$ (nest 2 $ if safety then lineComment_ "safety formula" else emptyDoc) where safety = isSafetyFormula $ formulaToGuarded_ $ L.get rstrFormula rstr -- | Pretty print a lemma.
452
prettyEitherRestriction :: HighlightDocument d => (Side, Restriction) -> d prettyEitherRestriction (s, rstr) = kwRestriction <-> text (L.get rstrName rstr) <-> prettySide s <> colon $-$ (nest 2 $ doubleQuotes $ prettyLNFormula $ L.get rstrFormula rstr) $-$ (nest 2 $ if safety then lineComment_ "safety formula" else emptyDoc) where safety = isSafetyFormula $ formulaToGuarded_ $ L.get rstrFormula rstr -- | Pretty print a lemma.
452
prettyEitherRestriction (s, rstr) = kwRestriction <-> text (L.get rstrName rstr) <-> prettySide s <> colon $-$ (nest 2 $ doubleQuotes $ prettyLNFormula $ L.get rstrFormula rstr) $-$ (nest 2 $ if safety then lineComment_ "safety formula" else emptyDoc) where safety = isSafetyFormula $ formulaToGuarded_ $ L.get rstrFormula rstr -- | Pretty print a lemma.
377
false
true
0
13
85
143
72
71
null
null
green-haskell/ghc
libraries/base/Data/OldList.hs
bsd-3-clause
dropLength :: [a] -> [b] -> [b] dropLength [] y = y
51
dropLength :: [a] -> [b] -> [b] dropLength [] y = y
51
dropLength [] y = y
19
false
true
0
7
11
35
19
16
null
null
tel/hs-nanomsg
src/Network/Nanomsg/C.hs
apache-2.0
setItStorable :: Storable ty => ty -> (forall a. Ptr a -> CSize -> IO b) -> IO b setItStorable s f = alloca $ \ptr -> do poke ptr s f ptr (fromIntegral $ sizeOf s) -- | Default instance used for many 'OptionTy's. Returns 'Nothing' if -- the size doesn't match what it's expected to (!). -- getItStorable :: forall ty b. Storable ty => -- (Ptr ty -> Ptr CSize -> IO b) -> IO (Maybe (ty, b)) -- getItStorable f = do -- alloca $ \mainPtr -> do -- alloca $ \sizePtr -> do -- res <- f mainPtr sizePtr -- sz <- peek $ sizePtr -- -- This scoped type variable is needed since we can't peek -- -- mainPtr yet. -- case sizeOf (undefined :: ty) == fromIntegral sz of -- True -> do -- out <- peek mainPtr -- return $ Just (out, res) -- False -> return Nothing -- | Class generalizing how option types are serialized for setting.
913
setItStorable :: Storable ty => ty -> (forall a. Ptr a -> CSize -> IO b) -> IO b setItStorable s f = alloca $ \ptr -> do poke ptr s f ptr (fromIntegral $ sizeOf s) -- | Default instance used for many 'OptionTy's. Returns 'Nothing' if -- the size doesn't match what it's expected to (!). -- getItStorable :: forall ty b. Storable ty => -- (Ptr ty -> Ptr CSize -> IO b) -> IO (Maybe (ty, b)) -- getItStorable f = do -- alloca $ \mainPtr -> do -- alloca $ \sizePtr -> do -- res <- f mainPtr sizePtr -- sz <- peek $ sizePtr -- -- This scoped type variable is needed since we can't peek -- -- mainPtr yet. -- case sizeOf (undefined :: ty) == fromIntegral sz of -- True -> do -- out <- peek mainPtr -- return $ Just (out, res) -- False -> return Nothing -- | Class generalizing how option types are serialized for setting.
913
setItStorable s f = alloca $ \ptr -> do poke ptr s f ptr (fromIntegral $ sizeOf s) -- | Default instance used for many 'OptionTy's. Returns 'Nothing' if -- the size doesn't match what it's expected to (!). -- getItStorable :: forall ty b. Storable ty => -- (Ptr ty -> Ptr CSize -> IO b) -> IO (Maybe (ty, b)) -- getItStorable f = do -- alloca $ \mainPtr -> do -- alloca $ \sizePtr -> do -- res <- f mainPtr sizePtr -- sz <- peek $ sizePtr -- -- This scoped type variable is needed since we can't peek -- -- mainPtr yet. -- case sizeOf (undefined :: ty) == fromIntegral sz of -- True -> do -- out <- peek mainPtr -- return $ Just (out, res) -- False -> return Nothing -- | Class generalizing how option types are serialized for setting.
832
false
true
0
13
263
113
61
52
null
null
snoyberg/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
uDoubleDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UDouble")
64
uDoubleDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UDouble")
64
uDoubleDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UDouble")
64
false
false
0
7
5
17
8
9
null
null
diku-kmc/repg
test/Tests/FSTConstruction.hs
mit
s1 :: String s1 = [strQ| main := (~aaa | aa)* aaa := /aaa/ "bcd" aa := /aa/ "de" |]
112
s1 :: String s1 = [strQ| main := (~aaa | aa)* aaa := /aaa/ "bcd" aa := /aa/ "de" |]
112
s1 = [strQ| main := (~aaa | aa)* aaa := /aaa/ "bcd" aa := /aa/ "de" |]
99
false
true
0
6
48
22
11
11
null
null
na4zagin3/uhim-dict
src/Language/UHIM/Dictionary/SKK/SKKExtended.hs
gpl-3.0
escapeSKKCandidate :: String -> String escapeSKKCandidate s | any (`elem` "/();") s = error $ "escapeSKKCandidate: Not yet supported string: " ++ show s | otherwise = s
200
escapeSKKCandidate :: String -> String escapeSKKCandidate s | any (`elem` "/();") s = error $ "escapeSKKCandidate: Not yet supported string: " ++ show s | otherwise = s
200
escapeSKKCandidate s | any (`elem` "/();") s = error $ "escapeSKKCandidate: Not yet supported string: " ++ show s | otherwise = s
161
false
true
0
9
59
55
27
28
null
null
Ferdinand-vW/HHDFS
src/NameNode.hs
isc
handleClients :: NameNode -> ProxyToNameNode -> STM () handleClients nameNode@NameNode{..} (WriteP fp blockCount chan) = do writeIOChan nameNode $ liftIO $ putStrLn $ "Received write request of file: " ++ fp dNodes <- readTVar dataNodes idPidMap <- readTVar dnIdPidMap bMap <- readTVar blockMap dnIdAddrs <- readTVar dnIdAddrMap blockId <- readTVar blockIdCounter if not $ isValid fp then sendChanSTM nameNode chan (Left InvalidPathError) else do let dnodePids = mapMaybe (`M.lookup` idPidMap) dNodes dnodeAddrs = mapMaybe (`M.lookup` dnIdAddrs) dNodes -- We pick some random datanodes to store the blocks we are receiving selectedDnodes <- selectRandomDataNodes nameNode blockCount dnodeAddrs let positions = zip selectedDnodes [(blockId + 1)..] updateFsImg = M.insert fp (map snd positions) maxBlockId = blockId + length selectedDnodes -- We flush the fsImage and the taken blockIds to assure consistency on startup writeIOChan nameNode $ liftIO $ flushBlockId maxBlockId writeIOChan nameNode $ liftIO $ flushFsImage nameNode -- We update the tvars holding the updated data writeTVar blockIdCounter maxBlockId modifyTVar' fsImage updateFsImg -- We send the positions back to the client via the procChanel sendChanSTM nameNode chan (Right positions)
1,351
handleClients :: NameNode -> ProxyToNameNode -> STM () handleClients nameNode@NameNode{..} (WriteP fp blockCount chan) = do writeIOChan nameNode $ liftIO $ putStrLn $ "Received write request of file: " ++ fp dNodes <- readTVar dataNodes idPidMap <- readTVar dnIdPidMap bMap <- readTVar blockMap dnIdAddrs <- readTVar dnIdAddrMap blockId <- readTVar blockIdCounter if not $ isValid fp then sendChanSTM nameNode chan (Left InvalidPathError) else do let dnodePids = mapMaybe (`M.lookup` idPidMap) dNodes dnodeAddrs = mapMaybe (`M.lookup` dnIdAddrs) dNodes -- We pick some random datanodes to store the blocks we are receiving selectedDnodes <- selectRandomDataNodes nameNode blockCount dnodeAddrs let positions = zip selectedDnodes [(blockId + 1)..] updateFsImg = M.insert fp (map snd positions) maxBlockId = blockId + length selectedDnodes -- We flush the fsImage and the taken blockIds to assure consistency on startup writeIOChan nameNode $ liftIO $ flushBlockId maxBlockId writeIOChan nameNode $ liftIO $ flushFsImage nameNode -- We update the tvars holding the updated data writeTVar blockIdCounter maxBlockId modifyTVar' fsImage updateFsImg -- We send the positions back to the client via the procChanel sendChanSTM nameNode chan (Right positions)
1,351
handleClients nameNode@NameNode{..} (WriteP fp blockCount chan) = do writeIOChan nameNode $ liftIO $ putStrLn $ "Received write request of file: " ++ fp dNodes <- readTVar dataNodes idPidMap <- readTVar dnIdPidMap bMap <- readTVar blockMap dnIdAddrs <- readTVar dnIdAddrMap blockId <- readTVar blockIdCounter if not $ isValid fp then sendChanSTM nameNode chan (Left InvalidPathError) else do let dnodePids = mapMaybe (`M.lookup` idPidMap) dNodes dnodeAddrs = mapMaybe (`M.lookup` dnIdAddrs) dNodes -- We pick some random datanodes to store the blocks we are receiving selectedDnodes <- selectRandomDataNodes nameNode blockCount dnodeAddrs let positions = zip selectedDnodes [(blockId + 1)..] updateFsImg = M.insert fp (map snd positions) maxBlockId = blockId + length selectedDnodes -- We flush the fsImage and the taken blockIds to assure consistency on startup writeIOChan nameNode $ liftIO $ flushBlockId maxBlockId writeIOChan nameNode $ liftIO $ flushFsImage nameNode -- We update the tvars holding the updated data writeTVar blockIdCounter maxBlockId modifyTVar' fsImage updateFsImg -- We send the positions back to the client via the procChanel sendChanSTM nameNode chan (Right positions)
1,296
false
true
0
16
277
331
157
174
null
null
sir-murray/lol
Handler/Menu.hs
agpl-3.0
query :: Handler [(Text, [(Int64, Text, Money)])] query = do d <- getDeploymentId rows <- runDB $ select $ from $ \(c `InnerJoin` p) -> do on (c ^. CategoryId ==. p ^. ProductCategory) where_ (c ^. CategoryDeployment ==. (val d) &&. p ^. ProductAvailable) return ( c ^. CategoryName , p ^. ProductId , p ^. ProductName , p ^. ProductPrice ) return $ foldr categorise [] rows where categorise (Value cat, Value key, Value name, Value price) (x@(current, sublist):xs) = if cat == current then (cat, (fromSqlKey key, name, price):sublist):xs else (cat, [(fromSqlKey key, name, price)]):x:xs categorise (Value cat, Value key, Value name, Value price) [] = [(cat, [(fromSqlKey key, name, price)])]
838
query :: Handler [(Text, [(Int64, Text, Money)])] query = do d <- getDeploymentId rows <- runDB $ select $ from $ \(c `InnerJoin` p) -> do on (c ^. CategoryId ==. p ^. ProductCategory) where_ (c ^. CategoryDeployment ==. (val d) &&. p ^. ProductAvailable) return ( c ^. CategoryName , p ^. ProductId , p ^. ProductName , p ^. ProductPrice ) return $ foldr categorise [] rows where categorise (Value cat, Value key, Value name, Value price) (x@(current, sublist):xs) = if cat == current then (cat, (fromSqlKey key, name, price):sublist):xs else (cat, [(fromSqlKey key, name, price)]):x:xs categorise (Value cat, Value key, Value name, Value price) [] = [(cat, [(fromSqlKey key, name, price)])]
838
query = do d <- getDeploymentId rows <- runDB $ select $ from $ \(c `InnerJoin` p) -> do on (c ^. CategoryId ==. p ^. ProductCategory) where_ (c ^. CategoryDeployment ==. (val d) &&. p ^. ProductAvailable) return ( c ^. CategoryName , p ^. ProductId , p ^. ProductName , p ^. ProductPrice ) return $ foldr categorise [] rows where categorise (Value cat, Value key, Value name, Value price) (x@(current, sublist):xs) = if cat == current then (cat, (fromSqlKey key, name, price):sublist):xs else (cat, [(fromSqlKey key, name, price)]):x:xs categorise (Value cat, Value key, Value name, Value price) [] = [(cat, [(fromSqlKey key, name, price)])]
788
false
true
4
18
259
374
192
182
null
null
jakespringer/loka
Server/src/Loka.hs
lgpl-3.0
pieceDirectionCoordinates DirectionLeft = (-1, 0)
49
pieceDirectionCoordinates DirectionLeft = (-1, 0)
49
pieceDirectionCoordinates DirectionLeft = (-1, 0)
49
false
false
0
6
4
17
9
8
null
null
nlinker/haskell-you-could
src/Step3.hs
mit
mySum = \xs -> sum (xs :: [Int])
32
mySum = \xs -> sum (xs :: [Int])
32
mySum = \xs -> sum (xs :: [Int])
32
false
false
0
8
7
23
13
10
null
null
olsner/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
-------------------------------------------------------------------------------- unariseAlts :: UnariseEnv -> AltType -> InId -> [StgAlt] -> UniqSM [StgAlt] unariseAlts rho (MultiValAlt n) bndr [(DEFAULT, [], e)] | isUnboxedTupleBndr bndr = do (rho', ys) <- unariseConArgBinder rho bndr e' <- unariseExpr rho' e return [(DataAlt (tupleDataCon Unboxed n), ys, e')]
382
unariseAlts :: UnariseEnv -> AltType -> InId -> [StgAlt] -> UniqSM [StgAlt] unariseAlts rho (MultiValAlt n) bndr [(DEFAULT, [], e)] | isUnboxedTupleBndr bndr = do (rho', ys) <- unariseConArgBinder rho bndr e' <- unariseExpr rho' e return [(DataAlt (tupleDataCon Unboxed n), ys, e')]
300
unariseAlts rho (MultiValAlt n) bndr [(DEFAULT, [], e)] | isUnboxedTupleBndr bndr = do (rho', ys) <- unariseConArgBinder rho bndr e' <- unariseExpr rho' e return [(DataAlt (tupleDataCon Unboxed n), ys, e')]
224
true
true
0
13
62
134
68
66
null
null
spechub/Hets
Common/Keywords.hs
gpl-2.0
-- | External choice external_choiceS :: String external_choiceS = "[]"
71
external_choiceS :: String external_choiceS = "[]"
50
external_choiceS = "[]"
23
true
true
0
6
9
19
8
11
null
null
brendanhay/gogol
gogol-consumersurveys/gen/Network/Google/ConsumerSurveys/Types/Product.hs
mpl-2.0
piResultPerPage :: Lens' PageInfo (Maybe Int32) piResultPerPage = lens _piResultPerPage (\ s a -> s{_piResultPerPage = a}) . mapping _Coerce
154
piResultPerPage :: Lens' PageInfo (Maybe Int32) piResultPerPage = lens _piResultPerPage (\ s a -> s{_piResultPerPage = a}) . mapping _Coerce
154
piResultPerPage = lens _piResultPerPage (\ s a -> s{_piResultPerPage = a}) . mapping _Coerce
106
false
true
1
8
33
56
27
29
null
null
CulpaBS/wbBach
src/Language/Futhark/Pretty.hs
bsd-3-clause
commastack :: [Doc] -> Doc commastack = align . stack . punctuate comma
71
commastack :: [Doc] -> Doc commastack = align . stack . punctuate comma
71
commastack = align . stack . punctuate comma
44
false
true
0
6
12
29
15
14
null
null
Peaker/bitmap
Data/Bitmap/IO.hs
bsd-3-clause
omponentMapInPlace :: PixelComponent s => (s -> s) -> Bitmap s -> IO () componentMapInPlace f bm = do genericComponentMap f bm bm -- See the comments at 'componentMap'.
176
componentMapInPlace :: PixelComponent s => (s -> s) -> Bitmap s -> IO () componentMapInPlace f bm = do genericComponentMap f bm bm -- See the comments at 'componentMap'.
176
componentMapInPlace f bm = do genericComponentMap f bm bm -- See the comments at 'componentMap'.
103
false
true
0
9
36
61
28
33
null
null
termite2/debug
Debug/GraphView.hs
bsd-3-clause
--controllableStyle = ( GC {gcFG = (0 , 0, 40000), gcLW=2, gcLS=True} -- , GC {gcFG = (0 , 65535, 0), gcLW=0, gcLS=False}) --uncontrollableStyle = ( GC {gcFG = (0 , 0, 40000), gcLW=2, gcLS=True} -- , GC {gcFG = (65535, 0, 0), gcLW=0, gcLS=False}) defStateStyle = ( GC {gcFG = (0 , 0, 40000), gcLW=2, gcLS=True} , GC {gcFG = (40000, 40000, 40000), gcLW=0, gcLS=False})
475
defStateStyle = ( GC {gcFG = (0 , 0, 40000), gcLW=2, gcLS=True} , GC {gcFG = (40000, 40000, 40000), gcLW=0, gcLS=False})
155
defStateStyle = ( GC {gcFG = (0 , 0, 40000), gcLW=2, gcLS=True} , GC {gcFG = (40000, 40000, 40000), gcLW=0, gcLS=False})
155
true
false
0
8
173
74
49
25
null
null
keithodulaigh/Hets
THF/ParseTHF.hs
gpl-2.0
{- THF & THF0: <general_data> ::= <atomic_word> | <general_function> | <variable> | <number> | <distinct_object> | <formula_data> <general_data> :== bind(<variable>,<formula_data>) -} generalData :: CharParser st GeneralData generalData = fmap GD_Variable variable <|> fmap GD_Number number <|> fmap GD_Distinct_Object distinctObject <|> do key $ tryString "bind" oParentheses v <- variable comma fd <- formulaData cParentheses return (GD_Bind v fd) <|> fmap GD_General_Function generalFunction <|> fmap GD_Atomic_Word atomicWord <|> fmap GD_Formula_Data formulaData
618
generalData :: CharParser st GeneralData generalData = fmap GD_Variable variable <|> fmap GD_Number number <|> fmap GD_Distinct_Object distinctObject <|> do key $ tryString "bind" oParentheses v <- variable comma fd <- formulaData cParentheses return (GD_Bind v fd) <|> fmap GD_General_Function generalFunction <|> fmap GD_Atomic_Word atomicWord <|> fmap GD_Formula_Data formulaData
422
generalData = fmap GD_Variable variable <|> fmap GD_Number number <|> fmap GD_Distinct_Object distinctObject <|> do key $ tryString "bind" oParentheses v <- variable comma fd <- formulaData cParentheses return (GD_Bind v fd) <|> fmap GD_General_Function generalFunction <|> fmap GD_Atomic_Word atomicWord <|> fmap GD_Formula_Data formulaData
381
true
true
18
9
121
148
65
83
null
null
TomMD/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
cmpEqTick (FillInCaseDefault a) (FillInCaseDefault b) = a `compare` b
87
cmpEqTick (FillInCaseDefault a) (FillInCaseDefault b) = a `compare` b
87
cmpEqTick (FillInCaseDefault a) (FillInCaseDefault b) = a `compare` b
87
false
false
1
8
26
33
15
18
null
null
juanmab37/HOpenCV-0.5.0.1
src/HOpenCV/HCxCore.hs
gpl-2.0
getImageDataCV :: IplImage -> IO (Ptr CUChar) getImageDataCV i = do r <- getImageData i return (runErr r) -- | Function para obtener las medidas de una imagen
167
getImageDataCV :: IplImage -> IO (Ptr CUChar) getImageDataCV i = do r <- getImageData i return (runErr r) -- | Function para obtener las medidas de una imagen
167
getImageDataCV i = do r <- getImageData i return (runErr r) -- | Function para obtener las medidas de una imagen
121
false
true
0
9
36
50
23
27
null
null
fmthoma/ghc
compiler/types/Type.hs
bsd-3-clause
repSplitAppTy_maybe (AppTy ty1 ty2) = Just (ty1, ty2)
55
repSplitAppTy_maybe (AppTy ty1 ty2) = Just (ty1, ty2)
55
repSplitAppTy_maybe (AppTy ty1 ty2) = Just (ty1, ty2)
55
false
false
0
7
9
26
13
13
null
null
nevrenato/Hets_Fork
CASL/Kif2CASL.hs
gpl-2.0
-- | collect all predicate symbols used in a formula collectPreds :: CASLFORMULA -> Set.Set Predsym collectPreds = foldFormula (constRecord (error "Kif2CASL.collectPreds") Set.unions Set.empty) { foldPredication = \ _ p args _ -> Set.insert (Predsym (length args) (case p of Pred_name pn -> pn Qual_pred_name pn _ _ -> pn)) (Set.unions args) }
457
collectPreds :: CASLFORMULA -> Set.Set Predsym collectPreds = foldFormula (constRecord (error "Kif2CASL.collectPreds") Set.unions Set.empty) { foldPredication = \ _ p args _ -> Set.insert (Predsym (length args) (case p of Pred_name pn -> pn Qual_pred_name pn _ _ -> pn)) (Set.unions args) }
404
collectPreds = foldFormula (constRecord (error "Kif2CASL.collectPreds") Set.unions Set.empty) { foldPredication = \ _ p args _ -> Set.insert (Predsym (length args) (case p of Pred_name pn -> pn Qual_pred_name pn _ _ -> pn)) (Set.unions args) }
357
true
true
0
16
166
125
62
63
null
null
kazu-yamamoto/appar
Text/Appar/Parser.hs
bsd-3-clause
char :: Input inp => Char -> MkParser inp Char char c = satisfy (c ==)
70
char :: Input inp => Char -> MkParser inp Char char c = satisfy (c ==)
70
char c = satisfy (c ==)
23
false
true
0
7
15
37
18
19
null
null
dec9ue/jhc_copygc
src/FrontEnd/HsErrors.hs
gpl-2.0
fromHsTypeApp t = f t [] where f (HsTyApp a b) rs = f a (b:rs) f t rs = (t,rs)
86
fromHsTypeApp t = f t [] where f (HsTyApp a b) rs = f a (b:rs) f t rs = (t,rs)
86
fromHsTypeApp t = f t [] where f (HsTyApp a b) rs = f a (b:rs) f t rs = (t,rs)
86
false
false
2
7
28
73
32
41
null
null
futtetennista/IntroductionToFunctionalProgramming
itfp/src/Chapter8.hs
mit
eval'' :: Expr' -> Int eval'' (Num' x) = x
44
eval'' :: Expr' -> Int eval'' (Num' x) = x
44
eval'' (Num' x) = x
21
false
true
0
7
11
24
12
12
null
null
urv/fixhs
src/Data/FIX/Spec/FIX41.hs
lgpl-2.1
tLeavesQty :: FIXTag tLeavesQty = FIXTag { tName = "LeavesQty" , tnum = 151 , tparser = toFIXInt , arbitraryValue = FIXInt <$> arbitrary }
151
tLeavesQty :: FIXTag tLeavesQty = FIXTag { tName = "LeavesQty" , tnum = 151 , tparser = toFIXInt , arbitraryValue = FIXInt <$> arbitrary }
151
tLeavesQty = FIXTag { tName = "LeavesQty" , tnum = 151 , tparser = toFIXInt , arbitraryValue = FIXInt <$> arbitrary }
130
false
true
0
8
37
45
26
19
null
null
osa1/rho-torrent
src/Rho/PieceMgr.hs
bsd-3-clause
pRange :: PieceMgr -> PieceIdx -> (Int, Int) pRange (PieceMgr pSize pTotalSize pieces _) pIdx | pIdx >= pieces = error "requested range for a piece out of range" | otherwise = let start = pSize * pIdx end = min (fromIntegral $ start + pSize) (fromIntegral pTotalSize) in (fromIntegral start, end)
353
pRange :: PieceMgr -> PieceIdx -> (Int, Int) pRange (PieceMgr pSize pTotalSize pieces _) pIdx | pIdx >= pieces = error "requested range for a piece out of range" | otherwise = let start = pSize * pIdx end = min (fromIntegral $ start + pSize) (fromIntegral pTotalSize) in (fromIntegral start, end)
353
pRange (PieceMgr pSize pTotalSize pieces _) pIdx | pIdx >= pieces = error "requested range for a piece out of range" | otherwise = let start = pSize * pIdx end = min (fromIntegral $ start + pSize) (fromIntegral pTotalSize) in (fromIntegral start, end)
308
false
true
0
13
108
123
59
64
null
null
AlexanderPankiv/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
-- getOperand: the operand is not required to remain valid across the -- computation of an arbitrary expression. getOperand :: CmmExpr -> NatM (Operand, InstrBlock) getOperand (CmmLit lit) = do use_sse2 <- sse2Enabled if (use_sse2 && isSuitableFloatingPointLit lit) then do let CmmFloat _ w = lit Amode addr code <- memConstant (widthInBytes w) lit return (OpAddr addr, code) else do is32Bit <- is32BitPlatform dflags <- getDynFlags if is32BitLit is32Bit lit && not (isFloatType (cmmLitType dflags lit)) then return (OpImm (litToImm lit), nilOL) else getOperand_generic (CmmLit lit)
628
getOperand :: CmmExpr -> NatM (Operand, InstrBlock) getOperand (CmmLit lit) = do use_sse2 <- sse2Enabled if (use_sse2 && isSuitableFloatingPointLit lit) then do let CmmFloat _ w = lit Amode addr code <- memConstant (widthInBytes w) lit return (OpAddr addr, code) else do is32Bit <- is32BitPlatform dflags <- getDynFlags if is32BitLit is32Bit lit && not (isFloatType (cmmLitType dflags lit)) then return (OpImm (litToImm lit), nilOL) else getOperand_generic (CmmLit lit)
514
getOperand (CmmLit lit) = do use_sse2 <- sse2Enabled if (use_sse2 && isSuitableFloatingPointLit lit) then do let CmmFloat _ w = lit Amode addr code <- memConstant (widthInBytes w) lit return (OpAddr addr, code) else do is32Bit <- is32BitPlatform dflags <- getDynFlags if is32BitLit is32Bit lit && not (isFloatType (cmmLitType dflags lit)) then return (OpImm (litToImm lit), nilOL) else getOperand_generic (CmmLit lit)
462
true
true
0
17
131
199
94
105
null
null
GaloisInc/halvm-ghc
compiler/types/Coercion.hs
bsd-3-clause
maybeSubCo ReprEq = mkSubCo
27
maybeSubCo ReprEq = mkSubCo
27
maybeSubCo ReprEq = mkSubCo
27
false
false
1
5
3
13
4
9
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Term/Pretty.hs
bsd-3-clause
ppPair :: Prec -> SawDoc -> SawDoc -> SawDoc ppPair prec x y = ppParensPrec prec PrecCommas (group (vcat [x <> pretty ',', y]))
127
ppPair :: Prec -> SawDoc -> SawDoc -> SawDoc ppPair prec x y = ppParensPrec prec PrecCommas (group (vcat [x <> pretty ',', y]))
127
ppPair prec x y = ppParensPrec prec PrecCommas (group (vcat [x <> pretty ',', y]))
82
false
true
0
12
23
62
31
31
null
null
ku-fpg/blank-canvas
wiki-suite/Arc.hs
bsd-3-clause
-- (578,200) main :: IO () main = blankCanvas 3000 $ \ context -> do send context $ do let centerX = width context / 2; let centerY = height context / 2; let radius = 75; let startingAngle = 1.1 * pi let endingAngle = 1.9 * pi lineWidth 15 strokeStyle "black" beginPath() arc(centerX - 50, centerY, radius, startingAngle, endingAngle, False) stroke() beginPath() strokeStyle "blue" arc(centerX + 50, centerY, radius, startingAngle, endingAngle, True) stroke() wiki $ snapShot context "images/Arc.png" wiki $ close context
650
main :: IO () main = blankCanvas 3000 $ \ context -> do send context $ do let centerX = width context / 2; let centerY = height context / 2; let radius = 75; let startingAngle = 1.1 * pi let endingAngle = 1.9 * pi lineWidth 15 strokeStyle "black" beginPath() arc(centerX - 50, centerY, radius, startingAngle, endingAngle, False) stroke() beginPath() strokeStyle "blue" arc(centerX + 50, centerY, radius, startingAngle, endingAngle, True) stroke() wiki $ snapShot context "images/Arc.png" wiki $ close context
636
main = blankCanvas 3000 $ \ context -> do send context $ do let centerX = width context / 2; let centerY = height context / 2; let radius = 75; let startingAngle = 1.1 * pi let endingAngle = 1.9 * pi lineWidth 15 strokeStyle "black" beginPath() arc(centerX - 50, centerY, radius, startingAngle, endingAngle, False) stroke() beginPath() strokeStyle "blue" arc(centerX + 50, centerY, radius, startingAngle, endingAngle, True) stroke() wiki $ snapShot context "images/Arc.png" wiki $ close context
622
true
true
0
17
212
243
112
131
null
null
GaloisInc/sk-dev-platform
libs/lviz/GUI.hs
bsd-3-clause
fileChosen :: ResponseId -> MVar St -> IO () fileChosen r mv = do dia <- getFileChooserDialog mv widgetHide dia case r of ResponseUser 1 -> fileChooserGetFilename dia >>= \m -> openFiles (maybeToList m) mv _ -> return ()
234
fileChosen :: ResponseId -> MVar St -> IO () fileChosen r mv = do dia <- getFileChooserDialog mv widgetHide dia case r of ResponseUser 1 -> fileChooserGetFilename dia >>= \m -> openFiles (maybeToList m) mv _ -> return ()
234
fileChosen r mv = do dia <- getFileChooserDialog mv widgetHide dia case r of ResponseUser 1 -> fileChooserGetFilename dia >>= \m -> openFiles (maybeToList m) mv _ -> return ()
189
false
true
0
14
52
98
44
54
null
null
brendanhay/gogol
gogol-bigquerydatatransfer/gen/Network/Google/Resource/BigQueryDataTransfer/Projects/TransferConfigs/Create.hs
mpl-2.0
-- | Multipart request metadata. ptccPayload :: Lens' ProjectsTransferConfigsCreate TransferConfig ptccPayload = lens _ptccPayload (\ s a -> s{_ptccPayload = a})
163
ptccPayload :: Lens' ProjectsTransferConfigsCreate TransferConfig ptccPayload = lens _ptccPayload (\ s a -> s{_ptccPayload = a})
130
ptccPayload = lens _ptccPayload (\ s a -> s{_ptccPayload = a})
64
true
true
0
9
22
42
22
20
null
null
SX91/msgpack-haskell
src/Data/MessagePack/Generic.hs
bsd-3-clause
checkSumFromObject :: (Applicative m, Monad m) => (GSumPack f) => Word64 -> Word64 -> Object -> m (f a) checkSumFromObject size code x | code < size = sumFromObject code size x | otherwise = fail "invalid encoding for sum type"
233
checkSumFromObject :: (Applicative m, Monad m) => (GSumPack f) => Word64 -> Word64 -> Object -> m (f a) checkSumFromObject size code x | code < size = sumFromObject code size x | otherwise = fail "invalid encoding for sum type"
233
checkSumFromObject size code x | code < size = sumFromObject code size x | otherwise = fail "invalid encoding for sum type"
129
false
true
1
12
46
90
44
46
null
null
spechub/Hets
Common/Doc.hs
gpl-2.0
exists = symbol existsS
23
exists = symbol existsS
23
exists = symbol existsS
23
false
false
1
5
3
12
4
8
null
null
ribag/ganeti-experiments
src/Ganeti/Constants.hs
gpl-2.0
esActionSnapshot :: String esActionSnapshot = "snapshot"
56
esActionSnapshot :: String esActionSnapshot = "snapshot"
56
esActionSnapshot = "snapshot"
29
false
true
0
4
5
11
6
5
null
null
hiratara/doukaku-past-questions-advent-2013
src/Doukaku/Nonbiri.hs
bsd-3-clause
sitDown :: Char -> String -> String sitDown new current = either id undefined $ do toEither (sitDown' 0 current sides) toEither (sitDown' 1 current sides) toEither (sitDown' 2 current sides) return () where sides = sideMembers current sitDown' :: Int -> String -> [Int] -> Maybe String sitDown' _ [] [] = Nothing sitDown' n (c:cs) (m:ms) | n == m = Just $ new:cs | otherwise = (c :) `fmap` (sitDown' n cs ms)
446
sitDown :: Char -> String -> String sitDown new current = either id undefined $ do toEither (sitDown' 0 current sides) toEither (sitDown' 1 current sides) toEither (sitDown' 2 current sides) return () where sides = sideMembers current sitDown' :: Int -> String -> [Int] -> Maybe String sitDown' _ [] [] = Nothing sitDown' n (c:cs) (m:ms) | n == m = Just $ new:cs | otherwise = (c :) `fmap` (sitDown' n cs ms)
446
sitDown new current = either id undefined $ do toEither (sitDown' 0 current sides) toEither (sitDown' 1 current sides) toEither (sitDown' 2 current sides) return () where sides = sideMembers current sitDown' :: Int -> String -> [Int] -> Maybe String sitDown' _ [] [] = Nothing sitDown' n (c:cs) (m:ms) | n == m = Just $ new:cs | otherwise = (c :) `fmap` (sitDown' n cs ms)
410
false
true
0
10
113
212
103
109
null
null
frantisekfarka/ghc-dsi
libraries/base/Foreign/C/Error.hs
bsd-3-clause
eMLINK = Errno (CONST_EMLINK)
38
eMLINK = Errno (CONST_EMLINK)
38
eMLINK = Errno (CONST_EMLINK)
38
false
false
0
6
12
12
6
6
null
null
adamschoenemann/simple-frp
src/FRP/TypeInference.hs
mit
-- |Throw a type error, getting the context from the reader monad typeErrM :: (MonadError (TyExcept t) m, MonadReader (Context t) m) => TyErr t -> m a typeErrM err = do ctx <- ask throwError (TyExcept (err, ctx)) -- |Checks if a type variable occurs in a type signature. -- If it does, then unification would never terminate.
340
typeErrM :: (MonadError (TyExcept t) m, MonadReader (Context t) m) => TyErr t -> m a typeErrM err = do ctx <- ask throwError (TyExcept (err, ctx)) -- |Checks if a type variable occurs in a type signature. -- If it does, then unification would never terminate.
274
typeErrM err = do ctx <- ask throwError (TyExcept (err, ctx)) -- |Checks if a type variable occurs in a type signature. -- If it does, then unification would never terminate.
180
true
true
0
11
73
88
43
45
null
null
shlomobauer/BuildIT
src/Treepr.hs
apache-2.0
ptreeb (EBlock a b) = let z = "esxhost " ++ a in do putStrLn "" putStrLn z ptreel 1 b -- pretty print segment block
123
ptreeb (EBlock a b) = let z = "esxhost " ++ a in do putStrLn "" putStrLn z ptreel 1 b -- pretty print segment block
123
ptreeb (EBlock a b) = let z = "esxhost " ++ a in do putStrLn "" putStrLn z ptreel 1 b -- pretty print segment block
123
false
false
0
9
33
54
23
31
null
null
roberth/uu-helium
test/correct/PatBind1.hs
gpl-3.0
ys :: [Int] (y:ys) = [4, 5]
27
ys :: [Int] (y:ys) = [4, 5]
27
(y:ys) = [4, 5]
15
false
true
1
6
6
32
16
16
null
null
batterseapower/core-haskell
Utilities.hs
bsd-3-clause
expectHead :: String -> [a] -> a expectHead s = expectJust s . safeHead
71
expectHead :: String -> [a] -> a expectHead s = expectJust s . safeHead
71
expectHead s = expectJust s . safeHead
38
false
true
0
7
13
32
16
16
null
null
r-raymond/purple-muon
src/Client/Frames.hs
gpl-3.0
-- | Manage the end of a frame. -- Sleeps, times and updates the frame counter manageFps :: (MonadIO m, MonadState CTY.FrameState m) => m () manageFps = do start <- fmap (CLE.view CTY.frameBegin) get dt <- PUF.manageFps minFrameTime start modify (CLE.set CTY.dt (PPT.DeltaTime dt)) modify (CLE.over CTY.fpsCounter (registerFps dt))
348
manageFps :: (MonadIO m, MonadState CTY.FrameState m) => m () manageFps = do start <- fmap (CLE.view CTY.frameBegin) get dt <- PUF.manageFps minFrameTime start modify (CLE.set CTY.dt (PPT.DeltaTime dt)) modify (CLE.over CTY.fpsCounter (registerFps dt))
269
manageFps = do start <- fmap (CLE.view CTY.frameBegin) get dt <- PUF.manageFps minFrameTime start modify (CLE.set CTY.dt (PPT.DeltaTime dt)) modify (CLE.over CTY.fpsCounter (registerFps dt))
207
true
true
0
12
66
123
59
64
null
null
limaner2002/EPC-tools
scheduler-ui/src/Scheduler/Google/ghcjs/DriveUI.hs
bsd-3-clause
browseReq :: DReq -> Maybe (XhrRequest Text) browseReq req | typ == Just Folder || file == Root = Just $ xhrRequest "POST" "browse" cfg | typ == Just Zip = Just $ xhrRequest "POST" "download" cfg | otherwise = Nothing where cfg = (xhrRequestConfig_headers .~ ("Content-type" =: "application/json")) . (xhrRequestConfig_sendData .~ (toStrict . decodeUtf8 $ encode req)) $ def typ = file ^? fType file = req ^. reqFile
448
browseReq :: DReq -> Maybe (XhrRequest Text) browseReq req | typ == Just Folder || file == Root = Just $ xhrRequest "POST" "browse" cfg | typ == Just Zip = Just $ xhrRequest "POST" "download" cfg | otherwise = Nothing where cfg = (xhrRequestConfig_headers .~ ("Content-type" =: "application/json")) . (xhrRequestConfig_sendData .~ (toStrict . decodeUtf8 $ encode req)) $ def typ = file ^? fType file = req ^. reqFile
448
browseReq req | typ == Just Folder || file == Root = Just $ xhrRequest "POST" "browse" cfg | typ == Just Zip = Just $ xhrRequest "POST" "download" cfg | otherwise = Nothing where cfg = (xhrRequestConfig_headers .~ ("Content-type" =: "application/json")) . (xhrRequestConfig_sendData .~ (toStrict . decodeUtf8 $ encode req)) $ def typ = file ^? fType file = req ^. reqFile
403
false
true
14
11
101
187
82
105
null
null
fizruk/lanthanum
src/Lanthanum/API.hs
bsd-3-clause
runTestsFor :: Problem -> SubmitId -> Text -> AppM () runTestsFor Problem{..} submitId code = do cfg <- ask lift $ lift $ runReaderT runTests cfg where timeout_ :: Int -> SubmitStatus -> ReaderT Config IO a -> ReaderT Config IO () timeout_ n timeoutStatus f = do e <- ask res <- lift $ timeout n (runReaderT f e) case res of Nothing -> do status timeoutStatus [] liftIO exitFailure _ -> return () status :: SubmitStatus -> [Update Submit] -> ReaderT Config IO () status s updates = runDb $ update submitId ((SubmitStatus =. s) : updates) stage :: FilePath -> [String] -> SubmitStatus -> SubmitStatus -> ReaderT Config IO () stage cmd args processingStatus failureStatus = do status processingStatus [] (exitStatus, _out, err) <- liftIO $ readProcessWithExitCode cmd args "" case exitStatus of ExitFailure _exitCode -> do status failureStatus [SubmitLog =. Just (Text.pack err)] liftIO exitFailure ExitSuccess -> return () doctestSection :: Text -> Maybe Text -> Text doctestSection _ Nothing = "" doctestSection name (Just content) = Text.unlines $ [ "-- $" <> name ] ++ map ("-- " <>) (Text.lines content) runTests :: ReaderT Config IO () runTests = do withTempFile "/tmp" "solutionXXX.hs" $ \tmpFile hFile -> do -- copy code into a temporary file liftIO $ do Text.hPutStrLn hFile code Text.hPutStrLn hFile $ doctestSection "setup" problemSetup Text.hPutStrLn hFile $ doctestSection "examples" problemExamples Text.hPutStrLn hFile $ doctestSection "tests" problemTests hClose hFile stage "stack" ["ghc", "--", "-c", tmpFile] SubmitCompiling SubmitCompilationError timeout_ (30 * 10^6) SubmitTimeLimitExceeded $ do stage "stack" ["exec", "doctest", tmpFile] SubmitRunningTests SubmitWrongAnswer status SubmitAccepted []
2,006
runTestsFor :: Problem -> SubmitId -> Text -> AppM () runTestsFor Problem{..} submitId code = do cfg <- ask lift $ lift $ runReaderT runTests cfg where timeout_ :: Int -> SubmitStatus -> ReaderT Config IO a -> ReaderT Config IO () timeout_ n timeoutStatus f = do e <- ask res <- lift $ timeout n (runReaderT f e) case res of Nothing -> do status timeoutStatus [] liftIO exitFailure _ -> return () status :: SubmitStatus -> [Update Submit] -> ReaderT Config IO () status s updates = runDb $ update submitId ((SubmitStatus =. s) : updates) stage :: FilePath -> [String] -> SubmitStatus -> SubmitStatus -> ReaderT Config IO () stage cmd args processingStatus failureStatus = do status processingStatus [] (exitStatus, _out, err) <- liftIO $ readProcessWithExitCode cmd args "" case exitStatus of ExitFailure _exitCode -> do status failureStatus [SubmitLog =. Just (Text.pack err)] liftIO exitFailure ExitSuccess -> return () doctestSection :: Text -> Maybe Text -> Text doctestSection _ Nothing = "" doctestSection name (Just content) = Text.unlines $ [ "-- $" <> name ] ++ map ("-- " <>) (Text.lines content) runTests :: ReaderT Config IO () runTests = do withTempFile "/tmp" "solutionXXX.hs" $ \tmpFile hFile -> do -- copy code into a temporary file liftIO $ do Text.hPutStrLn hFile code Text.hPutStrLn hFile $ doctestSection "setup" problemSetup Text.hPutStrLn hFile $ doctestSection "examples" problemExamples Text.hPutStrLn hFile $ doctestSection "tests" problemTests hClose hFile stage "stack" ["ghc", "--", "-c", tmpFile] SubmitCompiling SubmitCompilationError timeout_ (30 * 10^6) SubmitTimeLimitExceeded $ do stage "stack" ["exec", "doctest", tmpFile] SubmitRunningTests SubmitWrongAnswer status SubmitAccepted []
2,006
runTestsFor Problem{..} submitId code = do cfg <- ask lift $ lift $ runReaderT runTests cfg where timeout_ :: Int -> SubmitStatus -> ReaderT Config IO a -> ReaderT Config IO () timeout_ n timeoutStatus f = do e <- ask res <- lift $ timeout n (runReaderT f e) case res of Nothing -> do status timeoutStatus [] liftIO exitFailure _ -> return () status :: SubmitStatus -> [Update Submit] -> ReaderT Config IO () status s updates = runDb $ update submitId ((SubmitStatus =. s) : updates) stage :: FilePath -> [String] -> SubmitStatus -> SubmitStatus -> ReaderT Config IO () stage cmd args processingStatus failureStatus = do status processingStatus [] (exitStatus, _out, err) <- liftIO $ readProcessWithExitCode cmd args "" case exitStatus of ExitFailure _exitCode -> do status failureStatus [SubmitLog =. Just (Text.pack err)] liftIO exitFailure ExitSuccess -> return () doctestSection :: Text -> Maybe Text -> Text doctestSection _ Nothing = "" doctestSection name (Just content) = Text.unlines $ [ "-- $" <> name ] ++ map ("-- " <>) (Text.lines content) runTests :: ReaderT Config IO () runTests = do withTempFile "/tmp" "solutionXXX.hs" $ \tmpFile hFile -> do -- copy code into a temporary file liftIO $ do Text.hPutStrLn hFile code Text.hPutStrLn hFile $ doctestSection "setup" problemSetup Text.hPutStrLn hFile $ doctestSection "examples" problemExamples Text.hPutStrLn hFile $ doctestSection "tests" problemTests hClose hFile stage "stack" ["ghc", "--", "-c", tmpFile] SubmitCompiling SubmitCompilationError timeout_ (30 * 10^6) SubmitTimeLimitExceeded $ do stage "stack" ["exec", "doctest", tmpFile] SubmitRunningTests SubmitWrongAnswer status SubmitAccepted []
1,952
false
true
34
14
547
617
311
306
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionTargetHTTPSProxies/List.hs
mpl-2.0
-- | Name of the region scoping this request. rthplRegion :: Lens' RegionTargetHTTPSProxiesList Text rthplRegion = lens _rthplRegion (\ s a -> s{_rthplRegion = a})
165
rthplRegion :: Lens' RegionTargetHTTPSProxiesList Text rthplRegion = lens _rthplRegion (\ s a -> s{_rthplRegion = a})
119
rthplRegion = lens _rthplRegion (\ s a -> s{_rthplRegion = a})
64
true
true
1
9
26
46
22
24
null
null
tonyday567/chart-svg
src/Chart/Hud.hs
bsd-3-clause
legendText :: LegendOptions -> Text -> Chart legendText l t = TextChart (l ^. #textStyle & #anchor .~ AnchorStart) [(t, zero)]
134
legendText :: LegendOptions -> Text -> Chart legendText l t = TextChart (l ^. #textStyle & #anchor .~ AnchorStart) [(t, zero)]
134
legendText l t = TextChart (l ^. #textStyle & #anchor .~ AnchorStart) [(t, zero)]
83
false
true
0
9
28
53
28
25
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/TysWiredIn.hs
bsd-3-clause
-- This function assumes that the types it creates have all parameters at -- Representational role! pcTyCon :: Bool -> RecFlag -> Bool -> Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon pcTyCon is_enum is_rec is_prom name cType tyvars cons = buildAlgTyCon name tyvars (map (const Representational) tyvars) cType [] -- No stupid theta (DataTyCon cons is_enum) is_rec is_prom False -- Not in GADT syntax NoParentTyCon
517
pcTyCon :: Bool -> RecFlag -> Bool -> Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon pcTyCon is_enum is_rec is_prom name cType tyvars cons = buildAlgTyCon name tyvars (map (const Representational) tyvars) cType [] -- No stupid theta (DataTyCon cons is_enum) is_rec is_prom False -- Not in GADT syntax NoParentTyCon
417
pcTyCon is_enum is_rec is_prom name cType tyvars cons = buildAlgTyCon name tyvars (map (const Representational) tyvars) cType [] -- No stupid theta (DataTyCon cons is_enum) is_rec is_prom False -- Not in GADT syntax NoParentTyCon
326
true
true
0
12
164
112
58
54
null
null
jgoerzen/missingpy
testsrc/AnyDBMtest.hs
gpl-2.0
generic_test initfunc openfunc = let f = mf initfunc openfunc in [ createdir ,f "empty" $ \h -> do [] @>=? keysA h [] @>=? valuesA h [] @>=? toListA h Nothing @>=? lookupA h "foo" ,f "basic" $ \h -> do insertA h "key" "value" (Just "value") @>=? lookupA h "key" [("key", "value")] @>=? toListA h insertA h "key" "v2" [("key", "v2")] @>=? toListA h deleteA h "key" [] @>=? toListA h ,f "mult" $ \h -> do insertListA h [("1", "2"), ("3", "4"), ("5", "6")] [("1", "2"), ("3", "4"), ("5", "6")] @>=? (toListA h >>= return . sort) ["1", "3", "5"] @>=? (keysA h >>= return . sort) ["2", "4", "6"] @>=? (valuesA h >>= return . sort) deleteall h ,f "weirdchars" $ \h -> do insertListA h weirdl weirdl @>=? (toListA h >>= return . sort) deleteall h ,removedir ]
1,332
generic_test initfunc openfunc = let f = mf initfunc openfunc in [ createdir ,f "empty" $ \h -> do [] @>=? keysA h [] @>=? valuesA h [] @>=? toListA h Nothing @>=? lookupA h "foo" ,f "basic" $ \h -> do insertA h "key" "value" (Just "value") @>=? lookupA h "key" [("key", "value")] @>=? toListA h insertA h "key" "v2" [("key", "v2")] @>=? toListA h deleteA h "key" [] @>=? toListA h ,f "mult" $ \h -> do insertListA h [("1", "2"), ("3", "4"), ("5", "6")] [("1", "2"), ("3", "4"), ("5", "6")] @>=? (toListA h >>= return . sort) ["1", "3", "5"] @>=? (keysA h >>= return . sort) ["2", "4", "6"] @>=? (valuesA h >>= return . sort) deleteall h ,f "weirdchars" $ \h -> do insertListA h weirdl weirdl @>=? (toListA h >>= return . sort) deleteall h ,removedir ]
1,332
generic_test initfunc openfunc = let f = mf initfunc openfunc in [ createdir ,f "empty" $ \h -> do [] @>=? keysA h [] @>=? valuesA h [] @>=? toListA h Nothing @>=? lookupA h "foo" ,f "basic" $ \h -> do insertA h "key" "value" (Just "value") @>=? lookupA h "key" [("key", "value")] @>=? toListA h insertA h "key" "v2" [("key", "v2")] @>=? toListA h deleteA h "key" [] @>=? toListA h ,f "mult" $ \h -> do insertListA h [("1", "2"), ("3", "4"), ("5", "6")] [("1", "2"), ("3", "4"), ("5", "6")] @>=? (toListA h >>= return . sort) ["1", "3", "5"] @>=? (keysA h >>= return . sort) ["2", "4", "6"] @>=? (valuesA h >>= return . sort) deleteall h ,f "weirdchars" $ \h -> do insertListA h weirdl weirdl @>=? (toListA h >>= return . sort) deleteall h ,removedir ]
1,332
false
false
0
16
722
421
210
211
null
null
haasn/colour
Data/Colour/Names.hs
mit
readColourName "beige" = return beige
37
readColourName "beige" = return beige
37
readColourName "beige" = return beige
37
false
false
1
5
4
15
5
10
null
null
Teaspot-Studio/gore-and-ash-sync
src/Game/GoreAndAsh/Sync/Collection/Message.hs
bsd-3-clause
sendComponentCreateMsg :: (LoggingMonad t m, NetworkMonad t b m, Store k, Store v) => Peer b -- ^ Client which we are sending -> ChannelId -- ^ ID of channel to use -> SyncId -- ^ Sync scope dynamic id -> SyncItemId -- ^ Sync item static id -> Event t (k, v) -- ^ Key and creation value of component -> m (Event t ()) -- ^ Event that message is sent sendComponentCreateMsg peer chan i itemId ekv = peerChanSend peer chan $ (ReliableMessage,) . uncurry (encodeComponentCreateMsg i itemId) <$> ekv
509
sendComponentCreateMsg :: (LoggingMonad t m, NetworkMonad t b m, Store k, Store v) => Peer b -- ^ Client which we are sending -> ChannelId -- ^ ID of channel to use -> SyncId -- ^ Sync scope dynamic id -> SyncItemId -- ^ Sync item static id -> Event t (k, v) -- ^ Key and creation value of component -> m (Event t ()) sendComponentCreateMsg peer chan i itemId ekv = peerChanSend peer chan $ (ReliableMessage,) . uncurry (encodeComponentCreateMsg i itemId) <$> ekv
477
sendComponentCreateMsg peer chan i itemId ekv = peerChanSend peer chan $ (ReliableMessage,) . uncurry (encodeComponentCreateMsg i itemId) <$> ekv
147
true
true
0
15
105
141
73
68
null
null
schell/bindings-objc
src/Bindings/Objc/TH.hs
mit
mkMsgSend :: String -> [Name] -> Q [Dec] mkMsgSend s ts = do let cf = "static objc/objc.h objc_msgSend" n = mkName s io = appT (conT ''IO) (conT ''CId) ts' = map conT $ ''CId : ''CSEL : ts ty <- foldr appapparrow io ts' return [ForeignD $ ImportF CCall Safe cf n ty]
306
mkMsgSend :: String -> [Name] -> Q [Dec] mkMsgSend s ts = do let cf = "static objc/objc.h objc_msgSend" n = mkName s io = appT (conT ''IO) (conT ''CId) ts' = map conT $ ''CId : ''CSEL : ts ty <- foldr appapparrow io ts' return [ForeignD $ ImportF CCall Safe cf n ty]
306
mkMsgSend s ts = do let cf = "static objc/objc.h objc_msgSend" n = mkName s io = appT (conT ''IO) (conT ''CId) ts' = map conT $ ''CId : ''CSEL : ts ty <- foldr appapparrow io ts' return [ForeignD $ ImportF CCall Safe cf n ty]
265
false
true
0
13
94
138
67
71
null
null
codemac/yi-editor
src/Yi/Syntax/Haskell.hs
gpl-2.0
-- | Parse an operator using please pQvarsym :: Parser TT (Exp TT) pQvarsym = pParen ((:) <$> please (PAtom <$> sym isOperator <*> pComments) <*> pEmpty)
172
pQvarsym :: Parser TT (Exp TT) pQvarsym = pParen ((:) <$> please (PAtom <$> sym isOperator <*> pComments) <*> pEmpty)
136
pQvarsym = pParen ((:) <$> please (PAtom <$> sym isOperator <*> pComments) <*> pEmpty)
105
true
true
2
13
45
64
29
35
null
null
itchyny/mackerel-client-hs
src/Web/Mackerel/Config.hs
mit
loadClient :: IO (Either String Client) loadClient = fmap (\c -> def { apiKey = fromMaybe (apiKey def) $ configApiKey c, apiBase = fromMaybe (apiBase def) $ configApiBase c }) <$> loadConfig
221
loadClient :: IO (Either String Client) loadClient = fmap (\c -> def { apiKey = fromMaybe (apiKey def) $ configApiKey c, apiBase = fromMaybe (apiBase def) $ configApiBase c }) <$> loadConfig
221
loadClient = fmap (\c -> def { apiKey = fromMaybe (apiKey def) $ configApiKey c, apiBase = fromMaybe (apiBase def) $ configApiBase c }) <$> loadConfig
181
false
true
0
14
62
83
42
41
null
null
ExNexu/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
declared (PTy _ _ _ _ _ n fc t) = [n]
37
declared (PTy _ _ _ _ _ n fc t) = [n]
37
declared (PTy _ _ _ _ _ n fc t) = [n]
37
false
false
0
6
11
33
16
17
null
null
solorab/proof-haskell
Language/Haskell/TH/Simple/Type.hs
mit
tvars (ForallT x) = tvars x
27
tvars (ForallT x) = tvars x
27
tvars (ForallT x) = tvars x
27
false
false
0
7
5
18
8
10
null
null
phischu/fragnix
tests/packages/scotty/Data.ByteString.Lazy.Char8.hs
bsd-3-clause
-- | The 'mapAccumR' function behaves like a combination of 'map' and -- 'foldr'; it applies a function to each element of a ByteString, -- passing an accumulating parameter from right to left, and returning a -- final value of this accumulator together with the new ByteString. mapAccumR :: (acc -> Char -> (acc, Char)) -> acc -> ByteString -> (acc, ByteString) mapAccumR f = L.mapAccumR (\acc w -> case f acc (w2c w) of (acc', c) -> (acc', c2w c))
449
mapAccumR :: (acc -> Char -> (acc, Char)) -> acc -> ByteString -> (acc, ByteString) mapAccumR f = L.mapAccumR (\acc w -> case f acc (w2c w) of (acc', c) -> (acc', c2w c))
170
mapAccumR f = L.mapAccumR (\acc w -> case f acc (w2c w) of (acc', c) -> (acc', c2w c))
86
true
true
0
12
80
104
58
46
null
null
gtk2hs/gconf
demo/GConfDemo.hs
lgpl-2.1
showGConfValue_Type (GConfValueInt n) = "Int"
45
showGConfValue_Type (GConfValueInt n) = "Int"
45
showGConfValue_Type (GConfValueInt n) = "Int"
45
false
false
0
7
4
15
7
8
null
null
hengchu/tiger-haskell
src/tigersemant.hs
mit
undefinedError :: TLex.AlexPosn -> String -> SemantError undefinedError pos str = SE pos $ Undefined str
104
undefinedError :: TLex.AlexPosn -> String -> SemantError undefinedError pos str = SE pos $ Undefined str
104
undefinedError pos str = SE pos $ Undefined str
47
false
true
0
6
15
36
17
19
null
null
andrew-christianson/Polyglot-Euler
Problem 23.hs
mit
intsToRoot n = takeWhile (<= flrt2 n) [1..]
44
intsToRoot n = takeWhile (<= flrt2 n) [1..]
44
intsToRoot n = takeWhile (<= flrt2 n) [1..]
44
false
false
1
7
8
27
12
15
null
null
triplepointfive/hogldev
tutorial26/LightingTechnique.hs
mit
pointLightLoc :: Program -> Int -> IO PointLightLoc pointLightLoc program index = do lColor <- loc "Base.Color" lAmbientIntensity <- loc "Base.AmbientIntensity" lPosition <- loc "Position" lDiffuseIntensity <- loc "Base.DiffuseIntensity" lConstant <- loc "Atten.Constant" lLinear <- loc "Atten.Linear" lExp <- loc "Atten.Exp" return PointLightLoc { plColorLoc = lColor , plAmbientIntensityLoc = lAmbientIntensity , plDiffuseIntensityLoc = lDiffuseIntensity , plPositionLoc = lPosition , plConstantLoc = lConstant , plLinearLoc = lLinear , plExpLoc = lExp } where loc field = getUniformLocation program ("gPointLights[" ++ show index ++ "]." ++ field)
860
pointLightLoc :: Program -> Int -> IO PointLightLoc pointLightLoc program index = do lColor <- loc "Base.Color" lAmbientIntensity <- loc "Base.AmbientIntensity" lPosition <- loc "Position" lDiffuseIntensity <- loc "Base.DiffuseIntensity" lConstant <- loc "Atten.Constant" lLinear <- loc "Atten.Linear" lExp <- loc "Atten.Exp" return PointLightLoc { plColorLoc = lColor , plAmbientIntensityLoc = lAmbientIntensity , plDiffuseIntensityLoc = lDiffuseIntensity , plPositionLoc = lPosition , plConstantLoc = lConstant , plLinearLoc = lLinear , plExpLoc = lExp } where loc field = getUniformLocation program ("gPointLights[" ++ show index ++ "]." ++ field)
860
pointLightLoc program index = do lColor <- loc "Base.Color" lAmbientIntensity <- loc "Base.AmbientIntensity" lPosition <- loc "Position" lDiffuseIntensity <- loc "Base.DiffuseIntensity" lConstant <- loc "Atten.Constant" lLinear <- loc "Atten.Linear" lExp <- loc "Atten.Exp" return PointLightLoc { plColorLoc = lColor , plAmbientIntensityLoc = lAmbientIntensity , plDiffuseIntensityLoc = lDiffuseIntensity , plPositionLoc = lPosition , plConstantLoc = lConstant , plLinearLoc = lLinear , plExpLoc = lExp } where loc field = getUniformLocation program ("gPointLights[" ++ show index ++ "]." ++ field)
808
false
true
1
10
295
190
89
101
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DeleteVPNConnection.hs
mpl-2.0
-- | The ID of the VPN connection. dvcVPNConnectionId :: Lens' DeleteVPNConnection Text dvcVPNConnectionId = lens _dvcVPNConnectionId (\ s a -> s{_dvcVPNConnectionId = a})
171
dvcVPNConnectionId :: Lens' DeleteVPNConnection Text dvcVPNConnectionId = lens _dvcVPNConnectionId (\ s a -> s{_dvcVPNConnectionId = a})
136
dvcVPNConnectionId = lens _dvcVPNConnectionId (\ s a -> s{_dvcVPNConnectionId = a})
83
true
true
0
9
23
40
22
18
null
null
thalerjonathan/phd
public/towards/SugarScape/experimental/chapter2_environment/src/test/StatsUtils.hs
gpl-3.0
avgTest :: [Double] -> Double -> Double -> Bool avgTest ys mu0 eps = abs (mu - mu0) <= eps where mu = StatsUtils.mean ys -- Performs a 2-sided t-test evaluating the null hypothesis that the mean of the population from which sample is drawn equals mu. -- The functions returns 'Just True' in case the means are statistically equal and 'Just False' if they are not -- In case no t-value could be calculated (in case all samples are same => no variance) Nothing is returned -- -- To test the 2-sided hypothesis sample mean = mu at the 95% level, use 'tTest "testId" samples mu 0.05' -- -- sources: -- http://www.statisticssolutions.com/manova-analysis-one-sample-t-test/ -- http://home.apache.org/~luc/commons-math-3.6-RC2-site/jacoco/org.apache.commons.math3.stat.inference/TTest.java.html -- https://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/inference/TTest.html
947
avgTest :: [Double] -> Double -> Double -> Bool avgTest ys mu0 eps = abs (mu - mu0) <= eps where mu = StatsUtils.mean ys -- Performs a 2-sided t-test evaluating the null hypothesis that the mean of the population from which sample is drawn equals mu. -- The functions returns 'Just True' in case the means are statistically equal and 'Just False' if they are not -- In case no t-value could be calculated (in case all samples are same => no variance) Nothing is returned -- -- To test the 2-sided hypothesis sample mean = mu at the 95% level, use 'tTest "testId" samples mu 0.05' -- -- sources: -- http://www.statisticssolutions.com/manova-analysis-one-sample-t-test/ -- http://home.apache.org/~luc/commons-math-3.6-RC2-site/jacoco/org.apache.commons.math3.stat.inference/TTest.java.html -- https://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/inference/TTest.html
947
avgTest ys mu0 eps = abs (mu - mu0) <= eps where mu = StatsUtils.mean ys -- Performs a 2-sided t-test evaluating the null hypothesis that the mean of the population from which sample is drawn equals mu. -- The functions returns 'Just True' in case the means are statistically equal and 'Just False' if they are not -- In case no t-value could be calculated (in case all samples are same => no variance) Nothing is returned -- -- To test the 2-sided hypothesis sample mean = mu at the 95% level, use 'tTest "testId" samples mu 0.05' -- -- sources: -- http://www.statisticssolutions.com/manova-analysis-one-sample-t-test/ -- http://home.apache.org/~luc/commons-math-3.6-RC2-site/jacoco/org.apache.commons.math3.stat.inference/TTest.java.html -- https://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/inference/TTest.html
875
false
true
3
9
158
81
42
39
null
null
deviant-logic/bytes
src/Data/Bytes/Serial.hs
bsd-3-clause
serialize2 :: (MonadPut m, Serial2 f, Serial a, Serial b) => f a b -> m () serialize2 = serializeWith2 serialize serialize
122
serialize2 :: (MonadPut m, Serial2 f, Serial a, Serial b) => f a b -> m () serialize2 = serializeWith2 serialize serialize
122
serialize2 = serializeWith2 serialize serialize
47
false
true
0
8
21
57
28
29
null
null
Tener/deeplearning-thesis
src/experiment-cli.hs
bsd-3-clause
ggExp6 = Experiment "main" [("won games", "tail -n 1000000 -f g6.txt | grep --color=always \"won \"") ,("scores", "tail -n 1000000 -f g6.txt | grep --color=always SCORE") ,("wins", "tail -n 1000000 -f g6.txt | grep --color=always WINS") ,("multi", "tail -n 1000000 -f g6.txt | grep --color=always multiNeuron") ,("killall", "zsh") ,("console", "zsh") ] [";", "send-keys", "-t", "killall", ": killall -USR1 gg-exp6\n", ";", "send-keys", "-t", "main", "zsh\nwhile (true) { make && make run-g6 }\n"] "GG-EXP6"
730
ggExp6 = Experiment "main" [("won games", "tail -n 1000000 -f g6.txt | grep --color=always \"won \"") ,("scores", "tail -n 1000000 -f g6.txt | grep --color=always SCORE") ,("wins", "tail -n 1000000 -f g6.txt | grep --color=always WINS") ,("multi", "tail -n 1000000 -f g6.txt | grep --color=always multiNeuron") ,("killall", "zsh") ,("console", "zsh") ] [";", "send-keys", "-t", "killall", ": killall -USR1 gg-exp6\n", ";", "send-keys", "-t", "main", "zsh\nwhile (true) { make && make run-g6 }\n"] "GG-EXP6"
730
ggExp6 = Experiment "main" [("won games", "tail -n 1000000 -f g6.txt | grep --color=always \"won \"") ,("scores", "tail -n 1000000 -f g6.txt | grep --color=always SCORE") ,("wins", "tail -n 1000000 -f g6.txt | grep --color=always WINS") ,("multi", "tail -n 1000000 -f g6.txt | grep --color=always multiNeuron") ,("killall", "zsh") ,("console", "zsh") ] [";", "send-keys", "-t", "killall", ": killall -USR1 gg-exp6\n", ";", "send-keys", "-t", "main", "zsh\nwhile (true) { make && make run-g6 }\n"] "GG-EXP6"
730
false
false
0
7
295
99
63
36
null
null
kawu/data-named
src/Data/Named/IOB.hs
bsd-2-clause
popMaybe (IOB _ []) = Nothing
33
popMaybe (IOB _ []) = Nothing
33
popMaybe (IOB _ []) = Nothing
33
false
false
0
7
9
20
9
11
null
null
anchor/rados-haskell
src/System/Rados/Base.hs
bsd-3-clause
-- Calls rados_aio_get_return_value, return value will be positive, and may or -- may not be useful. -- -- <http://ceph.com/docs/master/rados/api/librados/#rados_aio_get_return_value> getAsyncError :: Completion -> IO (Either RadosError Int) getAsyncError (Completion rados_completion_t_fp) = checkError' "rados_aio_get_return_value" $ withForeignPtr rados_completion_t_fp F.c_rados_aio_get_return_value
427
getAsyncError :: Completion -> IO (Either RadosError Int) getAsyncError (Completion rados_completion_t_fp) = checkError' "rados_aio_get_return_value" $ withForeignPtr rados_completion_t_fp F.c_rados_aio_get_return_value
243
getAsyncError (Completion rados_completion_t_fp) = checkError' "rados_aio_get_return_value" $ withForeignPtr rados_completion_t_fp F.c_rados_aio_get_return_value
185
true
true
0
8
60
53
27
26
null
null
kim/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/Waiters.hs
mpl-2.0
cacheClusterAvailable :: Wait DescribeCacheClusters cacheClusterAvailable = Wait { _waitName = "CacheClusterAvailable" , _waitAttempts = 60 , _waitDelay = 30 , _waitAcceptors = [ matchAll "available" AcceptSuccess (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "deleted" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "deleting" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "incompatible-network" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "restore-failed" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) ] }
866
cacheClusterAvailable :: Wait DescribeCacheClusters cacheClusterAvailable = Wait { _waitName = "CacheClusterAvailable" , _waitAttempts = 60 , _waitDelay = 30 , _waitAcceptors = [ matchAll "available" AcceptSuccess (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "deleted" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "deleting" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "incompatible-network" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "restore-failed" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) ] }
866
cacheClusterAvailable = Wait { _waitName = "CacheClusterAvailable" , _waitAttempts = 60 , _waitDelay = 30 , _waitAcceptors = [ matchAll "available" AcceptSuccess (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "deleted" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "deleting" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "incompatible-network" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) , matchAny "restore-failed" AcceptFailure (folding (concatOf dccrCacheClusters) . ccCacheClusterStatus . _Just) ] }
814
false
true
0
15
216
194
100
94
null
null
Teaspot-Studio/inline-c
src/Language/C/Inline/Context.hs
mit
fptrCtx :: Context fptrCtx = mempty { ctxAntiQuoters = Map.fromList [("fptr-ptr", SomeAntiQuoter fptrAntiQuoter)] }
119
fptrCtx :: Context fptrCtx = mempty { ctxAntiQuoters = Map.fromList [("fptr-ptr", SomeAntiQuoter fptrAntiQuoter)] }
119
fptrCtx = mempty { ctxAntiQuoters = Map.fromList [("fptr-ptr", SomeAntiQuoter fptrAntiQuoter)] }
100
false
true
0
11
17
46
22
24
null
null
jb55/hearthstone-cards
src/Hearthstone/CardType.hs
mit
toCardType _ = Nothing
22
toCardType _ = Nothing
22
toCardType _ = Nothing
22
false
false
0
5
3
9
4
5
null
null
dmalikov/highlighting-colors
src/Text/Highlighting/Color/Content.hs
mit
set_fgColor Nothing c = c
25
set_fgColor Nothing c = c
25
set_fgColor Nothing c = c
25
false
false
0
5
4
11
5
6
null
null
tjakway/ghcjvm
includes/CodeGen.Platform.hs
bsd-3-clause
globalRegMaybe (DoubleReg 1) = # if MACHREGS_sparc Just (RealRegPair REG_D1 (REG_D1 + 1)) # else Just (RealRegSingle REG_D1)
221
globalRegMaybe (DoubleReg 1) = # if MACHREGS_sparc Just (RealRegPair REG_D1 (REG_D1 + 1)) # else Just (RealRegSingle REG_D1)
221
globalRegMaybe (DoubleReg 1) = # if MACHREGS_sparc Just (RealRegPair REG_D1 (REG_D1 + 1)) # else Just (RealRegSingle REG_D1)
221
false
false
0
9
114
45
23
22
null
null
juodaspaulius/clafer
src/Language/Clafer/Intermediate/Desugarer.hs
mit
desugarElement :: Element -> [IElement] desugarElement x = case x of Subclafer _ claf -> (desugarClafer claf) ClaferUse s name crd es -> desugarClafer $ Clafer s (AbstractEmpty s) (GCardEmpty s) (mkIdent $ _sident $ desugarName name) (SuperSome s (ClaferId s name)) (ReferenceEmpty s) crd (InitEmpty s) es Subconstraint _ constraint -> [IEConstraint True $ desugarConstraint constraint] SubAssertion _ assertion -> [IEConstraint False $ desugarAssertion assertion] Subgoal _ goal -> [desugarGoal goal]
538
desugarElement :: Element -> [IElement] desugarElement x = case x of Subclafer _ claf -> (desugarClafer claf) ClaferUse s name crd es -> desugarClafer $ Clafer s (AbstractEmpty s) (GCardEmpty s) (mkIdent $ _sident $ desugarName name) (SuperSome s (ClaferId s name)) (ReferenceEmpty s) crd (InitEmpty s) es Subconstraint _ constraint -> [IEConstraint True $ desugarConstraint constraint] SubAssertion _ assertion -> [IEConstraint False $ desugarAssertion assertion] Subgoal _ goal -> [desugarGoal goal]
538
desugarElement x = case x of Subclafer _ claf -> (desugarClafer claf) ClaferUse s name crd es -> desugarClafer $ Clafer s (AbstractEmpty s) (GCardEmpty s) (mkIdent $ _sident $ desugarName name) (SuperSome s (ClaferId s name)) (ReferenceEmpty s) crd (InitEmpty s) es Subconstraint _ constraint -> [IEConstraint True $ desugarConstraint constraint] SubAssertion _ assertion -> [IEConstraint False $ desugarAssertion assertion] Subgoal _ goal -> [desugarGoal goal]
498
false
true
0
13
108
205
97
108
null
null
leepike/copilot-language
src/Copilot/Language/Operators/Boolean.hs
bsd-3-clause
xor :: Stream Bool -> Stream Bool -> Stream Bool xor x y = ( not x && y ) || ( x && not y )
91
xor :: Stream Bool -> Stream Bool -> Stream Bool xor x y = ( not x && y ) || ( x && not y )
91
xor x y = ( not x && y ) || ( x && not y )
42
false
true
0
9
26
62
28
34
null
null
osa1/chsc
Evaluator/Syntax.hs
bsd-3-clause
renameAnnedValue' = renameTaggedSizedFVedValue'
47
renameAnnedValue' = renameTaggedSizedFVedValue'
47
renameAnnedValue' = renameTaggedSizedFVedValue'
47
false
false
0
4
2
6
3
3
null
null
alexander-at-github/eta
compiler/ETA/Interactive/ByteCodeInstr.hs
bsd-3-clause
bciStackUse PUSH_L{} = 1
37
bciStackUse PUSH_L{} = 1
37
bciStackUse PUSH_L{} = 1
37
false
false
1
5
16
16
6
10
null
null
ekmett/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
78
pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
78
pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
78
false
false
0
7
12
40
19
21
null
null
BartMassey/ssv
Text/SSV.hs
mit
throwRE :: SSVFormat -> (Int, Int) -> String -> a throwRE fmt pos msg = throw $ SSVReadException (ssvFormatName fmt) pos msg
126
throwRE :: SSVFormat -> (Int, Int) -> String -> a throwRE fmt pos msg = throw $ SSVReadException (ssvFormatName fmt) pos msg
126
throwRE fmt pos msg = throw $ SSVReadException (ssvFormatName fmt) pos msg
76
false
true
0
8
23
53
27
26
null
null
Davorak/mdistribute
src/Control/Monad/Distribute.hs
bsd-3-clause
ts = go where go = do s <- S.get lift (yield s) go
80
ts = go where go = do s <- S.get lift (yield s) go
80
ts = go where go = do s <- S.get lift (yield s) go
80
false
false
2
9
43
45
17
28
null
null
dblia/nosql-ganeti
src/Ganeti/Query/Query.hs
gpl-2.0
query cfg live qry = queryInner cfg live qry $ getRequestedNames qry
68
query cfg live qry = queryInner cfg live qry $ getRequestedNames qry
68
query cfg live qry = queryInner cfg live qry $ getRequestedNames qry
68
false
false
0
6
11
28
12
16
null
null
etrepat/learn-you-a-haskell-exercises
06-higher-order-functions.hs
gpl-3.0
-- Sum the squares between two numbers. This function should be similar to the sumInts function sumSquares :: Int -> Int -> Int sumSquares a b = foldl (\acc n -> acc + sq n) 0 [a..b]
182
sumSquares :: Int -> Int -> Int sumSquares a b = foldl (\acc n -> acc + sq n) 0 [a..b]
86
sumSquares a b = foldl (\acc n -> acc + sq n) 0 [a..b]
54
true
true
0
9
36
54
28
26
null
null
Chuck-Aguilar/haskell-opencv-work
src/Utils.hs
bsd-3-clause
polygonArea :: [(Int32, Int32)] -> Int32 polygonArea (firstPoint : polygon) = polygonArea' polygon firstPoint firstPoint 0 where polygonArea' :: [(Int32, Int32)] -> (Int32, Int32) -> (Int32, Int32) -> Int32 -> Int32 polygonArea' [] (x, y) (x1, y1) acc = (acc + (x1 * y - y1 * x)) polygonArea' ((crrntX, crrntY) : polygon) firstPoint (prevX, prevY) acc = polygonArea' polygon firstPoint (crrntX, crrntY) (acc + ((prevX * crrntY - prevY * crrntX)))
474
polygonArea :: [(Int32, Int32)] -> Int32 polygonArea (firstPoint : polygon) = polygonArea' polygon firstPoint firstPoint 0 where polygonArea' :: [(Int32, Int32)] -> (Int32, Int32) -> (Int32, Int32) -> Int32 -> Int32 polygonArea' [] (x, y) (x1, y1) acc = (acc + (x1 * y - y1 * x)) polygonArea' ((crrntX, crrntY) : polygon) firstPoint (prevX, prevY) acc = polygonArea' polygon firstPoint (crrntX, crrntY) (acc + ((prevX * crrntY - prevY * crrntX)))
474
polygonArea (firstPoint : polygon) = polygonArea' polygon firstPoint firstPoint 0 where polygonArea' :: [(Int32, Int32)] -> (Int32, Int32) -> (Int32, Int32) -> Int32 -> Int32 polygonArea' [] (x, y) (x1, y1) acc = (acc + (x1 * y - y1 * x)) polygonArea' ((crrntX, crrntY) : polygon) firstPoint (prevX, prevY) acc = polygonArea' polygon firstPoint (crrntX, crrntY) (acc + ((prevX * crrntY - prevY * crrntX)))
433
false
true
0
14
99
210
118
92
null
null
christiaanb/cabal
Cabal/Distribution/Simple/PackageIndex.hs
bsd-3-clause
deleteSourcePackageId :: PackageInstalled a => PackageId -> PackageIndex a -> PackageIndex a deleteSourcePackageId pkgid original@(PackageIndex pids pnames) = case Map.lookup (packageName pkgid) pnames of Nothing -> original Just pvers -> case Map.lookup (packageVersion pkgid) pvers of Nothing -> original Just pkgs -> mkPackageIndex (foldl' (flip (Map.delete . installedPackageId)) pids pkgs) (deletePkgName pnames) where deletePkgName = Map.update deletePkgVersion (packageName pkgid) deletePkgVersion = (\m -> if Map.null m then Nothing else Just m) . Map.delete (packageVersion pkgid) -- | Removes all packages with this (case-sensitive) name from the index. --
770
deleteSourcePackageId :: PackageInstalled a => PackageId -> PackageIndex a -> PackageIndex a deleteSourcePackageId pkgid original@(PackageIndex pids pnames) = case Map.lookup (packageName pkgid) pnames of Nothing -> original Just pvers -> case Map.lookup (packageVersion pkgid) pvers of Nothing -> original Just pkgs -> mkPackageIndex (foldl' (flip (Map.delete . installedPackageId)) pids pkgs) (deletePkgName pnames) where deletePkgName = Map.update deletePkgVersion (packageName pkgid) deletePkgVersion = (\m -> if Map.null m then Nothing else Just m) . Map.delete (packageVersion pkgid) -- | Removes all packages with this (case-sensitive) name from the index. --
770
deleteSourcePackageId pkgid original@(PackageIndex pids pnames) = case Map.lookup (packageName pkgid) pnames of Nothing -> original Just pvers -> case Map.lookup (packageVersion pkgid) pvers of Nothing -> original Just pkgs -> mkPackageIndex (foldl' (flip (Map.delete . installedPackageId)) pids pkgs) (deletePkgName pnames) where deletePkgName = Map.update deletePkgVersion (packageName pkgid) deletePkgVersion = (\m -> if Map.null m then Nothing else Just m) . Map.delete (packageVersion pkgid) -- | Removes all packages with this (case-sensitive) name from the index. --
677
false
true
1
18
191
216
106
110
null
null