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
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/ClientNamenodeProtocolProtos/ClientNamenodeProtocol.hs
mit
getServerDefaults :: GetServerDefaults getServerDefaults = P'.Method
68
getServerDefaults :: GetServerDefaults getServerDefaults = P'.Method
68
getServerDefaults = P'.Method
29
false
true
0
5
5
13
7
6
null
null
bitemyapp/blpapi-hs
src/Finance/Blpapi/Impl/EventImpl.hs
mit
convertEventImpl :: Ptr EventImpl -> IO [Event] convertEventImpl ptr = do currEventType <- blpapi_Event_eventType ptr iterator <- blpapi_MessageIterator_create ptr msgs <- getMessage iterator return $ map (Event (toEnum currEventType)) msgs
248
convertEventImpl :: Ptr EventImpl -> IO [Event] convertEventImpl ptr = do currEventType <- blpapi_Event_eventType ptr iterator <- blpapi_MessageIterator_create ptr msgs <- getMessage iterator return $ map (Event (toEnum currEventType)) msgs
248
convertEventImpl ptr = do currEventType <- blpapi_Event_eventType ptr iterator <- blpapi_MessageIterator_create ptr msgs <- getMessage iterator return $ map (Event (toEnum currEventType)) msgs
200
false
true
0
12
37
81
36
45
null
null
qpliu/esolang
featured/glass.hs
gpl-3.0
gcObjRefs :: State -> ObjRef -> [ObjRef] gcObjRefs State{stObjs = objs} objRef = concatMap gcValRefs (M.elems vars) where Obj{objVars = vars} = objs M.! objRef
161
gcObjRefs :: State -> ObjRef -> [ObjRef] gcObjRefs State{stObjs = objs} objRef = concatMap gcValRefs (M.elems vars) where Obj{objVars = vars} = objs M.! objRef
161
gcObjRefs State{stObjs = objs} objRef = concatMap gcValRefs (M.elems vars) where Obj{objVars = vars} = objs M.! objRef
120
false
true
4
9
26
85
39
46
null
null
rwtodd/small_programs
i_ching/haskell/iching.hs
gpl-2.0
num_prompt :: String -> IO (Int) num_prompt words = do at 1 23 putStr words IO.hFlush IO.stdout liftM read IO.getLine
125
num_prompt :: String -> IO (Int) num_prompt words = do at 1 23 putStr words IO.hFlush IO.stdout liftM read IO.getLine
125
num_prompt words = do at 1 23 putStr words IO.hFlush IO.stdout liftM read IO.getLine
92
false
true
0
8
27
58
25
33
null
null
c19/Exercism-Haskell
pascals-triangle/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_pascals_triangle.hs
mit
getDataDir = catchIO (getEnv "pascals_triangle_datadir") (\_ -> return datadir)
79
getDataDir = catchIO (getEnv "pascals_triangle_datadir") (\_ -> return datadir)
79
getDataDir = catchIO (getEnv "pascals_triangle_datadir") (\_ -> return datadir)
79
false
false
0
8
8
28
14
14
null
null
EmilGedda/hattis
src/Hattis/Network.hs
bsd-3-clause
parseStatus :: MonadIO m => IOStateArrow () XmlTree XmlTree -> m String parseStatus doc = liftIO $ safe <$> runX (doc >>> deep stat //> getText) where stat = hasName "td" >>> hasAttrValue "class" (isInfixOf "status") safe = fromMaybe "Unknown status" . listToMaybe
294
parseStatus :: MonadIO m => IOStateArrow () XmlTree XmlTree -> m String parseStatus doc = liftIO $ safe <$> runX (doc >>> deep stat //> getText) where stat = hasName "td" >>> hasAttrValue "class" (isInfixOf "status") safe = fromMaybe "Unknown status" . listToMaybe
294
parseStatus doc = liftIO $ safe <$> runX (doc >>> deep stat //> getText) where stat = hasName "td" >>> hasAttrValue "class" (isInfixOf "status") safe = fromMaybe "Unknown status" . listToMaybe
222
false
true
5
9
72
110
48
62
null
null
bitemyapp/7startups
Backends/XMPP.hs
bsd-3-clause
toNode (PDirection Own) = toNode "⇓"
36
toNode (PDirection Own) = toNode "⇓"
36
toNode (PDirection Own) = toNode "⇓"
36
false
false
0
6
5
19
8
11
null
null
printedheart/Dao
src/Dao/Lens.hs
agpl-3.0
-- | Defined as @(\lens -> 'Control.Monad.State.Class.get' >>= 'fetch' lens)@ lensGet :: (Monad m, MonadState c m) => Lens m c e -> m e lensGet lens = get >>= fetch lens
169
lensGet :: (Monad m, MonadState c m) => Lens m c e -> m e lensGet lens = get >>= fetch lens
91
lensGet lens = get >>= fetch lens
33
true
true
0
7
31
53
26
27
null
null
nomeata/cryptonite
tests/Tests.hs
bsd-3-clause
tests = testGroup "cryptonite" [ Number.tests , Hash.tests , Padding.tests , testGroup "MAC" [ Poly1305.tests , KAT_HMAC.tests ] , KAT_Curve25519.tests , KAT_Ed25519.tests , KAT_PubKey.tests , testGroup "KDF" [ KAT_PBKDF2.tests , KAT_Scrypt.tests ...
697
tests = testGroup "cryptonite" [ Number.tests , Hash.tests , Padding.tests , testGroup "MAC" [ Poly1305.tests , KAT_HMAC.tests ] , KAT_Curve25519.tests , KAT_Ed25519.tests , KAT_PubKey.tests , testGroup "KDF" [ KAT_PBKDF2.tests , KAT_Scrypt.tests ...
697
tests = testGroup "cryptonite" [ Number.tests , Hash.tests , Padding.tests , testGroup "MAC" [ Poly1305.tests , KAT_HMAC.tests ] , KAT_Curve25519.tests , KAT_Ed25519.tests , KAT_PubKey.tests , testGroup "KDF" [ KAT_PBKDF2.tests , KAT_Scrypt.tests ...
697
false
false
1
9
254
153
84
69
null
null
ademinn/JavaWithClasses
src/Native.hs
bsd-3-clause
readLong :: Method readLong = readMethod "readLong" TLong
57
readLong :: Method readLong = readMethod "readLong" TLong
57
readLong = readMethod "readLong" TLong
38
false
true
0
6
7
23
9
14
null
null
geraldus/image-proc
app/Main.hs
bsd-3-clause
main :: IO () main = do args <- checkArgs case args of Left e -> die e Right a -> do print a case ipaAction a of ResizeAction _ _ -> resizeImage a -- _ -> die "Other commands not implemented yet." {- --resize -r (default) - resize image ...
552
main :: IO () main = do args <- checkArgs case args of Left e -> die e Right a -> do print a case ipaAction a of ResizeAction _ _ -> resizeImage a -- _ -> die "Other commands not implemented yet." {- --resize -r (default) - resize image ...
552
main = do args <- checkArgs case args of Left e -> die e Right a -> do print a case ipaAction a of ResizeAction _ _ -> resizeImage a -- _ -> die "Other commands not implemented yet." {- --resize -r (default) - resize image --width ...
538
false
true
0
15
240
83
37
46
null
null
rahulmutt/ghcvm
libraries/base/Control/Concurrent/MVar.hs
bsd-3-clause
withMVarMasked :: MVar a -> (a -> IO b) -> IO b withMVarMasked m io = mask_ $ do a <- takeMVar m b <- io a `onException` putMVar m a putMVar m a return b {-| An exception-safe wrapper for modifying the contents of an 'MVar'. Like 'withMVar', 'modifyMVar' will replace the original contents of th...
463
withMVarMasked :: MVar a -> (a -> IO b) -> IO b withMVarMasked m io = mask_ $ do a <- takeMVar m b <- io a `onException` putMVar m a putMVar m a return b {-| An exception-safe wrapper for modifying the contents of an 'MVar'. Like 'withMVar', 'modifyMVar' will replace the original contents of th...
463
withMVarMasked m io = mask_ $ do a <- takeMVar m b <- io a `onException` putMVar m a putMVar m a return b {-| An exception-safe wrapper for modifying the contents of an 'MVar'. Like 'withMVar', 'modifyMVar' will replace the original contents of the 'MVar' if an exception is raised during the op...
415
false
true
2
9
111
91
41
50
null
null
haskell-distributed/distributed-process-execution
src/Control/Distributed/Process/Execution/Exchange/Internal.hs
bsd-3-clause
processDefinition :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> ControlChannel ControlMessage -> Process (ProcessDefinition (ExchangeType s)) processDefinition _ tc cc = do liftIO $ putMVar tc $ channelControlPort cc re...
602
processDefinition :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> ControlChannel ControlMessage -> Process (ProcessDefinition (ExchangeType s)) processDefinition _ tc cc = do liftIO $ putMVar tc $ channelControlPort cc re...
602
processDefinition _ tc cc = do liftIO $ putMVar tc $ channelControlPort cc return $ defaultProcess { externHandlers = [ handleControlChan cc handleControlMessage ] , infoHandlers = [ handleInfo handleMonitor , handleRaw convertToCC ] } :: P...
363
false
true
0
13
212
141
69
72
null
null
tdammers/templar
src/Web/Sprinkles/ProjectConfig.hs
bsd-3-clause
firstNonNull :: [a] -> [a] -> [a] firstNonNull [] xs = xs
57
firstNonNull :: [a] -> [a] -> [a] firstNonNull [] xs = xs
57
firstNonNull [] xs = xs
23
false
true
0
7
11
40
20
20
null
null
Concomitant/LambdaHack
Game/LambdaHack/Server/Fov.hs
bsd-3-clause
-- | Calculate perception of a faction. factionPerception :: FovMode -> PersLit -> FactionId -> State -> FactionPers factionPerception fovMode persLit fid s = EM.mapWithKey (fidLidPerception fovMode persLit fid) $ sdungeon s
226
factionPerception :: FovMode -> PersLit -> FactionId -> State -> FactionPers factionPerception fovMode persLit fid s = EM.mapWithKey (fidLidPerception fovMode persLit fid) $ sdungeon s
186
factionPerception fovMode persLit fid s = EM.mapWithKey (fidLidPerception fovMode persLit fid) $ sdungeon s
109
true
true
0
10
33
64
30
34
null
null
rueshyna/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The column index of the coordinate. gcColumnIndex :: Lens' GridCoordinate (Maybe Int32) gcColumnIndex = lens _gcColumnIndex (\ s a -> s{_gcColumnIndex = a}) . mapping _Coerce
193
gcColumnIndex :: Lens' GridCoordinate (Maybe Int32) gcColumnIndex = lens _gcColumnIndex (\ s a -> s{_gcColumnIndex = a}) . mapping _Coerce
152
gcColumnIndex = lens _gcColumnIndex (\ s a -> s{_gcColumnIndex = a}) . mapping _Coerce
100
true
true
2
8
41
59
28
31
null
null
facebookincubator/duckling
Duckling/Rules/CS.hs
bsd-3-clause
langRules (Seal Numeral) = Numeral.rules
40
langRules (Seal Numeral) = Numeral.rules
40
langRules (Seal Numeral) = Numeral.rules
40
false
false
0
7
4
17
8
9
null
null
bitterharvest/BilliardBalls
src/Configure.hs
gpl-2.0
pInit2 :: V2 Double pInit2 = V2 (-0.5) 0.75
43
pInit2 :: V2 Double pInit2 = V2 (-0.5) 0.75
43
pInit2 = V2 (-0.5) 0.75
23
false
true
0
7
8
24
12
12
null
null
anton-dessiatov/stack
subs/rio/src/RIO/Process.hs
bsd-3-clause
augmentPath :: MonadThrow m => [Path Abs Dir] -> Maybe Text -> m Text augmentPath dirs mpath = do let illegal = filter (FP.searchPathSeparator `elem`) (map toFilePath dirs) unless (null illegal) (throwM $ PathsInvalidInPath illegal) return $ T.intercalate (T.singleton FP.searchPathSeparator) $ m...
457
augmentPath :: MonadThrow m => [Path Abs Dir] -> Maybe Text -> m Text augmentPath dirs mpath = do let illegal = filter (FP.searchPathSeparator `elem`) (map toFilePath dirs) unless (null illegal) (throwM $ PathsInvalidInPath illegal) return $ T.intercalate (T.singleton FP.searchPathSeparator) $ m...
457
augmentPath dirs mpath = do let illegal = filter (FP.searchPathSeparator `elem`) (map toFilePath dirs) unless (null illegal) (throwM $ PathsInvalidInPath illegal) return $ T.intercalate (T.singleton FP.searchPathSeparator) $ map (T.pack . toFilePathNoTrailingSep) dirs ++ maybeToList ...
387
false
true
0
13
97
147
71
76
null
null
moonKimura/vector-0.10.9.1
Data/Vector/Fusion/Stream.hs
bsd-3-clause
iterateN = M.iterateN
21
iterateN = M.iterateN
21
iterateN = M.iterateN
21
false
false
0
5
2
8
4
4
null
null
dysinger/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types.hs
mpl-2.0
-- | The state of the reserved DB instance. rdbiState :: Lens' ReservedDBInstance (Maybe Text) rdbiState = lens _rdbiState (\s a -> s { _rdbiState = a })
153
rdbiState :: Lens' ReservedDBInstance (Maybe Text) rdbiState = lens _rdbiState (\s a -> s { _rdbiState = a })
109
rdbiState = lens _rdbiState (\s a -> s { _rdbiState = a })
58
true
true
0
9
27
46
25
21
null
null
brendanhay/semver
test/Main.hs
mpl-2.0
sv101 = sv "1.0.1"
32
sv101 = sv "1.0.1"
32
sv101 = sv "1.0.1"
32
false
false
0
5
17
9
4
5
null
null
JacquesCarette/literate-scientific-software
code/drasil-gool/GOOL/Drasil/LanguageRenderer/LanguagePolymorphic.hs
bsd-2-clause
switchAsIf :: (RenderSym repr) => VS (repr (Value repr)) -> [(VS (repr (Value repr)), MS (repr (Body repr)))] -> MS (repr (Body repr)) -> MS (repr (Statement repr)) switchAsIf v cs = S.ifCond cases where cases = map (first (v ?==)) cs
242
switchAsIf :: (RenderSym repr) => VS (repr (Value repr)) -> [(VS (repr (Value repr)), MS (repr (Body repr)))] -> MS (repr (Body repr)) -> MS (repr (Statement repr)) switchAsIf v cs = S.ifCond cases where cases = map (first (v ?==)) cs
242
switchAsIf v cs = S.ifCond cases where cases = map (first (v ?==)) cs
71
false
true
1
15
49
156
75
81
null
null
kmels/hledger
hledger-web/Hledger/Web/Main.hs
gpl-3.0
withJournalDo' :: WebOpts -> (WebOpts -> Journal -> IO ()) -> IO () withJournalDo' opts cmd = do journalFilePathFromOpts (cliopts_ opts) >>= readJournalFile Nothing Nothing True >>= either error' (cmd opts . journalApplyAliases (aliasesFromOpts $ cliopts_ opts)) -- | The web command.
291
withJournalDo' :: WebOpts -> (WebOpts -> Journal -> IO ()) -> IO () withJournalDo' opts cmd = do journalFilePathFromOpts (cliopts_ opts) >>= readJournalFile Nothing Nothing True >>= either error' (cmd opts . journalApplyAliases (aliasesFromOpts $ cliopts_ opts)) -- | The web command.
291
withJournalDo' opts cmd = do journalFilePathFromOpts (cliopts_ opts) >>= readJournalFile Nothing Nothing True >>= either error' (cmd opts . journalApplyAliases (aliasesFromOpts $ cliopts_ opts)) -- | The web command.
223
false
true
0
15
48
106
49
57
null
null
OpenXT/manager
xenmgr/Vm/React.hs
gpl-2.0
lifecycleR xm get_shr = whenE (VmStateChange Running) ( whenRunning xm ) `mappend` whenE (VmStateChange Shutdown) ( whenShutdown xm =<< get_shr ) `mappend` whenE (VmAcpiStateChange 3) ( whenAsleep ) `mappend` whenE (VmAcpiStateChange 4) ( whenHibernated )
318
lifecycleR xm get_shr = whenE (VmStateChange Running) ( whenRunning xm ) `mappend` whenE (VmStateChange Shutdown) ( whenShutdown xm =<< get_shr ) `mappend` whenE (VmAcpiStateChange 3) ( whenAsleep ) `mappend` whenE (VmAcpiStateChange 4) ( whenHibernated )
318
lifecycleR xm get_shr = whenE (VmStateChange Running) ( whenRunning xm ) `mappend` whenE (VmStateChange Shutdown) ( whenShutdown xm =<< get_shr ) `mappend` whenE (VmAcpiStateChange 3) ( whenAsleep ) `mappend` whenE (VmAcpiStateChange 4) ( whenHibernated )
318
false
false
1
8
97
112
52
60
null
null
wolftune/titlecase
tests/Test/Unit.hs
bsd-3-clause
testIgnored t = testTitlecase $ "This Sentence Keeps" <#> t <#> "as Is"
71
testIgnored t = testTitlecase $ "This Sentence Keeps" <#> t <#> "as Is"
71
testIgnored t = testTitlecase $ "This Sentence Keeps" <#> t <#> "as Is"
71
false
false
0
7
12
21
10
11
null
null
anton-dessiatov/ghc
compiler/basicTypes/ConLike.hs
bsd-3-clause
conLikeArity (PatSynCon pat_syn) = patSynArity pat_syn
57
conLikeArity (PatSynCon pat_syn) = patSynArity pat_syn
57
conLikeArity (PatSynCon pat_syn) = patSynArity pat_syn
57
false
false
0
7
8
18
8
10
null
null
haskell-infra/hackage-server
Distribution/Server/Features/Search.hs
bsd-3-clause
searchFeature :: ServerEnv -> CoreFeature -> ListFeature -> MemState PkgSearchEngine -> Templates -> SearchFeature searchFeature ServerEnv{serverBaseURI} CoreFeature{..} ListFeature{getAllLists} searchEngineState templates = SearchFe...
4,344
searchFeature :: ServerEnv -> CoreFeature -> ListFeature -> MemState PkgSearchEngine -> Templates -> SearchFeature searchFeature ServerEnv{serverBaseURI} CoreFeature{..} ListFeature{getAllLists} searchEngineState templates = SearchFea...
4,343
searchFeature ServerEnv{serverBaseURI} CoreFeature{..} ListFeature{getAllLists} searchEngineState templates = SearchFeature{..} where searchFeatureInterface = (emptyHackageFeature "search") { featureResources = [ searchOpenSearchResource , searchPackagesResource -- ...
4,158
false
true
0
18
1,241
864
438
426
null
null
pparkkin/eta
compiler/ETA/CodeGen/Rts.hs
bsd-3-clause
selectThunkName :: Bool -> Text -> Text selectThunkName updatable repText = thunk $ T.concat ["Selector", repText, updText] where updText = if updatable then "Upd" else "NoUpd"
178
selectThunkName :: Bool -> Text -> Text selectThunkName updatable repText = thunk $ T.concat ["Selector", repText, updText] where updText = if updatable then "Upd" else "NoUpd"
178
selectThunkName updatable repText = thunk $ T.concat ["Selector", repText, updText] where updText = if updatable then "Upd" else "NoUpd"
138
false
true
0
7
27
58
31
27
null
null
micxjo/range-set
src/Data/RangeSet.hs
bsd-3-clause
union :: (Ord a, Enum a, Bounded a) => RangeSet a -> RangeSet a -> RangeSet a union rs RangeSet{_ranges} = List.foldl' append rs _ranges
136
union :: (Ord a, Enum a, Bounded a) => RangeSet a -> RangeSet a -> RangeSet a union rs RangeSet{_ranges} = List.foldl' append rs _ranges
136
union rs RangeSet{_ranges} = List.foldl' append rs _ranges
58
false
true
1
8
24
79
35
44
null
null
bezirg/hlogo
src/Language/Logo/Prim.hs
bsd-3-clause
printObserverSTM :: Show a => a -> C Observer b STM () printObserverSTM a = lift $ unsafeIOToSTM $ Prelude.print a
114
printObserverSTM :: Show a => a -> C Observer b STM () printObserverSTM a = lift $ unsafeIOToSTM $ Prelude.print a
114
printObserverSTM a = lift $ unsafeIOToSTM $ Prelude.print a
59
false
true
0
8
20
49
23
26
null
null
Oblosys/webviews
tryout/TypedJSFunctions.hs
mit
declareFunction :: JSFunction webView fName params => ViewId webView -> fName -> String -> String declareFunction vid fName body = show fName++" = "++show body
159
declareFunction :: JSFunction webView fName params => ViewId webView -> fName -> String -> String declareFunction vid fName body = show fName++" = "++show body
159
declareFunction vid fName body = show fName++" = "++show body
61
false
true
0
8
24
58
27
31
null
null
flowbox-public/language-c-quote
Language/C/Quote/Base.hs
bsd-3-clause
qqTypeQualListE (stm : stms) = Just [|$(dataToExpQ qqExp stm) : $(dataToExpQ qqExp stms)|]
94
qqTypeQualListE (stm : stms) = Just [|$(dataToExpQ qqExp stm) : $(dataToExpQ qqExp stms)|]
94
qqTypeQualListE (stm : stms) = Just [|$(dataToExpQ qqExp stm) : $(dataToExpQ qqExp stms)|]
94
false
false
0
7
16
22
12
10
null
null
wavewave/HEPUtil
src/HEP/Util/CutSets.hs
bsd-2-clause
xor Nothing (Just x) = Just x
30
xor Nothing (Just x) = Just x
30
xor Nothing (Just x) = Just x
30
false
false
0
6
7
22
9
13
null
null
k16shikano/qnda
src/EPUB/MathReader.hs
mit
genImageFromEqString mathtype imagepath equation = do IO.writeFile "temp" (latexTemplate equation) Process.system $ "pdflatex temp > /dev/null ;" ++ case mathtype of PNG -> "convert -strip -trim -density 200 +repage temp.pdf -flatten " SVG -> "pdfcrop temp.pdf > /dev/null; pdf2svg te...
837
genImageFromEqString mathtype imagepath equation = do IO.writeFile "temp" (latexTemplate equation) Process.system $ "pdflatex temp > /dev/null ;" ++ case mathtype of PNG -> "convert -strip -trim -density 200 +repage temp.pdf -flatten " SVG -> "pdfcrop temp.pdf > /dev/null; pdf2svg te...
837
genImageFromEqString mathtype imagepath equation = do IO.writeFile "temp" (latexTemplate equation) Process.system $ "pdflatex temp > /dev/null ;" ++ case mathtype of PNG -> "convert -strip -trim -density 200 +repage temp.pdf -flatten " SVG -> "pdfcrop temp.pdf > /dev/null; pdf2svg te...
837
false
false
0
11
255
110
52
58
null
null
d0kt0r0/estuary
client/src/Estuary/Languages/LaCalle.hs
gpl-3.0
pronounOrSimile :: Parser String pronounOrSimile = choice [try possessive, try connector', try intejection, try pronoun]
120
pronounOrSimile :: Parser String pronounOrSimile = choice [try possessive, try connector', try intejection, try pronoun]
120
pronounOrSimile = choice [try possessive, try connector', try intejection, try pronoun]
87
false
true
0
7
14
41
20
21
null
null
cdm1006/Words
dist/build/autogen/Paths_Words.hs
gpl-3.0
joinFileName :: String -> String -> FilePath joinFileName "" fname = fname
75
joinFileName :: String -> String -> FilePath joinFileName "" fname = fname
75
joinFileName "" fname = fname
30
false
true
0
8
12
30
13
17
null
null
jsavatgy/xroads-game
code/blue-atan2.hs
gpl-2.0
points = darkPoly
17
points = darkPoly
17
points = darkPoly
17
false
false
1
5
2
10
3
7
null
null
trbauer/ebnf
Language/EBNF/Parser.hs
mit
-- var and if it's finite or not checkBindings :: Grammar -> [Diag] checkBindings g = checkVarDefsContext [] (gVars g) where envExtend :: [Var] -> Env -> Env envExtend vs env = map (\v -> (v,vs)) vs : env envLookup :: String -> Env -> Maybe (Var,[Var]) envLookup vnm = find ((==vnm) . vName ...
2,049
checkBindings :: Grammar -> [Diag] checkBindings g = checkVarDefsContext [] (gVars g) where envExtend :: [Var] -> Env -> Env envExtend vs env = map (\v -> (v,vs)) vs : env envLookup :: String -> Env -> Maybe (Var,[Var]) envLookup vnm = find ((==vnm) . vName . fst) . concat checkVarDe...
2,014
checkBindings g = checkVarDefsContext [] (gVars g) where envExtend :: [Var] -> Env -> Env envExtend vs env = map (\v -> (v,vs)) vs : env envLookup :: String -> Env -> Maybe (Var,[Var]) envLookup vnm = find ((==vnm) . vName . fst) . concat checkVarDefsContext :: Env -> [Var] -> [Diag]...
1,979
true
true
39
8
736
505
274
231
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/ShowXmlLazy.hs
bsd-3-clause
--ev (EVPERef p e) = peref p ev (EVRef r) = reference r
87
ev (EVRef r) = reference r
44
ev (EVRef r) = reference r
44
true
false
0
7
44
19
9
10
null
null
Happy0/haskellscrabble
src/Wordify/Rules/Board.hs
gpl-3.0
{- | Returns the square at a given position if it is occupied by a tile. Otherwise returns Nothing.-} occupiedSquareAt :: Board -> Pos -> Maybe Square occupiedSquareAt board pos = squareAt board pos >>= squareIfOccupied
223
occupiedSquareAt :: Board -> Pos -> Maybe Square occupiedSquareAt board pos = squareAt board pos >>= squareIfOccupied
117
occupiedSquareAt board pos = squareAt board pos >>= squareIfOccupied
68
true
true
0
7
39
42
19
23
null
null
vaibhav276/exercism_haskell
grade-school/src/School.hs
mit
grade :: Grade -> School -> [Name] grade n = sort . findWithDefault [] n
72
grade :: Grade -> School -> [Name] grade n = sort . findWithDefault [] n
72
grade n = sort . findWithDefault [] n
37
false
true
0
9
14
41
19
22
null
null
rvion/ride
jetpack/src/System/IO/AsEnv.hs
bsd-3-clause
-- env_hIsOpen :: Handle -> IO Bool env_hIsOpen = I.hIsOpen
59
env_hIsOpen = I.hIsOpen
23
env_hIsOpen = I.hIsOpen
23
true
false
0
5
9
9
5
4
null
null
pgj/bead
src/Bead/Persistence/SQL/TestFeedback.hs
bsd-3-clause
testFeedbacks :: Persist [(Domain.SubmissionKey, Domain.Feedback)] testFeedbacks = FS.testFeedbacks
99
testFeedbacks :: Persist [(Domain.SubmissionKey, Domain.Feedback)] testFeedbacks = FS.testFeedbacks
99
testFeedbacks = FS.testFeedbacks
32
false
true
1
8
7
33
16
17
null
null
arthur-yip/2048h
src/ConsoleUI.hs
mit
cellWidth = 7
13
cellWidth = 7
13
cellWidth = 7
13
false
false
1
5
2
10
3
7
null
null
alisdair/H99P
src/Lists.hs
mit
reverse :: [a] -> [a] reverse [] = []
37
reverse :: [a] -> [a] reverse [] = []
37
reverse [] = []
15
false
true
0
6
8
32
16
16
null
null
DavidAlphaFox/ghc
compiler/utils/UniqSet.hs
bsd-3-clause
lookupUniqSet = lookupUFM
25
lookupUniqSet = lookupUFM
25
lookupUniqSet = lookupUFM
25
false
false
0
4
2
6
3
3
null
null
hirokai/PaperServer
devel.hs
bsd-2-clause
terminateDevel :: IO () terminateDevel = exitSuccess
52
terminateDevel :: IO () terminateDevel = exitSuccess
52
terminateDevel = exitSuccess
28
false
true
1
6
6
20
8
12
null
null
jwaldmann/streams
Main.hs
gpl-3.0
evala :: [Int] -> Stream -> [Int] evala arg = \ case Argument -> arg ; Null -> [] Fib -> fib ; Thue -> thue; Morse -> morse; PD -> pd Waltz -> waltz ; Sierp -> sierp ; Kolak -> kolak ; PF -> pf Snd x -> second $ evala arg x ; Thrd x -> third $ evala arg x Delta x -> delta $ evala arg x ; Inv x -> inv $ eva...
428
evala :: [Int] -> Stream -> [Int] evala arg = \ case Argument -> arg ; Null -> [] Fib -> fib ; Thue -> thue; Morse -> morse; PD -> pd Waltz -> waltz ; Sierp -> sierp ; Kolak -> kolak ; PF -> pf Snd x -> second $ evala arg x ; Thrd x -> third $ evala arg x Delta x -> delta $ evala arg x ; Inv x -> inv $ eva...
428
evala arg = \ case Argument -> arg ; Null -> [] Fib -> fib ; Thue -> thue; Morse -> morse; PD -> pd Waltz -> waltz ; Sierp -> sierp ; Kolak -> kolak ; PF -> pf Snd x -> second $ evala arg x ; Thrd x -> third $ evala arg x Delta x -> delta $ evala arg x ; Inv x -> inv $ evala arg x Tail x -> drop 1 $ eval...
394
false
true
0
13
127
236
116
120
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/DebugEvents.hs
bsd-2-clause
dumpList'' :: CULong -> [(String,Decoder Bool,Atom)] -> String -> Decoder Bool dumpList'' _ [] _ = append ")" >> return True
156
dumpList'' :: CULong -> [(String,Decoder Bool,Atom)] -> String -> Decoder Bool dumpList'' _ [] _ = append ")" >> return True
156
dumpList'' _ [] _ = append ")" >> return True
58
false
true
0
9
52
60
30
30
null
null
carliros/Simple-San-Simon-Functional-Web-Browser
src/Parser/BasicCssParser.hs
bsd-3-clause
pString :: Parser String pString = pSym '\"' *> pString1Content <* pSym '\"' <|> pSym '\'' *> pString2Content <* pSym '\''
142
pString :: Parser String pString = pSym '\"' *> pString1Content <* pSym '\"' <|> pSym '\'' *> pString2Content <* pSym '\''
142
pString = pSym '\"' *> pString1Content <* pSym '\"' <|> pSym '\'' *> pString2Content <* pSym '\''
117
false
true
0
10
40
46
21
25
null
null
ennocramer/hindent
src/HIndent/Styles/Gibiansky.hs
bsd-3-clause
caseExpr :: Exp NodeInfo -> Printer State () caseExpr (Case _ exp alts) = do depend (write "case ") $ do pretty exp write " of" newline writeCaseAlts alts
169
caseExpr :: Exp NodeInfo -> Printer State () caseExpr (Case _ exp alts) = do depend (write "case ") $ do pretty exp write " of" newline writeCaseAlts alts
169
caseExpr (Case _ exp alts) = do depend (write "case ") $ do pretty exp write " of" newline writeCaseAlts alts
124
false
true
0
10
43
75
32
43
null
null
kejace/ethereum-client-haskell
src/Blockchain/VM/Code.hs
bsd-3-clause
getValidJUMPDESTs::Code->[Word256] getValidJUMPDESTs (Code bytes) = map fst $ filter ((== JUMPDEST) . snd) $ getOps bytes 0 where getOps::B.ByteString->Word256->[(Word256, Operation)] getOps bytes p | p > fromIntegral (B.length bytes) = [] getOps code p = (p, op):getOps code (p+len) where ...
354
getValidJUMPDESTs::Code->[Word256] getValidJUMPDESTs (Code bytes) = map fst $ filter ((== JUMPDEST) . snd) $ getOps bytes 0 where getOps::B.ByteString->Word256->[(Word256, Operation)] getOps bytes p | p > fromIntegral (B.length bytes) = [] getOps code p = (p, op):getOps code (p+len) where ...
354
getValidJUMPDESTs (Code bytes) = map fst $ filter ((== JUMPDEST) . snd) $ getOps bytes 0 where getOps::B.ByteString->Word256->[(Word256, Operation)] getOps bytes p | p > fromIntegral (B.length bytes) = [] getOps code p = (p, op):getOps code (p+len) where (op, len) = getOperationAt' code p
319
false
true
2
12
75
174
87
87
null
null
trskop/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
configureOptions :: ShowOrParseArgs -> [OptionField ConfigFlags] configureOptions showOrParseArgs = [optionVerbosity configVerbosity (\v flags -> flags { configVerbosity = v }) ,optionDistPref configDistPref (\d flags -> flags { configDistPref = d }) showOrParseArgs ,option [...
11,289
configureOptions :: ShowOrParseArgs -> [OptionField ConfigFlags] configureOptions showOrParseArgs = [optionVerbosity configVerbosity (\v flags -> flags { configVerbosity = v }) ,optionDistPref configDistPref (\d flags -> flags { configDistPref = d }) showOrParseArgs ,option [...
11,289
configureOptions showOrParseArgs = [optionVerbosity configVerbosity (\v flags -> flags { configVerbosity = v }) ,optionDistPref configDistPref (\d flags -> flags { configDistPref = d }) showOrParseArgs ,option [] ["compiler"] "compiler" configHcFlavor (\v flags -> fl...
11,224
false
true
4
17
3,546
2,678
1,480
1,198
null
null
AlexeyRaga/eta
compiler/ETA/CodeGen/ArgRep.hs
bsd-3-clause
argRepFt F = jfloat
19
argRepFt F = jfloat
19
argRepFt F = jfloat
19
false
false
0
5
3
9
4
5
null
null
timveitch/Gobble
src/SLM/Gobble/Gobble.hs
bsd-3-clause
newGobbleModel :: Int -> GobbleModel newGobbleModel bits = GobbleModel (V.replicate (2^bits) (WeightGrad 0 0))
110
newGobbleModel :: Int -> GobbleModel newGobbleModel bits = GobbleModel (V.replicate (2^bits) (WeightGrad 0 0))
110
newGobbleModel bits = GobbleModel (V.replicate (2^bits) (WeightGrad 0 0))
73
false
true
0
9
13
46
23
23
null
null
changlinli/remote-arduino-music
RemoteMusic.hs
gpl-3.0
senseInputPlayPauseCmus False = return ()
41
senseInputPlayPauseCmus False = return ()
41
senseInputPlayPauseCmus False = return ()
41
false
false
0
6
4
14
6
8
null
null
A1kmm/declarative-fieldml-prototype
src/Data/FieldML/Level1ToLevel2.hs
bsd-3-clause
testPatternUsing testEx (L1.L1PatternProduct ss args) = do let testProductPart (label, pat) = testPatternUsing (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pat lastTest <- (testProductPart (last args)) foldM (\exOther prodThis -> L1.L1ExApply ss (L1.L1ExApply ss (L1.L1ExReference ss (pathGlobal ss "&&")...
437
testPatternUsing testEx (L1.L1PatternProduct ss args) = do let testProductPart (label, pat) = testPatternUsing (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pat lastTest <- (testProductPart (last args)) foldM (\exOther prodThis -> L1.L1ExApply ss (L1.L1ExApply ss (L1.L1ExReference ss (pathGlobal ss "&&")...
437
testPatternUsing testEx (L1.L1PatternProduct ss args) = do let testProductPart (label, pat) = testPatternUsing (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pat lastTest <- (testProductPart (last args)) foldM (\exOther prodThis -> L1.L1ExApply ss (L1.L1ExApply ss (L1.L1ExReference ss (pathGlobal ss "&&")...
437
false
false
0
17
110
155
75
80
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
dataCollectorXenCpuLoad :: String dataCollectorXenCpuLoad = "xen-cpu-avg-load"
78
dataCollectorXenCpuLoad :: String dataCollectorXenCpuLoad = "xen-cpu-avg-load"
78
dataCollectorXenCpuLoad = "xen-cpu-avg-load"
44
false
true
0
6
5
18
7
11
null
null
rvion/lamdu
Lamdu/Main.hs
gpl-3.0
main :: IO () main = do setNumCapabilities =<< getNumProcessors lamduDir <- getLamduDir opts <- either fail return =<< Opts.get let withDB = ExampleDB.withDB lamduDir case opts of Opts.Parsed{..} | _poShouldDeleteDB -> deleteDB lamduDir ...
568
main :: IO () main = do setNumCapabilities =<< getNumProcessors lamduDir <- getLamduDir opts <- either fail return =<< Opts.get let withDB = ExampleDB.withDB lamduDir case opts of Opts.Parsed{..} | _poShouldDeleteDB -> deleteDB lamduDir ...
568
main = do setNumCapabilities =<< getNumProcessors lamduDir <- getLamduDir opts <- either fail return =<< Opts.get let withDB = ExampleDB.withDB lamduDir case opts of Opts.Parsed{..} | _poShouldDeleteDB -> deleteDB lamduDir | _poUndo...
554
false
true
0
13
192
184
82
102
null
null
mgsloan/panopti
src/Utils.hs
bsd-3-clause
convertOp (QConOp l n) = Con l n
32
convertOp (QConOp l n) = Con l n
32
convertOp (QConOp l n) = Con l n
32
false
false
0
7
7
22
10
12
null
null
tim-m89/Salsa
Foreign/Salsa/Common.hs
bsd-3-clause
-- System.Array _Type = undefined :: Type_
44
_Type = undefined :: Type_
28
_Type = undefined :: Type_
28
true
false
0
4
8
10
6
4
null
null
facebookincubator/duckling
Duckling/Time/RU/Rules.hs
bsd-3-clause
ruleLastNCycle :: Rule ruleLastNCycle = Rule { name = "last n <cycle>" , pattern = [ regex "последние" , Predicate $ isIntegerBetween 1 9999 , dimension TimeGrain ] , prod = \case (_:token:Token TimeGrain grain:_) -> do n <- getIntValue token tt $ cycleN True grain (- n) ...
338
ruleLastNCycle :: Rule ruleLastNCycle = Rule { name = "last n <cycle>" , pattern = [ regex "последние" , Predicate $ isIntegerBetween 1 9999 , dimension TimeGrain ] , prod = \case (_:token:Token TimeGrain grain:_) -> do n <- getIntValue token tt $ cycleN True grain (- n) ...
338
ruleLastNCycle = Rule { name = "last n <cycle>" , pattern = [ regex "последние" , Predicate $ isIntegerBetween 1 9999 , dimension TimeGrain ] , prod = \case (_:token:Token TimeGrain grain:_) -> do n <- getIntValue token tt $ cycleN True grain (- n) _ -> Nothing }
315
false
true
0
16
103
122
62
60
null
null
ezyang/ghc
testsuite/tests/typecheck/should_fail/tcfail130.hs
bsd-3-clause
baz = let ?x = 5 in print foo
29
baz = let ?x = 5 in print foo
29
baz = let ?x = 5 in print foo
29
false
false
0
8
8
20
9
11
null
null
Saeron/haskell
data.structures/haskell/DataStructures/Set/SortedLinearSet.hs
apache-2.0
difference :: (Ord a) => Set a -> Set a -> Set a difference s s' = fold delete s s'
85
difference :: (Ord a) => Set a -> Set a -> Set a difference s s' = fold delete s s'
84
difference s s' = fold delete s s'
35
false
true
0
8
22
49
23
26
null
null
noteed/syntactical
indent.hs
bsd-3-clause
tuple xs b = List (a : reverse (b:xs)) where a = Atom (MyToken Internal $ ',' : show (length xs + 1))
103
tuple xs b = List (a : reverse (b:xs)) where a = Atom (MyToken Internal $ ',' : show (length xs + 1))
103
tuple xs b = List (a : reverse (b:xs)) where a = Atom (MyToken Internal $ ',' : show (length xs + 1))
103
false
false
0
11
24
69
33
36
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/WAFRegionalWebACL.hs
mit
wafRegionalWebACL :: WAFRegionalWebACLAction -- ^ 'wafrwaclDefaultAction' -> Val Text -- ^ 'wafrwaclMetricName' -> Val Text -- ^ 'wafrwaclName' -> WAFRegionalWebACL wafRegionalWebACL defaultActionarg metricNamearg namearg = WAFRegionalWebACL { _wAFRegionalWebACLDefaultAction = defaultActionarg , _wAFRegio...
434
wafRegionalWebACL :: WAFRegionalWebACLAction -- ^ 'wafrwaclDefaultAction' -> Val Text -- ^ 'wafrwaclMetricName' -> Val Text -- ^ 'wafrwaclName' -> WAFRegionalWebACL wafRegionalWebACL defaultActionarg metricNamearg namearg = WAFRegionalWebACL { _wAFRegionalWebACLDefaultAction = defaultActionarg , _wAFRegio...
434
wafRegionalWebACL defaultActionarg metricNamearg namearg = WAFRegionalWebACL { _wAFRegionalWebACLDefaultAction = defaultActionarg , _wAFRegionalWebACLMetricName = metricNamearg , _wAFRegionalWebACLName = namearg , _wAFRegionalWebACLRules = Nothing }
261
false
true
0
9
62
74
39
35
null
null
rueshyna/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | The index of the corresponding metric in the -- ReportWorkItemStatusRequest. Required. msiMetricIndex :: Lens' MetricShortId (Maybe Int32) msiMetricIndex = lens _msiMetricIndex (\ s a -> s{_msiMetricIndex = a}) . mapping _Coerce
247
msiMetricIndex :: Lens' MetricShortId (Maybe Int32) msiMetricIndex = lens _msiMetricIndex (\ s a -> s{_msiMetricIndex = a}) . mapping _Coerce
155
msiMetricIndex = lens _msiMetricIndex (\ s a -> s{_msiMetricIndex = a}) . mapping _Coerce
103
true
true
2
8
46
61
29
32
null
null
mengcz13/haskell_project
src/Lib.hs
bsd-3-clause
lexeme :: Parser a -> Parser a lexeme p = do skipSpace p
64
lexeme :: Parser a -> Parser a lexeme p = do skipSpace p
64
lexeme p = do skipSpace p
33
false
true
0
7
20
35
14
21
null
null
seL4/capDL-tool
CapDL/MakeModel.hs
bsd-2-clause
getVMSize n (VMSize 0 : _) = error ("Cannot make a frame object that has size 0: " ++ n)
88
getVMSize n (VMSize 0 : _) = error ("Cannot make a frame object that has size 0: " ++ n)
88
getVMSize n (VMSize 0 : _) = error ("Cannot make a frame object that has size 0: " ++ n)
88
false
false
0
7
19
33
15
18
null
null
meteficha/yesod
yesod-core/Yesod/Routes/Parse.hs
mit
pieceFromString ('!':x) = Right $ (False, Static x)
51
pieceFromString ('!':x) = Right $ (False, Static x)
51
pieceFromString ('!':x) = Right $ (False, Static x)
51
false
false
0
7
7
29
15
14
null
null
bravit/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyFunDefn tm = fail $ "Couldn't reify " ++ show tm ++ " as a function declaration."
86
reifyFunDefn tm = fail $ "Couldn't reify " ++ show tm ++ " as a function declaration."
86
reifyFunDefn tm = fail $ "Couldn't reify " ++ show tm ++ " as a function declaration."
86
false
false
3
7
16
29
11
18
null
null
GaloisInc/ivory
ivory/src/Ivory/Language/Ptr.hs
bsd-3-clause
-- | Convert valid to nullable pointer. -- TODO deprecate in favor of 'pointerCastToNullable' refToPtr :: IvoryArea area => Ref s area -> Ptr s area refToPtr = pointerCastToNullable
181
refToPtr :: IvoryArea area => Ref s area -> Ptr s area refToPtr = pointerCastToNullable
87
refToPtr = pointerCastToNullable
32
true
true
0
7
28
34
17
17
null
null
ezyang/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ [] PrefetchAddrOp2 args = doPrefetchAddrOp 2 args
75
emitPrimOp _ [] PrefetchAddrOp2 args = doPrefetchAddrOp 2 args
75
emitPrimOp _ [] PrefetchAddrOp2 args = doPrefetchAddrOp 2 args
75
false
false
1
5
21
26
10
16
null
null
TWal/ENS_adac
src/Main.hs
bsd-3-clause
getSource _ = hPutStrLn stderr "Error: More than one filename given" >> exitWith (ExitFailure 2) >> return ("", "")
115
getSource _ = hPutStrLn stderr "Error: More than one filename given" >> exitWith (ExitFailure 2) >> return ("", "")
115
getSource _ = hPutStrLn stderr "Error: More than one filename given" >> exitWith (ExitFailure 2) >> return ("", "")
115
false
false
0
9
18
40
19
21
null
null
mamapanda/8-Puzzle-Solver
src/Node.hs
bsd-3-clause
heuristic (Node state _ _) goalMap = sum [disp (indexToPosition i) (goalMap!n) | (i, n) <- zip [0..] (concat state)] where disp (r, c) (r', c') = abs (r - r') + abs (c - c') -- | Converts a given node into a list of nodes, -- with parents coming before their children.
273
heuristic (Node state _ _) goalMap = sum [disp (indexToPosition i) (goalMap!n) | (i, n) <- zip [0..] (concat state)] where disp (r, c) (r', c') = abs (r - r') + abs (c - c') -- | Converts a given node into a list of nodes, -- with parents coming before their children.
273
heuristic (Node state _ _) goalMap = sum [disp (indexToPosition i) (goalMap!n) | (i, n) <- zip [0..] (concat state)] where disp (r, c) (r', c') = abs (r - r') + abs (c - c') -- | Converts a given node into a list of nodes, -- with parents coming before their children.
273
false
false
1
10
58
130
65
65
null
null
aBhallo/AoC2016
Day 8/day8part2.hs
mit
printScreen :: Screen -> IO () printScreen screen = mapM_ (\x -> putStrLn $ displayRow x) $ rotateScreen90 screen
113
printScreen :: Screen -> IO () printScreen screen = mapM_ (\x -> putStrLn $ displayRow x) $ rotateScreen90 screen
113
printScreen screen = mapM_ (\x -> putStrLn $ displayRow x) $ rotateScreen90 screen
82
false
true
0
10
18
48
23
25
null
null
agrafix/legoDSL
NXT/Types.hs
bsd-3-clause
prettyT (CastOp target val) = "(" ++ target ++ "(" ++ (prettyT val) ++ "))"
75
prettyT (CastOp target val) = "(" ++ target ++ "(" ++ (prettyT val) ++ "))"
75
prettyT (CastOp target val) = "(" ++ target ++ "(" ++ (prettyT val) ++ "))"
75
false
false
0
8
14
40
19
21
null
null
ladinu/cs457
src/Wk01NamingValues.hs
mit
--------------------------------------------- -- Define a Bool truthvalue that is -- (yourAge is greater than 19) or (yourFirstName is "Tim") compareName:: Bool compareName = (yourAge > 19) || (yourFirstName == "Tim")
224
compareName:: Bool compareName = (yourAge > 19) || (yourFirstName == "Tim")
75
compareName = (yourAge > 19) || (yourFirstName == "Tim")
56
true
true
0
7
35
32
19
13
null
null
aleator/bindings-dc1394
Examples/HelloWorld.hs
bsd-3-clause
fromResult REQ_VALUE_OUTSIDE_RANGE = c'DC1394_REQ_VALUE_OUTSIDE_RANGE
72
fromResult REQ_VALUE_OUTSIDE_RANGE = c'DC1394_REQ_VALUE_OUTSIDE_RANGE
72
fromResult REQ_VALUE_OUTSIDE_RANGE = c'DC1394_REQ_VALUE_OUTSIDE_RANGE
72
false
false
0
5
6
9
4
5
null
null
Rotsor/factorio-module-selector
factorio-module-selector.hs
unlicense
--main = print $ computeTotalCost SciencePack3 main = report
60
main = report
13
main = report
13
true
false
0
4
8
7
4
3
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/Get.hs
mpl-2.0
-- | User profile ID associated with this request. clgProFileId :: Lens' ChangeLogsGet Int64 clgProFileId = lens _clgProFileId (\ s a -> s{_clgProFileId = a}) . _Coerce
176
clgProFileId :: Lens' ChangeLogsGet Int64 clgProFileId = lens _clgProFileId (\ s a -> s{_clgProFileId = a}) . _Coerce
125
clgProFileId = lens _clgProFileId (\ s a -> s{_clgProFileId = a}) . _Coerce
83
true
true
0
10
34
46
24
22
null
null
esengie/fpl-exploration-tool
src/langGenerator/GeneratorTemplates/LangTemplate.hs
bsd-3-clause
ap6 m f = ap5 m (lift . f)
26
ap6 m f = ap5 m (lift . f)
26
ap6 m f = ap5 m (lift . f)
26
false
false
0
7
8
23
11
12
null
null
hrushikesh/ircbot
Network/IRC/Bot/Core.hs
bsd-3-clause
reconnect :: Logger -> String -> PortID -> String -> User -> TMVar Handle -> QSem -> IOException -> IO () reconnect logger host port nick user hTMVar connQSem e = do logger Normal $ "IRC Connection died: " ++ show e {- atomically $ do empty <- isEmptyTMVar hTMVar if empty ...
471
reconnect :: Logger -> String -> PortID -> String -> User -> TMVar Handle -> QSem -> IOException -> IO () reconnect logger host port nick user hTMVar connQSem e = do logger Normal $ "IRC Connection died: " ++ show e {- atomically $ do empty <- isEmptyTMVar hTMVar if empty ...
471
reconnect logger host port nick user hTMVar connQSem e = do logger Normal $ "IRC Connection died: " ++ show e {- atomically $ do empty <- isEmptyTMVar hTMVar if empty then return () else takeTMVar hTMVar >> return () -} doConne...
365
false
true
0
14
162
104
49
55
null
null
vikraman/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
{- ************************************************************************ * * Error Ids * * *******************************************************************...
1,246
errorIds :: [Id] errorIds = [ rUNTIME_ERROR_ID, iRREFUT_PAT_ERROR_ID, nON_EXHAUSTIVE_GUARDS_ERROR_ID, nO_METHOD_BINDING_ERROR_ID, pAT_ERROR_ID, rEC_CON_ERROR_ID, rEC_SEL_ERROR_ID, aBSENT_ERROR_ID, tYPE_ERROR_ID -- Used with Opt_DeferTypeErrors, see #10284 ]
315
errorIds = [ rUNTIME_ERROR_ID, iRREFUT_PAT_ERROR_ID, nON_EXHAUSTIVE_GUARDS_ERROR_ID, nO_METHOD_BINDING_ERROR_ID, pAT_ERROR_ID, rEC_CON_ERROR_ID, rEC_SEL_ERROR_ID, aBSENT_ERROR_ID, tYPE_ERROR_ID -- Used with Opt_DeferTypeErrors, see #10284 ]
298
true
true
0
7
357
50
29
21
null
null
dmcclean/dimensional-dk
src/Numeric/Units/Dimensional/SIUnits.hs
bsd-3-clause
-- meter ^ pos2 * meter ^ neg2 hertz :: Num a => Unit 'Metric DFrequency a hertz = mkUnitZ (ucumMetric "Hz" "Hz" "Hertz") 1 $ siUnit
132
hertz :: Num a => Unit 'Metric DFrequency a hertz = mkUnitZ (ucumMetric "Hz" "Hz" "Hertz") 1 $ siUnit
101
hertz = mkUnitZ (ucumMetric "Hz" "Hz" "Hertz") 1 $ siUnit
57
true
true
0
8
26
53
24
29
null
null
ekmett/tables
src/Data/Table.hs
bsd-3-clause
-- | Insert a row into a relation, removing collisions. insert :: Tabular t => t -> Table t -> Table t insert t r = snd $ insert' t r
133
insert :: Tabular t => t -> Table t -> Table t insert t r = snd $ insert' t r
77
insert t r = snd $ insert' t r
30
true
true
0
8
30
47
22
25
null
null
KommuSoft/ieeextreme8
ieeextreme80/kabloom.hs
gpl-3.0
calculateScore :: [Card] -> [Card] -> Int calculateScore a = calculateScore' (replicate (length a) 0) a
103
calculateScore :: [Card] -> [Card] -> Int calculateScore a = calculateScore' (replicate (length a) 0) a
103
calculateScore a = calculateScore' (replicate (length a) 0) a
61
false
true
0
9
15
52
25
27
null
null
ku-fpg/thrust-gen
src/Ion/Private/Lang.hs
bsd-3-clause
getLibInfo (Cout _ _) = [([Stdlib], "iostream")]
54
getLibInfo (Cout _ _) = [([Stdlib], "iostream")]
54
getLibInfo (Cout _ _) = [([Stdlib], "iostream")]
54
false
false
0
7
12
30
16
14
null
null
buildsome/buildsome
src/Lib/Exception.hs
gpl-2.0
onExceptionWith :: IO a -> (E.SomeException -> IO ()) -> IO a onExceptionWith act f = act `E.catch` \e -> E.uninterruptibleMask_ (f e) >> E.throwIO e
151
onExceptionWith :: IO a -> (E.SomeException -> IO ()) -> IO a onExceptionWith act f = act `E.catch` \e -> E.uninterruptibleMask_ (f e) >> E.throwIO e
151
onExceptionWith act f = act `E.catch` \e -> E.uninterruptibleMask_ (f e) >> E.throwIO e
89
false
true
0
10
27
77
38
39
null
null
BarrelfishOS/barrelfish
tools/mackerel/CSyntax.hs
mit
snlike fn arg = [ "_avail = (r > sz) ? 0 : sz-r;", printf "_rc = %s(s+r, _avail, %s);" fn arg, "if ( _rc > 0 && _rc < _avail) { r += _rc; }" ]
194
snlike fn arg = [ "_avail = (r > sz) ? 0 : sz-r;", printf "_rc = %s(s+r, _avail, %s);" fn arg, "if ( _rc > 0 && _rc < _avail) { r += _rc; }" ]
194
snlike fn arg = [ "_avail = (r > sz) ? 0 : sz-r;", printf "_rc = %s(s+r, _avail, %s);" fn arg, "if ( _rc > 0 && _rc < _avail) { r += _rc; }" ]
194
false
false
1
7
88
32
14
18
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
happyReduction_224 _ _ = notHappyAtAll
39
happyReduction_224 _ _ = notHappyAtAll
39
happyReduction_224 _ _ = notHappyAtAll
39
false
false
0
5
5
11
5
6
null
null
bitemyapp/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
ppr_dec _ (TySynD t xs rhs) = ppr_tySyn empty t (hsep (map ppr xs)) rhs
73
ppr_dec _ (TySynD t xs rhs) = ppr_tySyn empty t (hsep (map ppr xs)) rhs
73
ppr_dec _ (TySynD t xs rhs) = ppr_tySyn empty t (hsep (map ppr xs)) rhs
73
false
false
1
9
16
49
21
28
null
null
cblp/hindent
src/HIndent/Pretty.hs
bsd-3-clause
exp (Tuple _ boxed exps) = do let horVariant = parensB boxed $ inter (write ", ") (map pretty exps) verVariant = parensB boxed $ prefixedLined "," (map (depend space . pretty) exps) mst <- fitsOnOneLine horVariant case mst of Nothing -> verVariant Just st -> put st where parensB Unboxed = wrap...
382
exp (Tuple _ boxed exps) = do let horVariant = parensB boxed $ inter (write ", ") (map pretty exps) verVariant = parensB boxed $ prefixedLined "," (map (depend space . pretty) exps) mst <- fitsOnOneLine horVariant case mst of Nothing -> verVariant Just st -> put st where parensB Unboxed = wrap...
382
exp (Tuple _ boxed exps) = do let horVariant = parensB boxed $ inter (write ", ") (map pretty exps) verVariant = parensB boxed $ prefixedLined "," (map (depend space . pretty) exps) mst <- fitsOnOneLine horVariant case mst of Nothing -> verVariant Just st -> put st where parensB Unboxed = wrap...
382
false
false
1
16
95
148
69
79
null
null
djudd/blokus
Offset.hs
gpl-3.0
getOffsets piece = toOffsets $ case piece of OnePiece -> [] TwoPiece -> [(0,1)] ThreePiece -> [(0,1),(0,2)] CrookedThree -> [(0,1),(1,0)] SquarePiece -> [(0,1),(1,0),(1,1)] ShortI -> [(0,1),(0,2),(0,3)] ShortT -> [(0,1),(1,1),(-1,1)] ShortL -> [(0,1),(1,0),(0,2)] ShortZ -> [(0,1),(1,...
821
getOffsets piece = toOffsets $ case piece of OnePiece -> [] TwoPiece -> [(0,1)] ThreePiece -> [(0,1),(0,2)] CrookedThree -> [(0,1),(1,0)] SquarePiece -> [(0,1),(1,0),(1,1)] ShortI -> [(0,1),(0,2),(0,3)] ShortT -> [(0,1),(1,1),(-1,1)] ShortL -> [(0,1),(1,0),(0,2)] ShortZ -> [(0,1),(1,...
821
getOffsets piece = toOffsets $ case piece of OnePiece -> [] TwoPiece -> [(0,1)] ThreePiece -> [(0,1),(0,2)] CrookedThree -> [(0,1),(1,0)] SquarePiece -> [(0,1),(1,0),(1,1)] ShortI -> [(0,1),(0,2),(0,3)] ShortT -> [(0,1),(1,1),(-1,1)] ShortL -> [(0,1),(1,0),(0,2)] ShortZ -> [(0,1),(1,...
821
false
false
21
8
154
832
497
335
null
null
donnie4w/tim
protocols/gen-hs/ITim_Client.hs
apache-2.0
timMessage (ip,op) arg_mbean = do send_timMessage op arg_mbean
64
timMessage (ip,op) arg_mbean = do send_timMessage op arg_mbean
64
timMessage (ip,op) arg_mbean = do send_timMessage op arg_mbean
64
false
false
0
7
9
26
12
14
null
null
haskell-infra/hackage-server
Distribution/Server/Features/UserSignup.hs
bsd-3-clause
emptySignupResetTable :: SignupResetTable emptySignupResetTable = SignupResetTable Map.empty
92
emptySignupResetTable :: SignupResetTable emptySignupResetTable = SignupResetTable Map.empty
92
emptySignupResetTable = SignupResetTable Map.empty
50
false
true
0
6
6
16
8
8
null
null
elieux/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
genMachOp opt o@(MO_Add _) e@[(CmmReg (CmmGlobal r)), (CmmLit (CmmInt n _))] = genMachOp_fast opt o r (fromInteger n) e
123
genMachOp opt o@(MO_Add _) e@[(CmmReg (CmmGlobal r)), (CmmLit (CmmInt n _))] = genMachOp_fast opt o r (fromInteger n) e
123
genMachOp opt o@(MO_Add _) e@[(CmmReg (CmmGlobal r)), (CmmLit (CmmInt n _))] = genMachOp_fast opt o r (fromInteger n) e
123
false
false
1
11
22
84
38
46
null
null
planrich/abstractmachines
src/Interpretor.hs
bsd-3-clause
-- |Find out whether an expr is a variable bool literal string or list isAtom :: Expr -> Bool isAtom (VarExpr _) = True
119
isAtom :: Expr -> Bool isAtom (VarExpr _) = True
48
isAtom (VarExpr _) = True
25
true
true
0
7
23
25
13
12
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The reason for the state change. iStateReason :: Lens' Image (Maybe StateReason) iStateReason = lens _iStateReason (\s a -> s { _iStateReason = a })
153
iStateReason :: Lens' Image (Maybe StateReason) iStateReason = lens _iStateReason (\s a -> s { _iStateReason = a })
115
iStateReason = lens _iStateReason (\s a -> s { _iStateReason = a })
67
true
true
0
9
26
46
25
21
null
null