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
byorgey/Idris-dev
src/Core/ProofState.hs
bsd-3-clause
focus :: Name -> RunTactic focus n ctxt env t = do action (\ps -> let hs = holes ps in if n `elem` hs then ps { holes = n : (hs \\ [n]) } else ps) ps <- get return t
352
focus :: Name -> RunTactic focus n ctxt env t = do action (\ps -> let hs = holes ps in if n `elem` hs then ps { holes = n : (hs \\ [n]) } else ps) ps <- get return t
352
focus n ctxt env t = do action (\ps -> let hs = holes ps in if n `elem` hs then ps { holes = n : (hs \\ [n]) } else ps) ps <- get return t
325
false
true
0
19
229
107
53
54
null
null
et4te/zero
server/src/Zero/Bittrex/Handlers.hs
bsd-3-clause
------------------------------------------------------------------------------ marketSummary :: Maybe Text -> ClientM (Message [MarketSummary]) marketSummary = client bittrexAPI
178
marketSummary :: Maybe Text -> ClientM (Message [MarketSummary]) marketSummary = client bittrexAPI
98
marketSummary = client bittrexAPI
33
true
true
0
9
13
34
17
17
null
null
reinerp/CoreFoundation
C2HS.hs
bsd-3-clause
-- Conversion routines -- ------------------- -- |Integral conversion -- cIntConv :: (Integral a, Integral b) => a -> b cIntConv = fromIntegral
145
cIntConv :: (Integral a, Integral b) => a -> b cIntConv = fromIntegral
71
cIntConv = fromIntegral
24
true
true
0
8
23
41
21
20
null
null
phischu/fragnix
tests/packages/scotty/Network.HTTP.Types.URI.hs
bsd-3-clause
encodePathSegments :: [Text] -> Blaze.Builder encodePathSegments [] = mempty
76
encodePathSegments :: [Text] -> Blaze.Builder encodePathSegments [] = mempty
76
encodePathSegments [] = mempty
30
false
true
0
6
8
25
13
12
null
null
ababkin/qmuli
library/Qi/Options.hs
mit
awsModeOption :: Parser AwsMode awsModeOption = flag RealDeal LocalStack $ long "local-stack" <> help "Specify whether to use localstack mock or the real AWS"
164
awsModeOption :: Parser AwsMode awsModeOption = flag RealDeal LocalStack $ long "local-stack" <> help "Specify whether to use localstack mock or the real AWS"
164
awsModeOption = flag RealDeal LocalStack $ long "local-stack" <> help "Specify whether to use localstack mock or the real AWS"
132
false
true
2
6
29
41
16
25
null
null
dkandalov/katas
haskell/p99/src/p9x/p00/P00_.hs
unlicense
myButLast''' (_:xs) = myButLast''' xs
37
myButLast''' (_:xs) = myButLast''' xs
37
myButLast''' (_:xs) = myButLast''' xs
37
false
false
0
7
4
19
9
10
null
null
Softsapiens/mini-complete-servant
src/Config.hs
mit
makePool :: Environment -> IO ConnectionPool makePool Test = runNoLoggingT $ createPostgresqlPool (connStr Test) (envPool Test)
127
makePool :: Environment -> IO ConnectionPool makePool Test = runNoLoggingT $ createPostgresqlPool (connStr Test) (envPool Test)
127
makePool Test = runNoLoggingT $ createPostgresqlPool (connStr Test) (envPool Test)
82
false
true
0
8
15
42
20
22
null
null
mcschroeder/ghc
compiler/types/Type.hs
bsd-3-clause
-- | Like 'splitTyConApp_maybe', but doesn't look through synonyms. This -- assumes the synonyms have already been dealt with. repSplitTyConApp_maybe :: Type -> Maybe (TyCon, [Type]) repSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)
248
repSplitTyConApp_maybe :: Type -> Maybe (TyCon, [Type]) repSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)
121
repSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)
65
true
true
0
8
41
49
27
22
null
null
mattias-lundell/timber-llvm
src/Type.hs
bsd-3-clause
tiCmd env (CLet bs c) = do (s,pe,bs) <- tiBinds env bs (s',pe',t,c) <- tiCmd (addTEnv (tsigsOf bs) env) c return (s++s', pe++pe', t, CLet bs c) -- Compute a list of
250
tiCmd env (CLet bs c) = do (s,pe,bs) <- tiBinds env bs (s',pe',t,c) <- tiCmd (addTEnv (tsigsOf bs) env) c return (s++s', pe++pe', t, CLet bs c) -- Compute a list of
250
tiCmd env (CLet bs c) = do (s,pe,bs) <- tiBinds env bs (s',pe',t,c) <- tiCmd (addTEnv (tsigsOf bs) env) c return (s++s', pe++pe', t, CLet bs c) -- Compute a list of
250
false
false
0
12
117
112
57
55
null
null
Sobieck00/practice
pe/nonvisualstudio/haskell/OldWork/Implementation/Problem0005.hs
mit
removeMultiplesInList list = [x | x <- list, doesDivideEvenlyIntoLargerNumbersInList x list /= True ]
101
removeMultiplesInList list = [x | x <- list, doesDivideEvenlyIntoLargerNumbersInList x list /= True ]
101
removeMultiplesInList list = [x | x <- list, doesDivideEvenlyIntoLargerNumbersInList x list /= True ]
101
false
false
0
8
13
33
16
17
null
null
gnn/Hets
OWL2/XMLKeywords.hs
gpl-2.0
dataPropertyAssertionK :: String dataPropertyAssertionK = "DataPropertyAssertion"
81
dataPropertyAssertionK :: String dataPropertyAssertionK = "DataPropertyAssertion"
81
dataPropertyAssertionK = "DataPropertyAssertion"
48
false
true
0
6
5
18
7
11
null
null
enolan/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
highestFC (PPatvar fc _) = Just fc
43
highestFC (PPatvar fc _) = Just fc
43
highestFC (PPatvar fc _) = Just fc
43
false
false
0
6
15
21
9
12
null
null
kRITZCREEK/psc-ide
src/PureScript/Ide.hs
mit
loadReexports :: (PscIde m, MonadLogger m, MonadError PscIdeError m) => Module -> m [ModuleIdent] loadReexports m = case getReexports m of [] -> pure [] exportDeps -> do -- I'm fine with this crashing on a failed pattern match. -- If this ever fails I'll need to look at GADTs let reexports = map (\(Export mn) -> mn) exportDeps $(logDebug) ("Loading reexports for module: " <> fst m <> " reexports: " <> (T.intercalate ", " reexports)) traverse_ loadModule reexports exportDepsModules <- catMaybes <$> traverse getModule reexports exportDepDeps <- traverse loadReexports exportDepsModules return $ concat exportDepDeps
688
loadReexports :: (PscIde m, MonadLogger m, MonadError PscIdeError m) => Module -> m [ModuleIdent] loadReexports m = case getReexports m of [] -> pure [] exportDeps -> do -- I'm fine with this crashing on a failed pattern match. -- If this ever fails I'll need to look at GADTs let reexports = map (\(Export mn) -> mn) exportDeps $(logDebug) ("Loading reexports for module: " <> fst m <> " reexports: " <> (T.intercalate ", " reexports)) traverse_ loadModule reexports exportDepsModules <- catMaybes <$> traverse getModule reexports exportDepDeps <- traverse loadReexports exportDepsModules return $ concat exportDepDeps
688
loadReexports m = case getReexports m of [] -> pure [] exportDeps -> do -- I'm fine with this crashing on a failed pattern match. -- If this ever fails I'll need to look at GADTs let reexports = map (\(Export mn) -> mn) exportDeps $(logDebug) ("Loading reexports for module: " <> fst m <> " reexports: " <> (T.intercalate ", " reexports)) traverse_ loadModule reexports exportDepsModules <- catMaybes <$> traverse getModule reexports exportDepDeps <- traverse loadReexports exportDepsModules return $ concat exportDepDeps
574
false
true
0
18
164
192
90
102
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Version.hs
gpl-3.0
doesNotIntersect (UpperBound u ub) (LowerBound l lb) = u < l || (u == l && not (ub == InclusiveBound && lb == InclusiveBound))
135
doesNotIntersect (UpperBound u ub) (LowerBound l lb) = u < l || (u == l && not (ub == InclusiveBound && lb == InclusiveBound))
135
doesNotIntersect (UpperBound u ub) (LowerBound l lb) = u < l || (u == l && not (ub == InclusiveBound && lb == InclusiveBound))
135
false
false
4
10
32
71
33
38
null
null
samscott89/tamarin-prover
lib/term/src/Term/LTerm.hs
gpl-3.0
getVar _ = Nothing
42
getVar _ = Nothing
42
getVar _ = Nothing
42
false
false
0
4
27
10
4
6
null
null
robdockins/edison
edison-core/src/Data/Edison/Seq/SimpleQueue.hs
mit
foldr1' _ (Q [] []) = error "SimpleQueye.foldr1': empty sequence"
65
foldr1' _ (Q [] []) = error "SimpleQueye.foldr1': empty sequence"
65
foldr1' _ (Q [] []) = error "SimpleQueye.foldr1': empty sequence"
65
false
false
0
8
9
26
12
14
null
null
brendanhay/gogol
gogol-testing/gen/Network/Google/Testing/Types/Product.hs
mpl-2.0
-- | Creates a value of 'RoboStartingIntent' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rsiLauncherActivity' -- -- * 'rsiStartActivity' -- -- * 'rsiTimeout' roboStartingIntent :: RoboStartingIntent roboStartingIntent = RoboStartingIntent' { _rsiLauncherActivity = Nothing , _rsiStartActivity = Nothing , _rsiTimeout = Nothing }
440
roboStartingIntent :: RoboStartingIntent roboStartingIntent = RoboStartingIntent' { _rsiLauncherActivity = Nothing , _rsiStartActivity = Nothing , _rsiTimeout = Nothing }
192
roboStartingIntent = RoboStartingIntent' { _rsiLauncherActivity = Nothing , _rsiStartActivity = Nothing , _rsiTimeout = Nothing }
147
true
true
1
7
82
47
29
18
null
null
tomtitchener/RealSimpleMusic
src/Music/RealSimpleMusic/ScoreToLilypond/Utils.hs
cc0-1.0
pitchClassToLilypondName C = "c"
34
pitchClassToLilypondName C = "c"
34
pitchClassToLilypondName C = "c"
34
false
false
0
5
5
9
4
5
null
null
snoyberg/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
{- ************************************************************************ * * \subsection{Common list manipulation expressions} * * ************************************************************************ Call the constructor Ids when building explicit lists, so that they interact well with rules. -} -- | Makes a list @[]@ for lists of the specified type mkNilExpr :: Type -> CoreExpr mkNilExpr ty = mkCoreConApps nilDataCon [Type ty]
578
mkNilExpr :: Type -> CoreExpr mkNilExpr ty = mkCoreConApps nilDataCon [Type ty]
79
mkNilExpr ty = mkCoreConApps nilDataCon [Type ty]
49
true
true
0
7
190
31
16
15
null
null
urbanslug/ghc
testsuite/tests/rename/should_compile/timing003.hs
bsd-3-clause
a026 = []
9
a026 = []
9
a026 = []
9
false
false
1
6
2
12
4
8
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/streaming/pipes/src/FunctorOriented.hs
unlicense
fld :: Int fld = foldr (+) 0 flfll
35
fld :: Int fld = foldr (+) 0 flfll
35
fld = foldr (+) 0 flfll
24
false
true
0
6
9
29
12
17
null
null
tuturto/space-privateers
GameDefinition/Content/ItemKindOrgan.hs
bsd-3-clause
torsionRight = fist { iname = "right torsion" , ifreq = [("right torsion", 100)] , icount = 1 , iverbHit = "twist" , iaspects = [Timeout $ 5 + d 5] , ieffects = [ Hurt (2 * d 4) , Recharging (toOrganGameTurn "slow 10" (3 + d 3)) ] , idesc = "" }
287
torsionRight = fist { iname = "right torsion" , ifreq = [("right torsion", 100)] , icount = 1 , iverbHit = "twist" , iaspects = [Timeout $ 5 + d 5] , ieffects = [ Hurt (2 * d 4) , Recharging (toOrganGameTurn "slow 10" (3 + d 3)) ] , idesc = "" }
287
torsionRight = fist { iname = "right torsion" , ifreq = [("right torsion", 100)] , icount = 1 , iverbHit = "twist" , iaspects = [Timeout $ 5 + d 5] , ieffects = [ Hurt (2 * d 4) , Recharging (toOrganGameTurn "slow 10" (3 + d 3)) ] , idesc = "" }
287
false
false
1
14
96
120
66
54
null
null
chreekat/stack
src/Stack/Setup.hs
bsd-3-clause
ensureTool :: (MonadIO m, MonadMask m, MonadLogger m, MonadReader env m, HasConfig env, HasHttpManager env, MonadBaseControl IO m) => EnvOverride -> SetupOpts -> [PackageIdentifier] -- ^ already installed -> m SetupInfo -> Maybe (Version, Arch) -- ^ installed GHC -> (PackageName, Maybe Version) -> m (Maybe PackageIdentifier) ensureTool menv sopts installed getSetupInfo' msystem (name, mversion) | not $ null available = return $ Just $ PackageIdentifier name $ maximum available | not $ soptsInstallIfMissing sopts = if name == $(mkPackageName "ghc") then do Platform arch _ <- asks getPlatform throwM $ GHCVersionMismatch msystem (soptsExpected sopts, arch) (soptsStackYaml sopts) else do $logWarn $ "Continuing despite missing tool: " <> T.pack (packageNameString name) return Nothing | otherwise = do si <- getSetupInfo' (pair@(DownloadPair version _), installer) <- case packageNameString name of "git" -> do let pair = siPortableGit si return (pair, installGitWindows) "ghc" -> do osKey <- getOSKey menv pairs <- case Map.lookup osKey $ siGHCs si of Nothing -> throwM $ UnknownOSKey osKey Just pairs -> return pairs version <- case mversion of Nothing -> error "invariant violated: ghc must have a version" Just version -> return version pair <- case Map.lookup (getMajorVersion version) pairs of Nothing -> throwM $ UnknownGHCVersion osKey version (Map.keysSet pairs) Just pair -> return pair platform <- asks $ configPlatform . getConfig let installer = case platform of Platform _ os | isWindows os -> installGHCWindows _ -> installGHCPosix return (pair, installer) x -> error $ "Invariant violated: ensureTool on " ++ x let ident = PackageIdentifier name version (file, at) <- downloadPair pair ident dir <- installDir ident unmarkInstalled ident installer si file at dir ident markInstalled ident return $ Just ident where available | soptsForceReinstall sopts = [] | otherwise = filter goodVersion $ map packageIdentifierVersion $ filter (\pi' -> packageIdentifierName pi' == name) installed goodVersion = case mversion of Nothing -> const True Just expected -> \actual -> getMajorVersion expected == getMajorVersion actual && actual >= expected
3,121
ensureTool :: (MonadIO m, MonadMask m, MonadLogger m, MonadReader env m, HasConfig env, HasHttpManager env, MonadBaseControl IO m) => EnvOverride -> SetupOpts -> [PackageIdentifier] -- ^ already installed -> m SetupInfo -> Maybe (Version, Arch) -- ^ installed GHC -> (PackageName, Maybe Version) -> m (Maybe PackageIdentifier) ensureTool menv sopts installed getSetupInfo' msystem (name, mversion) | not $ null available = return $ Just $ PackageIdentifier name $ maximum available | not $ soptsInstallIfMissing sopts = if name == $(mkPackageName "ghc") then do Platform arch _ <- asks getPlatform throwM $ GHCVersionMismatch msystem (soptsExpected sopts, arch) (soptsStackYaml sopts) else do $logWarn $ "Continuing despite missing tool: " <> T.pack (packageNameString name) return Nothing | otherwise = do si <- getSetupInfo' (pair@(DownloadPair version _), installer) <- case packageNameString name of "git" -> do let pair = siPortableGit si return (pair, installGitWindows) "ghc" -> do osKey <- getOSKey menv pairs <- case Map.lookup osKey $ siGHCs si of Nothing -> throwM $ UnknownOSKey osKey Just pairs -> return pairs version <- case mversion of Nothing -> error "invariant violated: ghc must have a version" Just version -> return version pair <- case Map.lookup (getMajorVersion version) pairs of Nothing -> throwM $ UnknownGHCVersion osKey version (Map.keysSet pairs) Just pair -> return pair platform <- asks $ configPlatform . getConfig let installer = case platform of Platform _ os | isWindows os -> installGHCWindows _ -> installGHCPosix return (pair, installer) x -> error $ "Invariant violated: ensureTool on " ++ x let ident = PackageIdentifier name version (file, at) <- downloadPair pair ident dir <- installDir ident unmarkInstalled ident installer si file at dir ident markInstalled ident return $ Just ident where available | soptsForceReinstall sopts = [] | otherwise = filter goodVersion $ map packageIdentifierVersion $ filter (\pi' -> packageIdentifierName pi' == name) installed goodVersion = case mversion of Nothing -> const True Just expected -> \actual -> getMajorVersion expected == getMajorVersion actual && actual >= expected
3,121
ensureTool menv sopts installed getSetupInfo' msystem (name, mversion) | not $ null available = return $ Just $ PackageIdentifier name $ maximum available | not $ soptsInstallIfMissing sopts = if name == $(mkPackageName "ghc") then do Platform arch _ <- asks getPlatform throwM $ GHCVersionMismatch msystem (soptsExpected sopts, arch) (soptsStackYaml sopts) else do $logWarn $ "Continuing despite missing tool: " <> T.pack (packageNameString name) return Nothing | otherwise = do si <- getSetupInfo' (pair@(DownloadPair version _), installer) <- case packageNameString name of "git" -> do let pair = siPortableGit si return (pair, installGitWindows) "ghc" -> do osKey <- getOSKey menv pairs <- case Map.lookup osKey $ siGHCs si of Nothing -> throwM $ UnknownOSKey osKey Just pairs -> return pairs version <- case mversion of Nothing -> error "invariant violated: ghc must have a version" Just version -> return version pair <- case Map.lookup (getMajorVersion version) pairs of Nothing -> throwM $ UnknownGHCVersion osKey version (Map.keysSet pairs) Just pair -> return pair platform <- asks $ configPlatform . getConfig let installer = case platform of Platform _ os | isWindows os -> installGHCWindows _ -> installGHCPosix return (pair, installer) x -> error $ "Invariant violated: ensureTool on " ++ x let ident = PackageIdentifier name version (file, at) <- downloadPair pair ident dir <- installDir ident unmarkInstalled ident installer si file at dir ident markInstalled ident return $ Just ident where available | soptsForceReinstall sopts = [] | otherwise = filter goodVersion $ map packageIdentifierVersion $ filter (\pi' -> packageIdentifierName pi' == name) installed goodVersion = case mversion of Nothing -> const True Just expected -> \actual -> getMajorVersion expected == getMajorVersion actual && actual >= expected
2,717
false
true
1
22
1,285
783
364
419
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/RST.hs
gpl-2.0
notesToRST :: [[Block]] -> State WriterState Doc notesToRST notes = mapM (\(num, note) -> noteToRST num note) (zip [1..] notes) >>= return . vsep
149
notesToRST :: [[Block]] -> State WriterState Doc notesToRST notes = mapM (\(num, note) -> noteToRST num note) (zip [1..] notes) >>= return . vsep
149
notesToRST notes = mapM (\(num, note) -> noteToRST num note) (zip [1..] notes) >>= return . vsep
100
false
true
0
10
27
72
38
34
null
null
fimad/scalpel
scalpel-core/src/Text/HTML/Scalpel/Internal/Select.hs
apache-2.0
-- | Returns True if a tag satisfies a list of attribute predicates. checkPreds :: TagSoup.StringLike str => [AttributePredicate] -> TagSoup.Tag str -> MatchResult checkPreds [] tag = boolMatch $ TagSoup.isTagOpen tag || TagSoup.isTagText tag
277
checkPreds :: TagSoup.StringLike str => [AttributePredicate] -> TagSoup.Tag str -> MatchResult checkPreds [] tag = boolMatch $ TagSoup.isTagOpen tag || TagSoup.isTagText tag
208
checkPreds [] tag = boolMatch $ TagSoup.isTagOpen tag || TagSoup.isTagText tag
102
true
true
3
10
69
65
30
35
null
null
maurer/15-411-Haskell-Base-Code
src/Compile.hs
bsd-3-clause
writer file obj = liftIOE $ writeFile file $ show obj
53
writer file obj = liftIOE $ writeFile file $ show obj
53
writer file obj = liftIOE $ writeFile file $ show obj
53
false
false
0
7
10
25
11
14
null
null
z0isch/lambda-hive
src/LambdaHive/Types.hs
bsd-3-clause
pieceText Queen = "Q"
21
pieceText Queen = "Q"
21
pieceText Queen = "Q"
21
false
false
0
5
3
9
4
5
null
null
torrlane/haskell_learning
src/Utils.hs
bsd-3-clause
parseDouble :: T.Text -> Double parseDouble s = read (stripChar ',' (T.unpack s)) :: Double
91
parseDouble :: T.Text -> Double parseDouble s = read (stripChar ',' (T.unpack s)) :: Double
91
parseDouble s = read (stripChar ',' (T.unpack s)) :: Double
59
false
true
0
10
14
42
21
21
null
null
vikraman/ghc-mod
Language/Haskell/GhcMod/Types.hs
bsd-3-clause
tupToString :: ((Int,Int,Int,Int),String) -> String tupToString ((a,b,c,d),s) = show a ++ " " ++ show b ++ " " ++ show c ++ " " ++ show d ++ " " ++ quote s
255
tupToString :: ((Int,Int,Int,Int),String) -> String tupToString ((a,b,c,d),s) = show a ++ " " ++ show b ++ " " ++ show c ++ " " ++ show d ++ " " ++ quote s
255
tupToString ((a,b,c,d),s) = show a ++ " " ++ show b ++ " " ++ show c ++ " " ++ show d ++ " " ++ quote s
203
false
true
0
13
133
105
55
50
null
null
thomasjm/IHaskell
src/IHaskell/Eval/Lint.hs
mit
-- | Given parsed code chunks, perform linting and output a displayable report on linting warnings -- and errors. lint :: [Located CodeBlock] -> IO Display lint blocks = do -- Initialize hlint settings initialized <- not <$> isEmptyMVar hlintSettings unless initialized $ autoSettings >>= putMVar hlintSettings -- Get hlint settings (flags, classify, hint) <- readMVar hlintSettings let mode = hseFlags flags -- create 'suggestions' let modules = mapMaybe (createModule mode) blocks ideas = applyHints classify hint (map (\m -> (m, [])) modules) suggestions = mapMaybe showIdea ideas return $ Display $ if null suggestions then [] else [plain $ concatMap plainSuggestion suggestions, html $ htmlSuggestions suggestions]
772
lint :: [Located CodeBlock] -> IO Display lint blocks = do -- Initialize hlint settings initialized <- not <$> isEmptyMVar hlintSettings unless initialized $ autoSettings >>= putMVar hlintSettings -- Get hlint settings (flags, classify, hint) <- readMVar hlintSettings let mode = hseFlags flags -- create 'suggestions' let modules = mapMaybe (createModule mode) blocks ideas = applyHints classify hint (map (\m -> (m, [])) modules) suggestions = mapMaybe showIdea ideas return $ Display $ if null suggestions then [] else [plain $ concatMap plainSuggestion suggestions, html $ htmlSuggestions suggestions]
658
lint blocks = do -- Initialize hlint settings initialized <- not <$> isEmptyMVar hlintSettings unless initialized $ autoSettings >>= putMVar hlintSettings -- Get hlint settings (flags, classify, hint) <- readMVar hlintSettings let mode = hseFlags flags -- create 'suggestions' let modules = mapMaybe (createModule mode) blocks ideas = applyHints classify hint (map (\m -> (m, [])) modules) suggestions = mapMaybe showIdea ideas return $ Display $ if null suggestions then [] else [plain $ concatMap plainSuggestion suggestions, html $ htmlSuggestions suggestions]
616
true
true
0
16
159
211
104
107
null
null
jstolarek/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
jumpRegs :: DynFlags -> [GlobalReg] -> [Reg] jumpRegs dflags gregs = [ RegReal r | Just r <- map (globalRegMaybe platform) gregs ] where platform = targetPlatform dflags -------------------------------------------------------------------------------- -- | 'InstrBlock's are the insn sequences generated by the insn selectors. -- They are really trees of insns to facilitate fast appending, where a -- left-to-right traversal yields the insns in the correct order. --
481
jumpRegs :: DynFlags -> [GlobalReg] -> [Reg] jumpRegs dflags gregs = [ RegReal r | Just r <- map (globalRegMaybe platform) gregs ] where platform = targetPlatform dflags -------------------------------------------------------------------------------- -- | 'InstrBlock's are the insn sequences generated by the insn selectors. -- They are really trees of insns to facilitate fast appending, where a -- left-to-right traversal yields the insns in the correct order. --
481
jumpRegs dflags gregs = [ RegReal r | Just r <- map (globalRegMaybe platform) gregs ] where platform = targetPlatform dflags -------------------------------------------------------------------------------- -- | 'InstrBlock's are the insn sequences generated by the insn selectors. -- They are really trees of insns to facilitate fast appending, where a -- left-to-right traversal yields the insns in the correct order. --
436
false
true
0
10
79
74
39
35
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Scene/Node.hs
mit
nodeRemoveChild :: (Parent Node a, Pointer p a, Parent Node child, Pointer pChild child, MonadIO m) => p -- ^ Node pointer or child -> pChild -- ^ pointer to child node -> m () nodeRemoveChild p c = liftIO $ do let ptr = parentPointer p child = parentPointer c [C.exp| void { $(Node* ptr)->RemoveChild($(Node* child)) } |] -- | Remove all child scene nodes
371
nodeRemoveChild :: (Parent Node a, Pointer p a, Parent Node child, Pointer pChild child, MonadIO m) => p -- ^ Node pointer or child -> pChild -- ^ pointer to child node -> m () nodeRemoveChild p c = liftIO $ do let ptr = parentPointer p child = parentPointer c [C.exp| void { $(Node* ptr)->RemoveChild($(Node* child)) } |] -- | Remove all child scene nodes
371
nodeRemoveChild p c = liftIO $ do let ptr = parentPointer p child = parentPointer c [C.exp| void { $(Node* ptr)->RemoveChild($(Node* child)) } |] -- | Remove all child scene nodes
190
false
true
2
10
80
112
56
56
null
null
nishiuramakoto/logiku
test/Handler/PrologSpec.hs
gpl-3.0
goals27 :: PrologIO [Goal] goals27 = do [s,l2] <- getFreeVars 2 return [ devidelist (plist [a,b,c,d,e]) (plist [a,b]) l2 ]
126
goals27 :: PrologIO [Goal] goals27 = do [s,l2] <- getFreeVars 2 return [ devidelist (plist [a,b,c,d,e]) (plist [a,b]) l2 ]
126
goals27 = do [s,l2] <- getFreeVars 2 return [ devidelist (plist [a,b,c,d,e]) (plist [a,b]) l2 ]
99
false
true
0
13
23
88
45
43
null
null
hvr/text
tests/Tests/Properties.hs
bsd-2-clause
t_foldl' f z = L.foldl' f z `eqP` T.foldl' f z where _types = f :: Char -> Char -> Char
97
t_foldl' f z = L.foldl' f z `eqP` T.foldl' f z where _types = f :: Char -> Char -> Char
97
t_foldl' f z = L.foldl' f z `eqP` T.foldl' f z where _types = f :: Char -> Char -> Char
97
false
false
0
7
30
50
25
25
null
null
lancelotsix/hs-tls
core/Network/TLS/State.hs
bsd-3-clause
getSession :: TLSSt Session getSession = gets stSession
55
getSession :: TLSSt Session getSession = gets stSession
55
getSession = gets stSession
27
false
true
0
5
7
17
8
9
null
null
bhamrick/HSS
HSS/Color.hs
mit
oldLace = RGB 0xFD 0xF5 0xE6
44
oldLace = RGB 0xFD 0xF5 0xE6
44
oldLace = RGB 0xFD 0xF5 0xE6
44
false
false
0
5
21
13
6
7
null
null
JacquesCarette/literate-scientific-software
code/drasil-lang/Language/Drasil/Chunk/DefinedQuantity.hs
bsd-2-clause
-- When the input already has all the necessary information. A 'projection' operator dqdWr :: (Quantity c, Concept c, MayHaveUnit c) => c -> DefinedQuantityDict dqdWr c = DQD (cw c) (symbol c) (c ^. typ) (getUnit c)
215
dqdWr :: (Quantity c, Concept c, MayHaveUnit c) => c -> DefinedQuantityDict dqdWr c = DQD (cw c) (symbol c) (c ^. typ) (getUnit c)
130
dqdWr c = DQD (cw c) (symbol c) (c ^. typ) (getUnit c)
54
true
true
0
7
37
74
38
36
null
null
hvr/semigroups
src/Data/List/NonEmpty.hs
bsd-2-clause
-- | The 'partition' function takes a predicate @p@ and a stream -- @xs@, and returns a pair of lists. The first list corresponds to the -- elements of @xs@ for which @p@ holds; the second corresponds to the -- elements of @xs@ for which @p@ does not hold. -- -- > 'partition' p xs = ('filter' p xs, 'filter' (not . p) xs) partition :: (a -> Bool) -> NonEmpty a -> ([a], [a]) partition p = List.partition p . toList
415
partition :: (a -> Bool) -> NonEmpty a -> ([a], [a]) partition p = List.partition p . toList
92
partition p = List.partition p . toList
39
true
true
0
8
81
59
34
25
null
null
GaloisInc/tower
tower-config/src/Ivory/Tower/Config/Options.hs
bsd-3-clause
setConfigDebug :: C.OptParser CfgOpts setConfigDebug = C.success (\t -> t { cfgopts_debug = True })
99
setConfigDebug :: C.OptParser CfgOpts setConfigDebug = C.success (\t -> t { cfgopts_debug = True })
99
setConfigDebug = C.success (\t -> t { cfgopts_debug = True })
61
false
true
0
9
14
43
21
22
null
null
brendanhay/gogol
gogol-poly/gen/Network/Google/Resource/Poly/Users/Assets/List.hs
mpl-2.0
-- | Specifies an ordering for assets. Acceptable values are: \`BEST\`, -- \`NEWEST\`, \`OLDEST\`. Defaults to \`BEST\`, which ranks assets based -- on a combination of popularity and other features. ualOrderBy :: Lens' UsersAssetsList (Maybe Text) ualOrderBy = lens _ualOrderBy (\ s a -> s{_ualOrderBy = a})
310
ualOrderBy :: Lens' UsersAssetsList (Maybe Text) ualOrderBy = lens _ualOrderBy (\ s a -> s{_ualOrderBy = a})
110
ualOrderBy = lens _ualOrderBy (\ s a -> s{_ualOrderBy = a})
61
true
true
0
9
48
50
27
23
null
null
mightymoose/liquidhaskell
tests/neg/RecSelector.hs
bsd-3-clause
{-@ foo :: x:a -> {v : F a | (fxx v) > x} @-} foo :: a -> F a foo x = F x x x
77
foo :: a -> F a foo x = F x x x
31
foo x = F x x x
15
true
true
0
7
27
33
15
18
null
null
rahulmutt/ghcvm
compiler/Eta/Core/CoreUnfold.hs
bsd-3-clause
lamScrutDiscount _ TooBig = TooBig
48
lamScrutDiscount _ TooBig = TooBig
48
lamScrutDiscount _ TooBig = TooBig
48
false
false
0
5
18
11
5
6
null
null
urv/fixhs
src/Data/FIX/Spec/FIX43.hs
lgpl-2.1
tOrderPercent :: FIXTag tOrderPercent = FIXTag { tName = "OrderPercent" , tnum = 516 , tparser = toFIXDouble , arbitraryValue = FIXDouble <$> (return (-2.112 :: Double)) }
184
tOrderPercent :: FIXTag tOrderPercent = FIXTag { tName = "OrderPercent" , tnum = 516 , tparser = toFIXDouble , arbitraryValue = FIXDouble <$> (return (-2.112 :: Double)) }
184
tOrderPercent = FIXTag { tName = "OrderPercent" , tnum = 516 , tparser = toFIXDouble , arbitraryValue = FIXDouble <$> (return (-2.112 :: Double)) }
160
false
true
0
12
40
59
34
25
null
null
spacekitteh/smcghc
libraries/base/Data/OldList.hs
bsd-3-clause
minimum xs = foldl1 min xs
40
minimum xs = foldl1 min xs
40
minimum xs = foldl1 min xs
40
false
false
0
5
19
14
6
8
null
null
fpco/stackage-server
src/Handler/Home.hs
mit
getOlderReleasesR :: Handler Html getOlderReleasesR = contentHelper "Older Releases" wcOlderReleases
100
getOlderReleasesR :: Handler Html getOlderReleasesR = contentHelper "Older Releases" wcOlderReleases
100
getOlderReleasesR = contentHelper "Older Releases" wcOlderReleases
66
false
true
0
5
9
19
9
10
null
null
cmh/boggle
boggleMain.hs
bsd-3-clause
printSolutions board = do print board wt <- wordTree let numSols = numWords board wt let bw = bestWords board wt putStrLn $ show numSols ++ " solutions\n" putStrLn "Best 100 solutions\n" putStrLn . unlines . take 100 $ bw
249
printSolutions board = do print board wt <- wordTree let numSols = numWords board wt let bw = bestWords board wt putStrLn $ show numSols ++ " solutions\n" putStrLn "Best 100 solutions\n" putStrLn . unlines . take 100 $ bw
249
printSolutions board = do print board wt <- wordTree let numSols = numWords board wt let bw = bestWords board wt putStrLn $ show numSols ++ " solutions\n" putStrLn "Best 100 solutions\n" putStrLn . unlines . take 100 $ bw
249
false
false
1
10
67
92
37
55
null
null
noughtmare/yi
yi-core/src/Yi/Buffer/Implementation.hs
gpl-2.0
applyUpdateI :: Update -> BufferImpl syntax -> BufferImpl syntax applyUpdateI u fb = touchSyntax (updatePoint u) $ fb {mem = p', marks = M.map shift (marks fb), overlays = Set.map (mapOvlMarks shift) (overlays fb)} -- FIXME: this is inefficient; find a way to use mapMonotonic -- (problem is that marks can have different gravities) where (!p', !amount) = case u of Insert pnt _ cs -> (insertChars p cs pnt, sz) Delete pnt _ _ -> (deleteChars p pnt sz, negate sz) !sz = updateSize u shift = shiftMarkValue (updatePoint u) amount p = mem fb -- FIXME: remove collapsed overlays -- | Reverse the given update
800
applyUpdateI :: Update -> BufferImpl syntax -> BufferImpl syntax applyUpdateI u fb = touchSyntax (updatePoint u) $ fb {mem = p', marks = M.map shift (marks fb), overlays = Set.map (mapOvlMarks shift) (overlays fb)} -- FIXME: this is inefficient; find a way to use mapMonotonic -- (problem is that marks can have different gravities) where (!p', !amount) = case u of Insert pnt _ cs -> (insertChars p cs pnt, sz) Delete pnt _ _ -> (deleteChars p pnt sz, negate sz) !sz = updateSize u shift = shiftMarkValue (updatePoint u) amount p = mem fb -- FIXME: remove collapsed overlays -- | Reverse the given update
800
applyUpdateI u fb = touchSyntax (updatePoint u) $ fb {mem = p', marks = M.map shift (marks fb), overlays = Set.map (mapOvlMarks shift) (overlays fb)} -- FIXME: this is inefficient; find a way to use mapMonotonic -- (problem is that marks can have different gravities) where (!p', !amount) = case u of Insert pnt _ cs -> (insertChars p cs pnt, sz) Delete pnt _ _ -> (deleteChars p pnt sz, negate sz) !sz = updateSize u shift = shiftMarkValue (updatePoint u) amount p = mem fb -- FIXME: remove collapsed overlays -- | Reverse the given update
735
false
true
2
10
301
220
106
114
null
null
rvion/ride
jetpack/src/Network/HTTP/Conduit/AsHttp.hs
bsd-3-clause
-- http_tlsManagerSettings :: ManagerSettings http_tlsManagerSettings = I.tlsManagerSettings
92
http_tlsManagerSettings = I.tlsManagerSettings
46
http_tlsManagerSettings = I.tlsManagerSettings
46
true
false
0
5
6
9
5
4
null
null
robdockins/edison
edison-core/src/Data/Edison/Seq/MyersStack.hs
mit
foldl1 f (C _ x xs _) = foldl f x xs
36
foldl1 f (C _ x xs _) = foldl f x xs
36
foldl1 f (C _ x xs _) = foldl f x xs
36
false
false
0
7
11
30
14
16
null
null
bitc/omegagb
src/Cpu.hs
gpl-2.0
mctiCB 0x6B = (BIT Bit5 E, 8)
29
mctiCB 0x6B = (BIT Bit5 E, 8)
29
mctiCB 0x6B = (BIT Bit5 E, 8)
29
false
false
1
6
6
23
10
13
null
null
agentm/project-m36
src/bin/TutorialD/Printer.hs
unlicense
ignoreProjects r = r
20
ignoreProjects r = r
20
ignoreProjects r = r
20
false
false
1
5
3
13
4
9
null
null
keithodulaigh/Hets
CSL/Parse_AS_Basic.hs
gpl-2.0
sequenceExpr :: CharParser (AnnoState.AnnoState st) CMD sequenceExpr = do lstring "sequence" statements <- many1 (AnnoState.dotT >> AnnoState.allAnnoParser command) lstring "end" return $ Sequence $ map AS_Anno.item statements
234
sequenceExpr :: CharParser (AnnoState.AnnoState st) CMD sequenceExpr = do lstring "sequence" statements <- many1 (AnnoState.dotT >> AnnoState.allAnnoParser command) lstring "end" return $ Sequence $ map AS_Anno.item statements
234
sequenceExpr = do lstring "sequence" statements <- many1 (AnnoState.dotT >> AnnoState.allAnnoParser command) lstring "end" return $ Sequence $ map AS_Anno.item statements
178
false
true
0
12
34
78
35
43
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
integerToIntName = varQual gHC_INTEGER_TYPE (fsLit "integerToInt") integerToIntIdKey
94
integerToIntName = varQual gHC_INTEGER_TYPE (fsLit "integerToInt") integerToIntIdKey
94
integerToIntName = varQual gHC_INTEGER_TYPE (fsLit "integerToInt") integerToIntIdKey
94
false
false
1
7
16
22
9
13
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | Brand of the product. sBrand :: Lens' Segments (Maybe Text) sBrand = lens _sBrand (\ s a -> s{_sBrand = a})
112
sBrand :: Lens' Segments (Maybe Text) sBrand = lens _sBrand (\ s a -> s{_sBrand = a})
85
sBrand = lens _sBrand (\ s a -> s{_sBrand = a})
47
true
true
0
9
22
46
25
21
null
null
twittner/redis-resp
src/Data/Redis/Command.hs
mpl-2.0
----------------------------------------------------------------------------- -- Strings get :: (Monad m, FromByteString a) => Key -> Redis m (Maybe a) get k = singleton $ Get $ cmd 2 ["GET", key k]
199
get :: (Monad m, FromByteString a) => Key -> Redis m (Maybe a) get k = singleton $ Get $ cmd 2 ["GET", key k]
109
get k = singleton $ Get $ cmd 2 ["GET", key k]
46
true
true
0
9
28
71
36
35
null
null
graninas/Haskell-Algorithms
Tests/Robotics/Task3.hs
gpl-3.0
s = 's'
7
s = 's'
7
s = 's'
7
false
false
1
5
2
10
3
7
null
null
markus1189/xmonad-contrib-710
XMonad/Actions/DynamicWorkspaces.hs
bsd-3-clause
addWorkspace :: String -> X () addWorkspace newtag = addHiddenWorkspace newtag >> windows (greedyView newtag)
109
addWorkspace :: String -> X () addWorkspace newtag = addHiddenWorkspace newtag >> windows (greedyView newtag)
109
addWorkspace newtag = addHiddenWorkspace newtag >> windows (greedyView newtag)
78
false
true
0
8
14
43
19
24
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ApiGatewayUsagePlan.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html#cfn-apigateway-usageplan-quota agupQuota :: Lens' ApiGatewayUsagePlan (Maybe ApiGatewayUsagePlanQuotaSettings) agupQuota = lens _apiGatewayUsagePlanQuota (\s a -> s { _apiGatewayUsagePlanQuota = a })
305
agupQuota :: Lens' ApiGatewayUsagePlan (Maybe ApiGatewayUsagePlanQuotaSettings) agupQuota = lens _apiGatewayUsagePlanQuota (\s a -> s { _apiGatewayUsagePlanQuota = a })
168
agupQuota = lens _apiGatewayUsagePlanQuota (\s a -> s { _apiGatewayUsagePlanQuota = a })
88
true
true
0
9
21
46
25
21
null
null
jozefg/hasquito
src/Language/Hasquito/TypeCheck.hs
mit
-- | Replace a type variable with a different type substTy :: Flex -> Maybe Name -> Name -> Ty -> Ty -> Ty substTy _ _ _ _ TNum = TNum
134
substTy :: Flex -> Maybe Name -> Name -> Ty -> Ty -> Ty substTy _ _ _ _ TNum = TNum
83
substTy _ _ _ _ TNum = TNum
27
true
true
0
9
31
46
23
23
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1ReplicaSetStatusObservedGeneration' Lens v1ReplicaSetStatusObservedGenerationL :: Lens_' V1ReplicaSetStatus (Maybe Integer) v1ReplicaSetStatusObservedGenerationL f V1ReplicaSetStatus{..} = (\v1ReplicaSetStatusObservedGeneration -> V1ReplicaSetStatus { v1ReplicaSetStatusObservedGeneration, ..} ) <$> f v1ReplicaSetStatusObservedGeneration
346
v1ReplicaSetStatusObservedGenerationL :: Lens_' V1ReplicaSetStatus (Maybe Integer) v1ReplicaSetStatusObservedGenerationL f V1ReplicaSetStatus{..} = (\v1ReplicaSetStatusObservedGeneration -> V1ReplicaSetStatus { v1ReplicaSetStatusObservedGeneration, ..} ) <$> f v1ReplicaSetStatusObservedGeneration
297
v1ReplicaSetStatusObservedGenerationL f V1ReplicaSetStatus{..} = (\v1ReplicaSetStatusObservedGeneration -> V1ReplicaSetStatus { v1ReplicaSetStatusObservedGeneration, ..} ) <$> f v1ReplicaSetStatusObservedGeneration
214
true
true
0
8
23
57
30
27
null
null
uwap/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
filterInclude :: NsItem -- ^ Accessibility to check -> Bool -- ^ Predicate result filterInclude (name, Just _, Public) | filterName name = True
159
filterInclude :: NsItem -- ^ Accessibility to check -> Bool filterInclude (name, Just _, Public) | filterName name = True
135
filterInclude (name, Just _, Public) | filterName name = True
61
true
true
0
8
39
41
21
20
null
null
eklavya/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
isTypeConst StrType = True
26
isTypeConst StrType = True
26
isTypeConst StrType = True
26
false
false
0
5
3
9
4
5
null
null
bgamari/text
tests/Tests/Properties.hs
bsd-2-clause
t_count (NotEmpty t) = (subtract 1 . L.length . T.splitOn t) `eq` T.count t
76
t_count (NotEmpty t) = (subtract 1 . L.length . T.splitOn t) `eq` T.count t
76
t_count (NotEmpty t) = (subtract 1 . L.length . T.splitOn t) `eq` T.count t
76
false
false
0
9
14
47
23
24
null
null
teuffy/interactive-brokers
executable/Requests-Simple.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Reference data conES :: IBContract conES = future "ES" "ESZ5" (Just $ fromGregorian 2015 12 18) GLOBEX "USD"
193
conES :: IBContract conES = future "ES" "ESZ5" (Just $ fromGregorian 2015 12 18) GLOBEX "USD"
93
conES = future "ES" "ESZ5" (Just $ fromGregorian 2015 12 18) GLOBEX "USD"
73
true
true
0
8
21
44
21
23
null
null
ezyang/ghc
testsuite/tests/indexed-types/should_fail/T13092/C.hs
bsd-3-clause
x :: Proxy b -> (forall t. Proxy t -> Bool -> A (t, b)) -> (Bool -> ()) x _ f = f (undefined :: Proxy X)
104
x :: Proxy b -> (forall t. Proxy t -> Bool -> A (t, b)) -> (Bool -> ()) x _ f = f (undefined :: Proxy X)
104
x _ f = f (undefined :: Proxy X)
32
false
true
0
13
27
81
40
41
null
null
ocharles/virtual-dom
src/VirtualDom/HTML/Attributes.hs
bsd-3-clause
size_ :: Traversal' HTMLElement (Maybe JSString) size_ = attributes . at "size"
79
size_ :: Traversal' HTMLElement (Maybe JSString) size_ = attributes . at "size"
79
size_ = attributes . at "size"
30
false
true
2
7
11
35
14
21
null
null
mpickering/hackage-server
Distribution/Server/Framework/AuthCrypt.hs
bsd-3-clause
-- Hashed passwords are stored in the format: -- -- @md5 (username ++ ":" ++ realm ++ ":" ++ password)@. -- -- This format enables us to use either the basic or digest -- HTTP authentication methods. -- | Create a new 'PasswdHash' suitable for safe permanent storage. -- newPasswdHash :: RealmName -> UserName -> PasswdPlain -> PasswdHash newPasswdHash (RealmName realmName) (UserName userName) (PasswdPlain passwd) = PasswdHash $ md5HexDigest [userName, realmName, passwd]
478
newPasswdHash :: RealmName -> UserName -> PasswdPlain -> PasswdHash newPasswdHash (RealmName realmName) (UserName userName) (PasswdPlain passwd) = PasswdHash $ md5HexDigest [userName, realmName, passwd]
206
newPasswdHash (RealmName realmName) (UserName userName) (PasswdPlain passwd) = PasswdHash $ md5HexDigest [userName, realmName, passwd]
138
true
true
0
7
76
72
41
31
null
null
keithodulaigh/Hets
Temporal/ModalCasl.hs
gpl-2.0
showPathFormula (W' phi psi) True = showPathFormula phi False ++ " W! " ++ showPathFormula psi False
101
showPathFormula (W' phi psi) True = showPathFormula phi False ++ " W! " ++ showPathFormula psi False
101
showPathFormula (W' phi psi) True = showPathFormula phi False ++ " W! " ++ showPathFormula psi False
101
false
false
0
7
17
37
17
20
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
nvNodelist :: String nvNodelist = "nodelist"
44
nvNodelist :: String nvNodelist = "nodelist"
44
nvNodelist = "nodelist"
23
false
true
0
6
5
18
7
11
null
null
AlexeyRaga/eta
compiler/ETA/BasicTypes/Literal.hs
bsd-3-clause
hashLiteral (MachWord64 i) = hashInteger i
47
hashLiteral (MachWord64 i) = hashInteger i
47
hashLiteral (MachWord64 i) = hashInteger i
47
false
false
0
7
10
18
8
10
null
null
mwahab1/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
pSymbol :: InlinesParser Inlines pSymbol = satisfy isSpecial >>= return . B.str . (:[])
87
pSymbol :: InlinesParser Inlines pSymbol = satisfy isSpecial >>= return . B.str . (:[])
87
pSymbol = satisfy isSpecial >>= return . B.str . (:[])
54
false
true
1
8
13
41
19
22
null
null
HIPERFIT/futhark
src/Futhark/IR/Primitive.hs
isc
doUnOp SSignum {} (IntValue v) = Just $ IntValue $ doSSignum v
62
doUnOp SSignum {} (IntValue v) = Just $ IntValue $ doSSignum v
62
doUnOp SSignum {} (IntValue v) = Just $ IntValue $ doSSignum v
62
false
false
1
6
11
33
15
18
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
mpl-2.0
-- | When the RAID array was created. raCreatedAt :: Lens' RaidArray (Maybe Text) raCreatedAt = lens _raCreatedAt (\s a -> s { _raCreatedAt = a })
146
raCreatedAt :: Lens' RaidArray (Maybe Text) raCreatedAt = lens _raCreatedAt (\s a -> s { _raCreatedAt = a })
108
raCreatedAt = lens _raCreatedAt (\s a -> s { _raCreatedAt = a })
64
true
true
0
9
26
46
25
21
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CreateInstanceExportTask.hs
mpl-2.0
-- | The response status code. cietrsResponseStatus :: Lens' CreateInstanceExportTaskResponse Int cietrsResponseStatus = lens _cietrsResponseStatus (\ s a -> s{_cietrsResponseStatus = a})
187
cietrsResponseStatus :: Lens' CreateInstanceExportTaskResponse Int cietrsResponseStatus = lens _cietrsResponseStatus (\ s a -> s{_cietrsResponseStatus = a})
156
cietrsResponseStatus = lens _cietrsResponseStatus (\ s a -> s{_cietrsResponseStatus = a})
89
true
true
0
9
21
40
22
18
null
null
uwap/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
createOtherDoc ist (DataDoc fd@(FD n docstring args _ _) fds) = do H.dt ! (A.id $ toValue $ show n) $ do H.span ! class_ "word" $ do "data"; nbsp genTypeHeader ist fd H.dd $ do (if nullDocstring docstring then Empty else Docstrings.renderHtml docstring) let args' = filter (\(_, _, _, d) -> isJust d) args if not $ null args' then H.dl $ forM_ args' genArg else Empty H.dl ! class_ "decls" $ forM_ fds (createFunDoc ist) where genArg (_, _, _, Nothing) = Empty genArg (name, _, _, Just docstring) = do H.dt $ toHtml $ show name H.dd $ Docstrings.renderHtml docstring
649
createOtherDoc ist (DataDoc fd@(FD n docstring args _ _) fds) = do H.dt ! (A.id $ toValue $ show n) $ do H.span ! class_ "word" $ do "data"; nbsp genTypeHeader ist fd H.dd $ do (if nullDocstring docstring then Empty else Docstrings.renderHtml docstring) let args' = filter (\(_, _, _, d) -> isJust d) args if not $ null args' then H.dl $ forM_ args' genArg else Empty H.dl ! class_ "decls" $ forM_ fds (createFunDoc ist) where genArg (_, _, _, Nothing) = Empty genArg (name, _, _, Just docstring) = do H.dt $ toHtml $ show name H.dd $ Docstrings.renderHtml docstring
649
createOtherDoc ist (DataDoc fd@(FD n docstring args _ _) fds) = do H.dt ! (A.id $ toValue $ show n) $ do H.span ! class_ "word" $ do "data"; nbsp genTypeHeader ist fd H.dd $ do (if nullDocstring docstring then Empty else Docstrings.renderHtml docstring) let args' = filter (\(_, _, _, d) -> isJust d) args if not $ null args' then H.dl $ forM_ args' genArg else Empty H.dl ! class_ "decls" $ forM_ fds (createFunDoc ist) where genArg (_, _, _, Nothing) = Empty genArg (name, _, _, Just docstring) = do H.dt $ toHtml $ show name H.dd $ Docstrings.renderHtml docstring
649
false
false
1
16
186
296
145
151
null
null
urbanslug/ghc
compiler/codeGen/CgUtils.hs
bsd-3-clause
baseRegOffset dflags (YmmReg 3) = oFFSET_StgRegTable_rYMM3 dflags
74
baseRegOffset dflags (YmmReg 3) = oFFSET_StgRegTable_rYMM3 dflags
74
baseRegOffset dflags (YmmReg 3) = oFFSET_StgRegTable_rYMM3 dflags
74
false
false
0
6
15
22
9
13
null
null
Rathcke/uni
ap/afl1/SalsaInterp.hs
gpl-3.0
putContext :: Context -> Salsa () putContext c = Salsa (\_ -> Right((), c, []))
79
putContext :: Context -> Salsa () putContext c = Salsa (\_ -> Right((), c, []))
79
putContext c = Salsa (\_ -> Right((), c, []))
45
false
true
0
10
14
50
26
24
null
null
eryx67/haskell-libtorrent
src/Network/Libtorrent/TorrentInfo.hs
bsd-3-clause
creationDate :: MonadIO m => TorrentInfo -> m (Maybe C.CTime) creationDate ho = liftIO . withPtr ho $ \hoPtr -> do res <- [CU.block| time_t { boost::optional<time_t> v = $(torrent_info * hoPtr)->creation_date(); return (v ? *v : 0); } |] if res == 0 then return Nothing else return $ Just res
350
creationDate :: MonadIO m => TorrentInfo -> m (Maybe C.CTime) creationDate ho = liftIO . withPtr ho $ \hoPtr -> do res <- [CU.block| time_t { boost::optional<time_t> v = $(torrent_info * hoPtr)->creation_date(); return (v ? *v : 0); } |] if res == 0 then return Nothing else return $ Just res
350
creationDate ho = liftIO . withPtr ho $ \hoPtr -> do res <- [CU.block| time_t { boost::optional<time_t> v = $(torrent_info * hoPtr)->creation_date(); return (v ? *v : 0); } |] if res == 0 then return Nothing else return $ Just res
287
false
true
0
11
109
90
45
45
null
null
typedvar/hLand
hcore/GMachine.hs
mit
gmDispatch Eval = eval2WHNF
27
gmDispatch Eval = eval2WHNF
27
gmDispatch Eval = eval2WHNF
27
false
false
0
5
3
9
4
5
null
null
nar-org/hs-nar
Archive/Nar/UTF8.hs
bsd-3-clause
utf8Decode :: B.ByteString -> String utf8Decode = decode . B.unpack where decode :: [Word8] -> [Char] decode [] = [] decode (x:xs) = case getNbBytes x of 0 -> toEnum (fromIntegral x) : decode xs 1 -> case xs of b1:xs2 | isCont b1 -> toChar (x .&. 0x1f) [b1] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (1) " 2 -> case xs of b1:b2:xs2 | and $ map isCont [b1,b2] -> toChar (x .&. 0xf) [b1,b2] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (2)" 3 -> case xs of b1:b2:b3:xs2 | and $ map isCont [b1,b2,b3] -> toChar (x .&. 0x7) [b1,b2,b3] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (3)" _ -> error "invalid heading byte" toChar :: Word8 -> [Word8] -> Char toChar h l = toEnum $ foldl (\acc v -> (acc `shiftL` 6) + clearCont v) (fromIntegral h) l where clearCont w = fromIntegral (w `clearBit` 7) getNbBytes = indexTableI headTable headTable = Table "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\ \\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\ \\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\ \\x03\x03\x03\x03\x03\x03\x03\x03\xff\xff\xff\xff\xff\xff\xff\xff"# isCont :: Word8 -> Bool isCont = indexTableB contTable contTable = Table "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
4,192
utf8Decode :: B.ByteString -> String utf8Decode = decode . B.unpack where decode :: [Word8] -> [Char] decode [] = [] decode (x:xs) = case getNbBytes x of 0 -> toEnum (fromIntegral x) : decode xs 1 -> case xs of b1:xs2 | isCont b1 -> toChar (x .&. 0x1f) [b1] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (1) " 2 -> case xs of b1:b2:xs2 | and $ map isCont [b1,b2] -> toChar (x .&. 0xf) [b1,b2] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (2)" 3 -> case xs of b1:b2:b3:xs2 | and $ map isCont [b1,b2,b3] -> toChar (x .&. 0x7) [b1,b2,b3] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (3)" _ -> error "invalid heading byte" toChar :: Word8 -> [Word8] -> Char toChar h l = toEnum $ foldl (\acc v -> (acc `shiftL` 6) + clearCont v) (fromIntegral h) l where clearCont w = fromIntegral (w `clearBit` 7) getNbBytes = indexTableI headTable headTable = Table "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\ \\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\ \\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\ \\x03\x03\x03\x03\x03\x03\x03\x03\xff\xff\xff\xff\xff\xff\xff\xff"# isCont :: Word8 -> Bool isCont = indexTableB contTable contTable = Table "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
4,192
utf8Decode = decode . B.unpack where decode :: [Word8] -> [Char] decode [] = [] decode (x:xs) = case getNbBytes x of 0 -> toEnum (fromIntegral x) : decode xs 1 -> case xs of b1:xs2 | isCont b1 -> toChar (x .&. 0x1f) [b1] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (1) " 2 -> case xs of b1:b2:xs2 | and $ map isCont [b1,b2] -> toChar (x .&. 0xf) [b1,b2] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (2)" 3 -> case xs of b1:b2:b3:xs2 | and $ map isCont [b1,b2,b3] -> toChar (x .&. 0x7) [b1,b2,b3] : decode xs2 | otherwise -> error "continuation bytes invalid" _ -> error "not enough bytes (3)" _ -> error "invalid heading byte" toChar :: Word8 -> [Word8] -> Char toChar h l = toEnum $ foldl (\acc v -> (acc `shiftL` 6) + clearCont v) (fromIntegral h) l where clearCont w = fromIntegral (w `clearBit` 7) getNbBytes = indexTableI headTable headTable = Table "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\ \\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\ \\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\ \\x03\x03\x03\x03\x03\x03\x03\x03\xff\xff\xff\xff\xff\xff\xff\xff"# isCont :: Word8 -> Bool isCont = indexTableB contTable contTable = Table "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
4,155
false
true
18
16
1,215
498
246
252
null
null
Sword-Smith/hfasto
src/MipsRegAlloc.hs
mit
storeRegistersCode :: Int -> Int -> [] Mips.Reg -> [] Mips.Instruction storeRegistersCode n i (reg:regs) = (Mips.SW reg "$sp" (show (4*n - 4*(i+1)))) : (storeRegistersCode n (i + 1) regs)
187
storeRegistersCode :: Int -> Int -> [] Mips.Reg -> [] Mips.Instruction storeRegistersCode n i (reg:regs) = (Mips.SW reg "$sp" (show (4*n - 4*(i+1)))) : (storeRegistersCode n (i + 1) regs)
187
storeRegistersCode n i (reg:regs) = (Mips.SW reg "$sp" (show (4*n - 4*(i+1)))) : (storeRegistersCode n (i + 1) regs)
116
false
true
0
13
29
112
57
55
null
null
kishoredbn/barrelfish
tools/flounder/GCBackend.hs
mit
arg_names :: MessageArgument -> [String] arg_names (Arg _ v) = var_names v where var_names (Name n) = [n] var_names (StringArray n _) = [n] var_names (DynamicArray n1 n2 _) = [n1, n2]
211
arg_names :: MessageArgument -> [String] arg_names (Arg _ v) = var_names v where var_names (Name n) = [n] var_names (StringArray n _) = [n] var_names (DynamicArray n1 n2 _) = [n1, n2]
211
arg_names (Arg _ v) = var_names v where var_names (Name n) = [n] var_names (StringArray n _) = [n] var_names (DynamicArray n1 n2 _) = [n1, n2]
170
false
true
0
6
59
103
50
53
null
null
ghc-android/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprCtO (LiteralOrigin lit) = hsep [ptext (sLit "the literal"), quotes (ppr lit)]
82
pprCtO (LiteralOrigin lit) = hsep [ptext (sLit "the literal"), quotes (ppr lit)]
82
pprCtO (LiteralOrigin lit) = hsep [ptext (sLit "the literal"), quotes (ppr lit)]
82
false
false
0
8
13
43
20
23
null
null
danoctavian/shepherd
src/Network/BitTorrent/Shepherd.hs
gpl-2.0
countPeers s peers = P.length . P.filter ((== s) . peerState) $ peers
69
countPeers s peers = P.length . P.filter ((== s) . peerState) $ peers
69
countPeers s peers = P.length . P.filter ((== s) . peerState) $ peers
69
false
false
2
9
12
43
19
24
null
null
mightybyte/reflex-dom-stubs
src/GHCJS/DOM/HTMLInputElement.hs
bsd-3-clause
htmlInputElementSetAutofocus = undefined
40
htmlInputElementSetAutofocus = undefined
40
htmlInputElementSetAutofocus = undefined
40
false
false
1
5
2
10
3
7
null
null
dreixel/instant-generics
src/Generics/Instant/TH.hs
bsd-3-clause
repConGADT d _repVs _ c = repCon d c baseEqs
44
repConGADT d _repVs _ c = repCon d c baseEqs
44
repConGADT d _repVs _ c = repCon d c baseEqs
44
false
false
0
5
9
22
10
12
null
null
asr/fotc
notes/FOT/FOTC/Program/ABP/ABPThesis.hs
mit
outH b (Error :> bs) = outH b bs
37
outH b (Error :> bs) = outH b bs
37
outH b (Error :> bs) = outH b bs
37
false
false
0
7
13
23
11
12
null
null
kjslag/hTensor
lib/Numeric/LinearAlgebra/Tensor.hs
bsd-3-clause
-- | Creates a tensor from a list of dimensions and a list of coordinates. -- A positive dimension means that the index is assumed to be contravariant (vector-like), and -- a negative dimension means that the index is assumed to be covariant (like a linear function, or covector). Contractions can only be performed between indices of different type. listTensor :: Coord t => [Int] -- ^ dimensions -> [t] -- ^ coordinates -> Tensor t listTensor ds cs = mkNArray dms (product ds' |> (cs ++ repeat 0)) where dms = zipWith3 Idx (map f ds) ds' (map show [1::Int ..]) ds' = map abs ds f n | n>0 = Contra | otherwise = Co -- | Create an 'Tensor' from a list of parts with a contravariant index (@superindex = 'newIndex' 'Contra'@).
805
listTensor :: Coord t => [Int] -- ^ dimensions -> [t] -- ^ coordinates -> Tensor t listTensor ds cs = mkNArray dms (product ds' |> (cs ++ repeat 0)) where dms = zipWith3 Idx (map f ds) ds' (map show [1::Int ..]) ds' = map abs ds f n | n>0 = Contra | otherwise = Co -- | Create an 'Tensor' from a list of parts with a contravariant index (@superindex = 'newIndex' 'Contra'@).
454
listTensor ds cs = mkNArray dms (product ds' |> (cs ++ repeat 0)) where dms = zipWith3 Idx (map f ds) ds' (map show [1::Int ..]) ds' = map abs ds f n | n>0 = Contra | otherwise = Co -- | Create an 'Tensor' from a list of parts with a contravariant index (@superindex = 'newIndex' 'Contra'@).
336
true
true
0
10
214
147
76
71
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGPathSegMovetoRel.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegMovetoRel.y Mozilla SVGPathSegMovetoRel.y documentation> setY :: (MonadDOM m) => SVGPathSegMovetoRel -> Float -> m () setY self val = liftDOM (self ^. jss "y" (toJSVal val))
239
setY :: (MonadDOM m) => SVGPathSegMovetoRel -> Float -> m () setY self val = liftDOM (self ^. jss "y" (toJSVal val))
116
setY self val = liftDOM (self ^. jss "y" (toJSVal val))
55
true
true
0
10
28
60
30
30
null
null
vaibhav276/haskell_cs194_assignments
monoids/JoinList.hs
mit
jlToList (Append _ a b) = (jlToList a) ++ (jlToList b)
54
jlToList (Append _ a b) = (jlToList a) ++ (jlToList b)
54
jlToList (Append _ a b) = (jlToList a) ++ (jlToList b)
54
false
false
0
7
10
35
17
18
null
null
Philonous/hs-otr
source/Otr.hs
mit
putMsgState :: Monad m => MsgState -> OtrT g m () putMsgState ns = modifyState $ \s -> s{msgState = ns }
104
putMsgState :: Monad m => MsgState -> OtrT g m () putMsgState ns = modifyState $ \s -> s{msgState = ns }
104
putMsgState ns = modifyState $ \s -> s{msgState = ns }
54
false
true
0
8
21
51
26
25
null
null
jamesyang124/haskell-playground
src/Geometry.hs
bsd-3-clause
cuboidVolume :: Float -> Float -> Float -> Float cuboidVolume a b c = rectangleArea a b * c
91
cuboidVolume :: Float -> Float -> Float -> Float cuboidVolume a b c = rectangleArea a b * c
91
cuboidVolume a b c = rectangleArea a b * c
42
false
true
0
9
18
46
20
26
null
null
Jubobs/CommonMark-WIP
src/CommonMark/Util/Parsing.hs
bsd-3-clause
-- | @failure@ is a parser that always fails. failure :: Parser a failure = fail "no parse"
91
failure :: Parser a failure = fail "no parse"
45
failure = fail "no parse"
25
true
true
1
5
17
21
9
12
null
null
alexander-at-github/eta
compiler/ETA/BasicTypes/OccName.hs
bsd-3-clause
pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc pprOccEnv ppr_elt (A env) = pprUniqFM ppr_elt env
94
pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc pprOccEnv ppr_elt (A env) = pprUniqFM ppr_elt env
94
pprOccEnv ppr_elt (A env) = pprUniqFM ppr_elt env
49
false
true
0
10
17
50
23
27
null
null
fmapfmapfmap/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/DeleteEventSubscription.hs
mpl-2.0
-- | The name of the Amazon Redshift event notification subscription to be -- deleted. desSubscriptionName :: Lens' DeleteEventSubscription Text desSubscriptionName = lens _desSubscriptionName (\ s a -> s{_desSubscriptionName = a})
231
desSubscriptionName :: Lens' DeleteEventSubscription Text desSubscriptionName = lens _desSubscriptionName (\ s a -> s{_desSubscriptionName = a})
144
desSubscriptionName = lens _desSubscriptionName (\ s a -> s{_desSubscriptionName = a})
86
true
true
0
9
30
41
23
18
null
null
anton-dessiatov/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
inlineBoringOk :: CoreExpr -> Bool -- See Note [INLINE for small functions] -- True => the result of inlining the expression is -- no bigger than the expression itself -- eg (\x y -> f y x) -- This is a quick and dirty version. It doesn't attempt -- to deal with (\x y z -> x (y z)) -- The really important one is (x `cast` c) inlineBoringOk e = go 0 e where go :: Int -> CoreExpr -> Bool go credit (Lam x e) | isId x = go (credit+1) e | otherwise = go credit e go credit (App f (Type {})) = go credit f go credit (App f a) | credit > 0 , exprIsTrivial a = go (credit-1) f go credit (Tick _ e) = go credit e -- dubious go credit (Cast e _) = go credit e go _ (Var {}) = boringCxtOk go _ _ = boringCxtNotOk
927
inlineBoringOk :: CoreExpr -> Bool inlineBoringOk e = go 0 e where go :: Int -> CoreExpr -> Bool go credit (Lam x e) | isId x = go (credit+1) e | otherwise = go credit e go credit (App f (Type {})) = go credit f go credit (App f a) | credit > 0 , exprIsTrivial a = go (credit-1) f go credit (Tick _ e) = go credit e -- dubious go credit (Cast e _) = go credit e go _ (Var {}) = boringCxtOk go _ _ = boringCxtNotOk
617
inlineBoringOk e = go 0 e where go :: Int -> CoreExpr -> Bool go credit (Lam x e) | isId x = go (credit+1) e | otherwise = go credit e go credit (App f (Type {})) = go credit f go credit (App f a) | credit > 0 , exprIsTrivial a = go (credit-1) f go credit (Tick _ e) = go credit e -- dubious go credit (Cast e _) = go credit e go _ (Var {}) = boringCxtOk go _ _ = boringCxtNotOk
582
true
true
8
10
378
248
126
122
null
null
kongo2002/gitlog
src/Gitlog/Parser.hs
apache-2.0
tag :: Parser GitBody tag = Tag <$> (takeWhile (inClass "A-Z") <* char '-') <*> decimal <* end <*> return Nothing where end = skipWhile (notInClass bodySep) ------------------------------------------------------------------------------ -- | Skip to the end of line
279
tag :: Parser GitBody tag = Tag <$> (takeWhile (inClass "A-Z") <* char '-') <*> decimal <* end <*> return Nothing where end = skipWhile (notInClass bodySep) ------------------------------------------------------------------------------ -- | Skip to the end of line
279
tag = Tag <$> (takeWhile (inClass "A-Z") <* char '-') <*> decimal <* end <*> return Nothing where end = skipWhile (notInClass bodySep) ------------------------------------------------------------------------------ -- | Skip to the end of line
257
false
true
0
13
50
71
35
36
null
null
copland/cmdargs
System/Console/CmdArgs/Implicit/Reader.hs
bsd-3-clause
takes [] _ = []
15
takes [] _ = []
15
takes [] _ = []
15
false
false
0
6
4
15
7
8
null
null
nevrenato/Hets_Fork
DFOL/AS_DFOL.hs
gpl-2.0
-- canonical forms {- converts a term into a form where a function is applied to exactly one argument -} termRecForm :: TERM -> TERM termRecForm (Identifier t) = Identifier t
178
termRecForm :: TERM -> TERM termRecForm (Identifier t) = Identifier t
69
termRecForm (Identifier t) = Identifier t
41
true
true
0
7
34
29
15
14
null
null
ribag/ganeti-experiments
src/Ganeti/Constants.hs
gpl-2.0
vfVg :: String vfVg = "vg"
26
vfVg :: String vfVg = "vg"
26
vfVg = "vg"
11
false
true
0
4
5
11
6
5
null
null