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
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
haddockOptions :: ShowOrParseArgs -> [OptionField HaddockFlags] haddockOptions showOrParseArgs = [ opt { optionName = "haddock-" ++ name, optionDescr = [ fmapOptFlags (\(_, lflags) -> ([], map ("haddock-" ++) lflags)) descr | descr <- optionDescr opt] } | opt <- commandOption...
1,041
haddockOptions :: ShowOrParseArgs -> [OptionField HaddockFlags] haddockOptions showOrParseArgs = [ opt { optionName = "haddock-" ++ name, optionDescr = [ fmapOptFlags (\(_, lflags) -> ([], map ("haddock-" ++) lflags)) descr | descr <- optionDescr opt] } | opt <- commandOption...
1,041
haddockOptions showOrParseArgs = [ opt { optionName = "haddock-" ++ name, optionDescr = [ fmapOptFlags (\(_, lflags) -> ([], map ("haddock-" ++) lflags)) descr | descr <- optionDescr opt] } | opt <- commandOptions Cabal.haddockCommand showOrParseArgs , let name = optionNa...
977
false
true
0
14
287
393
208
185
null
null
ComputationWithBoundedResources/jat
src/Jat/PState/Fun.hs
bsd-3-clause
-- | Substitutes a value in a state with another one. -- Removes the entry in the heap if it the substituted value was a 'RefVal'. substitute :: Eq i => AbstrValue i -> AbstrValue i -> PState i a -> PState i a substitute v1@(RefVal adr1) v2 st = let PState hp frms ann = mapValues (\v -> if v == v1 then v2 else v) st...
363
substitute :: Eq i => AbstrValue i -> AbstrValue i -> PState i a -> PState i a substitute v1@(RefVal adr1) v2 st = let PState hp frms ann = mapValues (\v -> if v == v1 then v2 else v) st in PState (deallocate adr1 hp) frms ann
232
substitute v1@(RefVal adr1) v2 st = let PState hp frms ann = mapValues (\v -> if v == v1 then v2 else v) st in PState (deallocate adr1 hp) frms ann
153
true
true
0
13
80
123
60
63
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/Resource/ContainerAnalysis/Projects/ScanConfigs/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). psclUploadType :: Lens' ProjectsScanConfigsList (Maybe Text) psclUploadType = lens _psclUploadType (\ s a -> s{_psclUploadType = a})
211
psclUploadType :: Lens' ProjectsScanConfigsList (Maybe Text) psclUploadType = lens _psclUploadType (\ s a -> s{_psclUploadType = a})
140
psclUploadType = lens _psclUploadType (\ s a -> s{_psclUploadType = a})
79
true
true
0
9
34
48
25
23
null
null
kcharter/erl
Erl/EntityMap.hs
bsd-2-clause
lookup :: EntityId -> EntityMap a -> Maybe a lookup id m = DM.lookup id (toMap m)
81
lookup :: EntityId -> EntityMap a -> Maybe a lookup id m = DM.lookup id (toMap m)
81
lookup id m = DM.lookup id (toMap m)
36
false
true
0
8
16
49
21
28
null
null
andir/ganeti
src/Ganeti/THH/HsRPC.hs
bsd-2-clause
runRpcClient :: (MonadBase IO m, MonadError GanetiException m) => RpcClientMonad a -> Client -> m a runRpcClient = (toErrorBase .) . runReaderT . runRpcClientMonad
176
runRpcClient :: (MonadBase IO m, MonadError GanetiException m) => RpcClientMonad a -> Client -> m a runRpcClient = (toErrorBase .) . runReaderT . runRpcClientMonad
176
runRpcClient = (toErrorBase .) . runReaderT . runRpcClientMonad
63
false
true
0
9
36
62
30
32
null
null
jystic/river
src/River/Core/Analysis/Interference.hs
bsd-3-clause
interferenceOfAnnotBinding :: Ord n => Binding k p n (Live n a) -> InterferenceGraph n interferenceOfAnnotBinding = \case Lambda a ns tm -> fromNeighboring (liveVars a) <> fromNeighboring (liveOfAnnotTerm tm <> Set.fromList ns) <> interferenceOfAnnotTerm tm
271
interferenceOfAnnotBinding :: Ord n => Binding k p n (Live n a) -> InterferenceGraph n interferenceOfAnnotBinding = \case Lambda a ns tm -> fromNeighboring (liveVars a) <> fromNeighboring (liveOfAnnotTerm tm <> Set.fromList ns) <> interferenceOfAnnotTerm tm
271
interferenceOfAnnotBinding = \case Lambda a ns tm -> fromNeighboring (liveVars a) <> fromNeighboring (liveOfAnnotTerm tm <> Set.fromList ns) <> interferenceOfAnnotTerm tm
184
false
true
0
14
49
95
44
51
null
null
dsalisbury/xmobar
src/Plugins/Monitors/MultiCpu.hs
bsd-3-clause
parseCpuData :: CpuDataRef -> IO [[Float]] parseCpuData cref = do as <- readIORef cref bs <- cpuData writeIORef cref bs let p0 = zipWith percent bs as return p0
182
parseCpuData :: CpuDataRef -> IO [[Float]] parseCpuData cref = do as <- readIORef cref bs <- cpuData writeIORef cref bs let p0 = zipWith percent bs as return p0
182
parseCpuData cref = do as <- readIORef cref bs <- cpuData writeIORef cref bs let p0 = zipWith percent bs as return p0
139
false
true
0
10
50
74
33
41
null
null
kkardzis/curlhs
docs/examples/GetInMemory.hs
isc
main = curlGET "http://httpbin.org/get" >>= BL.putStrLn
55
main = curlGET "http://httpbin.org/get" >>= BL.putStrLn
55
main = curlGET "http://httpbin.org/get" >>= BL.putStrLn
55
false
false
1
7
5
19
7
12
null
null
rueshyna/gogol
gogol-books/gen/Network/Google/Books/Types/Product.hs
mpl-2.0
-- | Resource Type lKind :: Lens' Layersummary Text lKind = lens _lKind (\ s a -> s{_lKind = a})
96
lKind :: Lens' Layersummary Text lKind = lens _lKind (\ s a -> s{_lKind = a})
77
lKind = lens _lKind (\ s a -> s{_lKind = a})
44
true
true
1
9
19
46
22
24
null
null
uduki/hsQt
Qtc/Gui/QTableWidgetSelectionRange.hs
bsd-2-clause
rightColumn :: QTableWidgetSelectionRange a -> (()) -> IO (Int) rightColumn x0 () = withIntResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTableWidgetSelectionRange_rightColumn cobj_x0
191
rightColumn :: QTableWidgetSelectionRange a -> (()) -> IO (Int) rightColumn x0 () = withIntResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTableWidgetSelectionRange_rightColumn cobj_x0
191
rightColumn x0 () = withIntResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTableWidgetSelectionRange_rightColumn cobj_x0
127
false
true
0
8
31
59
29
30
null
null
acowley/ghc
compiler/nativeGen/X86/Regs.hs
bsd-3-clause
xmm8 = regSingle 32
20
xmm8 = regSingle 32
20
xmm8 = regSingle 32
20
false
false
1
5
4
12
4
8
null
null
MichielDerhaeg/stack
src/Stack/Types/Config.hs
bsd-3-clause
useShaPathOnWindows :: MonadThrow m => Path Rel Dir -> m (Path Rel Dir) useShaPathOnWindows = #ifdef mingw32_HOST_OS parseRelDir . S8.unpack . S8.take 8 . Mem.convertToBase Mem.Base16 . hashWith SHA1 . encodeUtf8 . T.pack . toFilePath
238
useShaPathOnWindows :: MonadThrow m => Path Rel Dir -> m (Path Rel Dir) useShaPathOnWindows = #ifdef mingw32_HOST_OS parseRelDir . S8.unpack . S8.take 8 . Mem.convertToBase Mem.Base16 . hashWith SHA1 . encodeUtf8 . T.pack . toFilePath
238
useShaPathOnWindows = #ifdef mingw32_HOST_OS parseRelDir . S8.unpack . S8.take 8 . Mem.convertToBase Mem.Base16 . hashWith SHA1 . encodeUtf8 . T.pack . toFilePath
166
false
true
2
11
38
94
42
52
null
null
bfpg/brisparks.info
src/Db/ParkAddress.hs
mit
insertParkAddress :: ParkAddress -> Db () insertParkAddress a = const () <$> execute [sql|INSERT INTO park_address ( park_number,park_name,street,suburb,easting,northing,latitude,longtitude ) VALUES (?,?,?,?,?,?,?,?)|] a
230
insertParkAddress :: ParkAddress -> Db () insertParkAddress a = const () <$> execute [sql|INSERT INTO park_address ( park_number,park_name,street,suburb,easting,northing,latitude,longtitude ) VALUES (?,?,?,?,?,?,?,?)|] a
230
insertParkAddress a = const () <$> execute [sql|INSERT INTO park_address ( park_number,park_name,street,suburb,easting,northing,latitude,longtitude ) VALUES (?,?,?,?,?,?,?,?)|] a
188
false
true
0
7
31
42
21
21
null
null
Elastifile/git-sling
server/src/Sling.hs
gpl-2.0
prepareMergeProposal :: Git.Remote -> Git.Branch -> Proposal -> Hash -> Git.Branch -> EShell () prepareMergeProposal remote proposalBranch proposal baseHash niceBranch = do let ontoBranchName = Proposal.proposalBranchOnto proposal -- note: 'nice' branch and 'onto' branch may be the same -- branch. (e.g. pro...
2,241
prepareMergeProposal :: Git.Remote -> Git.Branch -> Proposal -> Hash -> Git.Branch -> EShell () prepareMergeProposal remote proposalBranch proposal baseHash niceBranch = do let ontoBranchName = Proposal.proposalBranchOnto proposal -- note: 'nice' branch and 'onto' branch may be the same -- branch. (e.g. pro...
2,241
prepareMergeProposal remote proposalBranch proposal baseHash niceBranch = do let ontoBranchName = Proposal.proposalBranchOnto proposal -- note: 'nice' branch and 'onto' branch may be the same -- branch. (e.g. proposal called 'master' with onto=master) remoteOntoBranchHash <- Git.refToHash (Git.RefBranch...
2,145
false
true
0
17
536
454
219
235
null
null
achirkin/qua-kit
apps/hs/helen/src/Helen/Core.hs
mit
-- | Initialize state initHelen :: Settings -> IO Helen initHelen sets = do -- message channel ch <- STM.newTChanIO -- mutable base of clients clientStore <- STM.newTMVarIO (HashMap.empty :: HashMap.HashMap ClientId (Client, HelenWorld ())) -- construct helen return Helen { _msgChannel = ch , sendDi...
1,504
initHelen :: Settings -> IO Helen initHelen sets = do -- message channel ch <- STM.newTChanIO -- mutable base of clients clientStore <- STM.newTMVarIO (HashMap.empty :: HashMap.HashMap ClientId (Client, HelenWorld ())) -- construct helen return Helen { _msgChannel = ch , sendDirectMessage = \msg@(Ta...
1,482
initHelen sets = do -- message channel ch <- STM.newTChanIO -- mutable base of clients clientStore <- STM.newTMVarIO (HashMap.empty :: HashMap.HashMap ClientId (Client, HelenWorld ())) -- construct helen return Helen { _msgChannel = ch , sendDirectMessage = \msg@(TargetedMessage _ cId _) -> do ...
1,448
true
true
0
27
505
457
226
231
null
null
MegaShow/college-programming
Homework/Haskell Function Programming/MyFraction.hs
mit
(<*>) :: Fraction -> Fraction -> Fraction (<*>) (a,b) (c,d) = rattimes (a,b) (c,d)
82
(<*>) :: Fraction -> Fraction -> Fraction (<*>) (a,b) (c,d) = rattimes (a,b) (c,d)
82
(<*>) (a,b) (c,d) = rattimes (a,b) (c,d)
40
false
true
0
6
13
57
34
23
null
null
technogeeky/pearl-sorting-with-bialgebras
src/Pearl/SWB/Section06.hs
gpl-3.0
glue :: STree (Gf SList) -> SList (Gf SList :\/: STree (Gf SList)) glue KE = SNil
111
glue :: STree (Gf SList) -> SList (Gf SList :\/: STree (Gf SList)) glue KE = SNil
108
glue KE = SNil
41
false
true
0
11
46
53
24
29
null
null
senavi/haskell
chp3.hs
gpl-3.0
add :: Int -> Int -> Int -> Int add a b c = a + b + c
53
add :: Int -> Int -> Int -> Int add a b c = a + b + c
53
add a b c = a + b + c
21
false
true
0
7
18
43
20
23
null
null
cumber/havro
src/Data/Functor/Polyvariant.hs
lgpl-3.0
(/$/) :: Divisible f => (z -> (a, as)) -> f a -> (f as -> f z) (/$/) = dMap
75
(/$/) :: Divisible f => (z -> (a, as)) -> f a -> (f as -> f z) (/$/) = dMap
75
(/$/) = dMap
12
false
true
0
12
20
66
33
33
null
null
stevezhee/shootout
src/Untyped.hs
bsd-3-clause
lookupR :: (Hashable b, Eq b) => b -> MapR a b -> Maybe a lookupR b = M.lookup b . hmapR
88
lookupR :: (Hashable b, Eq b) => b -> MapR a b -> Maybe a lookupR b = M.lookup b . hmapR
88
lookupR b = M.lookup b . hmapR
30
false
true
0
8
21
54
26
28
null
null
Helkafen/haddock
haddock-api/src/Haddock/Backends/Hoogle.hs
bsd-2-clause
ppInstance :: DynFlags -> ClsInst -> [String] ppInstance dflags x = [dropComment $ outWith (showSDocForUser dflags alwaysQualify) cls] where -- As per #168, we don't want safety information about the class -- in Hoogle output. The easiest way to achieve this is to set the -- safety information to a stat...
577
ppInstance :: DynFlags -> ClsInst -> [String] ppInstance dflags x = [dropComment $ outWith (showSDocForUser dflags alwaysQualify) cls] where -- As per #168, we don't want safety information about the class -- in Hoogle output. The easiest way to achieve this is to set the -- safety information to a stat...
577
ppInstance dflags x = [dropComment $ outWith (showSDocForUser dflags alwaysQualify) cls] where -- As per #168, we don't want safety information about the class -- in Hoogle output. The easiest way to achieve this is to set the -- safety information to a state where the Outputable instance -- produce...
531
false
true
0
9
151
85
48
37
null
null
kallisti-dev/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
-- hides some "unused import" warnings -- |Create a new session with the given 'Capabilities'. The returned session becomes the \"current session\" for this action. -- -- Note: if you're using 'runSession' to run your WebDriver commands, you don't need to call this explicitly. createSession :: (HasCallStack, WebDriver...
564
createSession :: (HasCallStack, WebDriver wd) => Capabilities -> wd WDSession createSession caps = do ignoreReturn . withAuthHeaders . doCommand methodPost "/session" . single "desiredCapabilities" $ caps getSession -- |Retrieve a list of active sessions and their 'Capabilities'.
285
createSession caps = do ignoreReturn . withAuthHeaders . doCommand methodPost "/session" . single "desiredCapabilities" $ caps getSession -- |Retrieve a list of active sessions and their 'Capabilities'.
207
true
true
0
10
86
69
35
34
null
null
idleberg/NSIS
Development/NSIS/Show.hs
apache-2.0
out fs (SectionGroup ASectionGroup{secgId=SectionId secgId, ..} xs) = [unwords $ "SectionGroup" : ["/e"|secgExpanded] ++ [show secgName, "_sec" ++ show secgId]] ++ map indent (outs fs xs) ++ ["SectionGroupEnd"]
222
out fs (SectionGroup ASectionGroup{secgId=SectionId secgId, ..} xs) = [unwords $ "SectionGroup" : ["/e"|secgExpanded] ++ [show secgName, "_sec" ++ show secgId]] ++ map indent (outs fs xs) ++ ["SectionGroupEnd"]
222
out fs (SectionGroup ASectionGroup{secgId=SectionId secgId, ..} xs) = [unwords $ "SectionGroup" : ["/e"|secgExpanded] ++ [show secgName, "_sec" ++ show secgId]] ++ map indent (outs fs xs) ++ ["SectionGroupEnd"]
222
false
false
0
11
39
97
49
48
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1ResourceQuotaKind' Lens v1ResourceQuotaKindL :: Lens_' V1ResourceQuota (Maybe Text) v1ResourceQuotaKindL f V1ResourceQuota{..} = (\v1ResourceQuotaKind -> V1ResourceQuota { v1ResourceQuotaKind, ..} ) <$> f v1ResourceQuotaKind
232
v1ResourceQuotaKindL :: Lens_' V1ResourceQuota (Maybe Text) v1ResourceQuotaKindL f V1ResourceQuota{..} = (\v1ResourceQuotaKind -> V1ResourceQuota { v1ResourceQuotaKind, ..} ) <$> f v1ResourceQuotaKind
200
v1ResourceQuotaKindL f V1ResourceQuota{..} = (\v1ResourceQuotaKind -> V1ResourceQuota { v1ResourceQuotaKind, ..} ) <$> f v1ResourceQuotaKind
140
true
true
1
8
23
62
30
32
null
null
Concomitant/LambdaHack
Game/LambdaHack/Common/Color.hs
bsd-3-clause
_olorToRGB BrWhite = "#FFFFFF"
32
_olorToRGB BrWhite = "#FFFFFF"
32
_olorToRGB BrWhite = "#FFFFFF"
32
false
false
0
5
5
9
4
5
null
null
spechub/Hets
Framework/WriteLogicUtils.hs
gpl-2.0
synOpt :: String synOpt = "TypeSynonymInstances"
48
synOpt :: String synOpt = "TypeSynonymInstances"
48
synOpt = "TypeSynonymInstances"
31
false
true
0
4
5
11
6
5
null
null
pbl64k/HackerRank-Contests
2014-10-10-FP/Infer/i.fail.hs
bsd-2-clause
add_t0 u = do env <- get let n = Sq.length $ st env let st' = st env Sq.|> (FVar n) let ut' = if u then n `S.insert` ut env else ut env let env' = Env { vt = vt env, vt_st = vt_st env, st = st', ut = ut' } put env' return n
251
add_t0 u = do env <- get let n = Sq.length $ st env let st' = st env Sq.|> (FVar n) let ut' = if u then n `S.insert` ut env else ut env let env' = Env { vt = vt env, vt_st = vt_st env, st = st', ut = ut' } put env' return n
251
add_t0 u = do env <- get let n = Sq.length $ st env let st' = st env Sq.|> (FVar n) let ut' = if u then n `S.insert` ut env else ut env let env' = Env { vt = vt env, vt_st = vt_st env, st = st', ut = ut' } put env' return n
251
false
false
1
13
86
146
69
77
null
null
JackKiefer/herms
src/Lang/Strings.hs
gpl-3.0
servingMetavar = "INT"
22
servingMetavar = "INT"
22
servingMetavar = "INT"
22
false
false
0
4
2
6
3
3
null
null
aaronshim/whenisbad
app/Main.hs
mit
main :: IO () main = do env <- getEnvironment let port = maybe 3000 read $ lookup "PORT" env startApp port
112
main :: IO () main = do env <- getEnvironment let port = maybe 3000 read $ lookup "PORT" env startApp port
112
main = do env <- getEnvironment let port = maybe 3000 read $ lookup "PORT" env startApp port
98
false
true
0
11
27
52
23
29
null
null
tolysz/prepare-ghcjs
spec-lts8/base/Data/Data.hs
bsd-3-clause
-- | Constructs a constructor mkConstr :: DataType -> String -> [String] -> Fixity -> Constr mkConstr dt str fields fix = Constr { conrep = AlgConstr idx , constring = str , confields = fields , confixity = fix , datatype = dt ...
503
mkConstr :: DataType -> String -> [String] -> Fixity -> Constr mkConstr dt str fields fix = Constr { conrep = AlgConstr idx , constring = str , confields = fields , confixity = fix , datatype = dt } where i...
473
mkConstr dt str fields fix = Constr { conrep = AlgConstr idx , constring = str , confields = fields , confixity = fix , datatype = dt } where idx = head [ i | (c,i) <- dataTypeConstrs dt `zip` [1..], ...
410
true
true
1
10
208
140
73
67
null
null
CMCDragonkai/.dotfiles
.xmonad/xmonad.hs
mit
myEvents = Ewmh.ewmhDesktopsEventHook <+> Ewmh.fullscreenEventHook
66
myEvents = Ewmh.ewmhDesktopsEventHook <+> Ewmh.fullscreenEventHook
66
myEvents = Ewmh.ewmhDesktopsEventHook <+> Ewmh.fullscreenEventHook
66
false
false
0
6
4
14
7
7
null
null
cies/gelatin
gelatin-core/src/Gelatin/Core/Color.hs
bsd-3-clause
deepPink :: (Num a, Fractional a) => V4 a deepPink = V4 (255/255) (20/255) (147/255) 1
86
deepPink :: (Num a, Fractional a) => V4 a deepPink = V4 (255/255) (20/255) (147/255) 1
86
deepPink = V4 (255/255) (20/255) (147/255) 1
44
false
true
0
7
15
59
31
28
null
null
dysinger/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/DeleteItem.hs
mpl-2.0
-- | There is a newer parameter available. Use /ConditionExpression/ instead. Note -- that if you use /ConditionalOperator/ and / ConditionExpression / at the same -- time, DynamoDB will return a /ValidationException/ exception. -- -- A logical operator to apply to the conditions in the /Expected/ map: -- -- 'AND' - If...
894
diConditionalOperator :: Lens' DeleteItem (Maybe ConditionalOperator) diConditionalOperator = lens _diConditionalOperator (\s a -> s { _diConditionalOperator = a })
168
diConditionalOperator = lens _diConditionalOperator (\s a -> s { _diConditionalOperator = a })
98
true
true
0
9
150
63
42
21
null
null
SkemaPlatform/skema-common
src/Skema/Concurrent.hs
agpl-3.0
waitForChild :: ChildLock -> IO () waitForChild = takeMVar
58
waitForChild :: ChildLock -> IO () waitForChild = takeMVar
58
waitForChild = takeMVar
23
false
true
0
7
8
20
10
10
null
null
foollbar/Ponga
src/Train.hs
bsd-3-clause
getFittest :: (Population, Population) -> (Gene, Gene, Float) getFittest (a,b) = let mates = [(x,y) | x <- a, y <- b] matchResult = map match mates m = minimumBy (\(_, _,a) (_, _,b) -> compare b a) matchResult in trace (show $ (\(_, _, t) -> t) m) $ m
267
getFittest :: (Population, Population) -> (Gene, Gene, Float) getFittest (a,b) = let mates = [(x,y) | x <- a, y <- b] matchResult = map match mates m = minimumBy (\(_, _,a) (_, _,b) -> compare b a) matchResult in trace (show $ (\(_, _, t) -> t) m) $ m
267
getFittest (a,b) = let mates = [(x,y) | x <- a, y <- b] matchResult = map match mates m = minimumBy (\(_, _,a) (_, _,b) -> compare b a) matchResult in trace (show $ (\(_, _, t) -> t) m) $ m
205
false
true
0
12
66
167
92
75
null
null
rpglover64/lens
tests/properties.hs
bsd-3-clause
prop__Just = isPrism (_Just :: Prism' (Maybe Int) Int)
80
prop__Just = isPrism (_Just :: Prism' (Maybe Int) Int)
80
prop__Just = isPrism (_Just :: Prism' (Maybe Int) Int)
80
false
false
0
9
34
26
13
13
null
null
pbiggar/rash
src/Rash/Runtime/Process.hs
bsd-3-clause
waitForProcess (ProcProc handle) = do rv <- Proc.waitForProcess handle return $ VResult rv
94
waitForProcess (ProcProc handle) = do rv <- Proc.waitForProcess handle return $ VResult rv
94
waitForProcess (ProcProc handle) = do rv <- Proc.waitForProcess handle return $ VResult rv
94
false
false
0
9
16
37
16
21
null
null
tjakway/ghcjvm
compiler/stgSyn/StgSyn.hs
bsd-3-clause
exprHasCafRefs (StgLet bind body) = bindHasCafRefs bind || exprHasCafRefs body
80
exprHasCafRefs (StgLet bind body) = bindHasCafRefs bind || exprHasCafRefs body
80
exprHasCafRefs (StgLet bind body) = bindHasCafRefs bind || exprHasCafRefs body
80
false
false
0
7
11
27
12
15
null
null
energyflowanalysis/efa-2.1
src/EFA/Signal/Record.hs
bsd-3-clause
-- | Add Record name to SigId -- can be used for plotting multiple records in one window addRecName2SigId :: String -> SignalRecord v d -> SignalRecord v d addRecName2SigId name (Record time sigs) = Record time (Map.mapKeys (\ (SigId x) -> SigId (name ++ "_" ++ x) ) sigs)
272
addRecName2SigId :: String -> SignalRecord v d -> SignalRecord v d addRecName2SigId name (Record time sigs) = Record time (Map.mapKeys (\ (SigId x) -> SigId (name ++ "_" ++ x) ) sigs)
183
addRecName2SigId name (Record time sigs) = Record time (Map.mapKeys (\ (SigId x) -> SigId (name ++ "_" ++ x) ) sigs)
116
true
true
0
13
49
86
43
43
null
null
rahulmutt/codec-jvm
src/Codec/JVM/ASM/Code/CtrlFlow.hs
apache-2.0
mapLocals :: (Locals -> Locals) -> CtrlFlow -> CtrlFlow mapLocals f cf = cf { locals = f $ locals cf }
102
mapLocals :: (Locals -> Locals) -> CtrlFlow -> CtrlFlow mapLocals f cf = cf { locals = f $ locals cf }
102
mapLocals f cf = cf { locals = f $ locals cf }
46
false
true
0
8
21
46
24
22
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
twice = id
10
twice = id
10
twice = id
10
false
false
0
4
2
6
3
3
null
null
apriori/daak
lib/DAAK/Core/ResidualSpace.hs
mit
startOrd (ResidualSpace a) (ResidualSpace b) | eq == EQ = (compare `on` volume) b a | otherwise = eq where eq = (compare `on` start) a b
146
startOrd (ResidualSpace a) (ResidualSpace b) | eq == EQ = (compare `on` volume) b a | otherwise = eq where eq = (compare `on` start) a b
146
startOrd (ResidualSpace a) (ResidualSpace b) | eq == EQ = (compare `on` volume) b a | otherwise = eq where eq = (compare `on` start) a b
146
false
false
1
8
36
88
40
48
null
null
keera-studios/hsQt
Qtc/Gui/QTextLayout.hs
bsd-2-clause
clearAdditionalFormats :: QTextLayout a -> (()) -> IO () clearAdditionalFormats x0 () = withObjectPtr x0 $ \cobj_x0 -> qtc_QTextLayout_clearAdditionalFormats cobj_x0
171
clearAdditionalFormats :: QTextLayout a -> (()) -> IO () clearAdditionalFormats x0 () = withObjectPtr x0 $ \cobj_x0 -> qtc_QTextLayout_clearAdditionalFormats cobj_x0
171
clearAdditionalFormats x0 () = withObjectPtr x0 $ \cobj_x0 -> qtc_QTextLayout_clearAdditionalFormats cobj_x0
114
false
true
0
8
25
54
26
28
null
null
brendanhay/gogol
gogol-firebasehosting/gen/Network/Google/Resource/FirebaseHosting/Operations/List.hs
mpl-2.0
-- | Creates a value of 'OperationsList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'olXgafv' -- -- * 'olUploadProtocol' -- -- * 'olAccessToken' -- -- * 'olUploadType' -- -- * 'olName' -- -- * 'olFilter' -- -- * 'olPageToken' -- -...
726
operationsList :: Text -- ^ 'olName' -> OperationsList operationsList pOlName_ = OperationsList' { _olXgafv = Nothing , _olUploadProtocol = Nothing , _olAccessToken = Nothing , _olUploadType = Nothing , _olName = pOlName_ , _olFilter = Nothing , _olPageToken = Nothing , _olPage...
368
operationsList pOlName_ = OperationsList' { _olXgafv = Nothing , _olUploadProtocol = Nothing , _olAccessToken = Nothing , _olUploadType = Nothing , _olName = pOlName_ , _olFilter = Nothing , _olPageToken = Nothing , _olPageSize = Nothing , _olCallback = Nothing }
305
true
true
0
6
164
96
68
28
null
null
ivanperez-keera/Yampa
yampa/src/FRP/Yampa/InternalCore.hs
bsd-3-clause
fdPar (FDC b) FDI = FDG (\(~(_, c)) -> (b, c))
50
fdPar (FDC b) FDI = FDG (\(~(_, c)) -> (b, c))
50
fdPar (FDC b) FDI = FDG (\(~(_, c)) -> (b, c))
50
false
false
0
10
14
44
24
20
null
null
ghcjs/ghcjs
utils/pkg-cache/ghc/includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs
mit
oFFSET_StgRegTable_rR8 :: DynFlags -> Int oFFSET_StgRegTable_rR8 dflags = pc_OFFSET_StgRegTable_rR8 (platformConstants dflags)
126
oFFSET_StgRegTable_rR8 :: DynFlags -> Int oFFSET_StgRegTable_rR8 dflags = pc_OFFSET_StgRegTable_rR8 (platformConstants dflags)
126
oFFSET_StgRegTable_rR8 dflags = pc_OFFSET_StgRegTable_rR8 (platformConstants dflags)
84
false
true
0
7
10
30
14
16
null
null
garetxe/cabal
Cabal/Distribution/PackageDescription.hs
bsd-3-clause
ident :: Parse.ReadP r String ident = Parse.munch1 (\c -> Char.isAlphaNum c || c == '_' || c == '-')
100
ident :: Parse.ReadP r String ident = Parse.munch1 (\c -> Char.isAlphaNum c || c == '_' || c == '-')
100
ident = Parse.munch1 (\c -> Char.isAlphaNum c || c == '_' || c == '-')
70
false
true
0
13
19
52
26
26
null
null
mahrz/hit
src/Numeric/Information/Model.hs
mit
marginalize :: (Fractional prob, Ord a) => [String] -> ModelDistribution prob a -> ModelDistribution prob a marginalize vars (vmap, d) = (varAutoIndex vars, margin (filterIndex vars vmap) d) where filterIndex vars vmap vs = [ vs !! (fromJust $ lookup v vmap)...
334
marginalize :: (Fractional prob, Ord a) => [String] -> ModelDistribution prob a -> ModelDistribution prob a marginalize vars (vmap, d) = (varAutoIndex vars, margin (filterIndex vars vmap) d) where filterIndex vars vmap vs = [ vs !! (fromJust $ lookup v vmap)...
334
marginalize vars (vmap, d) = (varAutoIndex vars, margin (filterIndex vars vmap) d) where filterIndex vars vmap vs = [ vs !! (fromJust $ lookup v vmap) | v <- vars]
181
false
true
0
9
108
121
62
59
null
null
darthdeus/ghc-mod-ng
Language/Haskell/GhcMod/CabalApi.hs
bsd-3-clause
---------------------------------------------------------------- -- | Getting necessary 'CompilerOptions' from three information sources. getCompilerOptions :: [GHCOption] -> Cradle -> PackageDescription -> IO CompilerOptions getCompilerOptions ghcopts cradle pk...
821
getCompilerOptions :: [GHCOption] -> Cradle -> PackageDescription -> IO CompilerOptions getCompilerOptions ghcopts cradle pkgDesc = do gopts <- getGHCOptions ghcopts cradle rdir $ head buildInfos depPkgs <- cabalConfigDependencies cradle (C.packageId pkgD...
682
getCompilerOptions ghcopts cradle pkgDesc = do gopts <- getGHCOptions ghcopts cradle rdir $ head buildInfos depPkgs <- cabalConfigDependencies cradle (C.packageId pkgDesc) return $ CompilerOptions gopts idirs depPkgs where wdir = cradleCurrentDir cradle rdir = cradleRootDir cradle ...
537
true
true
0
11
182
139
67
72
null
null
FranklinChen/Hugs
demos/Lattice.hs
bsd-3-clause
xs `subset` ys = all (`elem` ys) xs
36
xs `subset` ys = all (`elem` ys) xs
36
xs `subset` ys = all (`elem` ys) xs
36
false
false
0
6
8
29
15
14
null
null
jtdaugherty/vty
src/Graphics/Vty/DisplayAttributes.hs
bsd-3-clause
simplifyColorDiffs cd NoColorChange = cd
54
simplifyColorDiffs cd NoColorChange = cd
54
simplifyColorDiffs cd NoColorChange = cd
54
false
false
0
5
18
12
5
7
null
null
wyager/Neks
Network/Neks/NeksServer.hs
mit
processWith :: Store -> Request -> STM [Reply] processWith store (Set k v) = do insert k v store return []
122
processWith :: Store -> Request -> STM [Reply] processWith store (Set k v) = do insert k v store return []
122
processWith store (Set k v) = do insert k v store return []
75
false
true
0
8
36
56
26
30
null
null
rueshyna/gogol
gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs
mpl-2.0
-- | The next page token. To be used in a subsequent request to return the -- next page of results. dNextPageToken :: Lens' DownloadAccountResponse (Maybe Text) dNextPageToken = lens _dNextPageToken (\ s a -> s{_dNextPageToken = a})
240
dNextPageToken :: Lens' DownloadAccountResponse (Maybe Text) dNextPageToken = lens _dNextPageToken (\ s a -> s{_dNextPageToken = a})
140
dNextPageToken = lens _dNextPageToken (\ s a -> s{_dNextPageToken = a})
79
true
true
1
9
45
53
26
27
null
null
sopvop/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
warn :: Verbosity -> String -> IO () warn verbosity msg = withFrozenCallStack $ do when (verbosity >= normal) $ do hFlush stdout hPutCallStackPrefix stderr verbosity hPutStr stderr (wrapText ("Warning: " ++ msg)) -- | Useful status messages. -- -- We display these at the 'normal' verbosity level. -- -- T...
471
warn :: Verbosity -> String -> IO () warn verbosity msg = withFrozenCallStack $ do when (verbosity >= normal) $ do hFlush stdout hPutCallStackPrefix stderr verbosity hPutStr stderr (wrapText ("Warning: " ++ msg)) -- | Useful status messages. -- -- We display these at the 'normal' verbosity level. -- -- T...
471
warn verbosity msg = withFrozenCallStack $ do when (verbosity >= normal) $ do hFlush stdout hPutCallStackPrefix stderr verbosity hPutStr stderr (wrapText ("Warning: " ++ msg)) -- | Useful status messages. -- -- We display these at the 'normal' verbosity level. -- -- This is for the ordinary helpful statu...
434
false
true
0
15
91
92
46
46
null
null
sphynx/hamisado
AI/Algorithms/Tzaar.hs
bsd-3-clause
negascout :: Gametree p => Valuation p -> Int -> p -> Valued p negascout node_value depth p = let a = fromIntegral (minBound+1 :: Int) b = fromIntegral (maxBound :: Int) in negascout' node_value depth a b p where -- worker negascout' node_value d alfa beta p | d==0 || is_terminal p = valued nod...
1,213
negascout :: Gametree p => Valuation p -> Int -> p -> Valued p negascout node_value depth p = let a = fromIntegral (minBound+1 :: Int) b = fromIntegral (maxBound :: Int) in negascout' node_value depth a b p where -- worker negascout' node_value d alfa beta p | d==0 || is_terminal p = valued nod...
1,213
negascout node_value depth p = let a = fromIntegral (minBound+1 :: Int) b = fromIntegral (maxBound :: Int) in negascout' node_value depth a b p where -- worker negascout' node_value d alfa beta p | d==0 || is_terminal p = valued node_value p | d==1 = valued (negate . node_value) p0 -...
1,150
false
true
0
14
439
448
217
231
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Identifies what kind of resource this is. Value: the fixed string -- \"dfareporting#projectsListResponse\". plrKind :: Lens' ProjectsListResponse (Maybe Text) plrKind = lens _plrKind (\ s a -> s{_plrKind = a})
214
plrKind :: Lens' ProjectsListResponse (Maybe Text) plrKind = lens _plrKind (\ s a -> s{_plrKind = a})
101
plrKind = lens _plrKind (\ s a -> s{_plrKind = a})
50
true
true
1
9
31
53
26
27
null
null
thoferon/mud
src/Mud/History.hs
bsd-3-clause
runHistoryT :: MonadError MudError m => HistoryT m a -> FileSystemT m a runHistoryT = iterTM interpreter where interpreter :: MonadError MudError m => HistoryF (FileSystemT m a) -> FileSystemT m a interpreter = \case ReadHistory path f -> actualReadHistory path >>= f Wr...
380
runHistoryT :: MonadError MudError m => HistoryT m a -> FileSystemT m a runHistoryT = iterTM interpreter where interpreter :: MonadError MudError m => HistoryF (FileSystemT m a) -> FileSystemT m a interpreter = \case ReadHistory path f -> actualReadHistory path >>= f Wr...
380
runHistoryT = iterTM interpreter where interpreter :: MonadError MudError m => HistoryF (FileSystemT m a) -> FileSystemT m a interpreter = \case ReadHistory path f -> actualReadHistory path >>= f WriteHistory path hist f -> actualWriteHistory path hist >>= f
308
false
true
0
10
102
132
58
74
null
null
rel-eng/jdec
src/JDec/Class/Parse/ParseAnnotation.hs
bsd-3-clause
deserializeAnnotationElementValue :: Get AnnotationElementValue -- ^ Annotation element value deserializeAnnotationElementValue = do tag <- getWord8 case tag of 0x42 -> do constValueIndex <- getWord16be return $! AnnotationElementConstByteValue (ConstantPoolIndex (toInteger constValueIndex)) 0x4...
2,258
deserializeAnnotationElementValue :: Get AnnotationElementValue deserializeAnnotationElementValue = do tag <- getWord8 case tag of 0x42 -> do constValueIndex <- getWord16be return $! AnnotationElementConstByteValue (ConstantPoolIndex (toInteger constValueIndex)) 0x43 -> do constValueIndex ...
2,228
deserializeAnnotationElementValue = do tag <- getWord8 case tag of 0x42 -> do constValueIndex <- getWord16be return $! AnnotationElementConstByteValue (ConstantPoolIndex (toInteger constValueIndex)) 0x43 -> do constValueIndex <- getWord16be return $! AnnotationElementConstCharValue (...
2,164
true
true
0
17
421
521
239
282
null
null
damoxc/ganeti
src/Ganeti/HTools/Node.hs
gpl-2.0
addSec :: Node -> Instance.Instance -> T.Ndx -> T.OpResult Node addSec = addSecEx False
87
addSec :: Node -> Instance.Instance -> T.Ndx -> T.OpResult Node addSec = addSecEx False
87
addSec = addSecEx False
23
false
true
0
10
13
40
18
22
null
null
GaloisInc/mistral
src/Mistral/ModuleSystem/NameMap.hs
bsd-3-clause
mbLNameMap :: Maybe (Located Name) -> NameMap mbLNameMap = foldMap (\ ln -> singleton (locThing ln) (fromIdent ln) )
117
mbLNameMap :: Maybe (Located Name) -> NameMap mbLNameMap = foldMap (\ ln -> singleton (locThing ln) (fromIdent ln) )
117
mbLNameMap = foldMap (\ ln -> singleton (locThing ln) (fromIdent ln) )
71
false
true
0
10
19
52
26
26
null
null
rjregenold/morse
src/Morse/Commands/Server.hs
mit
maybeParam :: Parsable a => TL.Text -> ActionM (Maybe a) maybeParam name = flip rescue (const $ return Nothing) (param name >>= return . Just)
142
maybeParam :: Parsable a => TL.Text -> ActionM (Maybe a) maybeParam name = flip rescue (const $ return Nothing) (param name >>= return . Just)
142
maybeParam name = flip rescue (const $ return Nothing) (param name >>= return . Just)
85
false
true
0
9
24
67
32
35
null
null
niteria/haddock
haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
bsd-2-clause
ppTypeSig :: Bool -> [OccName] -> Html -> Unicode -> Html ppTypeSig summary nms pp_ty unicode = concatHtml htmlNames <+> dcolon unicode <+> pp_ty where htmlNames = intersperse (stringToHtml ", ") $ map (ppBinder summary) nms
232
ppTypeSig :: Bool -> [OccName] -> Html -> Unicode -> Html ppTypeSig summary nms pp_ty unicode = concatHtml htmlNames <+> dcolon unicode <+> pp_ty where htmlNames = intersperse (stringToHtml ", ") $ map (ppBinder summary) nms
232
ppTypeSig summary nms pp_ty unicode = concatHtml htmlNames <+> dcolon unicode <+> pp_ty where htmlNames = intersperse (stringToHtml ", ") $ map (ppBinder summary) nms
174
false
true
0
8
43
85
41
44
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
judiciously = id
16
judiciously = id
16
judiciously = id
16
false
false
0
4
2
6
3
3
null
null
pogden/cookie-quicker
Game/CookieClicker/Model.hs
bsd-3-clause
count Grandma = grandmas
36
count Grandma = grandmas
36
count Grandma = grandmas
36
false
false
0
5
15
9
4
5
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrelNames.hs
bsd-3-clause
toList_RDR = nameRdrName toListName
35
toList_RDR = nameRdrName toListName
35
toList_RDR = nameRdrName toListName
35
false
false
0
5
3
9
4
5
null
null
noschinl/cyp
src/Test/Info2/Cyp/Env.hs
mit
interpretTerm :: Env -> RawTerm -> Term interpretTerm env rt = fmap f rt where f v = case M.lookup v (fixes env) of Nothing -> (v, 0) Just n -> (v, n)
172
interpretTerm :: Env -> RawTerm -> Term interpretTerm env rt = fmap f rt where f v = case M.lookup v (fixes env) of Nothing -> (v, 0) Just n -> (v, n)
172
interpretTerm env rt = fmap f rt where f v = case M.lookup v (fixes env) of Nothing -> (v, 0) Just n -> (v, n)
132
false
true
0
8
54
83
42
41
null
null
mtesseract/wosa
src/Nebelfiller.hs
bsd-3-clause
printWordset :: Wordset -> String printWordset (Wordset item0 item1 item2 item3) = printItem item0 ++ " | " ++ printItem item1 ++ " | " ++ printItem item2 ++ " | " ++ printItem item3
208
printWordset :: Wordset -> String printWordset (Wordset item0 item1 item2 item3) = printItem item0 ++ " | " ++ printItem item1 ++ " | " ++ printItem item2 ++ " | " ++ printItem item3
208
printWordset (Wordset item0 item1 item2 item3) = printItem item0 ++ " | " ++ printItem item1 ++ " | " ++ printItem item2 ++ " | " ++ printItem item3
174
false
true
0
11
60
66
31
35
null
null
jtdaugherty/vty-ui-builder-xml
src/Graphics/Vty/Widgets/Builder/Reader/XML/Reader.hs
bsd-3-clause
parseAndValidate :: FilePath -> String -> IO (Either [(String, A.SourceLocation)] (Element Posn)) parseAndValidate inputXmlPath xmlContents = do case xmlParse' inputXmlPath xmlContents of Left e -> return $ Left [ ("Error parsing input XML " ++ (show inputXmlPath) ++ ": " ++ e ...
483
parseAndValidate :: FilePath -> String -> IO (Either [(String, A.SourceLocation)] (Element Posn)) parseAndValidate inputXmlPath xmlContents = do case xmlParse' inputXmlPath xmlContents of Left e -> return $ Left [ ("Error parsing input XML " ++ (show inputXmlPath) ++ ": " ++ e ...
483
parseAndValidate inputXmlPath xmlContents = do case xmlParse' inputXmlPath xmlContents of Left e -> return $ Left [ ("Error parsing input XML " ++ (show inputXmlPath) ++ ": " ++ e , A.noLoc) ] Right d -> do let (Doc...
385
false
true
0
18
173
155
75
80
null
null
futtetennista/IntroductionToFunctionalProgramming
itfp/src/Chapter9.hs
mit
prune :: Int -> GTree a -> GTree a prune 0 (GNode x _) = GNode x []
69
prune :: Int -> GTree a -> GTree a prune 0 (GNode x _) = GNode x []
69
prune 0 (GNode x _) = GNode x []
34
false
true
0
7
19
45
21
24
null
null
wxwxwwxxx/ghc
testsuite/tests/programs/andy_cherry/DataTypes.hs
bsd-3-clause
charToMoveTok '5' = Just (RankTok 5)
36
charToMoveTok '5' = Just (RankTok 5)
36
charToMoveTok '5' = Just (RankTok 5)
36
false
false
0
7
5
18
8
10
null
null
Kyly/liquidhaskell
benchmarks/icfp15/neg/DataBase.hs
bsd-3-clause
{-@ assume (Prelude.++) :: xs:[a] -> ys:[a] -> {v:[a] | listElts v = Set_cup (listElts xs) (listElts ys)} @-} {-@ assume Prelude.elem :: x:a -> xs:[a] -> {v:Bool | Prop v <=> Set_mem x (listElts xs)} @-} {-@ filter :: xs:[a] -> ({v:a | Set_mem v (listElts xs)} -> Bool) -> {v:[a] | Set_sub (listElts v) (listElts xs)} @...
377
filter :: [a] -> (a -> Bool) -> [a] filter [] _ = []
54
filter [] _ = []
18
true
true
0
9
75
50
26
24
null
null
fmapfmapfmap/amazonka
amazonka-ecs/gen/Network/AWS/ECS/ListTaskDefinitionFamilies.hs
mpl-2.0
-- | The list of task definition family names that match the -- 'ListTaskDefinitionFamilies' request. ltdfrsFamilies :: Lens' ListTaskDefinitionFamiliesResponse [Text] ltdfrsFamilies = lens _ltdfrsFamilies (\ s a -> s{_ltdfrsFamilies = a}) . _Default . _Coerce
260
ltdfrsFamilies :: Lens' ListTaskDefinitionFamiliesResponse [Text] ltdfrsFamilies = lens _ltdfrsFamilies (\ s a -> s{_ltdfrsFamilies = a}) . _Default . _Coerce
158
ltdfrsFamilies = lens _ltdfrsFamilies (\ s a -> s{_ltdfrsFamilies = a}) . _Default . _Coerce
92
true
true
0
11
34
52
29
23
null
null
christiaanb/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isQuietHsExpr _ = False
23
isQuietHsExpr _ = False
23
isQuietHsExpr _ = False
23
false
false
0
4
3
10
4
6
null
null
phischu/fragnix
tests/packages/scotty/Network.hs
bsd-3-clause
connectTo _ (UnixSocket path) = do bracketOnError (socket AF_UNIX Stream 0) (sClose) (\sock -> do connect sock (SockAddrUnix path) socketToHandle sock ReadWriteMode )
222
connectTo _ (UnixSocket path) = do bracketOnError (socket AF_UNIX Stream 0) (sClose) (\sock -> do connect sock (SockAddrUnix path) socketToHandle sock ReadWriteMode )
222
connectTo _ (UnixSocket path) = do bracketOnError (socket AF_UNIX Stream 0) (sClose) (\sock -> do connect sock (SockAddrUnix path) socketToHandle sock ReadWriteMode )
222
false
false
0
14
78
70
33
37
null
null
kindl/Hypatia
src/Compiler.hs
mit
toJavaScriptS (If e th el) = vcat [ text "if" <> parens (toJavaScriptE e) <+> text "{", nest 4 (vcatMap toJavaScriptS th), text "}" <+> text "else" <+> text "{", nest 4 (vcatMap toJavaScriptS el), text "}"]
226
toJavaScriptS (If e th el) = vcat [ text "if" <> parens (toJavaScriptE e) <+> text "{", nest 4 (vcatMap toJavaScriptS th), text "}" <+> text "else" <+> text "{", nest 4 (vcatMap toJavaScriptS el), text "}"]
226
toJavaScriptS (If e th el) = vcat [ text "if" <> parens (toJavaScriptE e) <+> text "{", nest 4 (vcatMap toJavaScriptS th), text "}" <+> text "else" <+> text "{", nest 4 (vcatMap toJavaScriptS el), text "}"]
226
false
false
0
11
56
107
50
57
null
null
Javran/hakyll
src/Hakyll/Core/Rules.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- | Advanced usage: add extra dependencies to compilers. Basically this is -- needed when you're doing unsafe tricky stuff in the rules monad, but you -- still want correct builds. -- -- A useful utility for this purpose is 'makePatternDe...
1,462
rulesExtraDependencies :: [Dependency] -> Rules a -> Rules a rulesExtraDependencies deps rules = -- Note that we add the dependencies seemingly twice here. However, this is -- done so that 'rulesExtraDependencies' works both if we have something -- like: -- -- > match "*.css" $ rulesExtraDependencie...
1,131
rulesExtraDependencies deps rules = -- Note that we add the dependencies seemingly twice here. However, this is -- done so that 'rulesExtraDependencies' works both if we have something -- like: -- -- > match "*.css" $ rulesExtraDependencies [foo] $ ... -- -- and something like: -- --...
1,070
true
true
8
13
391
206
105
101
null
null
sdiehl/ghc
compiler/llvmGen/LlvmCodeGen/Base.hs
bsd-3-clause
-- | Get the LLVM version we are generating code for getLlvmVer :: LlvmM LlvmVersion getLlvmVer = getEnv envVersion
115
getLlvmVer :: LlvmM LlvmVersion getLlvmVer = getEnv envVersion
62
getLlvmVer = getEnv envVersion
30
true
true
1
5
18
21
9
12
null
null
keithodulaigh/Hets
CspCASL/Morphism.hs
gpl-2.0
{- | Check if a CspCASL signature morphism has the refl property i.e., sigma(s1) <= sigma(s2) implies s1 <= s2 for all s1, s2 in S -} checkReflCondition :: Morphism f CspSign CspAddMorphism -> Result () checkReflCondition Morphism { msource = sig , mtarget = sig' , sort_map = sm } = do let rel = sortRel sig ...
1,430
checkReflCondition :: Morphism f CspSign CspAddMorphism -> Result () checkReflCondition Morphism { msource = sig , mtarget = sig' , sort_map = sm } = do let rel = sortRel sig rel' = sortRel sig' allPairs = LT.cartesian $ sortSet sig failures = Set.filter (not . test) allPairs test (s1, s...
1,296
checkReflCondition Morphism { msource = sig , mtarget = sig' , sort_map = sm } = do let rel = sortRel sig rel' = sortRel sig' allPairs = LT.cartesian $ sortSet sig failures = Set.filter (not . test) allPairs test (s1, s2) = not (Rel.path (mapSort sm s1) (mapSort sm s2) rel' || ...
1,227
true
true
0
19
466
328
162
166
null
null
exercism/xhaskell
exercises/practice/pov/.meta/examples/success-standard/src/POV.hs
mit
right _ = Nothing
17
right _ = Nothing
17
right _ = Nothing
17
false
false
0
5
3
9
4
5
null
null
Soostone/blaze-markup-haste
src/Text/Blaze/Renderer/String.hs
bsd-3-clause
-- | Render markup to a lazy 'String'. -- renderMarkup :: Markup -> String renderMarkup html = renderString html ""
115
renderMarkup :: Markup -> String renderMarkup html = renderString html ""
73
renderMarkup html = renderString html ""
40
true
true
0
5
19
25
13
12
null
null
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/programs/joao-circular/LrcPrelude.hs
bsd-3-clause
lrc_map_in a ((Fork (b,c) l r),d) | a == b = True | a < b = lrc_map_in a (l,d) | a > b = lrc_map_in a (r,d)
127
lrc_map_in a ((Fork (b,c) l r),d) | a == b = True | a < b = lrc_map_in a (l,d) | a > b = lrc_map_in a (r,d)
127
lrc_map_in a ((Fork (b,c) l r),d) | a == b = True | a < b = lrc_map_in a (l,d) | a > b = lrc_map_in a (r,d)
127
false
false
0
9
47
91
46
45
null
null
termite2/tsl
Frontend/Grammar.hs
bsd-3-clause
sintType = SIntSpec nopos <$ reserved "sint" <*> (fromIntegral <$> angles decimal)
89
sintType = SIntSpec nopos <$ reserved "sint" <*> (fromIntegral <$> angles decimal)
89
sintType = SIntSpec nopos <$ reserved "sint" <*> (fromIntegral <$> angles decimal)
89
false
false
0
8
18
30
14
16
null
null
apyrgio/ganeti
src/Ganeti/HTools/Program/Harep.hs
bsd-2-clause
-- | Return the 'AutoRepairData' element of an 'AutoRepairStatus' type. getArData :: AutoRepairStatus -> Maybe AutoRepairData getArData status = case status of ArHealthy (Just d) -> Just d ArFailedRepair d -> Just d ArPendingRepair d -> Just d ArNeedsRepair d -> Just d _ -> ...
530
getArData :: AutoRepairStatus -> Maybe AutoRepairData getArData status = case status of ArHealthy (Just d) -> Just d ArFailedRepair d -> Just d ArPendingRepair d -> Just d ArNeedsRepair d -> Just d _ -> Nothing -- | Return a short name for each auto-repair status. -- -- Thi...
458
getArData status = case status of ArHealthy (Just d) -> Just d ArFailedRepair d -> Just d ArPendingRepair d -> Just d ArNeedsRepair d -> Just d _ -> Nothing -- | Return a short name for each auto-repair status. -- -- This is a more concise representation of the status, beca...
404
true
true
6
6
124
81
43
38
null
null
michaeljklein/HCy2C
dist/dist-sandbox-c6f81870/build/autogen/Paths_Hcy2c.hs
mit
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
75
false
true
0
10
22
45
21
24
null
null
phischu/fragnix
tests/packages/scotty/Network.HTTP.Types.Header.hs
bsd-3-clause
hRange = "Range"
29
hRange = "Range"
29
hRange = "Range"
29
false
false
1
5
15
10
3
7
null
null
stu-smith/project-euler-haskell
Euler-008.hs
mit
main = print $ maximum $ map (product . toNumbers) chunks
57
main = print $ maximum $ map (product . toNumbers) chunks
57
main = print $ maximum $ map (product . toNumbers) chunks
57
false
false
3
8
10
30
13
17
null
null
Enzo-Liu/cis194
src/Intro01.hs
bsd-3-clause
doubleEveryOther (x:[]) = [x]
29
doubleEveryOther (x:[]) = [x]
29
doubleEveryOther (x:[]) = [x]
29
false
false
0
8
3
21
11
10
null
null
spacekitteh/smcghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
doCopyMutableArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff -> FCode () doCopyMutableArrayOp = emitCopyArray copy where -- The only time the memory might overlap is when the two arrays -- we were provided are the same array! -- TODO: Optimize branch for common case of ...
786
doCopyMutableArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff -> FCode () doCopyMutableArrayOp = emitCopyArray copy where -- The only time the memory might overlap is when the two arrays -- we were provided are the same array! -- TODO: Optimize branch for common case of ...
786
doCopyMutableArrayOp = emitCopyArray copy where -- The only time the memory might overlap is when the two arrays -- we were provided are the same array! -- TODO: Optimize branch for common case of no aliasing. copy src dst dst_p src_p bytes = do dflags <- getDynFlags [moveCall, cpyCall...
677
false
true
0
16
223
194
92
102
null
null
leksah/leksah-server
src/IDE/Utils/Tool.hs
gpl-2.0
quoteArg :: Text -> Text quoteArg s | T.any (==' ') s = "\"" <> escapeQuotes s <> "\""
86
quoteArg :: Text -> Text quoteArg s | T.any (==' ') s = "\"" <> escapeQuotes s <> "\""
86
quoteArg s | T.any (==' ') s = "\"" <> escapeQuotes s <> "\""
61
false
true
0
9
18
52
23
29
null
null
joshuaclayton/import-sort
src/ImportSort/Parser.hs
mit
moduleImportParser :: Parser ModuleImport moduleImportParser = qualifiedImportParser <|> nonQualifiedImportParser <|> separatorParser
145
moduleImportParser :: Parser ModuleImport moduleImportParser = qualifiedImportParser <|> nonQualifiedImportParser <|> separatorParser
145
moduleImportParser = qualifiedImportParser <|> nonQualifiedImportParser <|> separatorParser
103
false
true
6
5
22
29
15
14
null
null
risgk/haskell_hamamatsu_2013
grep.hs
unlicense
main :: IO() main = do args <- getArgs let s = (args !! 0) f <- readFile (args !! 1) putStrLn `mapM_` (filter (isInfixOf s) (lines f))
150
main :: IO() main = do args <- getArgs let s = (args !! 0) f <- readFile (args !! 1) putStrLn `mapM_` (filter (isInfixOf s) (lines f))
150
main = do args <- getArgs let s = (args !! 0) f <- readFile (args !! 1) putStrLn `mapM_` (filter (isInfixOf s) (lines f))
137
false
true
0
11
43
85
42
43
null
null
tpsinnem/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
p_strSubstr _ = Nothing
23
p_strSubstr _ = Nothing
23
p_strSubstr _ = Nothing
23
false
false
0
4
3
10
4
6
null
null
themoritz/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
gbuildTargetName _lbi (GReplExe exe) = exeTargetName exe
59
gbuildTargetName _lbi (GReplExe exe) = exeTargetName exe
59
gbuildTargetName _lbi (GReplExe exe) = exeTargetName exe
59
false
false
0
7
9
20
9
11
null
null
icyfork/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkSetAssignment2 = verify checkSetAssignment "set foo = 42"
67
prop_checkSetAssignment2 = verify checkSetAssignment "set foo = 42"
67
prop_checkSetAssignment2 = verify checkSetAssignment "set foo = 42"
67
false
false
0
5
7
11
5
6
null
null
tjakway/ghcjvm
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
tickishPlace Breakpoint{} = PlaceRuntime
41
tickishPlace Breakpoint{} = PlaceRuntime
41
tickishPlace Breakpoint{} = PlaceRuntime
41
false
false
0
6
4
13
6
7
null
null
jean-edouard/idl
rpcgen/Backend/Haskell.hs
gpl-2.0
indentExp :: Int -> Expression -> Expression indentExp n (Expression s) = Expression (indent n s)
97
indentExp :: Int -> Expression -> Expression indentExp n (Expression s) = Expression (indent n s)
97
indentExp n (Expression s) = Expression (indent n s)
52
false
true
0
7
15
41
20
21
null
null
iquiw/wai
warp/Network/Wai/Handler/Warp/HTTP2/Sender.hs
mit
nextForStream buf siz sq tvar strm leftover True len = return $ Next len (CNext (fillBufStream buf siz leftover sq tvar strm))
130
nextForStream buf siz sq tvar strm leftover True len = return $ Next len (CNext (fillBufStream buf siz leftover sq tvar strm))
130
nextForStream buf siz sq tvar strm leftover True len = return $ Next len (CNext (fillBufStream buf siz leftover sq tvar strm))
130
false
false
0
10
25
54
26
28
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Locations/Buckets/Create.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). olbcUploadType :: Lens' OrganizationsLocationsBucketsCreate (Maybe Text) olbcUploadType = lens _olbcUploadType (\ s a -> s{_olbcUploadType = a})
223
olbcUploadType :: Lens' OrganizationsLocationsBucketsCreate (Maybe Text) olbcUploadType = lens _olbcUploadType (\ s a -> s{_olbcUploadType = a})
152
olbcUploadType = lens _olbcUploadType (\ s a -> s{_olbcUploadType = a})
79
true
true
0
9
34
48
25
23
null
null
siddhanathan/yi
yi-mode-haskell/src/Yi/Syntax/Haskell.hs
gpl-2.0
-- | Parse an Of block pOf :: Parser TT (Exp TT) pOf = Bin <$> pAtom [Reserved Of] <*> pBlock pAlternative
116
pOf :: Parser TT (Exp TT) pOf = Bin <$> pAtom [Reserved Of] <*> pBlock pAlternative
93
pOf = Bin <$> pAtom [Reserved Of] <*> pBlock pAlternative
67
true
true
1
9
31
46
21
25
null
null
hspec/HUnit
src/Test/HUnit/Base.hs
bsd-3-clause
-- Conditional Assertion Functions -- ------------------------------- -- | Asserts that the specified condition holds. assertBool :: HasCallStack_ String -- ^ The message that is displayed if the assertion fails -> Bool -- ^ The condition -> Assertion assertBool msg b = unle...
344
assertBool :: HasCallStack_ String -- ^ The message that is displayed if the assertion fails -> Bool -- ^ The condition -> Assertion assertBool msg b = unless b (assertFailure msg)
224
assertBool msg b = unless b (assertFailure msg)
47
true
true
0
8
89
48
24
24
null
null