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
akhileshs/stack
src/Stack/Upload.hs
bsd-3-clause
-- | Save the given credentials to the credentials file. -- -- Since 0.1.0.0 saveCreds :: Config -> HackageCreds -> IO () saveCreds config creds = do fp <- credsFile config L.writeFile fp $ encode creds -- | Load the Hackage credentials from the prompt, asking the user to type them -- in. -- -- Since 0.1.0.0
318
saveCreds :: Config -> HackageCreds -> IO () saveCreds config creds = do fp <- credsFile config L.writeFile fp $ encode creds -- | Load the Hackage credentials from the prompt, asking the user to type them -- in. -- -- Since 0.1.0.0
241
saveCreds config creds = do fp <- credsFile config L.writeFile fp $ encode creds -- | Load the Hackage credentials from the prompt, asking the user to type them -- in. -- -- Since 0.1.0.0
196
true
true
0
10
65
66
32
34
null
null
davesque/nagari
Nagari.hs
mit
takeOneIf' :: (Char -> Bool) -> Parser Char takeOneIf' p = do x <- char if p x then return x else fail "" -- | Builds a parser which will apply itself to a string the given number of -- times.
201
takeOneIf' :: (Char -> Bool) -> Parser Char takeOneIf' p = do x <- char if p x then return x else fail "" -- | Builds a parser which will apply itself to a string the given number of -- times.
201
takeOneIf' p = do x <- char if p x then return x else fail "" -- | Builds a parser which will apply itself to a string the given number of -- times.
157
false
true
0
9
50
62
29
33
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_QUERY_WAIT :: GLenum gl_QUERY_WAIT = 0x8E13
46
gl_QUERY_WAIT :: GLenum gl_QUERY_WAIT = 0x8E13
46
gl_QUERY_WAIT = 0x8E13
22
false
true
0
4
5
11
6
5
null
null
MaxDaten/yage
src/Yage/Rendering/Pipeline/Deferred/LightPass.hs
mit
mkGBufferSampler :: YageResource Sampler mkGBufferSampler = throwWithStack $ do sampler <- glResource samplerParameteri sampler GL_TEXTURE_WRAP_S $= GL_CLAMP_TO_EDGE samplerParameteri sampler GL_TEXTURE_WRAP_T $= GL_CLAMP_TO_EDGE samplerParameteri sampler GL_TEXTURE_MIN_FILTER $= GL_LINEAR samplerParameteri sampler GL_TEXTURE_MAG_FILTER $= GL_LINEAR -- when gl_EXT_texture_filter_anisotropic $ samplerParameterf sampler GL_TEXTURE_MAX_ANISOTROPY_EXT $= 16 return sampler
486
mkGBufferSampler :: YageResource Sampler mkGBufferSampler = throwWithStack $ do sampler <- glResource samplerParameteri sampler GL_TEXTURE_WRAP_S $= GL_CLAMP_TO_EDGE samplerParameteri sampler GL_TEXTURE_WRAP_T $= GL_CLAMP_TO_EDGE samplerParameteri sampler GL_TEXTURE_MIN_FILTER $= GL_LINEAR samplerParameteri sampler GL_TEXTURE_MAG_FILTER $= GL_LINEAR -- when gl_EXT_texture_filter_anisotropic $ samplerParameterf sampler GL_TEXTURE_MAX_ANISOTROPY_EXT $= 16 return sampler
486
mkGBufferSampler = throwWithStack $ do sampler <- glResource samplerParameteri sampler GL_TEXTURE_WRAP_S $= GL_CLAMP_TO_EDGE samplerParameteri sampler GL_TEXTURE_WRAP_T $= GL_CLAMP_TO_EDGE samplerParameteri sampler GL_TEXTURE_MIN_FILTER $= GL_LINEAR samplerParameteri sampler GL_TEXTURE_MAG_FILTER $= GL_LINEAR -- when gl_EXT_texture_filter_anisotropic $ samplerParameterf sampler GL_TEXTURE_MAX_ANISOTROPY_EXT $= 16 return sampler
445
false
true
0
9
56
80
35
45
null
null
brendanhay/gogol
gogol-translate/gen/Network/Google/Resource/Language/Translations/List.hs
mpl-2.0
-- | The language of the source text, set to one of the language codes listed -- in Language Support. If the source language is not specified, the API -- will attempt to identify the source language automatically and return it -- within the response. tlSource :: Lens' TranslationsList (Maybe Text) tlSource = lens _tlSource (\ s a -> s{_tlSource = a})
352
tlSource :: Lens' TranslationsList (Maybe Text) tlSource = lens _tlSource (\ s a -> s{_tlSource = a})
101
tlSource = lens _tlSource (\ s a -> s{_tlSource = a})
53
true
true
0
9
61
49
28
21
null
null
DimaSamoz/mezzo
test/CompTestsCompile.hs
mit
scMAAs = test $ a_ sn :|: as_ qn'
33
scMAAs = test $ a_ sn :|: as_ qn'
33
scMAAs = test $ a_ sn :|: as_ qn'
33
false
false
0
7
8
20
9
11
null
null
HJvT/com
System/Win32/Com/Exception.hs
bsd-3-clause
cAT_E_LAST :: HRESULT cAT_E_LAST = word32ToInt32 (0x80040161 ::Word32)
70
cAT_E_LAST :: HRESULT cAT_E_LAST = word32ToInt32 (0x80040161 ::Word32)
70
cAT_E_LAST = word32ToInt32 (0x80040161 ::Word32)
48
false
true
0
6
7
26
12
14
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/EnumSet.hs
mit
partitionLT_GT :: (Ord a, Enum a) => a -> Set a -> (Set a, Set a) partitionLT_GT x s = (filterLT x s,filterGT x s)
114
partitionLT_GT :: (Ord a, Enum a) => a -> Set a -> (Set a, Set a) partitionLT_GT x s = (filterLT x s,filterGT x s)
114
partitionLT_GT x s = (filterLT x s,filterGT x s)
48
false
true
0
9
24
70
35
35
null
null
meiersi/bytestring-builder
tests/FusionProperties.hs
bsd-3-clause
prop_noacc_up_lazy = eq4 (\g h i -> L.foldl g (0::W) . (L.map h . L.filter i)) (\g h i -> P.foldl g (0::W) . (P.map h . P.filter i))
140
prop_noacc_up_lazy = eq4 (\g h i -> L.foldl g (0::W) . (L.map h . L.filter i)) (\g h i -> P.foldl g (0::W) . (P.map h . P.filter i))
140
prop_noacc_up_lazy = eq4 (\g h i -> L.foldl g (0::W) . (L.map h . L.filter i)) (\g h i -> P.foldl g (0::W) . (P.map h . P.filter i))
140
false
false
0
12
36
103
53
50
null
null
jean-lopes/grafos
src/Algoritmos/Kruskal.hs
mit
g2 = Graph { vertices = "ABCDEFGHIJLM" , edges = [ Edge 'A' 'B' 4 , Edge 'A' 'M' 7 , Edge 'A' 'I' 4 , Edge 'B' 'C' 4 , Edge 'B' 'L' 8 , Edge 'C' 'D' 3 , Edge 'C' 'M' 6 , Edge 'D' 'E' 1 , Edge 'D' 'L' 2 , Edge 'E' 'F' 3 , Edge 'F' 'J' 2 , Edge 'J' 'L' 4 , Edge 'J' 'G' 2 , Edge 'G' 'M' 5 , Edge 'H' 'I' 3 , Edge 'I' 'J' 6 , Edge 'H' 'G' 7 ] }
498
g2 = Graph { vertices = "ABCDEFGHIJLM" , edges = [ Edge 'A' 'B' 4 , Edge 'A' 'M' 7 , Edge 'A' 'I' 4 , Edge 'B' 'C' 4 , Edge 'B' 'L' 8 , Edge 'C' 'D' 3 , Edge 'C' 'M' 6 , Edge 'D' 'E' 1 , Edge 'D' 'L' 2 , Edge 'E' 'F' 3 , Edge 'F' 'J' 2 , Edge 'J' 'L' 4 , Edge 'J' 'G' 2 , Edge 'G' 'M' 5 , Edge 'H' 'I' 3 , Edge 'I' 'J' 6 , Edge 'H' 'G' 7 ] }
498
g2 = Graph { vertices = "ABCDEFGHIJLM" , edges = [ Edge 'A' 'B' 4 , Edge 'A' 'M' 7 , Edge 'A' 'I' 4 , Edge 'B' 'C' 4 , Edge 'B' 'L' 8 , Edge 'C' 'D' 3 , Edge 'C' 'M' 6 , Edge 'D' 'E' 1 , Edge 'D' 'L' 2 , Edge 'E' 'F' 3 , Edge 'F' 'J' 2 , Edge 'J' 'L' 4 , Edge 'J' 'G' 2 , Edge 'G' 'M' 5 , Edge 'H' 'I' 3 , Edge 'I' 'J' 6 , Edge 'H' 'G' 7 ] }
498
false
false
1
9
253
197
98
99
null
null
joelwilliamson/jcc
Parser/Language.hs
gpl-3.0
initializerList = liftM InitializerList $ flip sepBy comma $ liftM2 (,) (optionMaybe designation) initializer
145
initializerList = liftM InitializerList $ flip sepBy comma $ liftM2 (,) (optionMaybe designation) initializer
145
initializerList = liftM InitializerList $ flip sepBy comma $ liftM2 (,) (optionMaybe designation) initializer
145
false
false
0
8
49
38
18
20
null
null
pikajude/melvin
src/Melvin.hs
mit
runClient :: ClientT m => Handle -> m (Either SomeException ()) runClient h = do mt <- myThreadId ct <- use M.clientThreadId putMVar ct mt try $ Client.loop h
174
runClient :: ClientT m => Handle -> m (Either SomeException ()) runClient h = do mt <- myThreadId ct <- use M.clientThreadId putMVar ct mt try $ Client.loop h
174
runClient h = do mt <- myThreadId ct <- use M.clientThreadId putMVar ct mt try $ Client.loop h
110
false
true
0
10
44
77
34
43
null
null
phadej/stack
src/Stack/Init.hs
bsd-3-clause
-- | Generate stack.yaml initProject :: ( MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m , MonadReader env m, HasConfig env , HasGHCVariant env , HasHttpManager env , HasLogLevel env , HasReExec env , HasTerminal env) => Path Abs Dir -> InitOpts -> Maybe AbstractResolver -> m () initProject currDir initOpts mresolver = do let dest = currDir </> stackDotYaml reldest <- toFilePath `liftM` makeRelativeToCurrentDir dest exists <- doesFileExist dest when (not (forceOverwrite initOpts) && exists) $ do error ("Stack configuration file " <> reldest <> " exists, use 'stack solver' to fix the existing config file or \ \'--force' to overwrite it.") dirs <- mapM (resolveDir' . T.unpack) (searchDirs initOpts) let noPkgMsg = "In order to init, you should have an existing .cabal \ \file. Please try \"stack new\" instead." find = findCabalFiles (includeSubDirs initOpts) dirs' = if null dirs then [currDir] else dirs $logInfo "Looking for .cabal or package.yaml files to use to init the project." cabalfps <- liftM concat $ mapM find dirs' (bundle, dupPkgs) <- cabalPackagesCheck cabalfps noPkgMsg Nothing (r, flags, extraDeps, rbundle) <- getDefaultResolver dest initOpts mresolver bundle let ignored = Map.difference bundle rbundle dupPkgMsg | (dupPkgs /= []) = "Warning (added by new or init): Some packages were found to \ \have names conflicting with others and have been commented \ \out in the packages section.\n" | otherwise = "" missingPkgMsg | (Map.size ignored > 0) = "Warning (added by new or init): Some packages were found to \ \be incompatible with the resolver and have been left commented \ \out in the packages section.\n" | otherwise = "" extraDepMsg | (Map.size extraDeps > 0) = "Warning (added by new or init): Specified resolver could not \ \satisfy all dependencies. Some external packages have been \ \added as dependencies.\n" | otherwise = "" makeUserMsg msgs = let msg = concat msgs in if msg /= "" then msg <> "You can suppress this message by removing it from \ \stack.yaml\n" else "" userMsg = makeUserMsg [dupPkgMsg, missingPkgMsg, extraDepMsg] gpds = Map.elems $ fmap snd rbundle p = Project { projectUserMsg = if userMsg == "" then Nothing else Just userMsg , projectPackages = pkgs , projectExtraDeps = extraDeps , projectFlags = PackageFlags (removeSrcPkgDefaultFlags gpds flags) , projectResolver = r , projectCompiler = Nothing , projectExtraPackageDBs = [] } makeRelDir dir = case stripDir currDir dir of Nothing | currDir == dir -> "." | otherwise -> assert False $ toFilePath dir Just rel -> toFilePath rel makeRel = fmap toFilePath . makeRelativeToCurrentDir pkgs = map toPkg $ Map.elems (fmap (parent . fst) rbundle) toPkg dir = PackageEntry { peExtraDep = False , peLocation = PLFilePath $ makeRelDir dir , peSubdirs = [] } indent t = T.unlines $ fmap (" " <>) (T.lines t) $logInfo $ "Initialising configuration using resolver: " <> resolverName r $logInfo $ "Total number of user packages considered: " <> (T.pack $ show $ (Map.size bundle + length dupPkgs)) when (dupPkgs /= []) $ do $logWarn $ "Warning! Ignoring " <> (T.pack $ show $ length dupPkgs) <> " duplicate packages:" rels <- mapM makeRel dupPkgs $logWarn $ indent $ showItems rels when (Map.size ignored > 0) $ do $logWarn $ "Warning! Ignoring " <> (T.pack $ show $ Map.size ignored) <> " packages due to dependency conflicts:" rels <- mapM makeRel (Map.elems (fmap fst ignored)) $logWarn $ indent $ showItems $ rels when (Map.size extraDeps > 0) $ do $logWarn $ "Warning! " <> (T.pack $ show $ Map.size extraDeps) <> " external dependencies were added." $logInfo $ (if exists then "Overwriting existing configuration file: " else "Writing configuration to file: ") <> T.pack reldest liftIO $ L.writeFile (toFilePath dest) $ B.toLazyByteString $ renderStackYaml p (Map.elems $ fmap (makeRelDir . parent . fst) ignored) (map (makeRelDir . parent) dupPkgs) $logInfo "All done." -- | Render a stack.yaml file with comments, see: -- https://github.com/commercialhaskell/stack/issues/226
5,138
initProject :: ( MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m , MonadReader env m, HasConfig env , HasGHCVariant env , HasHttpManager env , HasLogLevel env , HasReExec env , HasTerminal env) => Path Abs Dir -> InitOpts -> Maybe AbstractResolver -> m () initProject currDir initOpts mresolver = do let dest = currDir </> stackDotYaml reldest <- toFilePath `liftM` makeRelativeToCurrentDir dest exists <- doesFileExist dest when (not (forceOverwrite initOpts) && exists) $ do error ("Stack configuration file " <> reldest <> " exists, use 'stack solver' to fix the existing config file or \ \'--force' to overwrite it.") dirs <- mapM (resolveDir' . T.unpack) (searchDirs initOpts) let noPkgMsg = "In order to init, you should have an existing .cabal \ \file. Please try \"stack new\" instead." find = findCabalFiles (includeSubDirs initOpts) dirs' = if null dirs then [currDir] else dirs $logInfo "Looking for .cabal or package.yaml files to use to init the project." cabalfps <- liftM concat $ mapM find dirs' (bundle, dupPkgs) <- cabalPackagesCheck cabalfps noPkgMsg Nothing (r, flags, extraDeps, rbundle) <- getDefaultResolver dest initOpts mresolver bundle let ignored = Map.difference bundle rbundle dupPkgMsg | (dupPkgs /= []) = "Warning (added by new or init): Some packages were found to \ \have names conflicting with others and have been commented \ \out in the packages section.\n" | otherwise = "" missingPkgMsg | (Map.size ignored > 0) = "Warning (added by new or init): Some packages were found to \ \be incompatible with the resolver and have been left commented \ \out in the packages section.\n" | otherwise = "" extraDepMsg | (Map.size extraDeps > 0) = "Warning (added by new or init): Specified resolver could not \ \satisfy all dependencies. Some external packages have been \ \added as dependencies.\n" | otherwise = "" makeUserMsg msgs = let msg = concat msgs in if msg /= "" then msg <> "You can suppress this message by removing it from \ \stack.yaml\n" else "" userMsg = makeUserMsg [dupPkgMsg, missingPkgMsg, extraDepMsg] gpds = Map.elems $ fmap snd rbundle p = Project { projectUserMsg = if userMsg == "" then Nothing else Just userMsg , projectPackages = pkgs , projectExtraDeps = extraDeps , projectFlags = PackageFlags (removeSrcPkgDefaultFlags gpds flags) , projectResolver = r , projectCompiler = Nothing , projectExtraPackageDBs = [] } makeRelDir dir = case stripDir currDir dir of Nothing | currDir == dir -> "." | otherwise -> assert False $ toFilePath dir Just rel -> toFilePath rel makeRel = fmap toFilePath . makeRelativeToCurrentDir pkgs = map toPkg $ Map.elems (fmap (parent . fst) rbundle) toPkg dir = PackageEntry { peExtraDep = False , peLocation = PLFilePath $ makeRelDir dir , peSubdirs = [] } indent t = T.unlines $ fmap (" " <>) (T.lines t) $logInfo $ "Initialising configuration using resolver: " <> resolverName r $logInfo $ "Total number of user packages considered: " <> (T.pack $ show $ (Map.size bundle + length dupPkgs)) when (dupPkgs /= []) $ do $logWarn $ "Warning! Ignoring " <> (T.pack $ show $ length dupPkgs) <> " duplicate packages:" rels <- mapM makeRel dupPkgs $logWarn $ indent $ showItems rels when (Map.size ignored > 0) $ do $logWarn $ "Warning! Ignoring " <> (T.pack $ show $ Map.size ignored) <> " packages due to dependency conflicts:" rels <- mapM makeRel (Map.elems (fmap fst ignored)) $logWarn $ indent $ showItems $ rels when (Map.size extraDeps > 0) $ do $logWarn $ "Warning! " <> (T.pack $ show $ Map.size extraDeps) <> " external dependencies were added." $logInfo $ (if exists then "Overwriting existing configuration file: " else "Writing configuration to file: ") <> T.pack reldest liftIO $ L.writeFile (toFilePath dest) $ B.toLazyByteString $ renderStackYaml p (Map.elems $ fmap (makeRelDir . parent . fst) ignored) (map (makeRelDir . parent) dupPkgs) $logInfo "All done." -- | Render a stack.yaml file with comments, see: -- https://github.com/commercialhaskell/stack/issues/226
5,113
initProject currDir initOpts mresolver = do let dest = currDir </> stackDotYaml reldest <- toFilePath `liftM` makeRelativeToCurrentDir dest exists <- doesFileExist dest when (not (forceOverwrite initOpts) && exists) $ do error ("Stack configuration file " <> reldest <> " exists, use 'stack solver' to fix the existing config file or \ \'--force' to overwrite it.") dirs <- mapM (resolveDir' . T.unpack) (searchDirs initOpts) let noPkgMsg = "In order to init, you should have an existing .cabal \ \file. Please try \"stack new\" instead." find = findCabalFiles (includeSubDirs initOpts) dirs' = if null dirs then [currDir] else dirs $logInfo "Looking for .cabal or package.yaml files to use to init the project." cabalfps <- liftM concat $ mapM find dirs' (bundle, dupPkgs) <- cabalPackagesCheck cabalfps noPkgMsg Nothing (r, flags, extraDeps, rbundle) <- getDefaultResolver dest initOpts mresolver bundle let ignored = Map.difference bundle rbundle dupPkgMsg | (dupPkgs /= []) = "Warning (added by new or init): Some packages were found to \ \have names conflicting with others and have been commented \ \out in the packages section.\n" | otherwise = "" missingPkgMsg | (Map.size ignored > 0) = "Warning (added by new or init): Some packages were found to \ \be incompatible with the resolver and have been left commented \ \out in the packages section.\n" | otherwise = "" extraDepMsg | (Map.size extraDeps > 0) = "Warning (added by new or init): Specified resolver could not \ \satisfy all dependencies. Some external packages have been \ \added as dependencies.\n" | otherwise = "" makeUserMsg msgs = let msg = concat msgs in if msg /= "" then msg <> "You can suppress this message by removing it from \ \stack.yaml\n" else "" userMsg = makeUserMsg [dupPkgMsg, missingPkgMsg, extraDepMsg] gpds = Map.elems $ fmap snd rbundle p = Project { projectUserMsg = if userMsg == "" then Nothing else Just userMsg , projectPackages = pkgs , projectExtraDeps = extraDeps , projectFlags = PackageFlags (removeSrcPkgDefaultFlags gpds flags) , projectResolver = r , projectCompiler = Nothing , projectExtraPackageDBs = [] } makeRelDir dir = case stripDir currDir dir of Nothing | currDir == dir -> "." | otherwise -> assert False $ toFilePath dir Just rel -> toFilePath rel makeRel = fmap toFilePath . makeRelativeToCurrentDir pkgs = map toPkg $ Map.elems (fmap (parent . fst) rbundle) toPkg dir = PackageEntry { peExtraDep = False , peLocation = PLFilePath $ makeRelDir dir , peSubdirs = [] } indent t = T.unlines $ fmap (" " <>) (T.lines t) $logInfo $ "Initialising configuration using resolver: " <> resolverName r $logInfo $ "Total number of user packages considered: " <> (T.pack $ show $ (Map.size bundle + length dupPkgs)) when (dupPkgs /= []) $ do $logWarn $ "Warning! Ignoring " <> (T.pack $ show $ length dupPkgs) <> " duplicate packages:" rels <- mapM makeRel dupPkgs $logWarn $ indent $ showItems rels when (Map.size ignored > 0) $ do $logWarn $ "Warning! Ignoring " <> (T.pack $ show $ Map.size ignored) <> " packages due to dependency conflicts:" rels <- mapM makeRel (Map.elems (fmap fst ignored)) $logWarn $ indent $ showItems $ rels when (Map.size extraDeps > 0) $ do $logWarn $ "Warning! " <> (T.pack $ show $ Map.size extraDeps) <> " external dependencies were added." $logInfo $ (if exists then "Overwriting existing configuration file: " else "Writing configuration to file: ") <> T.pack reldest liftIO $ L.writeFile (toFilePath dest) $ B.toLazyByteString $ renderStackYaml p (Map.elems $ fmap (makeRelDir . parent . fst) ignored) (map (makeRelDir . parent) dupPkgs) $logInfo "All done." -- | Render a stack.yaml file with comments, see: -- https://github.com/commercialhaskell/stack/issues/226
4,803
true
true
15
18
1,783
1,151
567
584
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxQUANTIZE_FILL_DESTINATION_IMAGE :: Int wxQUANTIZE_FILL_DESTINATION_IMAGE = 4
78
wxQUANTIZE_FILL_DESTINATION_IMAGE :: Int wxQUANTIZE_FILL_DESTINATION_IMAGE = 4
78
wxQUANTIZE_FILL_DESTINATION_IMAGE = 4
37
false
true
0
4
5
11
6
5
null
null
brendanhay/gogol
gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Locations/Get.hs
mpl-2.0
-- | JSONP algCallback :: Lens' AppsLocationsGet (Maybe Text) algCallback = lens _algCallback (\ s a -> s{_algCallback = a})
126
algCallback :: Lens' AppsLocationsGet (Maybe Text) algCallback = lens _algCallback (\ s a -> s{_algCallback = a})
115
algCallback = lens _algCallback (\ s a -> s{_algCallback = a})
64
true
true
0
9
21
48
25
23
null
null
nickbart1980/pandoc-citeproc
pandoc-citeproc.hs
bsd-3-clause
findWarnings :: Inline -> [String] findWarnings (Span (_,["citeproc-not-found"],[("data-reference-id",ref)]) _) = ["pandoc-citeproc: reference " ++ ref ++ " not found" | ref /= "*"]
183
findWarnings :: Inline -> [String] findWarnings (Span (_,["citeproc-not-found"],[("data-reference-id",ref)]) _) = ["pandoc-citeproc: reference " ++ ref ++ " not found" | ref /= "*"]
183
findWarnings (Span (_,["citeproc-not-found"],[("data-reference-id",ref)]) _) = ["pandoc-citeproc: reference " ++ ref ++ " not found" | ref /= "*"]
148
false
true
0
9
24
73
40
33
null
null
TimLuq/transmissionbt-rpc
src/Network/BitTorrent/Transmission/Test.hs
mit
details'' :: (TorrentFieldsContainer t) => t -> IO () details'' x' = do let x = torrentFields x' putStr ">> " case lookupTorrentField TorrentHashString x of Nothing -> putStr " " Just xh -> T.putStr xh putStr " " case lookupTorrentField TorrentName x of Nothing -> putStrLn "(no name)" Just xn -> putStrLn $ show xn forM_ (torrentFieldsToList x) $ \(a, b) -> do putStr " " T.putStr a putStr ": " putStr $ replicate (24 - T.length a) ' ' putStrLn $ showjson b where showjson j = case j of JSON.Null -> "null" JSON.String y -> show y JSON.Number y -> show y JSON.Bool y -> if y then "true" else "false" JSON.Array y -> '[' : P.intercalate "," (map showjson $ toList y) ++ "]" JSON.Object y -> '{' : P.intercalate "," (foldrWithKey (\k a b -> ((show k) ++ ": " ++ showjson a) : b) [] y) ++ "}" y -> show y
958
details'' :: (TorrentFieldsContainer t) => t -> IO () details'' x' = do let x = torrentFields x' putStr ">> " case lookupTorrentField TorrentHashString x of Nothing -> putStr " " Just xh -> T.putStr xh putStr " " case lookupTorrentField TorrentName x of Nothing -> putStrLn "(no name)" Just xn -> putStrLn $ show xn forM_ (torrentFieldsToList x) $ \(a, b) -> do putStr " " T.putStr a putStr ": " putStr $ replicate (24 - T.length a) ' ' putStrLn $ showjson b where showjson j = case j of JSON.Null -> "null" JSON.String y -> show y JSON.Number y -> show y JSON.Bool y -> if y then "true" else "false" JSON.Array y -> '[' : P.intercalate "," (map showjson $ toList y) ++ "]" JSON.Object y -> '{' : P.intercalate "," (foldrWithKey (\k a b -> ((show k) ++ ": " ++ showjson a) : b) [] y) ++ "}" y -> show y
958
details'' x' = do let x = torrentFields x' putStr ">> " case lookupTorrentField TorrentHashString x of Nothing -> putStr " " Just xh -> T.putStr xh putStr " " case lookupTorrentField TorrentName x of Nothing -> putStrLn "(no name)" Just xn -> putStrLn $ show xn forM_ (torrentFieldsToList x) $ \(a, b) -> do putStr " " T.putStr a putStr ": " putStr $ replicate (24 - T.length a) ' ' putStrLn $ showjson b where showjson j = case j of JSON.Null -> "null" JSON.String y -> show y JSON.Number y -> show y JSON.Bool y -> if y then "true" else "false" JSON.Array y -> '[' : P.intercalate "," (map showjson $ toList y) ++ "]" JSON.Object y -> '{' : P.intercalate "," (foldrWithKey (\k a b -> ((show k) ++ ": " ++ showjson a) : b) [] y) ++ "}" y -> show y
904
false
true
8
22
313
383
182
201
null
null
tomjaguarpaw/postgresql-simple
src/Database/PostgreSQL/Simple/Time/Implementation.hs
bsd-3-clause
parseDate :: B.ByteString -> Either String Date parseDate = A.parseOnly (getDate <* A.endOfInput)
97
parseDate :: B.ByteString -> Either String Date parseDate = A.parseOnly (getDate <* A.endOfInput)
97
parseDate = A.parseOnly (getDate <* A.endOfInput)
49
false
true
0
8
12
36
18
18
null
null
sampou-org/pfad
Code/Code20.hs
bsd-3-clause
mkExprs1 :: [Int] -> [(Expr, Int)] mkExprs1 [x] = [(Num x, x)]
71
mkExprs1 :: [Int] -> [(Expr, Int)] mkExprs1 [x] = [(Num x, x)]
71
mkExprs1 [x] = [(Num x, x)]
30
false
true
0
9
20
51
27
24
null
null
pseudonom/persistent
persistent/Database/Persist/Sql/Class.hs
mit
extractMaybe :: Maybe a -> a extractMaybe = fromMaybe (error "Database.Persist.GenericSql.extractMaybe")
104
extractMaybe :: Maybe a -> a extractMaybe = fromMaybe (error "Database.Persist.GenericSql.extractMaybe")
104
extractMaybe = fromMaybe (error "Database.Persist.GenericSql.extractMaybe")
75
false
true
0
7
10
27
13
14
null
null
spechub/Hets
GMP/GMP-CoLoSS/GMP/Parser.hs
gpl-2.0
-- | Parser which translates all implications in disjunctions & conjunctions implFormula :: (SigFeature a b c) => a (b c) -> ModalOperator -> Parser (Formula (a (b c)) ) implFormula sig flag = do f <- orFormula sig flag option f (do string "->" spaces i <- implFormula sig flag return $ Or (Neg f) i <|> do try (string "<->") spaces i <- implFormula sig flag return $ And (Or (Neg f) i) (Or f (Neg i)) <|> do string "<-" spaces i <- implFormula sig flag return $ Or f (Neg i) <|> return f <?> "GMPParser.implFormula") -- | Parser for disjunction - used for handling binding order
818
implFormula :: (SigFeature a b c) => a (b c) -> ModalOperator -> Parser (Formula (a (b c)) ) implFormula sig flag = do f <- orFormula sig flag option f (do string "->" spaces i <- implFormula sig flag return $ Or (Neg f) i <|> do try (string "<->") spaces i <- implFormula sig flag return $ And (Or (Neg f) i) (Or f (Neg i)) <|> do string "<-" spaces i <- implFormula sig flag return $ Or f (Neg i) <|> return f <?> "GMPParser.implFormula") -- | Parser for disjunction - used for handling binding order
741
implFormula sig flag = do f <- orFormula sig flag option f (do string "->" spaces i <- implFormula sig flag return $ Or (Neg f) i <|> do try (string "<->") spaces i <- implFormula sig flag return $ And (Or (Neg f) i) (Or f (Neg i)) <|> do string "<-" spaces i <- implFormula sig flag return $ Or f (Neg i) <|> return f <?> "GMPParser.implFormula") -- | Parser for disjunction - used for handling binding order
611
true
true
0
20
349
256
116
140
null
null
rudymatela/llcheck
src/Test/LeanCheck/Utils/Types.hs
bsd-3-clause
fInt2 :: (Int->Int) -> (Int2->Int2) ; fInt2 = fNewtype int2 unInt2
71
fInt2 :: (Int->Int) -> (Int2->Int2) fInt2 = fNewtype int2 unInt2
67
fInt2 = fNewtype int2 unInt2
30
false
true
0
7
15
38
20
18
null
null
clample/lamdabtc
backend/src/Protocol/Server.hs
bsd-3-clause
handleResponse' (Message (HeadersMessageBody (HeadersMessage headers)) _) = do handleNewHeaders headers getDataMerkleBlock headers -- request merkle blocks to look for our utxos
181
handleResponse' (Message (HeadersMessageBody (HeadersMessage headers)) _) = do handleNewHeaders headers getDataMerkleBlock headers -- request merkle blocks to look for our utxos
181
handleResponse' (Message (HeadersMessageBody (HeadersMessage headers)) _) = do handleNewHeaders headers getDataMerkleBlock headers -- request merkle blocks to look for our utxos
181
false
false
0
11
24
42
19
23
null
null
liyanchang/scheme-in-haskell
src/chp7.hs
mit
eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm
82
eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm
82
eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm
82
false
false
0
6
10
20
9
11
null
null
emilaxelsson/feldspar-synch
tests/Laws.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Proof of applicative laws for `System` -------------------------------------------------------------------------------- -- identity: pure id <*> v = v appLaw1 :: Monad m => System m a -> [System m a] appLaw1 v@(System v') = [ pure id <*> v , System (return (return id)) <*> (System v') , System $ do nextf <- return (return id) nexta <- v' return $ nextf <*> nexta , System $ do nexta <- v' return $ return id <*> nexta , System $ do nexta <- v' return $ nexta , System v' , v ]
621
appLaw1 :: Monad m => System m a -> [System m a] appLaw1 v@(System v') = [ pure id <*> v , System (return (return id)) <*> (System v') , System $ do nextf <- return (return id) nexta <- v' return $ nextf <*> nexta , System $ do nexta <- v' return $ return id <*> nexta , System $ do nexta <- v' return $ nexta , System v' , v ]
385
appLaw1 v@(System v') = [ pure id <*> v , System (return (return id)) <*> (System v') , System $ do nextf <- return (return id) nexta <- v' return $ nextf <*> nexta , System $ do nexta <- v' return $ return id <*> nexta , System $ do nexta <- v' return $ nexta , System v' , v ]
336
true
true
0
12
150
188
93
95
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_CMD_DOCUMENTENDEXTEND :: Int wxSTC_CMD_DOCUMENTENDEXTEND = 2319
69
wxSTC_CMD_DOCUMENTENDEXTEND :: Int wxSTC_CMD_DOCUMENTENDEXTEND = 2319
69
wxSTC_CMD_DOCUMENTENDEXTEND = 2319
34
false
true
0
4
5
11
6
5
null
null
GRACeFUL-project/haskelzinc
src/Interfaces/MZBuiltIns.hs
bsd-3-clause
mz_index_set_1of3 = prefCall "index_set_1of3"
45
mz_index_set_1of3 = prefCall "index_set_1of3"
45
mz_index_set_1of3 = prefCall "index_set_1of3"
45
false
false
0
5
3
9
4
5
null
null
susoDominguez/eNominalTerms-Alpha
TrmX_Actions.hs
unlicense
atmsRl (fc,l,r) = atmsTrmCtx (fc, TplTrm [l,r])
47
atmsRl (fc,l,r) = atmsTrmCtx (fc, TplTrm [l,r])
47
atmsRl (fc,l,r) = atmsTrmCtx (fc, TplTrm [l,r])
47
false
false
0
8
6
36
20
16
null
null
SRechenberger/grammata
src/Grammata/Machine/Core/Types.hs
gpl-3.0
Struct sa na asa =:= Struct sb nb asb = do let simple = sa == sb && na == nb complex <- and <$> mapM (\(a,b) -> a =:= b) (asa `zip` asb) return $ simple && complex
189
Struct sa na asa =:= Struct sb nb asb = do let simple = sa == sb && na == nb complex <- and <$> mapM (\(a,b) -> a =:= b) (asa `zip` asb) return $ simple && complex
189
Struct sa na asa =:= Struct sb nb asb = do let simple = sa == sb && na == nb complex <- and <$> mapM (\(a,b) -> a =:= b) (asa `zip` asb) return $ simple && complex
189
false
false
0
12
64
101
50
51
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/SDF/Core.hs
bsd-3-clause
scen43 (c,p,f) = ctxt43 c p f
29
scen43 (c,p,f) = ctxt43 c p f
29
scen43 (c,p,f) = ctxt43 c p f
29
false
false
0
6
6
25
13
12
null
null
ezyang/hoopl
testing/EvalMonad.hs
bsd-3-clause
runProg :: [Proc] -> [v] -> EvalM v x -> ErrorM (State v, x) runProg procs vs (EvalM f) = case f init_state of Left (_, e) -> throwError e Right x -> return x where init_state = State { frames = [], heap = M.empty, events = [], vsupply = vs, procs = procMap } procMap = M.fromList $ zip (map name procs) procs
359
runProg :: [Proc] -> [v] -> EvalM v x -> ErrorM (State v, x) runProg procs vs (EvalM f) = case f init_state of Left (_, e) -> throwError e Right x -> return x where init_state = State { frames = [], heap = M.empty, events = [], vsupply = vs, procs = procMap } procMap = M.fromList $ zip (map name procs) procs
359
runProg procs vs (EvalM f) = case f init_state of Left (_, e) -> throwError e Right x -> return x where init_state = State { frames = [], heap = M.empty, events = [], vsupply = vs, procs = procMap } procMap = M.fromList $ zip (map name procs) procs
298
false
true
2
11
114
176
88
88
null
null
xnning/fcore
lib/OptiUtils.hs
bsd-2-clause
joinExpr (Tuple es) = Tuple (map joinExpr es)
45
joinExpr (Tuple es) = Tuple (map joinExpr es)
45
joinExpr (Tuple es) = Tuple (map joinExpr es)
45
false
false
0
7
7
26
12
14
null
null
nushio3/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
-- | Make a core tuple of the given boxity mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr mkCoreTupBoxity Boxed exps = mkCoreTup exps
140
mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr mkCoreTupBoxity Boxed exps = mkCoreTup exps
97
mkCoreTupBoxity Boxed exps = mkCoreTup exps
45
true
true
0
7
24
31
16
15
null
null
hpacheco/HAAP
examples/plab/svn/2017li1g186/src/RunT1.hs
mit
main = do args <- getArgs case args of ["constroi"] -> do str <- getContents let caminho = readMaybe str case caminho of Nothing -> error "caminho invalido" Just c -> print $ T1.constroi c ["testes"] -> print $ T1.testesT1 otherwise -> error "RunT1 argumentos invalidos"
370
main = do args <- getArgs case args of ["constroi"] -> do str <- getContents let caminho = readMaybe str case caminho of Nothing -> error "caminho invalido" Just c -> print $ T1.constroi c ["testes"] -> print $ T1.testesT1 otherwise -> error "RunT1 argumentos invalidos"
370
main = do args <- getArgs case args of ["constroi"] -> do str <- getContents let caminho = readMaybe str case caminho of Nothing -> error "caminho invalido" Just c -> print $ T1.constroi c ["testes"] -> print $ T1.testesT1 otherwise -> error "RunT1 argumentos invalidos"
370
false
false
1
18
145
110
49
61
null
null
emhoracek/smooch
app/src/Dolls/View.hs
gpl-3.0
celImageSplice :: FilePath -> KissCel -> Substitutions Ctxt celImageSplice dir cel = subs [("cel-name", textFill $ T.pack $ celName cel) ,("pal-num", textFill $ T.pack $ show $ celPalette cel) ,("dir", textFill $ T.pack dir <> "/palette" <> T.pack (show $ celPalette cel))]
289
celImageSplice :: FilePath -> KissCel -> Substitutions Ctxt celImageSplice dir cel = subs [("cel-name", textFill $ T.pack $ celName cel) ,("pal-num", textFill $ T.pack $ show $ celPalette cel) ,("dir", textFill $ T.pack dir <> "/palette" <> T.pack (show $ celPalette cel))]
289
celImageSplice dir cel = subs [("cel-name", textFill $ T.pack $ celName cel) ,("pal-num", textFill $ T.pack $ show $ celPalette cel) ,("dir", textFill $ T.pack dir <> "/palette" <> T.pack (show $ celPalette cel))]
229
false
true
0
12
57
124
62
62
null
null
np/lens
src/Control/Lens/Prism.hs
bsd-3-clause
------------------------------------------------------------------------------ -- Prism Combinators ------------------------------------------------------------------------------ -- | Build a 'Control.Lens.Prism.Prism'. -- -- @'Either' t a@ is used instead of @'Maybe' a@ to permit the types of @s@ and @t@ to differ. prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b prism bt seta = prismatic seta . rmap (fmap bt)
422
prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b prism bt seta = prismatic seta . rmap (fmap bt)
103
prism bt seta = prismatic seta . rmap (fmap bt)
47
true
true
0
9
58
74
39
35
null
null
RossMeikleham/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
inferDecl = PDatadecl inferTy NoFC (PType bi) [(emptyDocstring, [], inferCon, NoFC, PPi impl (sMN 0 "iType") NoFC (PType bi) ( PPi expl (sMN 0 "ival") NoFC (PRef bi [] (sMN 0 "iType")) (PRef bi [] inferTy)), bi, [])]
362
inferDecl = PDatadecl inferTy NoFC (PType bi) [(emptyDocstring, [], inferCon, NoFC, PPi impl (sMN 0 "iType") NoFC (PType bi) ( PPi expl (sMN 0 "ival") NoFC (PRef bi [] (sMN 0 "iType")) (PRef bi [] inferTy)), bi, [])]
362
inferDecl = PDatadecl inferTy NoFC (PType bi) [(emptyDocstring, [], inferCon, NoFC, PPi impl (sMN 0 "iType") NoFC (PType bi) ( PPi expl (sMN 0 "ival") NoFC (PRef bi [] (sMN 0 "iType")) (PRef bi [] inferTy)), bi, [])]
362
false
false
0
14
183
128
67
61
null
null
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Upload.hs
bsd-3-clause
mkFormData :: FilePath -> ByteString -> [BodyPart] mkFormData path pkg = -- yes, web browsers are that stupid (re quoting) [BodyPart [Header hdrContentDisposition $ "form-data; name=package; filename=\""++takeFileName path++"\"", Header HdrContentType "application/x-gzip"] pkg]
311
mkFormData :: FilePath -> ByteString -> [BodyPart] mkFormData path pkg = -- yes, web browsers are that stupid (re quoting) [BodyPart [Header hdrContentDisposition $ "form-data; name=package; filename=\""++takeFileName path++"\"", Header HdrContentType "application/x-gzip"] pkg]
311
mkFormData path pkg = -- yes, web browsers are that stupid (re quoting) [BodyPart [Header hdrContentDisposition $ "form-data; name=package; filename=\""++takeFileName path++"\"", Header HdrContentType "application/x-gzip"] pkg]
260
false
true
0
12
64
70
34
36
null
null
fmapfmapfmap/amazonka
amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types/Product.hs
mpl-2.0
-- | Undocumented member. spsOptions :: Lens' ScalingParametersStatus ScalingParameters spsOptions = lens _spsOptions (\ s a -> s{_spsOptions = a})
147
spsOptions :: Lens' ScalingParametersStatus ScalingParameters spsOptions = lens _spsOptions (\ s a -> s{_spsOptions = a})
121
spsOptions = lens _spsOptions (\ s a -> s{_spsOptions = a})
59
true
true
0
9
19
40
22
18
null
null
sopvop/cabal
cabal-install/Distribution/Client/ProjectPlanning/Types.hs
bsd-3-clause
elabSetupDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent comp } = compSetupDependencies comp
121
elabSetupDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent comp } = compSetupDependencies comp
121
elabSetupDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent comp } = compSetupDependencies comp
121
false
false
0
9
14
24
11
13
null
null
VictorDenisov/ldap-client
src/Ldap/Asn1/ToAsn1.hs
bsd-2-clause
sequence :: Mod -> Ber -> Ber sequence m = tagged (tag 0x10 <> m)
65
sequence :: Mod -> Ber -> Ber sequence m = tagged (tag 0x10 <> m)
65
sequence m = tagged (tag 0x10 <> m)
35
false
true
0
8
14
35
17
18
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
gpl-2.0
-- LATIN CAPITAL LETTER E WITH TILDE switch 'e' '?' = '\x1EBD'
62
switch 'e' '?' = '\x1EBD'
25
switch 'e' '?' = '\x1EBD'
25
true
false
0
5
11
12
6
6
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/HscMain.hs
bsd-3-clause
-- | Throw some errors. throwErrors :: ErrorMessages -> Hsc a throwErrors = liftIO . throwIO . mkSrcErr
103
throwErrors :: ErrorMessages -> Hsc a throwErrors = liftIO . throwIO . mkSrcErr
79
throwErrors = liftIO . throwIO . mkSrcErr
41
true
true
0
6
17
27
14
13
null
null
SneakingCat/distributed-nonsense
src/Master/Master.hs
apache-2.0
taskMaster' :: [ProcessId] -> [Int] -> [Int] -> Process () taskMaster' [] xs ys = do -- No processes are available, wait infinitely for one process to -- show up. say "Waiting for procs" ProcessUp processId <- expect say "Got proc" taskMaster' [processId] xs ys
273
taskMaster' :: [ProcessId] -> [Int] -> [Int] -> Process () taskMaster' [] xs ys = do -- No processes are available, wait infinitely for one process to -- show up. say "Waiting for procs" ProcessUp processId <- expect say "Got proc" taskMaster' [processId] xs ys
273
taskMaster' [] xs ys = do -- No processes are available, wait infinitely for one process to -- show up. say "Waiting for procs" ProcessUp processId <- expect say "Got proc" taskMaster' [processId] xs ys
214
false
true
0
9
56
83
40
43
null
null
tangboyun/miranda
src/MiRanda/Parameter/BL.hs
gpl-3.0
treeBin10 :: ByteString treeBin10 = "(9598:0.00246,(9544:0.01008,(30611:0.05105,\ \(37347:0.05942,((((10116:0.03062,10090:0.02795):0.07956,\ \10141:0.07477):0.01444,9986:0.06786):0.00813,\ \(((42254:0.072,9365:0.08211):0.01948,(((9615:0.02488,\ \9685:0.03004):0.01452,9796:0.03237):0.00187,\ \9913:0.05133):0.00192):0.00765,((9361:0.0617,\ \(9785:0.03883,9371:0.09215):0.01782):0.00487,\ \(13616:0.11309,(9258:0.1461,((9031:0.09071,\ \28377:0.16596):0.08067,8364:0.35492):0.03158):0.02139):0.06543):0.00696):0.00716):0.00217):0.00549):0.02177):0.00638,\ \9606:0.00255);"
610
treeBin10 :: ByteString treeBin10 = "(9598:0.00246,(9544:0.01008,(30611:0.05105,\ \(37347:0.05942,((((10116:0.03062,10090:0.02795):0.07956,\ \10141:0.07477):0.01444,9986:0.06786):0.00813,\ \(((42254:0.072,9365:0.08211):0.01948,(((9615:0.02488,\ \9685:0.03004):0.01452,9796:0.03237):0.00187,\ \9913:0.05133):0.00192):0.00765,((9361:0.0617,\ \(9785:0.03883,9371:0.09215):0.01782):0.00487,\ \(13616:0.11309,(9258:0.1461,((9031:0.09071,\ \28377:0.16596):0.08067,8364:0.35492):0.03158):0.02139):0.06543):0.00696):0.00716):0.00217):0.00549):0.02177):0.00638,\ \9606:0.00255);"
610
treeBin10 = "(9598:0.00246,(9544:0.01008,(30611:0.05105,\ \(37347:0.05942,((((10116:0.03062,10090:0.02795):0.07956,\ \10141:0.07477):0.01444,9986:0.06786):0.00813,\ \(((42254:0.072,9365:0.08211):0.01948,(((9615:0.02488,\ \9685:0.03004):0.01452,9796:0.03237):0.00187,\ \9913:0.05133):0.00192):0.00765,((9361:0.0617,\ \(9785:0.03883,9371:0.09215):0.01782):0.00487,\ \(13616:0.11309,(9258:0.1461,((9031:0.09071,\ \28377:0.16596):0.08067,8364:0.35492):0.03158):0.02139):0.06543):0.00696):0.00716):0.00217):0.00549):0.02177):0.00638,\ \9606:0.00255);"
586
false
true
0
4
54
11
6
5
null
null
dino-r/casttex
src/UpdateSvg.hs
mit
updateSVG :: String -> String -> IO () updateSVG svgStyle fileName = do -- file handle for svg file handle <- openFile fileName ReadMode -- get contents of svg file svgContents <- hGetContents handle -- open temporary file to store updated results (tempName, tempHandle) <- openTempFile "." "temp" -- put the updated SVG file into the temporary file hPutStr tempHandle $ cssStyleSVG svgStyle svgContents hClose handle hClose tempHandle -- remove the old svg file removeFile fileName -- rename the temporary svg file to have the same name as the initial svg file renameFile tempName fileName
678
updateSVG :: String -> String -> IO () updateSVG svgStyle fileName = do -- file handle for svg file handle <- openFile fileName ReadMode -- get contents of svg file svgContents <- hGetContents handle -- open temporary file to store updated results (tempName, tempHandle) <- openTempFile "." "temp" -- put the updated SVG file into the temporary file hPutStr tempHandle $ cssStyleSVG svgStyle svgContents hClose handle hClose tempHandle -- remove the old svg file removeFile fileName -- rename the temporary svg file to have the same name as the initial svg file renameFile tempName fileName
678
updateSVG svgStyle fileName = do -- file handle for svg file handle <- openFile fileName ReadMode -- get contents of svg file svgContents <- hGetContents handle -- open temporary file to store updated results (tempName, tempHandle) <- openTempFile "." "temp" -- put the updated SVG file into the temporary file hPutStr tempHandle $ cssStyleSVG svgStyle svgContents hClose handle hClose tempHandle -- remove the old svg file removeFile fileName -- rename the temporary svg file to have the same name as the initial svg file renameFile tempName fileName
639
false
true
0
9
182
121
54
67
null
null
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/OneOfN.hs
gpl-3.0
foldOneOf18 a b c d e f g h i j k l m n o p q r (NineOf18 z) = i z
66
foldOneOf18 a b c d e f g h i j k l m n o p q r (NineOf18 z) = i z
66
foldOneOf18 a b c d e f g h i j k l m n o p q r (NineOf18 z) = i z
66
false
false
0
7
23
54
26
28
null
null
rgoulter/expenses-csv-utils
src/Data/Expenses/Parse/Megaparsec/Document.hs
mit
withFile :: String -> (Model -> IO ()) -> IO () withFile inputF f = do -- Parse the input file to list of [DateDir | ExpDir] rawResult <- runParser parseExpensesFile inputF <$> readFile inputF case rawResult of Left err -> putStrLn $ errorBundlePretty err Right result -> case modelFromAst result of Left errors -> forM_ errors $ putStrLn . parseErrorPretty Right directives -> f directives
427
withFile :: String -> (Model -> IO ()) -> IO () withFile inputF f = do -- Parse the input file to list of [DateDir | ExpDir] rawResult <- runParser parseExpensesFile inputF <$> readFile inputF case rawResult of Left err -> putStrLn $ errorBundlePretty err Right result -> case modelFromAst result of Left errors -> forM_ errors $ putStrLn . parseErrorPretty Right directives -> f directives
427
withFile inputF f = do -- Parse the input file to list of [DateDir | ExpDir] rawResult <- runParser parseExpensesFile inputF <$> readFile inputF case rawResult of Left err -> putStrLn $ errorBundlePretty err Right result -> case modelFromAst result of Left errors -> forM_ errors $ putStrLn . parseErrorPretty Right directives -> f directives
379
false
true
0
15
102
132
60
72
null
null
nightscape/platform
editor/src/Editor.hs
mit
advancePath :: Path -> Box Text (Path,Region) -> Term V -> Maybe Path advancePath p box term = let isBlank p = maybe False (== Term.blank) (Paths.atTerm p term) scanHorizontal _ p | isBlank p = Just p scanHorizontal radius p = maybe (scanVertical radius p) (scanHorizontal radius) (Doc.right' box p) scanVertical 0 _ = Nothing scanVertical radius p = scanHorizontal (radius-1) =<< Doc.down' box p p' = Doc.contains box (Doc.region box p) p0 = leaf p' leaf p = maybe p leaf (Doc.contract' box p) in if isBlank p0 && p /= p0 then Just p0 else scanHorizontal (3::Int) p0
611
advancePath :: Path -> Box Text (Path,Region) -> Term V -> Maybe Path advancePath p box term = let isBlank p = maybe False (== Term.blank) (Paths.atTerm p term) scanHorizontal _ p | isBlank p = Just p scanHorizontal radius p = maybe (scanVertical radius p) (scanHorizontal radius) (Doc.right' box p) scanVertical 0 _ = Nothing scanVertical radius p = scanHorizontal (radius-1) =<< Doc.down' box p p' = Doc.contains box (Doc.region box p) p0 = leaf p' leaf p = maybe p leaf (Doc.contract' box p) in if isBlank p0 && p /= p0 then Just p0 else scanHorizontal (3::Int) p0
611
advancePath p box term = let isBlank p = maybe False (== Term.blank) (Paths.atTerm p term) scanHorizontal _ p | isBlank p = Just p scanHorizontal radius p = maybe (scanVertical radius p) (scanHorizontal radius) (Doc.right' box p) scanVertical 0 _ = Nothing scanVertical radius p = scanHorizontal (radius-1) =<< Doc.down' box p p' = Doc.contains box (Doc.region box p) p0 = leaf p' leaf p = maybe p leaf (Doc.contract' box p) in if isBlank p0 && p /= p0 then Just p0 else scanHorizontal (3::Int) p0
541
false
true
0
12
144
276
134
142
null
null
badp/ganeti
src/Ganeti/Path.hs
gpl-2.0
-- | Path to cluster configuration file. clusterConfFile :: IO FilePath clusterConfFile = dataDirP "config.data"
113
clusterConfFile :: IO FilePath clusterConfFile = dataDirP "config.data"
72
clusterConfFile = dataDirP "config.data"
41
true
true
0
5
15
18
9
9
null
null
jaspervdj/patat
lib/Patat/Presentation/Fragment.hs
gpl-2.0
fragmentBlock _ block@(Pandoc.DefinitionList {}) = [Append [block]]
67
fragmentBlock _ block@(Pandoc.DefinitionList {}) = [Append [block]]
67
fragmentBlock _ block@(Pandoc.DefinitionList {}) = [Append [block]]
67
false
false
0
9
6
32
17
15
null
null
mniip/zalgo
test/Test.hs
bsd-3-clause
indexOfSpec :: (forall a. Eq a => [a] -> [a] -> Maybe Int) -> SpecWith () indexOfSpec f = do it "finds a needle in the haystack" $ do f "[needle]" "hello[needle]world" `shouldBe` Just 5 f "[needle]" "some stuff" `shouldBe` Nothing it "finds a needle" $ property $ \as bs -> case f (as :: [Bool]) bs of Just i -> Data.List.isPrefixOf as $ drop i bs Nothing -> True it "finds the first needle in the haystack" $ do f "[needle]" "h[needle]el[needle]o[needle]wor[needle]ld" `shouldBe` Just 1 it "works in the beginning of a string" $ do f "[needle]" "[needle]helloworld" `shouldBe` Just 0 it "works in the end of a string" $ do f "[needle]" "helloworld[needle]" `shouldBe` Just 10 it "works on selfintersecting needles" $ do f "[needle[needle" "hello[needleworld[needle[needlestuff" `shouldBe` Just 17 it "works on needles consisting of the same element" $ do f "aaaa" "a|aa|aaa|aaaa|aaaaa" `shouldBe` Just 9 it "finds empty needles" $ property $ \as -> f [] (as :: [Bool]) == Just 0 it "doesn't find anything in empty haystacks" $ property $ \as -> not (null as) ==> f (as :: [Bool]) [] == Nothing context "works on lists of Bool" $ do it "finds the needle when it is in the haystack" $ property $ \as bs cs -> (not $ Data.List.isInfixOf as (bs ++ init as)) ==> f (as :: [Bool]) (bs ++ as ++ cs) == Just (length bs) it "returns Nothing when the needle is not in the haystack" $ property $ \as bs -> (not $ Data.List.isInfixOf as bs) ==> f (as :: [Bool]) bs == Nothing
1,659
indexOfSpec :: (forall a. Eq a => [a] -> [a] -> Maybe Int) -> SpecWith () indexOfSpec f = do it "finds a needle in the haystack" $ do f "[needle]" "hello[needle]world" `shouldBe` Just 5 f "[needle]" "some stuff" `shouldBe` Nothing it "finds a needle" $ property $ \as bs -> case f (as :: [Bool]) bs of Just i -> Data.List.isPrefixOf as $ drop i bs Nothing -> True it "finds the first needle in the haystack" $ do f "[needle]" "h[needle]el[needle]o[needle]wor[needle]ld" `shouldBe` Just 1 it "works in the beginning of a string" $ do f "[needle]" "[needle]helloworld" `shouldBe` Just 0 it "works in the end of a string" $ do f "[needle]" "helloworld[needle]" `shouldBe` Just 10 it "works on selfintersecting needles" $ do f "[needle[needle" "hello[needleworld[needle[needlestuff" `shouldBe` Just 17 it "works on needles consisting of the same element" $ do f "aaaa" "a|aa|aaa|aaaa|aaaaa" `shouldBe` Just 9 it "finds empty needles" $ property $ \as -> f [] (as :: [Bool]) == Just 0 it "doesn't find anything in empty haystacks" $ property $ \as -> not (null as) ==> f (as :: [Bool]) [] == Nothing context "works on lists of Bool" $ do it "finds the needle when it is in the haystack" $ property $ \as bs cs -> (not $ Data.List.isInfixOf as (bs ++ init as)) ==> f (as :: [Bool]) (bs ++ as ++ cs) == Just (length bs) it "returns Nothing when the needle is not in the haystack" $ property $ \as bs -> (not $ Data.List.isInfixOf as bs) ==> f (as :: [Bool]) bs == Nothing
1,659
indexOfSpec f = do it "finds a needle in the haystack" $ do f "[needle]" "hello[needle]world" `shouldBe` Just 5 f "[needle]" "some stuff" `shouldBe` Nothing it "finds a needle" $ property $ \as bs -> case f (as :: [Bool]) bs of Just i -> Data.List.isPrefixOf as $ drop i bs Nothing -> True it "finds the first needle in the haystack" $ do f "[needle]" "h[needle]el[needle]o[needle]wor[needle]ld" `shouldBe` Just 1 it "works in the beginning of a string" $ do f "[needle]" "[needle]helloworld" `shouldBe` Just 0 it "works in the end of a string" $ do f "[needle]" "helloworld[needle]" `shouldBe` Just 10 it "works on selfintersecting needles" $ do f "[needle[needle" "hello[needleworld[needle[needlestuff" `shouldBe` Just 17 it "works on needles consisting of the same element" $ do f "aaaa" "a|aa|aaa|aaaa|aaaaa" `shouldBe` Just 9 it "finds empty needles" $ property $ \as -> f [] (as :: [Bool]) == Just 0 it "doesn't find anything in empty haystacks" $ property $ \as -> not (null as) ==> f (as :: [Bool]) [] == Nothing context "works on lists of Bool" $ do it "finds the needle when it is in the haystack" $ property $ \as bs cs -> (not $ Data.List.isInfixOf as (bs ++ init as)) ==> f (as :: [Bool]) (bs ++ as ++ cs) == Just (length bs) it "returns Nothing when the needle is not in the haystack" $ property $ \as bs -> (not $ Data.List.isInfixOf as bs) ==> f (as :: [Bool]) bs == Nothing
1,585
false
true
0
19
459
557
269
288
null
null
comonoidial/ALFIN
RunTest.hs
mit
lookupFun :: String -> FunTable -> (FunAddr, Maybe NodeElem) lookupFun f fs = snd $ fromJust $ find (\(q,_) -> ('.':f) `isSuffixOf` show q) fs
142
lookupFun :: String -> FunTable -> (FunAddr, Maybe NodeElem) lookupFun f fs = snd $ fromJust $ find (\(q,_) -> ('.':f) `isSuffixOf` show q) fs
142
lookupFun f fs = snd $ fromJust $ find (\(q,_) -> ('.':f) `isSuffixOf` show q) fs
81
false
true
0
11
24
76
41
35
null
null
nevrenato/HetsAlloy
GUI/HTkGenericATP.hs
gpl-2.0
{- | Converts a 'ProofStatus' into a ('ProofStatusColour', 'String') tuple to be displayed by the GUI. -} toGuiStatus :: GenericConfig proofTree -- ^ current prover configuration -> ProofStatus a -- ^ status to convert -> (ProofStatusColour, String) toGuiStatus cf st = case goalStatus st of Proved c -> if c then statusProved else statusProvedButInconsistent Disproved -> statusDisproved _ -> if timeLimitExceeded cf then statusOpenTExceeded else statusOpen -- | stores widgets of an options frame and the frame itself
584
toGuiStatus :: GenericConfig proofTree -- ^ current prover configuration -> ProofStatus a -- ^ status to convert -> (ProofStatusColour, String) toGuiStatus cf st = case goalStatus st of Proved c -> if c then statusProved else statusProvedButInconsistent Disproved -> statusDisproved _ -> if timeLimitExceeded cf then statusOpenTExceeded else statusOpen -- | stores widgets of an options frame and the frame itself
474
toGuiStatus cf st = case goalStatus st of Proved c -> if c then statusProved else statusProvedButInconsistent Disproved -> statusDisproved _ -> if timeLimitExceeded cf then statusOpenTExceeded else statusOpen -- | stores widgets of an options frame and the frame itself
306
true
true
4
7
142
88
46
42
null
null
ksaveljev/hake-2
src/Constants.hs
bsd-3-clause
uSolid = 1 `shiftL` 27 :: Int
33
uSolid = 1 `shiftL` 27 :: Int
33
uSolid = 1 `shiftL` 27 :: Int
33
false
false
0
5
10
15
9
6
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Account permission collection. aplrAccountPermissions :: Lens' AccountPermissionsListResponse [AccountPermission] aplrAccountPermissions = lens _aplrAccountPermissions (\ s a -> s{_aplrAccountPermissions = a}) . _Default . _Coerce
255
aplrAccountPermissions :: Lens' AccountPermissionsListResponse [AccountPermission] aplrAccountPermissions = lens _aplrAccountPermissions (\ s a -> s{_aplrAccountPermissions = a}) . _Default . _Coerce
219
aplrAccountPermissions = lens _aplrAccountPermissions (\ s a -> s{_aplrAccountPermissions = a}) . _Default . _Coerce
136
true
true
3
8
44
58
28
30
null
null
shicks/shsh
System/Console/ShSh/Shell.hs
bsd-3-clause
redir _ p (1:>&2) = do eHandle -- this will mess stuff up sometimes? return (p { p_out = p_err p }, return ())
143
redir _ p (1:>&2) = do eHandle -- this will mess stuff up sometimes? return (p { p_out = p_err p }, return ())
143
redir _ p (1:>&2) = do eHandle -- this will mess stuff up sometimes? return (p { p_out = p_err p }, return ())
143
false
false
1
12
56
56
26
30
null
null
oldmanmike/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isFunPtrTy :: Type -> Bool isFunPtrTy ty | Just (tc, [_]) <- splitTyConApp_maybe ty = tc `hasKey` funPtrTyConKey | otherwise = False
140
isFunPtrTy :: Type -> Bool isFunPtrTy ty | Just (tc, [_]) <- splitTyConApp_maybe ty = tc `hasKey` funPtrTyConKey | otherwise = False
140
isFunPtrTy ty | Just (tc, [_]) <- splitTyConApp_maybe ty = tc `hasKey` funPtrTyConKey | otherwise = False
113
false
true
0
11
29
68
31
37
null
null
manyoo/reflex-dom
src-ghcjs/Reflex/Dom/Xhr/Foreign.hs
bsd-3-clause
xmlHttpRequestOnerror :: XMLHttpRequest -> EventM XMLHttpRequest XMLHttpRequestProgressEvent () -> IO (IO ()) xmlHttpRequestOnerror = (`on` error)
146
xmlHttpRequestOnerror :: XMLHttpRequest -> EventM XMLHttpRequest XMLHttpRequestProgressEvent () -> IO (IO ()) xmlHttpRequestOnerror = (`on` error)
146
xmlHttpRequestOnerror = (`on` error)
36
false
true
0
11
15
51
25
26
null
null
phaazon/quaazar
src/Quaazar/Render/GL/Texture.hs
bsd-3-clause
ya8Converter :: PixelYA8 -> [Float] ya8Converter (PixelYA8 y a) = map ((*imax8) . realToFrac) [y,a]
99
ya8Converter :: PixelYA8 -> [Float] ya8Converter (PixelYA8 y a) = map ((*imax8) . realToFrac) [y,a]
99
ya8Converter (PixelYA8 y a) = map ((*imax8) . realToFrac) [y,a]
63
false
true
0
8
14
51
28
23
null
null
balangs/eTeak
src/Bind.hs
bsd-3-clause
-- Check for colliding names bindPostBinding :: BindPost (Binding Decl) bindPostBinding (context:cs) (Complete, binding@(Binding _ name namespace _ decl)) = binding' where (lowVisible, _) = contextIndexRange context searchContext = case decl of ProcDecl {} | bindingIndex binding == lowVisible -> emptyContext | otherwise -> context { contextVisibleNameRange = (lowVisible, bindingIndex binding - 1) } _ -> context existingRef = findRefByName [searchContext] namespace name existingPos = bindingPos $ findBindingByRef [searchContext] $ fromJust existingRef pos = declPos decl binding' | existingRef /= Nothing = (Wrong [alreadyBound], binding) | otherwise = (Complete, binding) alreadyBound = Report pos $ "name `" ++ name ++ "' may already bound (at " ++ showPos (Just (last (context:cs))) existingPos ++ ")"
1,033
bindPostBinding :: BindPost (Binding Decl) bindPostBinding (context:cs) (Complete, binding@(Binding _ name namespace _ decl)) = binding' where (lowVisible, _) = contextIndexRange context searchContext = case decl of ProcDecl {} | bindingIndex binding == lowVisible -> emptyContext | otherwise -> context { contextVisibleNameRange = (lowVisible, bindingIndex binding - 1) } _ -> context existingRef = findRefByName [searchContext] namespace name existingPos = bindingPos $ findBindingByRef [searchContext] $ fromJust existingRef pos = declPos decl binding' | existingRef /= Nothing = (Wrong [alreadyBound], binding) | otherwise = (Complete, binding) alreadyBound = Report pos $ "name `" ++ name ++ "' may already bound (at " ++ showPos (Just (last (context:cs))) existingPos ++ ")"
996
bindPostBinding (context:cs) (Complete, binding@(Binding _ name namespace _ decl)) = binding' where (lowVisible, _) = contextIndexRange context searchContext = case decl of ProcDecl {} | bindingIndex binding == lowVisible -> emptyContext | otherwise -> context { contextVisibleNameRange = (lowVisible, bindingIndex binding - 1) } _ -> context existingRef = findRefByName [searchContext] namespace name existingPos = bindingPos $ findBindingByRef [searchContext] $ fromJust existingRef pos = declPos decl binding' | existingRef /= Nothing = (Wrong [alreadyBound], binding) | otherwise = (Complete, binding) alreadyBound = Report pos $ "name `" ++ name ++ "' may already bound (at " ++ showPos (Just (last (context:cs))) existingPos ++ ")"
953
true
true
5
13
337
285
144
141
null
null
emmanueltouzery/cigale-timesheet
src/EventProviders/Email.hs
mit
readLine :: Parsec BSL.ByteString st BSL.ByteString readLine = BL.pack <$> many (noneOf "\r\n") <* eol
102
readLine :: Parsec BSL.ByteString st BSL.ByteString readLine = BL.pack <$> many (noneOf "\r\n") <* eol
102
readLine = BL.pack <$> many (noneOf "\r\n") <* eol
50
false
true
2
7
14
48
21
27
null
null
plietar/super-user-spark
src/Parser.hs
mit
getFile :: Parser FilePath getFile = do pos <- getPosition let file = sourceName pos return file
108
getFile :: Parser FilePath getFile = do pos <- getPosition let file = sourceName pos return file
108
getFile = do pos <- getPosition let file = sourceName pos return file
81
false
true
0
10
28
39
17
22
null
null
noteed/sftp-streams
Network/SFTP/Messages.hs
bsd-3-clause
flagModifyTime = 0x00000020
27
flagModifyTime = 0x00000020
27
flagModifyTime = 0x00000020
27
false
false
0
4
2
6
3
3
null
null
PhDP/Sphinx-AI
Faun/Predicate.hs
mit
ground :: Predicate -> Bool ground (Predicate _ ts) = all Term.ground ts
72
ground :: Predicate -> Bool ground (Predicate _ ts) = all Term.ground ts
72
ground (Predicate _ ts) = all Term.ground ts
44
false
true
0
7
12
33
16
17
null
null
kawu/skladnica-with-walenty
src/NLP/Skladnica/Walenty.hs
bsd-2-clause
printCatStats :: CatStats -> IO () printCatStats catStats = do putStrLn "length,nodes,edges,waitnodes,waitedges,number" forM_ (M.toList catStats) $ \(len, atom) -> do putStr (show len) putStr "," printAtomStats atom
231
printCatStats :: CatStats -> IO () printCatStats catStats = do putStrLn "length,nodes,edges,waitnodes,waitedges,number" forM_ (M.toList catStats) $ \(len, atom) -> do putStr (show len) putStr "," printAtomStats atom
231
printCatStats catStats = do putStrLn "length,nodes,edges,waitnodes,waitedges,number" forM_ (M.toList catStats) $ \(len, atom) -> do putStr (show len) putStr "," printAtomStats atom
196
false
true
0
13
42
82
37
45
null
null
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Types/Substitutions.hs
bsd-3-clause
appSubst :: Subst -> Symbol -> Expr appSubst (Su s) x = fromMaybe (EVar x) (M.lookup x s)
89
appSubst :: Subst -> Symbol -> Expr appSubst (Su s) x = fromMaybe (EVar x) (M.lookup x s)
89
appSubst (Su s) x = fromMaybe (EVar x) (M.lookup x s)
53
false
true
0
10
17
57
26
31
null
null
urbanslug/ghc
testsuite/tests/driver/dynamic_flags_001/C.hs
bsd-3-clause
c_type_default :: Int c_type_default = 2 ^ 2
44
c_type_default :: Int c_type_default = 2 ^ 2
44
c_type_default = 2 ^ 2
22
false
true
2
6
7
23
9
14
null
null
seereason/ghcjs
src/Gen2/Sinker.hs
mit
foldArgsE :: Fold StgExpr Id foldArgsE f (StgApp x args) = StgApp <$> f x <*> (traverse . foldArgsA) f args
118
foldArgsE :: Fold StgExpr Id foldArgsE f (StgApp x args) = StgApp <$> f x <*> (traverse . foldArgsA) f args
118
foldArgsE f (StgApp x args) = StgApp <$> f x <*> (traverse . foldArgsA) f args
89
false
true
0
8
31
52
25
27
null
null
vladimir-ipatov/ganeti
src/Ganeti/Constants.hs
gpl-2.0
hvKvmCdromDiskType :: String hvKvmCdromDiskType = "cdrom_disk_type"
67
hvKvmCdromDiskType :: String hvKvmCdromDiskType = "cdrom_disk_type"
67
hvKvmCdromDiskType = "cdrom_disk_type"
38
false
true
0
6
5
18
7
11
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/UniqDSet.hs
bsd-3-clause
partitionUniqDSet :: (a -> Bool) -> UniqDSet a -> (UniqDSet a, UniqDSet a) partitionUniqDSet = partitionUDFM
108
partitionUniqDSet :: (a -> Bool) -> UniqDSet a -> (UniqDSet a, UniqDSet a) partitionUniqDSet = partitionUDFM
108
partitionUniqDSet = partitionUDFM
33
false
true
0
8
15
41
21
20
null
null
juretta/haskell-jwt
tests/src/Web/JWTTests.hs
mit
case_decodeAndVerifyJWTAlgoNone = do {- - Header: { "alg": "none", "typ": "JWT" } Payload: { "iss": "https://jwt-idp.example.com", "sub": "mailto:mike@example.com", "nbf": 1425980755, "exp": 1425984355, "iat": 1425980755, "jti": "id123456", "typ": "https://example.com/register" } -} let input = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJpc3MiOiJodHRwczovL2p3dC1pZHAuZXhhbXBsZS5jb20iLCJzdWIiOiJtYWlsdG86bWlrZUBleGFtcGxlLmNvbSIsIm5iZiI6MTQyNTk4MDc1NSwiZXhwIjoxNDI1OTg0MzU1LCJpYXQiOjE0MjU5ODA3NTUsImp0aSI6ImlkMTIzNDU2IiwidHlwIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9yZWdpc3RlciJ9." mJwt = decodeAndVerifySignature (secret "secretkey") input False @=? isJust mJwt
856
case_decodeAndVerifyJWTAlgoNone = do {- - Header: { "alg": "none", "typ": "JWT" } Payload: { "iss": "https://jwt-idp.example.com", "sub": "mailto:mike@example.com", "nbf": 1425980755, "exp": 1425984355, "iat": 1425980755, "jti": "id123456", "typ": "https://example.com/register" } -} let input = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJpc3MiOiJodHRwczovL2p3dC1pZHAuZXhhbXBsZS5jb20iLCJzdWIiOiJtYWlsdG86bWlrZUBleGFtcGxlLmNvbSIsIm5iZiI6MTQyNTk4MDc1NSwiZXhwIjoxNDI1OTg0MzU1LCJpYXQiOjE0MjU5ODA3NTUsImp0aSI6ImlkMTIzNDU2IiwidHlwIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9yZWdpc3RlciJ9." mJwt = decodeAndVerifySignature (secret "secretkey") input False @=? isJust mJwt
856
case_decodeAndVerifyJWTAlgoNone = do {- - Header: { "alg": "none", "typ": "JWT" } Payload: { "iss": "https://jwt-idp.example.com", "sub": "mailto:mike@example.com", "nbf": 1425980755, "exp": 1425984355, "iat": 1425980755, "jti": "id123456", "typ": "https://example.com/register" } -} let input = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJpc3MiOiJodHRwczovL2p3dC1pZHAuZXhhbXBsZS5jb20iLCJzdWIiOiJtYWlsdG86bWlrZUBleGFtcGxlLmNvbSIsIm5iZiI6MTQyNTk4MDc1NSwiZXhwIjoxNDI1OTg0MzU1LCJpYXQiOjE0MjU5ODA3NTUsImp0aSI6ImlkMTIzNDU2IiwidHlwIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9yZWdpc3RlciJ9." mJwt = decodeAndVerifySignature (secret "secretkey") input False @=? isJust mJwt
856
false
false
0
12
251
42
20
22
null
null
andersk/haskell-cgi
Network/CGI/Protocol.hs
bsd-3-clause
formatResponse :: ByteString -> Headers -> ByteString formatResponse c hs = -- NOTE: we use CRLF since lighttpd mod_fastcgi can't handle -- just LF if there are CRs in the content. unlinesCrLf ([BS.pack (n++": "++v) | (HeaderName n,v) <- hs] ++ [BS.empty,c]) where unlinesCrLf = BS.concat . intersperse (BS.pack "\r\n")
351
formatResponse :: ByteString -> Headers -> ByteString formatResponse c hs = -- NOTE: we use CRLF since lighttpd mod_fastcgi can't handle -- just LF if there are CRs in the content. unlinesCrLf ([BS.pack (n++": "++v) | (HeaderName n,v) <- hs] ++ [BS.empty,c]) where unlinesCrLf = BS.concat . intersperse (BS.pack "\r\n")
351
formatResponse c hs = -- NOTE: we use CRLF since lighttpd mod_fastcgi can't handle -- just LF if there are CRs in the content. unlinesCrLf ([BS.pack (n++": "++v) | (HeaderName n,v) <- hs] ++ [BS.empty,c]) where unlinesCrLf = BS.concat . intersperse (BS.pack "\r\n")
297
false
true
0
12
81
105
55
50
null
null
SuperDrew/sql-server-gen
src/Database/SqlServer/Definition/DataType.hs
bsd-2-clause
storageOptions (VarChar _ _ s) = s
34
storageOptions (VarChar _ _ s) = s
34
storageOptions (VarChar _ _ s) = s
34
false
false
0
6
6
20
9
11
null
null
rrnewton/hgdata
src/Network/Google/Books.hs
mit
totalItems :: JSValue -- ^ The books' metadata. -> Int -- ^ The total number of books in the shelf. totalItems (JSObject books) = let Ok count = "totalItems" `valFromObj` books in count
210
totalItems :: JSValue -- ^ The books' metadata. -> Int totalItems (JSObject books) = let Ok count = "totalItems" `valFromObj` books in count
160
totalItems (JSObject books) = let Ok count = "totalItems" `valFromObj` books in count
97
true
true
0
9
57
49
24
25
null
null
alios/clearingstelle
Settings.hs
bsd-3-clause
-- | The base URL for your static files. As you can see by the default -- value, this can simply be "static" appended to your application root. -- A powerful optimization can be serving static files from a separate -- domain name. This allows you to use a web server optimized for static -- files, more easily set expires and cache values, and avoid possibly -- costly transference of cookies on static files. For more information, -- please see: -- http://code.google.com/speed/page-speed/docs/request.html#ServeFromCookielessDomain -- -- If you change the resource pattern for StaticR in Foundation.hs, you will -- have to make a corresponding change here. -- -- To see how this value is used, see urlRenderOverride in Foundation.hs staticRoot :: AppConfig DefaultEnv -> Text staticRoot conf = [st|#{appRoot conf}/static|]
827
staticRoot :: AppConfig DefaultEnv -> Text staticRoot conf = [st|#{appRoot conf}/static|]
90
staticRoot conf = [st|#{appRoot conf}/static|]
46
true
true
0
6
130
38
27
11
null
null
adriannovegil/thinking-in-haskell
01-introduccion/01-funciones/elemental.hs
gpl-2.0
-- 05 - Última ficra de un número. -- ----------------------------------------------------------------------------- -- Definirla la función ultimaCifra tal que (ultimaCifra x) es la última cifra -- del número x. Por ejemplo, -- -- ultimaCifra 325 == 5 ultimaCifra x = rem x 10
277
ultimaCifra x = rem x 10
24
ultimaCifra x = rem x 10
24
true
false
0
5
41
20
12
8
null
null
basvandijk/cassava
Data/Csv/Encoding.hs
bsd-3-clause
intersperse :: Builder -> [Builder] -> [Builder] intersperse _ [] = []
77
intersperse :: Builder -> [Builder] -> [Builder] intersperse _ [] = []
77
intersperse _ [] = []
28
false
true
0
9
18
40
19
21
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 4880485 = 3615
34
getValueFromProduct 4880485 = 3615
34
getValueFromProduct 4880485 = 3615
34
false
false
0
5
3
9
4
5
null
null
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/Connect/Get.hs
mpl-2.0
-- | Optional. Optional snapshot read timestamp to trade freshness for -- performance. cgReadTime :: Lens' ConnectGet (Maybe UTCTime) cgReadTime = lens _cgReadTime (\ s a -> s{_cgReadTime = a}) . mapping _DateTime
221
cgReadTime :: Lens' ConnectGet (Maybe UTCTime) cgReadTime = lens _cgReadTime (\ s a -> s{_cgReadTime = a}) . mapping _DateTime
134
cgReadTime = lens _cgReadTime (\ s a -> s{_cgReadTime = a}) . mapping _DateTime
87
true
true
0
10
40
56
29
27
null
null
Solumin/ScriptNScribe
src/BreveLang.hs
mit
parseReturn :: Parser Statement parseReturn = Return <$> (b_reserved "return" *> parseExpr)
91
parseReturn :: Parser Statement parseReturn = Return <$> (b_reserved "return" *> parseExpr)
91
parseReturn = Return <$> (b_reserved "return" *> parseExpr)
59
false
true
0
8
11
28
14
14
null
null
4ZP6Capstone2015/ampersand
src/Database/Design/Ampersand/Input/ADL1/FilePos.hs
gpl-3.0
updatePos pos _ = addPos 1 pos
33
updatePos pos _ = addPos 1 pos
33
updatePos pos _ = addPos 1 pos
33
false
false
0
5
9
18
7
11
null
null
madjestic/b1
src/B1/Program/Chart/ChartFrame.hs
bsd-3-clause
newFrameState :: FrameOptions -> TaskManager -> Maybe Symbol -> IO FrameState newFrameState options@FrameOptions { chartOptions = chartOptions } taskManager maybeSymbol = do let createChart = newChartContent chartOptions taskManager content <- case maybeSymbol of Just symbol -> createChart symbol _ -> return Instructions return FrameState { options = options , createChart = createChart , maybeCurrentFrame = Just Frame { content = content , scaleAnimation = incomingScaleAnimation , alphaAnimation = incomingAlphaAnimation } , maybePreviousFrame = Nothing }
642
newFrameState :: FrameOptions -> TaskManager -> Maybe Symbol -> IO FrameState newFrameState options@FrameOptions { chartOptions = chartOptions } taskManager maybeSymbol = do let createChart = newChartContent chartOptions taskManager content <- case maybeSymbol of Just symbol -> createChart symbol _ -> return Instructions return FrameState { options = options , createChart = createChart , maybeCurrentFrame = Just Frame { content = content , scaleAnimation = incomingScaleAnimation , alphaAnimation = incomingAlphaAnimation } , maybePreviousFrame = Nothing }
642
newFrameState options@FrameOptions { chartOptions = chartOptions } taskManager maybeSymbol = do let createChart = newChartContent chartOptions taskManager content <- case maybeSymbol of Just symbol -> createChart symbol _ -> return Instructions return FrameState { options = options , createChart = createChart , maybeCurrentFrame = Just Frame { content = content , scaleAnimation = incomingScaleAnimation , alphaAnimation = incomingAlphaAnimation } , maybePreviousFrame = Nothing }
564
false
true
1
13
156
162
79
83
null
null
leshchevds/ganeti
src/Ganeti/Hs2Py/OpDoc.hs
bsd-2-clause
opNodeAdd :: String opNodeAdd = "Add a node to the cluster.\n\ \\n\ \ @type node_name: C{str}\n\ \ @ivar node_name: The name of the node to add. This can be a short name,\n\ \ but it will be expanded to the FQDN.\n\ \ @type primary_ip: IP address\n\ \ @ivar primary_ip: The primary IP of the node. This will be ignored when\n\ \ the opcode is submitted, but will be filled during the\n\ \ node add (so it will be visible in the job query).\n\ \ @type secondary_ip: IP address\n\ \ @ivar secondary_ip: The secondary IP of the node. This needs to be passed\n\ \ if the cluster has been initialized in 'dual-network'\n\ \ mode, otherwise it must not be given.\n\ \ @type readd: C{bool}\n\ \ @ivar readd: Whether to re-add an existing node to the cluster. If\n\ \ this is not passed, then the operation will abort if the node\n\ \ name is already in the cluster; use this parameter to\n\ \ 'repair' a node that had its configuration broken, or was\n\ \ reinstalled without removal from the cluster.\n\ \ @type group: C{str}\n\ \ @ivar group: The node group to which this node will belong.\n\ \ @type vm_capable: C{bool}\n\ \ @ivar vm_capable: The vm_capable node attribute\n\ \ @type master_capable: C{bool}\n\ \ @ivar master_capable: The master_capable node attribute"
1,435
opNodeAdd :: String opNodeAdd = "Add a node to the cluster.\n\ \\n\ \ @type node_name: C{str}\n\ \ @ivar node_name: The name of the node to add. This can be a short name,\n\ \ but it will be expanded to the FQDN.\n\ \ @type primary_ip: IP address\n\ \ @ivar primary_ip: The primary IP of the node. This will be ignored when\n\ \ the opcode is submitted, but will be filled during the\n\ \ node add (so it will be visible in the job query).\n\ \ @type secondary_ip: IP address\n\ \ @ivar secondary_ip: The secondary IP of the node. This needs to be passed\n\ \ if the cluster has been initialized in 'dual-network'\n\ \ mode, otherwise it must not be given.\n\ \ @type readd: C{bool}\n\ \ @ivar readd: Whether to re-add an existing node to the cluster. If\n\ \ this is not passed, then the operation will abort if the node\n\ \ name is already in the cluster; use this parameter to\n\ \ 'repair' a node that had its configuration broken, or was\n\ \ reinstalled without removal from the cluster.\n\ \ @type group: C{str}\n\ \ @ivar group: The node group to which this node will belong.\n\ \ @type vm_capable: C{bool}\n\ \ @ivar vm_capable: The vm_capable node attribute\n\ \ @type master_capable: C{bool}\n\ \ @ivar master_capable: The master_capable node attribute"
1,435
opNodeAdd = "Add a node to the cluster.\n\ \\n\ \ @type node_name: C{str}\n\ \ @ivar node_name: The name of the node to add. This can be a short name,\n\ \ but it will be expanded to the FQDN.\n\ \ @type primary_ip: IP address\n\ \ @ivar primary_ip: The primary IP of the node. This will be ignored when\n\ \ the opcode is submitted, but will be filled during the\n\ \ node add (so it will be visible in the job query).\n\ \ @type secondary_ip: IP address\n\ \ @ivar secondary_ip: The secondary IP of the node. This needs to be passed\n\ \ if the cluster has been initialized in 'dual-network'\n\ \ mode, otherwise it must not be given.\n\ \ @type readd: C{bool}\n\ \ @ivar readd: Whether to re-add an existing node to the cluster. If\n\ \ this is not passed, then the operation will abort if the node\n\ \ name is already in the cluster; use this parameter to\n\ \ 'repair' a node that had its configuration broken, or was\n\ \ reinstalled without removal from the cluster.\n\ \ @type group: C{str}\n\ \ @ivar group: The node group to which this node will belong.\n\ \ @type vm_capable: C{bool}\n\ \ @ivar vm_capable: The vm_capable node attribute\n\ \ @type master_capable: C{bool}\n\ \ @ivar master_capable: The master_capable node attribute"
1,415
false
true
0
4
385
11
6
5
null
null
bertdouglas/euler-haskell
001-050/13a.hs
mit
main = print $ solve numbers
28
main = print $ solve numbers
28
main = print $ solve numbers
28
false
false
3
5
5
17
6
11
null
null
facebookincubator/duckling
Duckling/Rules.hs
bsd-3-clause
localeRules PL = PLRules.localeRules
36
localeRules PL = PLRules.localeRules
36
localeRules PL = PLRules.localeRules
36
false
false
0
5
3
11
5
6
null
null
csrhodes/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
exampleRef :: MarkdownParser (F Inlines) exampleRef = try $ do guardEnabled Ext_example_lists char '@' lab <- many1 (alphaNum <|> oneOf "-_") return $ do st <- askF return $ case M.lookup lab (stateExamples st) of Just n -> B.str (show n) Nothing -> B.str ('@':lab)
322
exampleRef :: MarkdownParser (F Inlines) exampleRef = try $ do guardEnabled Ext_example_lists char '@' lab <- many1 (alphaNum <|> oneOf "-_") return $ do st <- askF return $ case M.lookup lab (stateExamples st) of Just n -> B.str (show n) Nothing -> B.str ('@':lab)
322
exampleRef = try $ do guardEnabled Ext_example_lists char '@' lab <- many1 (alphaNum <|> oneOf "-_") return $ do st <- askF return $ case M.lookup lab (stateExamples st) of Just n -> B.str (show n) Nothing -> B.str ('@':lab)
281
false
true
0
17
101
132
60
72
null
null
reinvdwoerd/lisp
src/Types.hs
mit
walk :: (LispVal -> LispM LispVal) -> LispVal -> LispM LispVal walk f val = do result <- f val case result of List items -> List <$> traverse (walk f) items _ -> return result
199
walk :: (LispVal -> LispM LispVal) -> LispVal -> LispM LispVal walk f val = do result <- f val case result of List items -> List <$> traverse (walk f) items _ -> return result
199
walk f val = do result <- f val case result of List items -> List <$> traverse (walk f) items _ -> return result
136
false
true
0
13
59
87
40
47
null
null
batterseapower/context-semantics
Language/ContextSemantics/LinearLambda.hs
bsd-3-clause
-- -- Translation from traditional linear lambda calculus -- exprSemantics :: Expr -> (Port, [(String, Port)]) exprSemantics e = exprSemantics' (fv "Input") [(v, fv v) | v <- freeVars e] e
189
exprSemantics :: Expr -> (Port, [(String, Port)]) exprSemantics e = exprSemantics' (fv "Input") [(v, fv v) | v <- freeVars e] e
127
exprSemantics e = exprSemantics' (fv "Input") [(v, fv v) | v <- freeVars e] e
77
true
true
0
9
31
72
40
32
null
null
nomeata/ghc
compiler/codeGen/CgPrimOp.hs
bsd-3-clause
emitPrimOp [r] IndexArrayOp [obj,ix] _ = doReadPtrArrayOp r obj ix
69
emitPrimOp [r] IndexArrayOp [obj,ix] _ = doReadPtrArrayOp r obj ix
69
emitPrimOp [r] IndexArrayOp [obj,ix] _ = doReadPtrArrayOp r obj ix
69
false
false
1
6
12
35
16
19
null
null
phylake/kademlia
Network/DHT/Kademlia/Util.hs
bsd-3-clause
forkIO_ :: IO () -> IO () forkIO_ = void . forkIO
49
forkIO_ :: IO () -> IO () forkIO_ = void . forkIO
49
forkIO_ = void . forkIO
23
false
true
1
8
11
36
15
21
null
null
haskell/haddock
haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
bsd-2-clause
divPackageHeader, divContent, divModuleHeader, divFooter, divTableOfContents, divDescription, divSynopsis, divInterface, divIndex, divAlphabet, divModuleList, divContentsList :: Html -> Html divPackageHeader = sectionDiv "package-header"
249
divPackageHeader, divContent, divModuleHeader, divFooter, divTableOfContents, divDescription, divSynopsis, divInterface, divIndex, divAlphabet, divModuleList, divContentsList :: Html -> Html divPackageHeader = sectionDiv "package-header"
248
divPackageHeader = sectionDiv "package-header"
49
false
true
1
5
31
41
31
10
null
null
tabemann/amphibian
src_old/Network/IRC/Client/Amphibian/Default.hs
bsd-3-clause
getDirectory :: (String -> IO FilePath) -> IO FilePath getDirectory query = do newDir <- query $ T.unpack applicationName newDirExists <- doesDirectoryExist newDir if newDirExists then return newDir else do oldDir <- getAppUserDataDirectory $ T.upack applicationName oldDirExists <- doesDirectoryExist oldDir if oldDirExists then return oldDir else do createDirectoryIfMissing True newDir return newDir
444
getDirectory :: (String -> IO FilePath) -> IO FilePath getDirectory query = do newDir <- query $ T.unpack applicationName newDirExists <- doesDirectoryExist newDir if newDirExists then return newDir else do oldDir <- getAppUserDataDirectory $ T.upack applicationName oldDirExists <- doesDirectoryExist oldDir if oldDirExists then return oldDir else do createDirectoryIfMissing True newDir return newDir
444
getDirectory query = do newDir <- query $ T.unpack applicationName newDirExists <- doesDirectoryExist newDir if newDirExists then return newDir else do oldDir <- getAppUserDataDirectory $ T.upack applicationName oldDirExists <- doesDirectoryExist oldDir if oldDirExists then return oldDir else do createDirectoryIfMissing True newDir return newDir
389
false
true
0
13
93
125
56
69
null
null
jsavatgy/hatupist
code/aboutDialog.hs
gpl-2.0
drawKeyrowsCanvas gsRef canvas _evt = do gs <- readIORef gsRef writeIORef gsRef gs { lastLetter = nextLetter gs } let c = nextLetter gs selected = [toUpper c] dupl = toUpper c == toUpper (lastLetter gs) keymap = [keyrow1 (s gs), keyrow2 (s gs), keyrow3 (s gs)] leK y = length (keymap !! y) keyK x y = [toUpper ((keymap !! y) !! x)] drawWin <- widgetGetDrawWindow canvas renderWithDrawable drawWin (do mapM ( \(x,y,k) -> drawKey x y k (k == selected) dupl) [(x,y,keyK x y)| y <- [0..2], x <- [0..(leK y)-1], keyK x y /= " "] return True)
605
drawKeyrowsCanvas gsRef canvas _evt = do gs <- readIORef gsRef writeIORef gsRef gs { lastLetter = nextLetter gs } let c = nextLetter gs selected = [toUpper c] dupl = toUpper c == toUpper (lastLetter gs) keymap = [keyrow1 (s gs), keyrow2 (s gs), keyrow3 (s gs)] leK y = length (keymap !! y) keyK x y = [toUpper ((keymap !! y) !! x)] drawWin <- widgetGetDrawWindow canvas renderWithDrawable drawWin (do mapM ( \(x,y,k) -> drawKey x y k (k == selected) dupl) [(x,y,keyK x y)| y <- [0..2], x <- [0..(leK y)-1], keyK x y /= " "] return True)
605
drawKeyrowsCanvas gsRef canvas _evt = do gs <- readIORef gsRef writeIORef gsRef gs { lastLetter = nextLetter gs } let c = nextLetter gs selected = [toUpper c] dupl = toUpper c == toUpper (lastLetter gs) keymap = [keyrow1 (s gs), keyrow2 (s gs), keyrow3 (s gs)] leK y = length (keymap !! y) keyK x y = [toUpper ((keymap !! y) !! x)] drawWin <- widgetGetDrawWindow canvas renderWithDrawable drawWin (do mapM ( \(x,y,k) -> drawKey x y k (k == selected) dupl) [(x,y,keyK x y)| y <- [0..2], x <- [0..(leK y)-1], keyK x y /= " "] return True)
605
false
false
0
18
169
313
155
158
null
null
JakDar/lab6-project
src/Lab2.hs
bsd-3-clause
- |Function changing the order of two arguments flip2 :: (a -> b -> c) -> b -> a -> c flip2 f a b = f b a
106
flip2 :: (a -> b -> c) -> b -> a -> c flip2 f a b = f b a
57
flip2 f a b = f b a
19
true
true
2
10
29
56
27
29
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/Texinfo.hs
gpl-2.0
inlineToTexinfo (Strikeout lst) = do modify $ \st -> st{ stStrikeout = True } contents <- inlineListToTexinfo lst return $ text "@textstrikeout{" <> contents <> text "}"
175
inlineToTexinfo (Strikeout lst) = do modify $ \st -> st{ stStrikeout = True } contents <- inlineListToTexinfo lst return $ text "@textstrikeout{" <> contents <> text "}"
175
inlineToTexinfo (Strikeout lst) = do modify $ \st -> st{ stStrikeout = True } contents <- inlineListToTexinfo lst return $ text "@textstrikeout{" <> contents <> text "}"
175
false
false
0
10
32
66
31
35
null
null
ExNexu/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
-- | The initial state for the compiler idrisInit :: IState idrisInit = IState initContext S.empty [] emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext [] [] [] defaultOpts 6 [] [] [] [] emptySyntaxRules [] [] [] [] [] [] [] [] [] Nothing [] Nothing [] [] Nothing Nothing [] Hidden False [] Nothing [] [] (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
811
idrisInit :: IState idrisInit = IState initContext S.empty [] emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext [] [] [] defaultOpts 6 [] [] [] [] emptySyntaxRules [] [] [] [] [] [] [] [] [] Nothing [] Nothing [] [] Nothing Nothing [] Hidden False [] Nothing [] [] (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
771
idrisInit = IState initContext S.empty [] emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext emptyContext [] [] [] defaultOpts 6 [] [] [] [] emptySyntaxRules [] [] [] [] [] [] [] [] [] Nothing [] Nothing [] [] Nothing Nothing [] Hidden False [] Nothing [] [] (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
751
true
true
0
7
259
272
124
148
null
null
shaunstanislaus/caramel
src/Lambda.hs
mit
pretty :: Term -> String pretty (Var n) = show n
50
pretty :: Term -> String pretty (Var n) = show n
50
pretty (Var n) = show n
25
false
true
0
9
12
32
14
18
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxTEXT_ATTR_FONT_FACE :: Int wxTEXT_ATTR_FONT_FACE = 0x00000004
85
wxTEXT_ATTR_FONT_FACE :: Int wxTEXT_ATTR_FONT_FACE = 0x00000004
85
wxTEXT_ATTR_FONT_FACE = 0x00000004
45
false
true
0
4
27
11
6
5
null
null
fmapfmapfmap/amazonka
amazonka-importexport/gen/Network/AWS/ImportExport/CreateJob.hs
mpl-2.0
-- | Undocumented member. cjManifest :: Lens' CreateJob Text cjManifest = lens _cjManifest (\ s a -> s{_cjManifest = a})
120
cjManifest :: Lens' CreateJob Text cjManifest = lens _cjManifest (\ s a -> s{_cjManifest = a})
94
cjManifest = lens _cjManifest (\ s a -> s{_cjManifest = a})
59
true
true
1
9
19
45
22
23
null
null