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
jstolarek/slicer
lib/Language/Slicer/Parser.hs
gpl-3.0
strThen = "then"
25
strThen = "then"
25
strThen = "then"
25
false
false
1
5
11
10
3
7
null
null
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/Code.hs
lgpl-2.1
-- | Format a given section made of subsections. formatSection :: Text -> (Export -> Maybe (Subsection, SymbolName)) -> [Export] -> Maybe Text formatSection section filter exports = if M.null exportedSubsections then Nothing else Just . T.unlines $ [" -- * " <> section , ( T.unlines . map formatSubsection . M.toList ) exportedSubsections] where filteredExports :: [(Subsection, SymbolName)] filteredExports = catMaybes (map filter exports) exportedSubsections :: M.Map Subsection (Set.Set SymbolName) exportedSubsections = foldr extract M.empty filteredExports extract :: (Subsection, SymbolName) -> M.Map Subsection (Set.Set Text) -> M.Map Subsection (Set.Set Text) extract (subsec, m) secs = M.insertWith Set.union subsec (Set.singleton m) secs formatSubsection :: (Subsection, Set.Set SymbolName) -> Text formatSubsection (subsec, symbols) = T.unlines [ "-- ** " <> case subsectionAnchor subsec of Just anchor -> subsectionTitle subsec <> " #" <> anchor <> "#" Nothing -> subsectionTitle subsec , ( T.concat . map (paddedLine 1 . comma) . Set.toList ) symbols] -- | Format the list of methods.
1,493
formatSection :: Text -> (Export -> Maybe (Subsection, SymbolName)) -> [Export] -> Maybe Text formatSection section filter exports = if M.null exportedSubsections then Nothing else Just . T.unlines $ [" -- * " <> section , ( T.unlines . map formatSubsection . M.toList ) exportedSubsections] where filteredExports :: [(Subsection, SymbolName)] filteredExports = catMaybes (map filter exports) exportedSubsections :: M.Map Subsection (Set.Set SymbolName) exportedSubsections = foldr extract M.empty filteredExports extract :: (Subsection, SymbolName) -> M.Map Subsection (Set.Set Text) -> M.Map Subsection (Set.Set Text) extract (subsec, m) secs = M.insertWith Set.union subsec (Set.singleton m) secs formatSubsection :: (Subsection, Set.Set SymbolName) -> Text formatSubsection (subsec, symbols) = T.unlines [ "-- ** " <> case subsectionAnchor subsec of Just anchor -> subsectionTitle subsec <> " #" <> anchor <> "#" Nothing -> subsectionTitle subsec , ( T.concat . map (paddedLine 1 . comma) . Set.toList ) symbols] -- | Format the list of methods.
1,444
formatSection section filter exports = if M.null exportedSubsections then Nothing else Just . T.unlines $ [" -- * " <> section , ( T.unlines . map formatSubsection . M.toList ) exportedSubsections] where filteredExports :: [(Subsection, SymbolName)] filteredExports = catMaybes (map filter exports) exportedSubsections :: M.Map Subsection (Set.Set SymbolName) exportedSubsections = foldr extract M.empty filteredExports extract :: (Subsection, SymbolName) -> M.Map Subsection (Set.Set Text) -> M.Map Subsection (Set.Set Text) extract (subsec, m) secs = M.insertWith Set.union subsec (Set.singleton m) secs formatSubsection :: (Subsection, Set.Set SymbolName) -> Text formatSubsection (subsec, symbols) = T.unlines [ "-- ** " <> case subsectionAnchor subsec of Just anchor -> subsectionTitle subsec <> " #" <> anchor <> "#" Nothing -> subsectionTitle subsec , ( T.concat . map (paddedLine 1 . comma) . Set.toList ) symbols] -- | Format the list of methods.
1,333
true
true
0
16
553
380
196
184
null
null
beni55/cryptol
src/Cryptol/TypeCheck/Solver/Numeric/Simplify1.hs
bsd-3-clause
pEq :: Expr -> Expr -> I Bool pEq x (K (Nat n)) = pIsNat n x
60
pEq :: Expr -> Expr -> I Bool pEq x (K (Nat n)) = pIsNat n x
60
pEq x (K (Nat n)) = pIsNat n x
30
false
true
0
12
16
48
22
26
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/FileMonitor.hs
bsd-3-clause
whenCacheChanged CacheUnchanged _ = return ()
48
whenCacheChanged CacheUnchanged _ = return ()
48
whenCacheChanged CacheUnchanged _ = return ()
48
false
false
0
6
8
18
7
11
null
null
facebookincubator/duckling
Duckling/Time/AR/Rules.hs
bsd-3-clause
ruleCycleOrdinalOfTime :: Rule ruleCycleOrdinalOfTime = Rule { name = "<ordinal> <cycle> of <time>" , pattern = [ dimension Ordinal , dimension TimeGrain , regex "في|من|بـ?" , dimension Time ] , prod = \tokens -> case tokens of (token:Token TimeGrain grain:_:Token Time td:_) -> do n <- getIntValue token tt $ cycleNthAfter True grain (n - 1) td _ -> Nothing }
416
ruleCycleOrdinalOfTime :: Rule ruleCycleOrdinalOfTime = Rule { name = "<ordinal> <cycle> of <time>" , pattern = [ dimension Ordinal , dimension TimeGrain , regex "في|من|بـ?" , dimension Time ] , prod = \tokens -> case tokens of (token:Token TimeGrain grain:_:Token Time td:_) -> do n <- getIntValue token tt $ cycleNthAfter True grain (n - 1) td _ -> Nothing }
416
ruleCycleOrdinalOfTime = Rule { name = "<ordinal> <cycle> of <time>" , pattern = [ dimension Ordinal , dimension TimeGrain , regex "في|من|بـ?" , dimension Time ] , prod = \tokens -> case tokens of (token:Token TimeGrain grain:_:Token Time td:_) -> do n <- getIntValue token tt $ cycleNthAfter True grain (n - 1) td _ -> Nothing }
385
false
true
0
17
116
142
72
70
null
null
melted/idris-lua
src/IRTS/CodegenLua.hs
isc
cgOp (LIntFloat _) [x] = x
26
cgOp (LIntFloat _) [x] = x
26
cgOp (LIntFloat _) [x] = x
26
false
false
0
7
5
24
11
13
null
null
mit-plv/riscv-semantics
src/Platform/RunFast.hs
bsd-3-clause
runFiles :: [String] -> IO Int64 runFiles (file:files) = do myreturn <- runFile file putStr (file ++ ": " ++ (show myreturn) ++ "\n") othersreturn <- runFiles files if myreturn /= 0 then return myreturn else return othersreturn
259
runFiles :: [String] -> IO Int64 runFiles (file:files) = do myreturn <- runFile file putStr (file ++ ": " ++ (show myreturn) ++ "\n") othersreturn <- runFiles files if myreturn /= 0 then return myreturn else return othersreturn
259
runFiles (file:files) = do myreturn <- runFile file putStr (file ++ ": " ++ (show myreturn) ++ "\n") othersreturn <- runFiles files if myreturn /= 0 then return myreturn else return othersreturn
226
false
true
0
12
69
99
47
52
null
null
trskop/hs-not-found
not-found/src/Control/Applicative/Predicate.hs
bsd-3-clause
-- | Shorthand for @\ x y -> 'pure' x ('.==.') y@. (==.) :: (Applicative f, Eq a) => a -> f a -> f Bool (==.) = (.==.) . pure
125
(==.) :: (Applicative f, Eq a) => a -> f a -> f Bool (==.) = (.==.) . pure
74
(==.) = (.==.) . pure
21
true
true
1
9
30
58
30
28
null
null
helino/wham
src/Wham/SignExc.hs
bsd-3-clause
Negative `eq` NonNegative = ret FF
34
Negative `eq` NonNegative = ret FF
34
Negative `eq` NonNegative = ret FF
34
false
false
0
5
5
17
8
9
null
null
thoughtpolice/calc
Asm.hs
bsd-3-clause
gconst n = do push (fromIntegral n :: Word32)
47
gconst n = do push (fromIntegral n :: Word32)
47
gconst n = do push (fromIntegral n :: Word32)
47
false
false
0
9
10
24
11
13
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/GlobalEventHandlers.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.ondurationchange Mozilla GlobalEventHandlers.ondurationchange documentation> durationChange :: (IsGlobalEventHandlers self, IsEventTarget self) => EventName self Event durationChange = unsafeEventName (toJSString "durationchange")
338
durationChange :: (IsGlobalEventHandlers self, IsEventTarget self) => EventName self Event durationChange = unsafeEventName (toJSString "durationchange")
185
durationChange = unsafeEventName (toJSString "durationchange")
62
true
true
0
7
53
44
22
22
null
null
hvr/jhc
src/FrontEnd/Representation.hs
mit
tassocToAp TAssoc { typeCon = con, typeClassArgs = cas, typeExtraArgs = eas } = foldl tAp (TCon con) (cas ++ eas)
113
tassocToAp TAssoc { typeCon = con, typeClassArgs = cas, typeExtraArgs = eas } = foldl tAp (TCon con) (cas ++ eas)
113
tassocToAp TAssoc { typeCon = con, typeClassArgs = cas, typeExtraArgs = eas } = foldl tAp (TCon con) (cas ++ eas)
113
false
false
0
8
20
50
27
23
null
null
cronburg/deckbuild
API/WebServer.hs
bsd-3-clause
-- c' == the card which caused us to have to maybe pick a card greedyMayPick :: Game -> CardName -> IO (Maybe CardName) greedyMayPick g c' = return $ case c' of CELLAR -> cellarPick g -- pick a victory card in hand if exists CHANCELLOR -> Just COPPER -- any card triggers a discard deck otherwise -> Nothing -- c' == the card which caused us to have to pick a card
389
greedyMayPick :: Game -> CardName -> IO (Maybe CardName) greedyMayPick g c' = return $ case c' of CELLAR -> cellarPick g -- pick a victory card in hand if exists CHANCELLOR -> Just COPPER -- any card triggers a discard deck otherwise -> Nothing -- c' == the card which caused us to have to pick a card
322
greedyMayPick g c' = return $ case c' of CELLAR -> cellarPick g -- pick a victory card in hand if exists CHANCELLOR -> Just COPPER -- any card triggers a discard deck otherwise -> Nothing -- c' == the card which caused us to have to pick a card
265
true
true
3
9
98
72
35
37
null
null
Kinokkory/type-level-bst
src/Main.hs
bsd-3-clause
p2 = Proxy :: Proxy 2
21
p2 = Proxy :: Proxy 2
21
p2 = Proxy :: Proxy 2
21
false
false
0
5
5
15
7
8
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
negateIntegerName = varQual gHC_INTEGER_TYPE (fsLit "negateInteger") negateIntegerIdKey
95
negateIntegerName = varQual gHC_INTEGER_TYPE (fsLit "negateInteger") negateIntegerIdKey
95
negateIntegerName = varQual gHC_INTEGER_TYPE (fsLit "negateInteger") negateIntegerIdKey
95
false
false
1
7
14
22
9
13
null
null
thewoolleyman/haskellbook
12/05/eric/MyMaybe.hs
unlicense
isJust :: Maybe a -> Bool isJust m = case m of Nothing -> False Just _ -> True
88
isJust :: Maybe a -> Bool isJust m = case m of Nothing -> False Just _ -> True
88
isJust m = case m of Nothing -> False Just _ -> True
62
false
true
3
6
28
40
19
21
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/OpenDocument.hs
gpl-2.0
isTightList (b:_) | Plain {} : _ <- b = True | otherwise = False
80
isTightList (b:_) | Plain {} : _ <- b = True | otherwise = False
80
isTightList (b:_) | Plain {} : _ <- b = True | otherwise = False
80
false
false
0
10
30
43
20
23
null
null
faylang/fay-jquery
src/JQuery.hs
bsd-3-clause
removeSelector :: Text -> JQuery -> Fay JQuery removeSelector = ffi "%2['remove'](%1)"
86
removeSelector :: Text -> JQuery -> Fay JQuery removeSelector = ffi "%2['remove'](%1)"
86
removeSelector = ffi "%2['remove'](%1)"
39
false
true
0
8
11
31
13
18
null
null
snoyberg/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ [] PrefetchByteArrayOp3 args = doPrefetchByteArrayOp 3 args
80
emitPrimOp _ [] PrefetchByteArrayOp3 args = doPrefetchByteArrayOp 3 args
80
emitPrimOp _ [] PrefetchByteArrayOp3 args = doPrefetchByteArrayOp 3 args
80
false
false
0
6
16
22
10
12
null
null
spinda/liquidhaskell
tests/gsoc15/unknown/pos/ex0.hs
bsd-3-clause
f n = go 0
10
f n = go 0
10
f n = go 0
10
false
false
1
5
4
15
5
10
null
null
qleguennec/lifegame
src/LifeGame/Data/CellGrid.hs
gpl-3.0
searchCell :: CellGrid -> (Int, Int) -> Maybe Cell searchCell (CellGrid _ cs) i = case filter (\(Cell _ ind) -> ind == i) cs of [] -> Nothing xs -> Just . head $ xs
168
searchCell :: CellGrid -> (Int, Int) -> Maybe Cell searchCell (CellGrid _ cs) i = case filter (\(Cell _ ind) -> ind == i) cs of [] -> Nothing xs -> Just . head $ xs
168
searchCell (CellGrid _ cs) i = case filter (\(Cell _ ind) -> ind == i) cs of [] -> Nothing xs -> Just . head $ xs
117
false
true
2
10
39
87
46
41
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/types/TyCon.hs
bsd-3-clause
primRepSizeW _ FloatRep = 1
40
primRepSizeW _ FloatRep = 1
40
primRepSizeW _ FloatRep = 1
40
false
false
0
5
17
11
5
6
null
null
graydon/metrics
src/Data/Metrics/Snapshot.hs
mit
p95Q :: Double p95Q = 0.95
26
p95Q :: Double p95Q = 0.95
26
p95Q = 0.95
11
false
true
0
6
5
18
7
11
null
null
Philonous/pontarius-xmpp
source/Network/Xmpp/Utilities.hs
bsd-3-clause
-- | Apply f with the content of tv as state, restoring the original value when an -- exception occurs withTMVar :: TMVar a -> (a -> IO (c, a)) -> IO c withTMVar tv f = bracketOnError (atomically $ takeTMVar tv) (atomically . putTMVar tv) (\s -> do (x, s') <- f s atomically $ putTMVar tv s' return x )
512
withTMVar :: TMVar a -> (a -> IO (c, a)) -> IO c withTMVar tv f = bracketOnError (atomically $ takeTMVar tv) (atomically . putTMVar tv) (\s -> do (x, s') <- f s atomically $ putTMVar tv s' return x )
409
withTMVar tv f = bracketOnError (atomically $ takeTMVar tv) (atomically . putTMVar tv) (\s -> do (x, s') <- f s atomically $ putTMVar tv s' return x )
360
true
true
0
11
271
121
59
62
null
null
keithodulaigh/Hets
SoftFOL/DFGParser.hs
gpl-2.0
commentLine :: Parser () commentLine = forget $ char '%' >> manyTill anyChar newline
84
commentLine :: Parser () commentLine = forget $ char '%' >> manyTill anyChar newline
84
commentLine = forget $ char '%' >> manyTill anyChar newline
59
false
true
1
7
13
35
15
20
null
null
jonathanknowles/hs-vhd
Data/Vhd/Serialize.hs
bsd-3-clause
putCreatorHostOs v = putWord32be $ case v of CreatorHostOsMacintosh -> 0x4D616320 CreatorHostOsWindows -> 0x5769326B CreatorHostOsUnknown -> 0
149
putCreatorHostOs v = putWord32be $ case v of CreatorHostOsMacintosh -> 0x4D616320 CreatorHostOsWindows -> 0x5769326B CreatorHostOsUnknown -> 0
149
putCreatorHostOs v = putWord32be $ case v of CreatorHostOsMacintosh -> 0x4D616320 CreatorHostOsWindows -> 0x5769326B CreatorHostOsUnknown -> 0
149
false
false
9
6
23
46
20
26
null
null
rrnewton/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
-- The core interpreter for optimised array programs -- evalOpenAcc :: forall aenv a. DelayedOpenAcc aenv a -> Val aenv -> a evalOpenAcc AST.Delayed{} _ = $internalError "evalOpenAcc" "expected manifest array"
237
evalOpenAcc :: forall aenv a. DelayedOpenAcc aenv a -> Val aenv -> a evalOpenAcc AST.Delayed{} _ = $internalError "evalOpenAcc" "expected manifest array"
181
evalOpenAcc AST.Delayed{} _ = $internalError "evalOpenAcc" "expected manifest array"
93
true
true
3
6
58
50
28
22
null
null
chrisdone/ace
test/Main.hs
bsd-3-clause
relatives = do it "relativeClauseCoord" (parsed relativeClauseCoord "that <intrans-verb> and a <noun> <intrans-verb>" == Right (RelativeClauseCoord (RelativeClauseThat (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))) (Just (And ,RelativeClauseCoord (RelativeClauseNP (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))) Nothing)))) it "relativeClause" (parsed relativeClause "that <intrans-verb>" == Right (RelativeClauseThat (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "a <noun> <intrans-verb>" == Right (RelativeClauseNP (NPCoordUnmarked (UnmarkedNPCoord (NP (SpecifyDeterminer A) (N' Nothing (N "<noun>") Nothing Nothing Nothing)) Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "that a <noun> <intrans-verb>" == Right (RelativeClauseThatNPVP (NPCoordUnmarked (UnmarkedNPCoord (NP (SpecifyDeterminer A) (N' Nothing (N "<noun>") Nothing Nothing Nothing)) Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "a <noun> a <noun> <intrans-verb>" == Right (RelativeClauseNPVP (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "<prep> a <noun> a <noun> <intrans-verb>" == Right (RelativeClausePP (PP (Preposition "<prep>") (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing))) (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))))
3,006
relatives = do it "relativeClauseCoord" (parsed relativeClauseCoord "that <intrans-verb> and a <noun> <intrans-verb>" == Right (RelativeClauseCoord (RelativeClauseThat (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))) (Just (And ,RelativeClauseCoord (RelativeClauseNP (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))) Nothing)))) it "relativeClause" (parsed relativeClause "that <intrans-verb>" == Right (RelativeClauseThat (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "a <noun> <intrans-verb>" == Right (RelativeClauseNP (NPCoordUnmarked (UnmarkedNPCoord (NP (SpecifyDeterminer A) (N' Nothing (N "<noun>") Nothing Nothing Nothing)) Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "that a <noun> <intrans-verb>" == Right (RelativeClauseThatNPVP (NPCoordUnmarked (UnmarkedNPCoord (NP (SpecifyDeterminer A) (N' Nothing (N "<noun>") Nothing Nothing Nothing)) Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "a <noun> a <noun> <intrans-verb>" == Right (RelativeClauseNPVP (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "<prep> a <noun> a <noun> <intrans-verb>" == Right (RelativeClausePP (PP (Preposition "<prep>") (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing))) (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))))
3,006
relatives = do it "relativeClauseCoord" (parsed relativeClauseCoord "that <intrans-verb> and a <noun> <intrans-verb>" == Right (RelativeClauseCoord (RelativeClauseThat (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))) (Just (And ,RelativeClauseCoord (RelativeClauseNP (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))) Nothing)))) it "relativeClause" (parsed relativeClause "that <intrans-verb>" == Right (RelativeClauseThat (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "a <noun> <intrans-verb>" == Right (RelativeClauseNP (NPCoordUnmarked (UnmarkedNPCoord (NP (SpecifyDeterminer A) (N' Nothing (N "<noun>") Nothing Nothing Nothing)) Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "that a <noun> <intrans-verb>" == Right (RelativeClauseThatNPVP (NPCoordUnmarked (UnmarkedNPCoord (NP (SpecifyDeterminer A) (N' Nothing (N "<noun>") Nothing Nothing Nothing)) Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "a <noun> a <noun> <intrans-verb>" == Right (RelativeClauseNPVP (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) []))))) it "relativeClause" (parsed relativeClause "<prep> a <noun> a <noun> <intrans-verb>" == Right (RelativeClausePP (PP (Preposition "<prep>") (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing))) (NPCoordUnmarked (UnmarkedNPCoord anoun Nothing)) (VPCoordVP (VP (V' Nothing (ComplVIV (IntransitiveV "<intrans-verb>")) [])))))
3,006
false
false
1
29
1,371
661
320
341
null
null
athanclark/sets
src/Data/Set/Unordered/Unique.hs
mit
-- | /O(n)/ size :: UUSet a -> Int size (UUSet xs) = List.length xs
67
size :: UUSet a -> Int size (UUSet xs) = List.length xs
55
size (UUSet xs) = List.length xs
32
true
true
0
6
14
37
17
20
null
null
SamirTalwar/advent-of-code
2021/AOC_06_1.hs
mit
days :: Int days = 80
21
days :: Int days = 80
21
days = 80
9
false
true
0
4
5
11
6
5
null
null
brendanhay/gogol
gogol-books/gen/Network/Google/Books/Types/Product.hs
mpl-2.0
-- | Short book title in the context of the series. viShortSeriesBookTitle :: Lens' VolumeseriesInfo (Maybe Text) viShortSeriesBookTitle = lens _viShortSeriesBookTitle (\ s a -> s{_viShortSeriesBookTitle = a})
217
viShortSeriesBookTitle :: Lens' VolumeseriesInfo (Maybe Text) viShortSeriesBookTitle = lens _viShortSeriesBookTitle (\ s a -> s{_viShortSeriesBookTitle = a})
165
viShortSeriesBookTitle = lens _viShortSeriesBookTitle (\ s a -> s{_viShortSeriesBookTitle = a})
103
true
true
0
8
35
49
25
24
null
null
kelnage/tamarin-prover
lib/theory/src/Theory/Constraint/System.hs
gpl-3.0
prettyProofType (Just p) = text $ show p
40
prettyProofType (Just p) = text $ show p
40
prettyProofType (Just p) = text $ show p
40
false
false
0
7
7
22
10
12
null
null
timmytofu/graphql-haskell
Data/GraphQL/Encoder.hs
bsd-3-clause
argumentsDefinition :: ArgumentsDefinition -> Text argumentsDefinition = parensCommas inputValueDefinition
106
argumentsDefinition :: ArgumentsDefinition -> Text argumentsDefinition = parensCommas inputValueDefinition
106
argumentsDefinition = parensCommas inputValueDefinition
55
false
true
0
5
8
18
9
9
null
null
MnO2/hindley-milner
src/HM/HigherRank.hs
bsd-3-clause
tcRho (Ann body ann_ty) exp_ty = do { checkSigma body ann_ty ; instSigma ann_ty exp_ty }
99
tcRho (Ann body ann_ty) exp_ty = do { checkSigma body ann_ty ; instSigma ann_ty exp_ty }
99
tcRho (Ann body ann_ty) exp_ty = do { checkSigma body ann_ty ; instSigma ann_ty exp_ty }
99
false
false
1
8
26
43
18
25
null
null
three/codeworld
codeworld-api/src/CodeWorld/Picture.hs
apache-2.0
-- | A thick rectangle, with this line width, and width and height thickRectangle :: HasCallStack => Double -> Double -> Double -> Picture thickRectangle lw w h = thickPolygon lw [ (-w/2, -h/2), (w/2, -h/2), (w/2, h/2), (-w/2, h/2) ]
241
thickRectangle :: HasCallStack => Double -> Double -> Double -> Picture thickRectangle lw w h = thickPolygon lw [ (-w/2, -h/2), (w/2, -h/2), (w/2, h/2), (-w/2, h/2) ]
174
thickRectangle lw w h = thickPolygon lw [ (-w/2, -h/2), (w/2, -h/2), (w/2, h/2), (-w/2, h/2) ]
102
true
true
0
9
48
117
64
53
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/RetrieveTapeArchive.hs
mpl-2.0
-- | The Amazon Resource Name (ARN) of the gateway you want to retrieve the -- virtual tape to. Use the ListGateways operation to return a list of -- gateways for your account and region. -- -- You retrieve archived virtual tapes to only one gateway and the gateway -- must be a gateway-VTL. rtaGatewayARN :: Lens' RetrieveTapeArchive Text rtaGatewayARN = lens _rtaGatewayARN (\ s a -> s{_rtaGatewayARN = a})
408
rtaGatewayARN :: Lens' RetrieveTapeArchive Text rtaGatewayARN = lens _rtaGatewayARN (\ s a -> s{_rtaGatewayARN = a})
116
rtaGatewayARN = lens _rtaGatewayARN (\ s a -> s{_rtaGatewayARN = a})
68
true
true
0
9
69
45
27
18
null
null
total-git/missingno
yesodMissingNo/Handler/GameHome.hs
mit
-- generate a random id (8 bytes) and forward to the corresponding site -- see http://www.yesodweb.com/book/yesods-monads#yesods-monads_adding_a_new_monad_transformer getGameHomeR :: Handler Html getGameHomeR = do gen <- liftIO newGenIO eres <- evalCRandT (getBytes 8) (gen :: SystemRandom) pId <- case eres of Left e -> error $ show (e :: GenError) Right g -> return g let urlHash = decodeUtf8 $ encode pId _ <- insertPlayer urlHash getGameR urlHash
490
getGameHomeR :: Handler Html getGameHomeR = do gen <- liftIO newGenIO eres <- evalCRandT (getBytes 8) (gen :: SystemRandom) pId <- case eres of Left e -> error $ show (e :: GenError) Right g -> return g let urlHash = decodeUtf8 $ encode pId _ <- insertPlayer urlHash getGameR urlHash
323
getGameHomeR = do gen <- liftIO newGenIO eres <- evalCRandT (getBytes 8) (gen :: SystemRandom) pId <- case eres of Left e -> error $ show (e :: GenError) Right g -> return g let urlHash = decodeUtf8 $ encode pId _ <- insertPlayer urlHash getGameR urlHash
294
true
true
0
13
106
127
59
68
null
null
shlevy/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
-- WriteXXXArray emitPrimOp dflags res WriteByteArrayOp_Char args = doWriteByteArrayOp (Just (mo_WordTo8 dflags)) b8 res args
139
emitPrimOp dflags res WriteByteArrayOp_Char args = doWriteByteArrayOp (Just (mo_WordTo8 dflags)) b8 res args
121
emitPrimOp dflags res WriteByteArrayOp_Char args = doWriteByteArrayOp (Just (mo_WordTo8 dflags)) b8 res args
121
true
false
0
9
28
41
18
23
null
null
antalsz/hs-to-coq
structural-isomorphism-plugin/src/Text/PrettyPrint/Util.hs
mit
pprAnnotated :: Outputable a => SDoc -> (a, Bool) -> SDoc pprAnnotated annot (obj, cond) = ppr obj <> if cond then space <> annot else empty
228
pprAnnotated :: Outputable a => SDoc -> (a, Bool) -> SDoc pprAnnotated annot (obj, cond) = ppr obj <> if cond then space <> annot else empty
228
pprAnnotated annot (obj, cond) = ppr obj <> if cond then space <> annot else empty
170
false
true
0
8
114
67
34
33
null
null
forste/haReFork
tools/base/lib/NewSCC.hs
bsd-3-clause
test1 = [('a', "b") ,('c', "b") ,('b', "") ]
68
test1 = [('a', "b") ,('c', "b") ,('b', "") ]
68
test1 = [('a', "b") ,('c', "b") ,('b', "") ]
68
false
false
1
6
32
36
21
15
null
null
technogeeky/centered
src/Pearl/GaDtTLHT/Section02.hs
gpl-3.0
-- ^ -- [/Theorem/:] -- (the 2nd list-homomorphism theorem [@'r01'@]). -- -- If -- -- @ -- 'h' = 'hom' f k 'e' -- @ -- -- Then -- -- @ -- 'h' = 'foldr' '<||' 'e' -- 'h' = 'foldl' '||>' 'e' -- @ -- -- Where -- -- @ -- ('<||') (x, v) = f (k x, v) -- ('||>') (v, x) = f ( v, k x) -- @ -- t01proof :: theorem proof [t01] t01proof = undefined
404
t01proof :: theorem proof [t01] t01proof = undefined
52
t01proof = undefined
20
true
true
0
6
147
43
34
9
null
null
DavidEichmann/boger-banana
src/Reactive/Banana/BOGRE.hs
bsd-3-clause
sphereCollisionsE :: Frameworks t => HookedBogreSystem t -> Float -> SceneNode -> SceneNode -> Moment t (Event t (SceneNode,SceneNode)) sphereCollisionsE bs radius nodeA nodeB = do posAB <- getPositionB nodeA posBB <- getPositionB nodeB let collisionE = (nodeA, nodeB) <$ (filterE (==(False,True)) prevZip) prevZip = accumE (True,True) ((\curr (_,prev) -> (prev,curr)) <$> isCollidedFrameE) isCollidedFrameE = ((<= sqrRadius) <$> (sqrDistB)) <@ (frameE bs) sqrDistB = sqrDist <$> posAB <*> posBB sqrRadius = radius**2 return collisionE {- sphereCollisionsE :: Frameworks t => HookedBogreSystem t -> Float -> SceneNode -> SceneNode -> Moment t (Event t (SceneNode,SceneNode)) sphereCollisionsE bs radius nodeA nodeB = do posAB <- getPositionB nodeA posBB <- getPositionB nodeB let collisionE = (nodeA, nodeB) <$ (filterE (\(col,fid) -> col && (fid /= 0)) collideFidE) collideFidE = accumE (False, -1) (collideFidInc <$> collideE) collideFidInc col (_, i) = (col, i+1) collideE = removeDuplicates (isCollidedB <@ uwE) uwE = _updateWorldE bs isCollidedB = (<= sqrRadius) <$> (sqrDistB) sqrDistB = sqrDist <$> posAB <*> posBB sqrRadius = radius**2 return collisionE -} -- |Filters an 'Event' such that the save event only occurse once. i.e. events [1,1,1,2,2,2,1,1,1,4,5,5,4,5,6] would become [1,2,1,4,5,4,5,6]
1,589
sphereCollisionsE :: Frameworks t => HookedBogreSystem t -> Float -> SceneNode -> SceneNode -> Moment t (Event t (SceneNode,SceneNode)) sphereCollisionsE bs radius nodeA nodeB = do posAB <- getPositionB nodeA posBB <- getPositionB nodeB let collisionE = (nodeA, nodeB) <$ (filterE (==(False,True)) prevZip) prevZip = accumE (True,True) ((\curr (_,prev) -> (prev,curr)) <$> isCollidedFrameE) isCollidedFrameE = ((<= sqrRadius) <$> (sqrDistB)) <@ (frameE bs) sqrDistB = sqrDist <$> posAB <*> posBB sqrRadius = radius**2 return collisionE {- sphereCollisionsE :: Frameworks t => HookedBogreSystem t -> Float -> SceneNode -> SceneNode -> Moment t (Event t (SceneNode,SceneNode)) sphereCollisionsE bs radius nodeA nodeB = do posAB <- getPositionB nodeA posBB <- getPositionB nodeB let collisionE = (nodeA, nodeB) <$ (filterE (\(col,fid) -> col && (fid /= 0)) collideFidE) collideFidE = accumE (False, -1) (collideFidInc <$> collideE) collideFidInc col (_, i) = (col, i+1) collideE = removeDuplicates (isCollidedB <@ uwE) uwE = _updateWorldE bs isCollidedB = (<= sqrRadius) <$> (sqrDistB) sqrDistB = sqrDist <$> posAB <*> posBB sqrRadius = radius**2 return collisionE -} -- |Filters an 'Event' such that the save event only occurse once. i.e. events [1,1,1,2,2,2,1,1,1,4,5,5,4,5,6] would become [1,2,1,4,5,4,5,6]
1,589
sphereCollisionsE bs radius nodeA nodeB = do posAB <- getPositionB nodeA posBB <- getPositionB nodeB let collisionE = (nodeA, nodeB) <$ (filterE (==(False,True)) prevZip) prevZip = accumE (True,True) ((\curr (_,prev) -> (prev,curr)) <$> isCollidedFrameE) isCollidedFrameE = ((<= sqrRadius) <$> (sqrDistB)) <@ (frameE bs) sqrDistB = sqrDist <$> posAB <*> posBB sqrRadius = radius**2 return collisionE {- sphereCollisionsE :: Frameworks t => HookedBogreSystem t -> Float -> SceneNode -> SceneNode -> Moment t (Event t (SceneNode,SceneNode)) sphereCollisionsE bs radius nodeA nodeB = do posAB <- getPositionB nodeA posBB <- getPositionB nodeB let collisionE = (nodeA, nodeB) <$ (filterE (\(col,fid) -> col && (fid /= 0)) collideFidE) collideFidE = accumE (False, -1) (collideFidInc <$> collideE) collideFidInc col (_, i) = (col, i+1) collideE = removeDuplicates (isCollidedB <@ uwE) uwE = _updateWorldE bs isCollidedB = (<= sqrRadius) <$> (sqrDistB) sqrDistB = sqrDist <$> posAB <*> posBB sqrRadius = radius**2 return collisionE -} -- |Filters an 'Event' such that the save event only occurse once. i.e. events [1,1,1,2,2,2,1,1,1,4,5,5,4,5,6] would become [1,2,1,4,5,4,5,6]
1,452
false
true
0
16
468
231
122
109
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/GT_6.hs
mit
primCmpNat (Succ x) (Succ y) = primCmpNat x y
45
primCmpNat (Succ x) (Succ y) = primCmpNat x y
45
primCmpNat (Succ x) (Succ y) = primCmpNat x y
45
false
false
0
7
8
28
13
15
null
null
mstksg/tensor-ops
src/TensorOps/Backend/BTensor.hs
bsd-3-clause
dispatchBLAS :: forall b ms os ns v. (RealFloat (ElemB b), BLAS b) => MaxLength N1 ms -> MaxLength N1 os -> MaxLength N1 ns -> BTensor v b (ms ++ os) -> BTensor v b (Reverse os ++ ns) -> BTensor v b (ms ++ ns) dispatchBLAS lM lO lN v r = case (lM, lO, lN) of (MLZ , MLZ , MLZ ) -> case (v, r) of -- scalar-scalar (BTS x, BTS y) -> BTS $ x * y (MLZ , MLZ , MLS MLZ) -> case (v, r) of -- scalar-vector (BTS x, BTV y) -> BTV $ axpy x y Nothing (MLZ , MLS MLZ, MLZ ) -> case (v, r) of -- dot (BTV x, BTV y) -> BTS $ x `dot` y (MLZ , MLS MLZ, MLS MLZ) -> case (v, r) of -- vector-matrix -- TODO: transpose? (BTV x, BTM y) -> BTV $ gemv 1 (transpB y) x Nothing (MLS MLZ, MLZ , MLZ ) -> case (v, r) of -- vector-scalar (BTV x, BTS y) -> BTV $ axpy y x Nothing (MLS MLZ, MLZ , MLS MLZ) -> case (v, r) of -- vector-scalar (BTV x, BTV y) -> BTM $ ger x y (MLS MLZ, MLS MLZ, MLZ ) -> case (v, r) of -- matrx-vector (BTM x, BTV y) -> BTV $ gemv 1 x y Nothing (MLS MLZ, MLS MLZ, MLS MLZ) -> case (v, r) of -- matrix-matrix (BTM x, BTM y) -> BTM $ gemm 1 x y Nothing
1,267
dispatchBLAS :: forall b ms os ns v. (RealFloat (ElemB b), BLAS b) => MaxLength N1 ms -> MaxLength N1 os -> MaxLength N1 ns -> BTensor v b (ms ++ os) -> BTensor v b (Reverse os ++ ns) -> BTensor v b (ms ++ ns) dispatchBLAS lM lO lN v r = case (lM, lO, lN) of (MLZ , MLZ , MLZ ) -> case (v, r) of -- scalar-scalar (BTS x, BTS y) -> BTS $ x * y (MLZ , MLZ , MLS MLZ) -> case (v, r) of -- scalar-vector (BTS x, BTV y) -> BTV $ axpy x y Nothing (MLZ , MLS MLZ, MLZ ) -> case (v, r) of -- dot (BTV x, BTV y) -> BTS $ x `dot` y (MLZ , MLS MLZ, MLS MLZ) -> case (v, r) of -- vector-matrix -- TODO: transpose? (BTV x, BTM y) -> BTV $ gemv 1 (transpB y) x Nothing (MLS MLZ, MLZ , MLZ ) -> case (v, r) of -- vector-scalar (BTV x, BTS y) -> BTV $ axpy y x Nothing (MLS MLZ, MLZ , MLS MLZ) -> case (v, r) of -- vector-scalar (BTV x, BTV y) -> BTM $ ger x y (MLS MLZ, MLS MLZ, MLZ ) -> case (v, r) of -- matrx-vector (BTM x, BTV y) -> BTV $ gemv 1 x y Nothing (MLS MLZ, MLS MLZ, MLS MLZ) -> case (v, r) of -- matrix-matrix (BTM x, BTM y) -> BTM $ gemm 1 x y Nothing
1,267
dispatchBLAS lM lO lN v r = case (lM, lO, lN) of (MLZ , MLZ , MLZ ) -> case (v, r) of -- scalar-scalar (BTS x, BTS y) -> BTS $ x * y (MLZ , MLZ , MLS MLZ) -> case (v, r) of -- scalar-vector (BTS x, BTV y) -> BTV $ axpy x y Nothing (MLZ , MLS MLZ, MLZ ) -> case (v, r) of -- dot (BTV x, BTV y) -> BTS $ x `dot` y (MLZ , MLS MLZ, MLS MLZ) -> case (v, r) of -- vector-matrix -- TODO: transpose? (BTV x, BTM y) -> BTV $ gemv 1 (transpB y) x Nothing (MLS MLZ, MLZ , MLZ ) -> case (v, r) of -- vector-scalar (BTV x, BTS y) -> BTV $ axpy y x Nothing (MLS MLZ, MLZ , MLS MLZ) -> case (v, r) of -- vector-scalar (BTV x, BTV y) -> BTM $ ger x y (MLS MLZ, MLS MLZ, MLZ ) -> case (v, r) of -- matrx-vector (BTM x, BTV y) -> BTV $ gemv 1 x y Nothing (MLS MLZ, MLS MLZ, MLS MLZ) -> case (v, r) of -- matrix-matrix (BTM x, BTM y) -> BTM $ gemm 1 x y Nothing
1,013
false
true
0
16
469
632
334
298
null
null
mcschroeder/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
insert :: Var -> DFFV () insert v = DFFV $ \ env (set, ids) -> let keep_me = isLocalId v && not (v `elemVarSet` env) && not (v `elemVarSet` set) in if keep_me then ((extendVarSet set v, v:ids), ()) else ((set, ids), ())
338
insert :: Var -> DFFV () insert v = DFFV $ \ env (set, ids) -> let keep_me = isLocalId v && not (v `elemVarSet` env) && not (v `elemVarSet` set) in if keep_me then ((extendVarSet set v, v:ids), ()) else ((set, ids), ())
338
insert v = DFFV $ \ env (set, ids) -> let keep_me = isLocalId v && not (v `elemVarSet` env) && not (v `elemVarSet` set) in if keep_me then ((extendVarSet set v, v:ids), ()) else ((set, ids), ())
313
false
true
0
15
162
131
72
59
null
null
homam/fsm-conversational-ui
src/V1SizeFlow.hs
bsd-3-clause
resume :: Suspended -> StateMachine as SizeFlowResult () resume (Suspended AskKnownSize e) = iput e >>> suspend AskKnownSize >>> askKnownSize >>>= \ b -> resume' (if b then AskSize else AskWeight) (b, e)
211
resume :: Suspended -> StateMachine as SizeFlowResult () resume (Suspended AskKnownSize e) = iput e >>> suspend AskKnownSize >>> askKnownSize >>>= \ b -> resume' (if b then AskSize else AskWeight) (b, e)
211
resume (Suspended AskKnownSize e) = iput e >>> suspend AskKnownSize >>> askKnownSize >>>= \ b -> resume' (if b then AskSize else AskWeight) (b, e)
154
false
true
0
9
40
80
41
39
null
null
mdsteele/pylos
src/Pylos/Draw.hs
gpl-3.0
newDrawRef :: (MonadDraw m) => a -> m (DrawRef a) newDrawRef = runDraw . Draw . fmap DrawRef . newIORef
103
newDrawRef :: (MonadDraw m) => a -> m (DrawRef a) newDrawRef = runDraw . Draw . fmap DrawRef . newIORef
103
newDrawRef = runDraw . Draw . fmap DrawRef . newIORef
53
false
true
0
9
19
48
24
24
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/TeX/Print.hs
bsd-2-clause
fence :: OpenClose -> Fence -> D fence Open Paren = texSym "left("
67
fence :: OpenClose -> Fence -> D fence Open Paren = texSym "left("
67
fence Open Paren = texSym "left("
34
false
true
0
8
13
32
14
18
null
null
romanb/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/DeleteReplicationGroup.hs
mpl-2.0
-- | 'DeleteReplicationGroupResponse' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'drgrReplicationGroup' @::@ 'Maybe' 'ReplicationGroup' -- deleteReplicationGroupResponse :: DeleteReplicationGroupResponse deleteReplicationGroupResponse = DeleteReplicationGroupResponse { _drgrReplicationGroup = Nothing }
351
deleteReplicationGroupResponse :: DeleteReplicationGroupResponse deleteReplicationGroupResponse = DeleteReplicationGroupResponse { _drgrReplicationGroup = Nothing }
172
deleteReplicationGroupResponse = DeleteReplicationGroupResponse { _drgrReplicationGroup = Nothing }
107
true
true
0
6
39
28
18
10
null
null
girving/duck
duck/TypedValue.hs
bsd-3-clause
-- | Pretty printing for values prettyval :: TypeVal -> Value -> Doc' prettyval t v | t == typeInt = pretty' (unsafeUnvalue v :: Int)
134
prettyval :: TypeVal -> Value -> Doc' prettyval t v | t == typeInt = pretty' (unsafeUnvalue v :: Int)
101
prettyval t v | t == typeInt = pretty' (unsafeUnvalue v :: Int)
63
true
true
0
8
26
47
23
24
null
null
kmels/hledger
hledger-lib/Hledger/Data/OutputFormat.hs
gpl-3.0
formatp :: Stream [Char] m Char => ParsecT [Char] st m OutputFormat formatp = formatField <|> formatLiteral
119
formatp :: Stream [Char] m Char => ParsecT [Char] st m OutputFormat formatp = formatField <|> formatLiteral
119
formatp = formatField <|> formatLiteral
51
false
true
0
7
28
41
21
20
null
null
AntoineSavage/haskell
Puzzles/src/Data/RubikCube.hs
gpl-2.0
toNumber 'b' = 5
16
toNumber 'b' = 5
16
toNumber 'b' = 5
16
false
false
0
5
3
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
mpl-2.0
-- | The date and time when the event occurred. heEventTimestamp :: Lens' HistoryEvent UTCTime heEventTimestamp = lens _heEventTimestamp (\ s a -> s{_heEventTimestamp = a}) . _Time
180
heEventTimestamp :: Lens' HistoryEvent UTCTime heEventTimestamp = lens _heEventTimestamp (\ s a -> s{_heEventTimestamp = a}) . _Time
132
heEventTimestamp = lens _heEventTimestamp (\ s a -> s{_heEventTimestamp = a}) . _Time
85
true
true
0
10
27
44
24
20
null
null
sdiehl/ghc
compiler/prelude/THNames.hs
bsd-3-clause
clauseTyConKey = mkPreludeTyConUnique 202
50
clauseTyConKey = mkPreludeTyConUnique 202
50
clauseTyConKey = mkPreludeTyConUnique 202
50
false
false
0
5
12
9
4
5
null
null
AlexanderPankiv/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
dffvExpr (Cast e _) = dffvExpr e
42
dffvExpr (Cast e _) = dffvExpr e
42
dffvExpr (Cast e _) = dffvExpr e
42
false
false
0
7
16
20
9
11
null
null
NickAger/LearningHaskell
CIS194/hw02.hs
mit
isConsistent :: Move -> Code -> Bool isConsistent (Move code exactScore regularScore) guess = actualExactScore == exactScore && actualRegularScore == regularScore where (Move _ actualExactScore actualRegularScore) = getMove guess code -- Exercise 5 -----------------------------------------
296
isConsistent :: Move -> Code -> Bool isConsistent (Move code exactScore regularScore) guess = actualExactScore == exactScore && actualRegularScore == regularScore where (Move _ actualExactScore actualRegularScore) = getMove guess code -- Exercise 5 -----------------------------------------
296
isConsistent (Move code exactScore regularScore) guess = actualExactScore == exactScore && actualRegularScore == regularScore where (Move _ actualExactScore actualRegularScore) = getMove guess code -- Exercise 5 -----------------------------------------
259
false
true
0
8
39
70
35
35
null
null
danstiner/transpiler
test/Batch/ParserTests.hs
mit
assertTokCommand = assertParseTokens command
44
assertTokCommand = assertParseTokens command
44
assertTokCommand = assertParseTokens command
44
false
false
1
5
3
13
4
9
null
null
Mathnerd314/lamdu
src/Lamdu/VersionControl.hs
gpl-3.0
setCurrentBranch :: View (Tag DbM) -> Branch (Tag DbM) -> TDB () setCurrentBranch view branch = do setP (revProp Anchors.currentBranch) branch View.setBranch view branch
173
setCurrentBranch :: View (Tag DbM) -> Branch (Tag DbM) -> TDB () setCurrentBranch view branch = do setP (revProp Anchors.currentBranch) branch View.setBranch view branch
173
setCurrentBranch view branch = do setP (revProp Anchors.currentBranch) branch View.setBranch view branch
108
false
true
0
11
27
78
34
44
null
null
pepegar/cis194-exercises
HW01.hs
mit
toDigits :: Integer -> [Integer] toDigits x | x <= 0 = [] | x < 10 = [x] | otherwise = toDigits (dropLastDigit x) ++ [lastDigit x]
148
toDigits :: Integer -> [Integer] toDigits x | x <= 0 = [] | x < 10 = [x] | otherwise = toDigits (dropLastDigit x) ++ [lastDigit x]
148
toDigits x | x <= 0 = [] | x < 10 = [x] | otherwise = toDigits (dropLastDigit x) ++ [lastDigit x]
115
false
true
0
9
45
87
40
47
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_DRAW_BUFFER12_NV :: GLenum gl_DRAW_BUFFER12_NV = 0x8831
58
gl_DRAW_BUFFER12_NV :: GLenum gl_DRAW_BUFFER12_NV = 0x8831
58
gl_DRAW_BUFFER12_NV = 0x8831
28
false
true
0
4
5
11
6
5
null
null
zhiyuanshi/fcore
frontend/SymbolicEvaluator.hs
bsd-2-clause
eval (Case e alts) = case eval e of VConstr n vs -> eval $ fromJust (lookup n table) vs where table = map (\(ConstrAlt c _ f) -> (constrName c, f)) alts
166
eval (Case e alts) = case eval e of VConstr n vs -> eval $ fromJust (lookup n table) vs where table = map (\(ConstrAlt c _ f) -> (constrName c, f)) alts
166
eval (Case e alts) = case eval e of VConstr n vs -> eval $ fromJust (lookup n table) vs where table = map (\(ConstrAlt c _ f) -> (constrName c, f)) alts
166
false
false
1
11
46
97
45
52
null
null
sdiehl/ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
dsHsWrapper (WpTyApp ty) = return $ \e -> App e (Type ty)
62
dsHsWrapper (WpTyApp ty) = return $ \e -> App e (Type ty)
62
dsHsWrapper (WpTyApp ty) = return $ \e -> App e (Type ty)
62
false
false
0
9
16
36
17
19
null
null
ndmitchell/firstify
Yhc/Core/Firstify/Mitchell/Terminate.hs
bsd-3-clause
emptyTerm :: Term emptyTerm = Term (replicate homeoOrder H.empty) Set.empty
75
emptyTerm :: Term emptyTerm = Term (replicate homeoOrder H.empty) Set.empty
75
emptyTerm = Term (replicate homeoOrder H.empty) Set.empty
57
false
true
0
8
9
35
15
20
null
null
noteed/sftp-streams
Network/SFTP/Messages.hs
bsd-3-clause
fxpFStat :: Int -> Parser Packet fxpFStat n = FxpFStat <$> requestId <*> AB.take (n - 4)
88
fxpFStat :: Int -> Parser Packet fxpFStat n = FxpFStat <$> requestId <*> AB.take (n - 4)
88
fxpFStat n = FxpFStat <$> requestId <*> AB.take (n - 4)
55
false
true
0
8
16
41
20
21
null
null
brendanhay/pagerduty
src/Network/PagerDuty/REST/Services.hs
mpl-2.0
-- | The date/time when this service was created. svcCreatedAt :: Lens' Service UTCTime svcCreatedAt = lens _svcCreatedAt (\s x -> s { _svcCreatedAt = x }) . _D
160
svcCreatedAt :: Lens' Service UTCTime svcCreatedAt = lens _svcCreatedAt (\s x -> s { _svcCreatedAt = x }) . _D
110
svcCreatedAt = lens _svcCreatedAt (\s x -> s { _svcCreatedAt = x }) . _D
72
true
true
0
10
28
44
24
20
null
null
ajsmith/project-euler-solutions
src/Problem59.hs
gpl-2.0
breakEncryption source = breakEncryption' source keys where breakEncryption' source (k:ks) = if testDecryption $ map chr (decrypt k source) then map chr (decrypt k source) else breakEncryption' source ks
227
breakEncryption source = breakEncryption' source keys where breakEncryption' source (k:ks) = if testDecryption $ map chr (decrypt k source) then map chr (decrypt k source) else breakEncryption' source ks
227
breakEncryption source = breakEncryption' source keys where breakEncryption' source (k:ks) = if testDecryption $ map chr (decrypt k source) then map chr (decrypt k source) else breakEncryption' source ks
227
false
false
0
9
52
77
37
40
null
null
haskoin/haskoin
test/Haskoin/KeysSpec.hs
unlicense
testKeyIOInvalidVector _ = assertFailure "Invalid test vector"
62
testKeyIOInvalidVector _ = assertFailure "Invalid test vector"
62
testKeyIOInvalidVector _ = assertFailure "Invalid test vector"
62
false
false
0
5
6
12
5
7
null
null
olorin/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/Types/Product.hs
mpl-2.0
-- | Undocumented member. rleiExpiredLogEventEndIndex :: Lens' RejectedLogEventsInfo (Maybe Int) rleiExpiredLogEventEndIndex = lens _rleiExpiredLogEventEndIndex (\ s a -> s{_rleiExpiredLogEventEndIndex = a})
207
rleiExpiredLogEventEndIndex :: Lens' RejectedLogEventsInfo (Maybe Int) rleiExpiredLogEventEndIndex = lens _rleiExpiredLogEventEndIndex (\ s a -> s{_rleiExpiredLogEventEndIndex = a})
181
rleiExpiredLogEventEndIndex = lens _rleiExpiredLogEventEndIndex (\ s a -> s{_rleiExpiredLogEventEndIndex = a})
110
true
true
0
9
20
46
25
21
null
null
sdiehl/ghc
compiler/utils/UniqDFM.hs
bsd-3-clause
delFromUDFM :: Uniquable key => UniqDFM elt -> key -> UniqDFM elt delFromUDFM (UDFM m i) k = UDFM (M.delete (getKey $ getUnique k) m) i
135
delFromUDFM :: Uniquable key => UniqDFM elt -> key -> UniqDFM elt delFromUDFM (UDFM m i) k = UDFM (M.delete (getKey $ getUnique k) m) i
135
delFromUDFM (UDFM m i) k = UDFM (M.delete (getKey $ getUnique k) m) i
69
false
true
0
10
25
74
34
40
null
null
mpickering/pandoc-lit
src/Text/Pandoc/Lit.hs
bsd-3-clause
transformBeamer _ content = [content]
39
transformBeamer _ content = [content]
39
transformBeamer _ content = [content]
39
false
false
1
6
6
15
7
8
null
null
kawu/concraft-pl
src/NLP/Concraft/Polish/Format/Plain.hs
bsd-2-clause
-- | Identify empty chunks of text. isEmpty :: L.Text -> Bool isEmpty = L.all C.isSpace
87
isEmpty :: L.Text -> Bool isEmpty = L.all C.isSpace
51
isEmpty = L.all C.isSpace
25
true
true
0
7
15
32
14
18
null
null
zchn/ethereum-analyzer
ethereum-analyzer/src/Ethereum/Analyzer/EVM/CfgAugWithTopNPass.hs
apache-2.0
w256Or :: Word256 -> Word256 -> Word256 w256Or wd1 wd2 = bytesToWord256 $ DL.zipWith (.|.) (word256ToBytes wd1) (word256ToBytes wd2)
134
w256Or :: Word256 -> Word256 -> Word256 w256Or wd1 wd2 = bytesToWord256 $ DL.zipWith (.|.) (word256ToBytes wd1) (word256ToBytes wd2)
134
w256Or wd1 wd2 = bytesToWord256 $ DL.zipWith (.|.) (word256ToBytes wd1) (word256ToBytes wd2)
94
false
true
0
8
20
51
26
25
null
null
uws-eresearch/docx2pandoc
src/Text/Pandoc/Readers/DocX.hs
gpl-2.0
spanReduce ((Span (id1, classes1, kvs1) ils1) : ils) | (id1, classes1, kvs1) == ("", [], []) = ils1 ++ (spanReduce ils)
121
spanReduce ((Span (id1, classes1, kvs1) ils1) : ils) | (id1, classes1, kvs1) == ("", [], []) = ils1 ++ (spanReduce ils)
121
spanReduce ((Span (id1, classes1, kvs1) ils1) : ils) | (id1, classes1, kvs1) == ("", [], []) = ils1 ++ (spanReduce ils)
121
false
false
0
10
22
75
41
34
null
null
oldmanmike/haskellSDL2Examples
src/lesson14.hs
gpl-2.0
title :: String title = "lesson14"
34
title :: String title = "lesson14"
34
title = "lesson14"
18
false
true
0
4
5
11
6
5
null
null
jepugs/simpl
Simpl/Parser.hs
apache-2.0
-- The first argument is a stack of lambda-bound variable names. In the event -- that a PId object is found in the stack, then it is converted to a de Bruijn -- index. PLam objects push their name on to the stack to evaluate their terms. convTerm' :: [Name] -> ParseTerm -> Term convTerm' s (PAnn e t) = EAnn (convTerm' s e) t
332
convTerm' :: [Name] -> ParseTerm -> Term convTerm' s (PAnn e t) = EAnn (convTerm' s e) t
94
convTerm' s (PAnn e t) = EAnn (convTerm' s e) t
53
true
true
0
7
70
51
27
24
null
null
nvasilakis/lsh
Types.hs
bsd-3-clause
showComplex (Statement a) = show a
34
showComplex (Statement a) = show a
34
showComplex (Statement a) = show a
34
false
false
0
7
5
18
8
10
null
null
ezyang/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
{- ************************************************************************ * * * Predicates for checking things about pattern-lists in EquationInfo * * * ************************************************************************ \subsection[Pat-list-predicates]{Look for interesting things in patterns} Unlike in the Wadler chapter, where patterns are either ``variables'' or ``constructors,'' here we distinguish between: \begin{description} \item[unfailable:] Patterns that cannot fail to match: variables, wildcards, and lazy patterns. These are the irrefutable patterns; the two other categories are refutable patterns. \item[constructor:] A non-literal constructor pattern (see next category). \item[literal patterns:] At least the numeric ones may be overloaded. \end{description} A pattern is in {\em exactly one} of the above three categories; `as' patterns are treated specially, of course. The 1.3 report defines what ``irrefutable'' and ``failure-free'' patterns are. -} isBangedLPat :: LPat p -> Bool isBangedLPat (L _ (ParPat p)) = isBangedLPat p
1,208
isBangedLPat :: LPat p -> Bool isBangedLPat (L _ (ParPat p)) = isBangedLPat p
79
isBangedLPat (L _ (ParPat p)) = isBangedLPat p
48
true
true
0
9
276
39
19
20
null
null
spechub/Hets
CSL/Interpreter.hs
gpl-2.0
prettyInfo :: (MonadState (ASState a) as, MonadIO as) => Doc -> as () prettyInfo = prettyInfoN 2
96
prettyInfo :: (MonadState (ASState a) as, MonadIO as) => Doc -> as () prettyInfo = prettyInfoN 2
96
prettyInfo = prettyInfoN 2
26
false
true
0
9
16
52
24
28
null
null
philopon/apiary
apiary-mongoDB/src/Web/Apiary/MongoDB.hs
mit
getMongoDBConfig :: T.Text -> MongoDBConfig -> MongoDBConfig getMongoDBConfig s0 cfg = let (_, s1) = T.breakOnEnd "://" s0 (user, s2) = T.break (== ':') s1 (passwd, s3) = T.break (== '@') (T.tail s2) (host_, s4) = first T.unpack $ T.break (== ':') (T.tail s3) (port, s5) = T.break (== '/') (T.tail s4) db = if T.null s5 then "" else T.tail s5 in cfg { mongoDBHost = either (const $ host host_) (Host host_ . PortNumber . fst) (T.decimal port) , mongoDBAuth = Just (user, passwd) , mongoDBDatabase = db }
606
getMongoDBConfig :: T.Text -> MongoDBConfig -> MongoDBConfig getMongoDBConfig s0 cfg = let (_, s1) = T.breakOnEnd "://" s0 (user, s2) = T.break (== ':') s1 (passwd, s3) = T.break (== '@') (T.tail s2) (host_, s4) = first T.unpack $ T.break (== ':') (T.tail s3) (port, s5) = T.break (== '/') (T.tail s4) db = if T.null s5 then "" else T.tail s5 in cfg { mongoDBHost = either (const $ host host_) (Host host_ . PortNumber . fst) (T.decimal port) , mongoDBAuth = Just (user, passwd) , mongoDBDatabase = db }
606
getMongoDBConfig s0 cfg = let (_, s1) = T.breakOnEnd "://" s0 (user, s2) = T.break (== ':') s1 (passwd, s3) = T.break (== '@') (T.tail s2) (host_, s4) = first T.unpack $ T.break (== ':') (T.tail s3) (port, s5) = T.break (== '/') (T.tail s4) db = if T.null s5 then "" else T.tail s5 in cfg { mongoDBHost = either (const $ host host_) (Host host_ . PortNumber . fst) (T.decimal port) , mongoDBAuth = Just (user, passwd) , mongoDBDatabase = db }
545
false
true
0
13
193
271
143
128
null
null
BartMassey/genuine-sieve
oneill-sieve.hs
mit
main :: IO () main = defaultMain (Just primes) Nothing
54
main :: IO () main = defaultMain (Just primes) Nothing
54
main = defaultMain (Just primes) Nothing
40
false
true
0
7
9
33
14
19
null
null
ingemaradahl/bilder
src/TypeChecker/Utils.hs
lgpl-3.0
returns (SWhile _ _ s) = returns s
34
returns (SWhile _ _ s) = returns s
34
returns (SWhile _ _ s) = returns s
34
false
false
0
7
7
22
10
12
null
null
kulshrax/haskml
src/Tags.hs
mit
dd :: HtmlParent dd = newElem "dd"
34
dd :: HtmlParent dd = newElem "dd"
34
dd = newElem "dd"
17
false
true
0
6
6
20
8
12
null
null
srhb/quickcheck
Test/QuickCheck/Text.hs
bsd-3-clause
short :: Int -> String -> String short n s | n < k = take (n-2-i) s ++ ".." ++ drop (k-i) s | otherwise = s where k = length s i = if n >= 5 then 3 else 0
167
short :: Int -> String -> String short n s | n < k = take (n-2-i) s ++ ".." ++ drop (k-i) s | otherwise = s where k = length s i = if n >= 5 then 3 else 0
167
short n s | n < k = take (n-2-i) s ++ ".." ++ drop (k-i) s | otherwise = s where k = length s i = if n >= 5 then 3 else 0
134
false
true
2
11
55
121
55
66
null
null
SKA-ScienceDataProcessor/RC
MS5/programs/dotproduct.hs
apache-2.0
a :: Flow Vec -> Flow Sum a = flow "sum"
40
a :: Flow Vec -> Flow Sum a = flow "sum"
40
a = flow "sum"
14
false
true
0
7
10
29
12
17
null
null
diku-dk/futhark
src/Futhark/IR/Parse.hs
isc
parseGPU :: FilePath -> T.Text -> Either T.Text (Prog GPU) parseGPU = parseRep prGPU
84
parseGPU :: FilePath -> T.Text -> Either T.Text (Prog GPU) parseGPU = parseRep prGPU
84
parseGPU = parseRep prGPU
25
false
true
0
10
13
43
19
24
null
null
antivo/Playground
Haskell/Crossing puzzle/uniform_cost_search.hs
gpl-2.0
succOfLeft [x] r _ offset _ p = [Node (State [] (insertOne x r) AtEnd p (Just (show x ++ " ->"))) (x + offset)]
130
succOfLeft [x] r _ offset _ p = [Node (State [] (insertOne x r) AtEnd p (Just (show x ++ " ->"))) (x + offset)]
130
succOfLeft [x] r _ offset _ p = [Node (State [] (insertOne x r) AtEnd p (Just (show x ++ " ->"))) (x + offset)]
130
false
false
0
13
43
77
39
38
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/ARB/shading_language_100.txt ARB_shading_language_100> extension supported? glGetARBShadingLanguage100 :: MonadIO m => m Bool glGetARBShadingLanguage100 = getExtensions >>= (return . member "GL_ARB_shading_language_100")
271
glGetARBShadingLanguage100 :: MonadIO m => m Bool glGetARBShadingLanguage100 = getExtensions >>= (return . member "GL_ARB_shading_language_100")
144
glGetARBShadingLanguage100 = getExtensions >>= (return . member "GL_ARB_shading_language_100")
94
true
true
0
8
22
36
18
18
null
null
apoikos/pkg-xmobar
src/Plugins/Monitors/Batt.hs
bsd-3-clause
haveAc :: FilePath -> IO Bool haveAc f = handle onError $ withFile (sysDir </> f) ReadMode (fmap (== "1") . hGetLine) where onError = const (return False) :: SomeException -> IO Bool
186
haveAc :: FilePath -> IO Bool haveAc f = handle onError $ withFile (sysDir </> f) ReadMode (fmap (== "1") . hGetLine) where onError = const (return False) :: SomeException -> IO Bool
186
haveAc f = handle onError $ withFile (sysDir </> f) ReadMode (fmap (== "1") . hGetLine) where onError = const (return False) :: SomeException -> IO Bool
156
false
true
0
10
36
83
41
42
null
null
michalkonecny/aern
aern-ivp/demos/simple-events.hs
bsd-3-clause
refines :: CF -> CF -> Bool refines a1 a2 = (a2 |<=? a1) == Just True where
84
refines :: CF -> CF -> Bool refines a1 a2 = (a2 |<=? a1) == Just True where
84
refines a1 a2 = (a2 |<=? a1) == Just True where
56
false
true
0
7
26
41
20
21
null
null
mikegehard/haskellBookExercises
chapter9/MyList.hs
mit
myMaximumBy :: (a -> a -> Ordering) -> [a] -> a myMaximumBy f (x:xs) = go f xs x where go _ [] largest = largest go f (first : rest) largest = if (f largest first) == GT then go f rest largest else go f rest first
281
myMaximumBy :: (a -> a -> Ordering) -> [a] -> a myMaximumBy f (x:xs) = go f xs x where go _ [] largest = largest go f (first : rest) largest = if (f largest first) == GT then go f rest largest else go f rest first
277
myMaximumBy f (x:xs) = go f xs x where go _ [] largest = largest go f (first : rest) largest = if (f largest first) == GT then go f rest largest else go f rest first
229
false
true
0
8
116
131
63
68
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/CelloPizzicato.hs
bsd-3-clause
note33 :: Note note33 = Note (Pitch 440.0 57 "a4") 34 (Range (NoteRange (NoteRangeAmplitude 7920.0 18 0.2) (NoteRangeHarmonicFreq 1 440.0)) (NoteRange (NoteRangeAmplitude 440.0 1 3219.0) (NoteRangeHarmonicFreq 22 9680.0))) [Harmonic 1 (-1.564) 3219.0 ,Harmonic 2 2.125 142.6 ,Harmonic 3 0.695 27.06 ,Harmonic 4 (-1.4) 48.39 ,Harmonic 5 (-2.062) 39.22 ,Harmonic 6 (-0.378) 10.45 ,Harmonic 7 0.373 37.66 ,Harmonic 8 (-2.525) 30.96 ,Harmonic 9 0.736 1.2 ,Harmonic 10 0.932 4.64 ,Harmonic 11 2.828 1.55 ,Harmonic 12 1.038 0.56 ,Harmonic 13 1.733 1.18 ,Harmonic 14 1.51 0.4 ,Harmonic 15 0.213 0.5 ,Harmonic 16 (-0.58) 0.64 ,Harmonic 17 (-6.1e-2) 0.3 ,Harmonic 18 1.739 0.2 ,Harmonic 19 (-6.0e-3) 0.56 ,Harmonic 20 (-0.736) 1.19 ,Harmonic 21 1.369 0.71 ,Harmonic 22 0.413 0.56]
935
note33 :: Note note33 = Note (Pitch 440.0 57 "a4") 34 (Range (NoteRange (NoteRangeAmplitude 7920.0 18 0.2) (NoteRangeHarmonicFreq 1 440.0)) (NoteRange (NoteRangeAmplitude 440.0 1 3219.0) (NoteRangeHarmonicFreq 22 9680.0))) [Harmonic 1 (-1.564) 3219.0 ,Harmonic 2 2.125 142.6 ,Harmonic 3 0.695 27.06 ,Harmonic 4 (-1.4) 48.39 ,Harmonic 5 (-2.062) 39.22 ,Harmonic 6 (-0.378) 10.45 ,Harmonic 7 0.373 37.66 ,Harmonic 8 (-2.525) 30.96 ,Harmonic 9 0.736 1.2 ,Harmonic 10 0.932 4.64 ,Harmonic 11 2.828 1.55 ,Harmonic 12 1.038 0.56 ,Harmonic 13 1.733 1.18 ,Harmonic 14 1.51 0.4 ,Harmonic 15 0.213 0.5 ,Harmonic 16 (-0.58) 0.64 ,Harmonic 17 (-6.1e-2) 0.3 ,Harmonic 18 1.739 0.2 ,Harmonic 19 (-6.0e-3) 0.56 ,Harmonic 20 (-0.736) 1.19 ,Harmonic 21 1.369 0.71 ,Harmonic 22 0.413 0.56]
935
note33 = Note (Pitch 440.0 57 "a4") 34 (Range (NoteRange (NoteRangeAmplitude 7920.0 18 0.2) (NoteRangeHarmonicFreq 1 440.0)) (NoteRange (NoteRangeAmplitude 440.0 1 3219.0) (NoteRangeHarmonicFreq 22 9680.0))) [Harmonic 1 (-1.564) 3219.0 ,Harmonic 2 2.125 142.6 ,Harmonic 3 0.695 27.06 ,Harmonic 4 (-1.4) 48.39 ,Harmonic 5 (-2.062) 39.22 ,Harmonic 6 (-0.378) 10.45 ,Harmonic 7 0.373 37.66 ,Harmonic 8 (-2.525) 30.96 ,Harmonic 9 0.736 1.2 ,Harmonic 10 0.932 4.64 ,Harmonic 11 2.828 1.55 ,Harmonic 12 1.038 0.56 ,Harmonic 13 1.733 1.18 ,Harmonic 14 1.51 0.4 ,Harmonic 15 0.213 0.5 ,Harmonic 16 (-0.58) 0.64 ,Harmonic 17 (-6.1e-2) 0.3 ,Harmonic 18 1.739 0.2 ,Harmonic 19 (-6.0e-3) 0.56 ,Harmonic 20 (-0.736) 1.19 ,Harmonic 21 1.369 0.71 ,Harmonic 22 0.413 0.56]
920
false
true
0
11
279
355
182
173
null
null
kazu-yamamoto/mighttpd
Mighttpd.hs
bsd-3-clause
makeExitHook :: String -> IO () makeExitHook = errorMsg
55
makeExitHook :: String -> IO () makeExitHook = errorMsg
55
makeExitHook = errorMsg
23
false
true
0
8
8
26
11
15
null
null
ComputationWithBoundedResources/tct-trs
src/Tct/Trs/Encoding/Matrix/Matrix.hs
bsd-3-clause
-- | lifts a list mapping function liftVector_ :: ([a] -> [b]) -> Vector a -> Vector b liftVector_ f (Vector v) = Vector $ f v
126
liftVector_ :: ([a] -> [b]) -> Vector a -> Vector b liftVector_ f (Vector v) = Vector $ f v
91
liftVector_ f (Vector v) = Vector $ f v
39
true
true
2
10
26
63
30
33
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/RevokeToken.hs
mpl-2.0
-- | Creates a value of 'UsersRevokeToken' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'urtEnterpriseId' -- -- * 'urtUserId' usersRevokeToken :: Text -- ^ 'urtEnterpriseId' -> Text -- ^ 'urtUserId' -> UsersRevokeToken usersRevokeToken pUrtEnterpriseId_ pUrtUserId_ = UsersRevokeToken' {_urtEnterpriseId = pUrtEnterpriseId_, _urtUserId = pUrtUserId_}
456
usersRevokeToken :: Text -- ^ 'urtEnterpriseId' -> Text -- ^ 'urtUserId' -> UsersRevokeToken usersRevokeToken pUrtEnterpriseId_ pUrtUserId_ = UsersRevokeToken' {_urtEnterpriseId = pUrtEnterpriseId_, _urtUserId = pUrtUserId_}
242
usersRevokeToken pUrtEnterpriseId_ pUrtUserId_ = UsersRevokeToken' {_urtEnterpriseId = pUrtEnterpriseId_, _urtUserId = pUrtUserId_}
137
true
true
0
8
79
56
32
24
null
null
prashant007/AMPL
myAMPL/src/TEMP/Skelparser.hs
mit
transHandle :: Handle -> Result transHandle x = case x of HandName uident -> failure x
89
transHandle :: Handle -> Result transHandle x = case x of HandName uident -> failure x
89
transHandle x = case x of HandName uident -> failure x
57
false
true
0
8
18
39
17
22
null
null
arnizamani/occam
interpreter.hs
mit
interpreter b axioms e@(HsList (x:xs)) = do x' <- interpreter False axioms x let r = [Right (HsList (a:xs),d) | (Right (a,d)) <- x', a /= x] --putStrLn $ show x --putStrLn $ show (length r) --putStrLn $ unlines $ [show e | (Right (e,d)) <- x', e /= x] xs' <- interpreter False axioms (HsList xs) let newxs = [Right (HsList (x:xsnew),d) | (Right (HsList xsnew,d)) <- xs'] let exp' = concatMap (\x -> matchFuncArgs b x e) $ axioms let exp = map Right exp' -- [Right e' | e'@(HsList (e:es)) <- exp'] let result = r ++ exp ++ newxs if notnull result then return result else return [Right (e,Nothing)]
718
interpreter b axioms e@(HsList (x:xs)) = do x' <- interpreter False axioms x let r = [Right (HsList (a:xs),d) | (Right (a,d)) <- x', a /= x] --putStrLn $ show x --putStrLn $ show (length r) --putStrLn $ unlines $ [show e | (Right (e,d)) <- x', e /= x] xs' <- interpreter False axioms (HsList xs) let newxs = [Right (HsList (x:xsnew),d) | (Right (HsList xsnew,d)) <- xs'] let exp' = concatMap (\x -> matchFuncArgs b x e) $ axioms let exp = map Right exp' -- [Right e' | e'@(HsList (e:es)) <- exp'] let result = r ++ exp ++ newxs if notnull result then return result else return [Right (e,Nothing)]
718
interpreter b axioms e@(HsList (x:xs)) = do x' <- interpreter False axioms x let r = [Right (HsList (a:xs),d) | (Right (a,d)) <- x', a /= x] --putStrLn $ show x --putStrLn $ show (length r) --putStrLn $ unlines $ [show e | (Right (e,d)) <- x', e /= x] xs' <- interpreter False axioms (HsList xs) let newxs = [Right (HsList (x:xsnew),d) | (Right (HsList xsnew,d)) <- xs'] let exp' = concatMap (\x -> matchFuncArgs b x e) $ axioms let exp = map Right exp' -- [Right e' | e'@(HsList (e:es)) <- exp'] let result = r ++ exp ++ newxs if notnull result then return result else return [Right (e,Nothing)]
718
false
false
1
17
234
281
138
143
null
null
jeannekamikaze/Spear
Spear/Window.hs
mit
fromGLFWkey (GLFW.CharKey '1') = KEY_1
38
fromGLFWkey (GLFW.CharKey '1') = KEY_1
38
fromGLFWkey (GLFW.CharKey '1') = KEY_1
38
false
false
0
7
4
18
8
10
null
null
florianpilz/autotool
src/NFA/Nerode/Congruent/Instance.hs
gpl-2.0
example :: Instance Char example = Instance { language = Convert.Language.example , goal = "ab" , wanted = 4 , minimal_length = 6 }
171
example :: Instance Char example = Instance { language = Convert.Language.example , goal = "ab" , wanted = 4 , minimal_length = 6 }
171
example = Instance { language = Convert.Language.example , goal = "ab" , wanted = 4 , minimal_length = 6 }
146
false
true
0
7
63
43
26
17
null
null
takayuki/natume
Re.hs
gpl-2.0
hiragana0,katakana0,hiragana,katakana :: [String] fulldigit = ["£°","£±","£²","£³","£´","£µ","£¶","£·","£¸","£¹"]
114
hiragana0,katakana0,hiragana,katakana :: [String] fulldigit = ["£°","£±","£²","£³","£´","£µ","£¶","£·","£¸","£¹"]
113
fulldigit = ["£°","£±","£²","£³","£´","£µ","£¶","£·","£¸","£¹"]
63
false
true
0
5
6
50
34
16
null
null
VictorDenisov/jdi
src/Language/Java/Jdi/ArrayReference.hs
gpl-2.0
{- | Returns the number of components in this array. -} length :: (Error e, MonadIO m, MonadError e m) => J.ArrayReference -> VirtualMachine m Int length = arrLength
178
length :: (Error e, MonadIO m, MonadError e m) => J.ArrayReference -> VirtualMachine m Int length = arrLength
122
length = arrLength
18
true
true
0
8
41
52
25
27
null
null