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
greydot/dns
Network/DNS/Lookup.hs
bsd-3-clause
-- | Look up all \'NS\' records for the given hostname. The results -- are taken from the AUTHORITY section of the response and not the -- usual ANSWER (use 'lookupNS' for that). For details, see e.g. -- <http://www.zytrax.com/books/dns/ch15/>. -- -- There will typically be more than one name server for a -- ...
1,145
lookupNSAuth :: Resolver -> Domain -> IO (Either DNSError [Domain]) lookupNSAuth = lookupNSImpl DNS.lookupAuth
110
lookupNSAuth = lookupNSImpl DNS.lookupAuth
42
true
true
0
10
214
61
42
19
null
null
CaptainPatate/xmonad-contrib
XMonad/Actions/Search.hs
bsd-3-clause
maps = searchEngine "maps" "http://maps.google.com/maps?q="
77
maps = searchEngine "maps" "http://maps.google.com/maps?q="
77
maps = searchEngine "maps" "http://maps.google.com/maps?q="
77
false
false
1
5
22
14
5
9
null
null
GaloisInc/halvm-ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
-- We clone let- and case-bound variables so that they are still -- distinct when floated out; hence the le_subst/le_env. -- (see point 3 of the module overview comment). -- We also use these envs when making a variable polymorphic -- because we want to float it out past a big lambda. ...
1,327
initialEnv :: FloatOutSwitches -> LevelEnv initialEnv float_lams = LE { le_switches = float_lams , le_ctxt_lvl = tOP_LEVEL , le_lvl_env = emptyVarEnv , le_subst = emptySubst , le_env = emptyVarEnv }
228
initialEnv float_lams = LE { le_switches = float_lams , le_ctxt_lvl = tOP_LEVEL , le_lvl_env = emptyVarEnv , le_subst = emptySubst , le_env = emptyVarEnv }
185
true
true
0
6
386
70
50
20
null
null
neongreen/hat
src/JS.hs
bsd-3-clause
-- | Move node down (in a list of sibling nodes), ignoring anchor elements -- inserted by 'thisNode'. moveNodeDown :: JSFunction a => a moveNodeDown = makeJSFunction "moveNodeDown" ["node"] [text| var el = $(node); while (el.next().is(".dummy")) el.next().after(el); if (el.not(':last-child')) ...
347
moveNodeDown :: JSFunction a => a moveNodeDown = makeJSFunction "moveNodeDown" ["node"] [text| var el = $(node); while (el.next().is(".dummy")) el.next().after(el); if (el.not(':last-child')) el.next().after(el); |]
245
moveNodeDown = makeJSFunction "moveNodeDown" ["node"] [text| var el = $(node); while (el.next().is(".dummy")) el.next().after(el); if (el.not(':last-child')) el.next().after(el); |]
211
true
true
0
6
70
35
20
15
null
null
sdiehl/ghc
testsuite/tests/pmcheck/should_compile/PmExprVars.hs
bsd-3-clause
dictVarsAreTypeIndexed:: Int dictVarsAreTypeIndexed = case d :: D Int of A -> case d :: D Bool of A -> 0 B -> 1 B -> case d :: D Bool of A -> 2 B -> 3
170
dictVarsAreTypeIndexed:: Int dictVarsAreTypeIndexed = case d :: D Int of A -> case d :: D Bool of A -> 0 B -> 1 B -> case d :: D Bool of A -> 2 B -> 3
170
dictVarsAreTypeIndexed = case d :: D Int of A -> case d :: D Bool of A -> 0 B -> 1 B -> case d :: D Bool of A -> 2 B -> 3
141
false
true
2
9
57
81
39
42
null
null
brunjlar/neural
src/Data/FixedSize/Matrix.hs
mit
-- | Gives the matrix row with the specified index (starting at zero) if the index is valid, -- otherwise 'Nothing'. -- -- >>> :set -XDataKinds -- >>> row (pure 42 :: Matrix 2 4 Int) 0 -- Just [42,42,42,42] -- -- >>> row (pure 42 :: Matrix 2 4 Int) 2 -- Nothing -- row :: KnownNat m => Matrix m n a -> Int -> Maybe (Ve...
359
row :: KnownNat m => Matrix m n a -> Int -> Maybe (Vector n a) row (Matrix rows) = (rows !?)
92
row (Matrix rows) = (rows !?)
29
true
true
0
11
78
72
39
33
null
null
kasbah/haskell-svg-path2
Diagrams/SVG/Path.hs
bsd-3-clause
-- | Take the endpoint of the latest path, append another path that has been generated from the path commands -- and return this whole path outline :: [(Path R2, (Double, Double))] -> [PathCommand] -> [(Path R2, (Double, Double))] outline paths cs = paths ++ [(newPath,newPoint)] where newPath = translate (r2 (trx,tr...
1,364
outline :: [(Path R2, (Double, Double))] -> [PathCommand] -> [(Path R2, (Double, Double))] outline paths cs = paths ++ [(newPath,newPoint)] where newPath = translate (r2 (trx,try)) $ pathFromTrail $ if isClosed (sel3 concatPaths) then wrapLoop $ closeLine (mconcat (getTrail (sel3 ...
1,224
outline paths cs = paths ++ [(newPath,newPoint)] where newPath = translate (r2 (trx,try)) $ pathFromTrail $ if isClosed (sel3 concatPaths) then wrapLoop $ closeLine (mconcat (getTrail (sel3 concatPaths))) else wrapLine $ mconcat (getTrail (sel3 concatPaths))...
1,133
true
true
5
14
401
392
205
187
null
null
fmapfmapfmap/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/Types/Product.hs
mpl-2.0
-- | The maximum number of strongly consistent reads consumed per second -- before DynamoDB returns a /ThrottlingException/. Eventually consistent -- reads require less effort than strongly consistent reads, so a setting -- of 50 /ReadCapacityUnits/ per second provides 100 eventually consistent -- /ReadCapacityUnits/ p...
514
ptdReadCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural) ptdReadCapacityUnits = lens _ptdReadCapacityUnits (\ s a -> s{_ptdReadCapacityUnits = a}) . mapping _Nat
183
ptdReadCapacityUnits = lens _ptdReadCapacityUnits (\ s a -> s{_ptdReadCapacityUnits = a}) . mapping _Nat
104
true
true
1
10
65
62
32
30
null
null
caneroj1/Crypto-hs
src/Internal/Base64.hs
bsd-3-clause
sextets4 :: Word8 -> Word8 -> Word8 -> BS.ByteString sextets4 a b c = let f1 = a .&. 63 `shift` 2 fi = f1 `shift` (-2) s1 = (b .&. 15 `shift` 4) `shift` (-4) se = s1 .|. (a .&. 3) `shift` 4 t1 = (c .&. 3 `shift` 6) `shift` (-6) th = t1 .|. ( b .&. 15) `shift` 2 fo = c .&. 63 i...
364
sextets4 :: Word8 -> Word8 -> Word8 -> BS.ByteString sextets4 a b c = let f1 = a .&. 63 `shift` 2 fi = f1 `shift` (-2) s1 = (b .&. 15 `shift` 4) `shift` (-4) se = s1 .|. (a .&. 3) `shift` 4 t1 = (c .&. 3 `shift` 6) `shift` (-6) th = t1 .|. ( b .&. 15) `shift` 2 fo = c .&. 63 i...
364
sextets4 a b c = let f1 = a .&. 63 `shift` 2 fi = f1 `shift` (-2) s1 = (b .&. 15 `shift` 4) `shift` (-4) se = s1 .|. (a .&. 3) `shift` 4 t1 = (c .&. 3 `shift` 6) `shift` (-6) th = t1 .|. ( b .&. 15) `shift` 2 fo = c .&. 63 in BS.map encodeW8 $ BS.pack [fi, se, th, fo]
311
false
true
0
12
120
206
118
88
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/basicTypes/Avail.hs
bsd-3-clause
pprAvail :: AvailInfo -> SDoc pprAvail (Avail n) = ppr n
61
pprAvail :: AvailInfo -> SDoc pprAvail (Avail n) = ppr n
61
pprAvail (Avail n) = ppr n
31
false
true
0
7
15
27
13
14
null
null
thinkpad20/rowling
src/Language/Rowling/Parser.hs
mit
------------------------------------------------------------------------------ -- * Basics ------------------------------------------------------------------------------ -- | Set of keywords. keywords :: Set Text keywords = S.fromList ["if", "then", "else", "is", "true", "false", "let", "with", ...
330
keywords :: Set Text keywords = S.fromList ["if", "then", "else", "is", "true", "false", "let", "with", "without"]
137
keywords = S.fromList ["if", "then", "else", "is", "true", "false", "let", "with", "without"]
116
true
true
0
6
49
55
32
23
null
null
paulrzcz/takusen-oracle
Database/Enumerator.hs
bsd-3-clause
thSession :: (Typeable a, IE.ISession sess) => IE.ConnectA sess -> (forall mark. DBM mark sess a) -> IO a withSession (IE.ConnectA connecta) m = bracket connecta IE.disconnect (runReaderT (unDBM m))
211
withSession :: (Typeable a, IE.ISession sess) => IE.ConnectA sess -> (forall mark. DBM mark sess a) -> IO a withSession (IE.ConnectA connecta) m = bracket connecta IE.disconnect (runReaderT (unDBM m))
210
withSession (IE.ConnectA connecta) m = bracket connecta IE.disconnect (runReaderT (unDBM m))
96
false
true
0
10
42
93
46
47
null
null
mlite/hLLVM
src/Llvm/Asm/Simplification.hs
bsd-3-clause
simplify :: Module -> Module simplify (Module ml) = let (sl, ml1) = iter1 ml in Module $ normalizeDataLayoutAndTargetTriple (iter2 ml1 sl)
161
simplify :: Module -> Module simplify (Module ml) = let (sl, ml1) = iter1 ml in Module $ normalizeDataLayoutAndTargetTriple (iter2 ml1 sl)
161
simplify (Module ml) = let (sl, ml1) = iter1 ml in Module $ normalizeDataLayoutAndTargetTriple (iter2 ml1 sl)
132
false
true
0
10
44
60
29
31
null
null
Danten/lejf
src/Evaluate.hs
bsd-3-clause
evaluateR :: RightTerm a -> Arg -> (a -> Eval b) -> Eval b evaluateR (TLam b t) arg cont = do n <- unpackType arg bindType b n $ cont t
139
evaluateR :: RightTerm a -> Arg -> (a -> Eval b) -> Eval b evaluateR (TLam b t) arg cont = do n <- unpackType arg bindType b n $ cont t
139
evaluateR (TLam b t) arg cont = do n <- unpackType arg bindType b n $ cont t
80
false
true
0
10
35
79
36
43
null
null
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/RetrieveTapeArchive.hs
mpl-2.0
-- | 'RetrieveTapeArchive' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'rtaGatewayARN' @::@ 'Text' -- -- * 'rtaTapeARN' @::@ 'Text' -- retrieveTapeArchive :: Text -- ^ 'rtaTapeARN' -> Text -- ^ 'rtaGatewayARN' -> RetrieveTapeArchive retrieve...
417
retrieveTapeArchive :: Text -- ^ 'rtaTapeARN' -> Text -- ^ 'rtaGatewayARN' -> RetrieveTapeArchive retrieveTapeArchive p1 p2 = RetrieveTapeArchive { _rtaTapeARN = p1 , _rtaGatewayARN = p2 }
243
retrieveTapeArchive p1 p2 = RetrieveTapeArchive { _rtaTapeARN = p1 , _rtaGatewayARN = p2 }
105
true
true
0
8
107
57
33
24
null
null
cjp256/manager
xenmgr/Vm/Queries.hs
gpl-2.0
-- returns in MiBs getVmMemoryStaticMax :: Uuid -> Rpc Int getVmMemoryStaticMax uuid = do v <- readConfigPropertyDef uuid vmMemoryStaticMax 0 if v <= 0 then getVmMemory uuid else return v -- in MiBs
222
getVmMemoryStaticMax :: Uuid -> Rpc Int getVmMemoryStaticMax uuid = do v <- readConfigPropertyDef uuid vmMemoryStaticMax 0 if v <= 0 then getVmMemory uuid else return v -- in MiBs
203
getVmMemoryStaticMax uuid = do v <- readConfigPropertyDef uuid vmMemoryStaticMax 0 if v <= 0 then getVmMemory uuid else return v -- in MiBs
163
true
true
0
8
56
58
28
30
null
null
ihc/futhark
src/Futhark/Representation/AST/RetType.hs
isc
-- | Given shape parameter names and value parameter types, produce the -- types of arguments accepted. expectedTypes :: Typed t => [VName] -> [t] -> [SubExp] -> [Type] expectedTypes shapes value_ts args = map (correctDims . typeOf) value_ts where parammap :: M.Map VName SubExp parammap = M.fromList $ zip...
632
expectedTypes :: Typed t => [VName] -> [t] -> [SubExp] -> [Type] expectedTypes shapes value_ts args = map (correctDims . typeOf) value_ts where parammap :: M.Map VName SubExp parammap = M.fromList $ zip shapes args correctDims t = t `setArrayShape` Shape (map correctDim ...
528
expectedTypes shapes value_ts args = map (correctDims . typeOf) value_ts where parammap :: M.Map VName SubExp parammap = M.fromList $ zip shapes args correctDims t = t `setArrayShape` Shape (map correctDim $ shapeDims $ arrayShape t) correctDim (Constant v) = ...
463
true
true
8
10
203
184
94
90
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/RefType.hs
bsd-3-clause
subsFree m s z@(_, _, _) (RFun x t t' r) = RFun x (subsFree m s z t) (subsFree m s z t') r
92
subsFree m s z@(_, _, _) (RFun x t t' r) = RFun x (subsFree m s z t) (subsFree m s z t') r
92
subsFree m s z@(_, _, _) (RFun x t t' r) = RFun x (subsFree m s z t) (subsFree m s z t') r
92
false
false
0
7
26
72
37
35
null
null
buildsome/buildsome
src/Lib/FilePath.hs
gpl-2.0
onFst :: (a -> a') -> (a, b) -> (a', b) onFst f (x, y) = (f x, y)
65
onFst :: (a -> a') -> (a, b) -> (a', b) onFst f (x, y) = (f x, y)
65
onFst f (x, y) = (f x, y)
25
false
true
0
7
18
58
33
25
null
null
miameng/courseography
app/WebParsing/UtsgJsonParser.hs
gpl-3.0
getNestedTimeSlots :: [Maybe T.Text] -> [Maybe T.Text] -> [Maybe T.Text] -> [[Time]] getNestedTimeSlots [Nothing] [Nothing] [Nothing] = [[]]
140
getNestedTimeSlots :: [Maybe T.Text] -> [Maybe T.Text] -> [Maybe T.Text] -> [[Time]] getNestedTimeSlots [Nothing] [Nothing] [Nothing] = [[]]
140
getNestedTimeSlots [Nothing] [Nothing] [Nothing] = [[]]
55
false
true
0
10
17
74
40
34
null
null
robdockins/edison
edison-core/src/Data/Edison/Seq/JoinList.hs
mit
lheadM (L x) = return x
23
lheadM (L x) = return x
23
lheadM (L x) = return x
23
false
false
0
7
5
18
8
10
null
null
kylcarte/threepenny-extra
src/Graphics/UI/Threepenny/Extra.hs
bsd-3-clause
-- Safe list indexing (?!) :: [a] -> Int -> Maybe a (?!) = \case [] -> pure Nothing a : as -> \case 0 -> Just a n | n > 0 -> as ?! pred n _ -> Nothing
186
(?!) :: [a] -> Int -> Maybe a (?!) = \case [] -> pure Nothing a : as -> \case 0 -> Just a n | n > 0 -> as ?! pred n _ -> Nothing
164
(?!) = \case [] -> pure Nothing a : as -> \case 0 -> Just a n | n > 0 -> as ?! pred n _ -> Nothing
134
true
true
0
14
76
99
48
51
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Check.hs
bsd-3-clause
make_con :: Pat Id -> ExhaustivePat -> ExhaustivePat make_con (ConPatOut{ pat_con = L _ (RealDataCon id) }) (lp:lq:ps, constraints) | return_list id q = (noLoc (make_list lp q) : ps, constraints) | isInfixCon id = (nlInfixConPat (getName id) lp lq : ps, constraints) where q = unLoc lq
302
make_con :: Pat Id -> ExhaustivePat -> ExhaustivePat make_con (ConPatOut{ pat_con = L _ (RealDataCon id) }) (lp:lq:ps, constraints) | return_list id q = (noLoc (make_list lp q) : ps, constraints) | isInfixCon id = (nlInfixConPat (getName id) lp lq : ps, constraints) where q = unLoc lq
302
make_con (ConPatOut{ pat_con = L _ (RealDataCon id) }) (lp:lq:ps, constraints) | return_list id q = (noLoc (make_list lp q) : ps, constraints) | isInfixCon id = (nlInfixConPat (getName id) lp lq : ps, constraints) where q = unLoc lq
249
false
true
0
12
64
141
70
71
null
null
saep/neil
src/Paper/Main.hs
bsd-3-clause
process "graph" files = do root <- settingsDir files let res = root </> "graph.png" graphCreate (root </> "graph.txt") res (allFiles files) putStrLn $ "Written graph, " ++ res #endif
198
process "graph" files = do root <- settingsDir files let res = root </> "graph.png" graphCreate (root </> "graph.txt") res (allFiles files) putStrLn $ "Written graph, " ++ res #endif
198
process "graph" files = do root <- settingsDir files let res = root </> "graph.png" graphCreate (root </> "graph.txt") res (allFiles files) putStrLn $ "Written graph, " ++ res #endif
198
false
false
0
10
45
69
32
37
null
null
chrisdone/ace
src/ACE/Parsers.hs
bsd-3-clause
-- | A prepositional noun phrase coordination. pp = PP <$> preposition <*> npCoord'
90
pp = PP <$> preposition <*> npCoord'
43
pp = PP <$> preposition <*> npCoord'
43
true
false
6
5
20
23
10
13
null
null
olsner/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
-- | Generates the in-scope set for the 'TCvSubst' from the types in the incoming -- environment. No CoVars, please! zipTvSubst :: [TyVar] -> [Type] -> TCvSubst zipTvSubst tvs tys | debugIsOn , not (all isTyVar tvs) || length tvs /= length tys = pprTrace "zipTvSubst" (ppr tvs $$ ppr tys) emptyTCvSubst | otherwi...
533
zipTvSubst :: [TyVar] -> [Type] -> TCvSubst zipTvSubst tvs tys | debugIsOn , not (all isTyVar tvs) || length tvs /= length tys = pprTrace "zipTvSubst" (ppr tvs $$ ppr tys) emptyTCvSubst | otherwise = mkTvSubst (mkInScopeSet (tyCoVarsOfTypes tys)) tenv where tenv = zipTyEnv tvs tys -- | Generates the in...
416
zipTvSubst tvs tys | debugIsOn , not (all isTyVar tvs) || length tvs /= length tys = pprTrace "zipTvSubst" (ppr tvs $$ ppr tys) emptyTCvSubst | otherwise = mkTvSubst (mkInScopeSet (tyCoVarsOfTypes tys)) tenv where tenv = zipTyEnv tvs tys -- | Generates the in-scope set for the 'TCvSubst' from the types...
372
true
true
0
12
103
130
63
67
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Elements/Elements.hs
bsd-3-clause
-- | A short-hand notion for @ el\' \"dd\" ... @ ddN' ∷ forall t m a. DomBuilder t m ⇒ m a → m (Element EventResult (DomBuilderSpace m) t, a) ddN' = el' "dd"
157
ddN' ∷ forall t m a. DomBuilder t m ⇒ m a → m (Element EventResult (DomBuilderSpace m) t, a) ddN' = el' "dd"
108
ddN' = el' "dd"
15
true
true
0
13
34
66
32
34
null
null
MathiasVP/syntax-checker-checker
numberofnodes.hs
mit
numberOfNodesExpression (LambdaExpression lambda) = numberOfNodesLambda lambda
80
numberOfNodesExpression (LambdaExpression lambda) = numberOfNodesLambda lambda
80
numberOfNodesExpression (LambdaExpression lambda) = numberOfNodesLambda lambda
80
false
false
0
6
7
19
8
11
null
null
allanderek/ipclib
Language/Prism/Print.hs
gpl-2.0
printPrismModelKind PrismDtmc = "dtmc"
38
printPrismModelKind PrismDtmc = "dtmc"
38
printPrismModelKind PrismDtmc = "dtmc"
38
false
false
0
5
3
9
4
5
null
null
mvoidex/carma-sync
src/Carma/ModelTables.hs
bsd-3-clause
execute :: (MonadLog m, P.ToRow q) => P.Connection -> P.Query -> q -> m () execute con q args = do bs <- liftIO $ P.formatQuery con q args log Trace $ T.decodeUtf8 bs liftIO $ P.execute con q args return ()
222
execute :: (MonadLog m, P.ToRow q) => P.Connection -> P.Query -> q -> m () execute con q args = do bs <- liftIO $ P.formatQuery con q args log Trace $ T.decodeUtf8 bs liftIO $ P.execute con q args return ()
222
execute con q args = do bs <- liftIO $ P.formatQuery con q args log Trace $ T.decodeUtf8 bs liftIO $ P.execute con q args return ()
147
false
true
0
10
57
115
53
62
null
null
xdlin/dotfiles
xmonad/.xmonad/lib/Solarized.hs
mit
solarizedBase02 = "#073642"
29
solarizedBase02 = "#073642"
29
solarizedBase02 = "#073642"
29
false
false
0
4
4
6
3
3
null
null
alpmestan/hnn
AI/HNN/FF/ComplexNetwork.hs
bsd-3-clause
conju (x:+y) = x:+(-y)
22
conju (x:+y) = x:+(-y)
22
conju (x:+y) = x:+(-y)
22
false
false
0
7
3
26
13
13
null
null
badi/super-user-spark
src/Compiler/Internal.hs
mit
compileDec (Alternatives ds) = do op <- gets state_outof_prefix modify (\s -> s { state_outof_prefix = op ++ [Alts ds] })
129
compileDec (Alternatives ds) = do op <- gets state_outof_prefix modify (\s -> s { state_outof_prefix = op ++ [Alts ds] })
129
compileDec (Alternatives ds) = do op <- gets state_outof_prefix modify (\s -> s { state_outof_prefix = op ++ [Alts ds] })
129
false
false
0
14
28
57
28
29
null
null
GaloisInc/sk-dev-platform
user/sklite/tests/LayoutValidationTests.hs
bsd-3-clause
unidirInvalidTo :: Layout unidirInvalidTo = let ch = Channel "c1" "invalid" 1024 1 "chan" False c1 = Cell "c1" "" "prog" CellMain 10000 10000 [] [] [] in Layout [c1] [] 100 [ch]
193
unidirInvalidTo :: Layout unidirInvalidTo = let ch = Channel "c1" "invalid" 1024 1 "chan" False c1 = Cell "c1" "" "prog" CellMain 10000 10000 [] [] [] in Layout [c1] [] 100 [ch]
193
unidirInvalidTo = let ch = Channel "c1" "invalid" 1024 1 "chan" False c1 = Cell "c1" "" "prog" CellMain 10000 10000 [] [] [] in Layout [c1] [] 100 [ch]
167
false
true
0
10
48
82
41
41
null
null
jystic/ssa-anf
src/Util/Pretty.hs
bsd-3-clause
num :: Pretty n => n -> Doc num x = dullred (pretty x)
54
num :: Pretty n => n -> Doc num x = dullred (pretty x)
54
num x = dullred (pretty x)
26
false
true
0
8
13
39
17
22
null
null
jaiyalas/sdl2-cairo-image
playground/try.hs
mit
imageTypeToString LBM = "LBM"
29
imageTypeToString LBM = "LBM"
29
imageTypeToString LBM = "LBM"
29
false
false
0
5
3
9
4
5
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Advertiser group collection. aglrAdvertiserGroups :: Lens' AdvertiserGroupsListResponse [AdvertiserGroup] aglrAdvertiserGroups = lens _aglrAdvertiserGroups (\ s a -> s{_aglrAdvertiserGroups = a}) . _Default . _Coerce
241
aglrAdvertiserGroups :: Lens' AdvertiserGroupsListResponse [AdvertiserGroup] aglrAdvertiserGroups = lens _aglrAdvertiserGroups (\ s a -> s{_aglrAdvertiserGroups = a}) . _Default . _Coerce
207
aglrAdvertiserGroups = lens _aglrAdvertiserGroups (\ s a -> s{_aglrAdvertiserGroups = a}) . _Default . _Coerce
130
true
true
3
8
44
58
28
30
null
null
jeremy-w/Idris-dev
src/Idris/Core/ProofState.hs
bsd-3-clause
regret :: RunTactic regret ctxt env (Bind x (Hole t) sc) | noOccurrence x sc = do action (\ps -> let hs = holes ps in ps { holes = hs \\ [x] }) return sc
190
regret :: RunTactic regret ctxt env (Bind x (Hole t) sc) | noOccurrence x sc = do action (\ps -> let hs = holes ps in ps { holes = hs \\ [x] }) return sc
190
regret ctxt env (Bind x (Hole t) sc) | noOccurrence x sc = do action (\ps -> let hs = holes ps in ps { holes = hs \\ [x] }) return sc
170
false
true
1
17
72
101
45
56
null
null
dlgd/GA
test/Spec.hs
bsd-3-clause
main :: IO () main = defaultMain properties
43
main :: IO () main = defaultMain properties
43
main = defaultMain properties
29
false
true
1
6
7
22
9
13
null
null
m-alvarez/jhc
src/Cmm/OpEval.hs
mit
convOp I2I t1 t2 | t1 `tyLte` t2 = Just Sx
42
convOp I2I t1 t2 | t1 `tyLte` t2 = Just Sx
42
convOp I2I t1 t2 | t1 `tyLte` t2 = Just Sx
42
false
false
0
8
10
28
13
15
null
null
sumitsahrawat/plot-gtk-ui
lib/Graphics/Rendering/Plot/Gtk/UI.hs
gpl-2.0
plotStatic :: (Double -> Double) -- ^ Function to plot -> (Double, Double) -- ^ Range for abscissa (horizontal axis) -> IO () plotStatic func r = let f :: Vec (S Z) Double -> Double f = func . V.head in plotDynamic f ((V.convert . V.Only $ r) :: Vec (S Z) (Double, Double))
307
plotStatic :: (Double -> Double) -- ^ Function to plot -> (Double, Double) -- ^ Range for abscissa (horizontal axis) -> IO () plotStatic func r = let f :: Vec (S Z) Double -> Double f = func . V.head in plotDynamic f ((V.convert . V.Only $ r) :: Vec (S Z) (Double, Double))
307
plotStatic func r = let f :: Vec (S Z) Double -> Double f = func . V.head in plotDynamic f ((V.convert . V.Only $ r) :: Vec (S Z) (Double, Double))
157
false
true
0
12
88
130
66
64
null
null
mbakke/ganeti
src/Ganeti/DataCollectors/XenCpuLoad.hs
bsd-2-clause
-- | The category of this data collector. dcCategory :: Maybe DCCategory dcCategory = Nothing
93
dcCategory :: Maybe DCCategory dcCategory = Nothing
51
dcCategory = Nothing
20
true
true
0
5
14
15
8
7
null
null
philopon/philopon.github.io
site.hs
bsd-3-clause
-------------------------------------------------------------------------------- rootAddress :: String rootAddress = "http://philopon.github.io"
145
rootAddress :: String rootAddress = "http://philopon.github.io"
63
rootAddress = "http://philopon.github.io"
41
true
true
0
4
7
12
7
5
null
null
qrilka/xlsx
src/Codec/Xlsx/Writer.hs
mit
qName :: Text -> Text -> Text -> Name qName n ns p = Name { nameLocalName = n , nameNamespace = Just ns , namePrefix = Just p }
147
qName :: Text -> Text -> Text -> Name qName n ns p = Name { nameLocalName = n , nameNamespace = Just ns , namePrefix = Just p }
147
qName n ns p = Name { nameLocalName = n , nameNamespace = Just ns , namePrefix = Just p }
109
false
true
0
8
49
60
31
29
null
null
leshchevds/ganeti
test/hs/Test/Ganeti/Types.hs
bsd-2-clause
prop_AllocPolicy_serialisation :: AllocPolicy -> Property prop_AllocPolicy_serialisation = testSerialisation
108
prop_AllocPolicy_serialisation :: AllocPolicy -> Property prop_AllocPolicy_serialisation = testSerialisation
108
prop_AllocPolicy_serialisation = testSerialisation
50
false
true
0
5
7
15
8
7
null
null
aaronc/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
showCG (MN i s) = "{" ++ T.unpack s ++ show i ++ "}"
52
showCG (MN i s) = "{" ++ T.unpack s ++ show i ++ "}"
52
showCG (MN i s) = "{" ++ T.unpack s ++ show i ++ "}"
52
false
false
4
6
13
40
17
23
null
null
mgsloan/yesod-media-simple
src/Yesod/Media/Simple.hs
mit
imageFromDynamicImage (ImageCMYK16 img) f = f img
49
imageFromDynamicImage (ImageCMYK16 img) f = f img
49
imageFromDynamicImage (ImageCMYK16 img) f = f img
49
false
false
0
7
6
20
9
11
null
null
joelburget/haskell-ipld
src/Network/IPLD/Example.hs
bsd-3-clause
chunkedFileExample :: Value chunkedFileExample = object [ "size" .= "1424119" , "subfiles" .= array [ object [ -- "link" .= merkleLink "QmAAA...", "size" .= "100324" ] , object [ -- "link" .= merkleLink "QmAA1...", "size" .= "120345", "repeat" .= "10...
439
chunkedFileExample :: Value chunkedFileExample = object [ "size" .= "1424119" , "subfiles" .= array [ object [ -- "link" .= merkleLink "QmAAA...", "size" .= "100324" ] , object [ -- "link" .= merkleLink "QmAA1...", "size" .= "120345", "repeat" .= "10...
439
chunkedFileExample = object [ "size" .= "1424119" , "subfiles" .= array [ object [ -- "link" .= merkleLink "QmAAA...", "size" .= "100324" ] , object [ -- "link" .= merkleLink "QmAA1...", "size" .= "120345", "repeat" .= "10" ] , object ...
411
false
true
0
11
168
80
44
36
null
null
haskell-pkg-janitors/feed
Text/Feed/Constructor.hs
bsd-3-clause
withFeedGenerator :: FeedSetter (Text,Maybe URLText) withFeedGenerator (gen,mbURI) fe = case fe of Feed.Types.AtomFeed f -> Feed.Types.AtomFeed $ f{Atom.feedGenerator=Just ((Atom.nullGenerator gen){Atom.genURI=mbURI})} Feed.Types.RSSFeed f -> Feed.Types.RSSFeed f{rssChannel=(rssChannel...
1,314
withFeedGenerator :: FeedSetter (Text,Maybe URLText) withFeedGenerator (gen,mbURI) fe = case fe of Feed.Types.AtomFeed f -> Feed.Types.AtomFeed $ f{Atom.feedGenerator=Just ((Atom.nullGenerator gen){Atom.genURI=mbURI})} Feed.Types.RSSFeed f -> Feed.Types.RSSFeed f{rssChannel=(rssChannel ...
1,313
withFeedGenerator (gen,mbURI) fe = case fe of Feed.Types.AtomFeed f -> Feed.Types.AtomFeed $ f{Atom.feedGenerator=Just ((Atom.nullGenerator gen){Atom.genURI=mbURI})} Feed.Types.RSSFeed f -> Feed.Types.RSSFeed f{rssChannel=(rssChannel f){rssGenerator=Just gen}} Feed.Types.RSS1Feed f ...
1,260
false
true
13
18
414
422
229
193
null
null
themad/hmpf
src/Main.hs
gpl-3.0
config :: Configuration config = Configuration { confPort = (8000::Int) &= help "Port to listen on" &= name "port" &= explicit, confStaticDir = ("static" :: FilePath) &= help "Static file directory" &= name "static" &= explicit &= typ "dir" } &= summary "hmpf v0.01 (C) 2014 themad, 0mark" &= progr...
329
config :: Configuration config = Configuration { confPort = (8000::Int) &= help "Port to listen on" &= name "port" &= explicit, confStaticDir = ("static" :: FilePath) &= help "Static file directory" &= name "static" &= explicit &= typ "dir" } &= summary "hmpf v0.01 (C) 2014 themad, 0mark" &= progr...
329
config = Configuration { confPort = (8000::Int) &= help "Port to listen on" &= name "port" &= explicit, confStaticDir = ("static" :: FilePath) &= help "Static file directory" &= name "static" &= explicit &= typ "dir" } &= summary "hmpf v0.01 (C) 2014 themad, 0mark" &= program "hmpf"
305
false
true
2
11
72
102
50
52
null
null
diogob/postgrest
test/Feature/BinaryJwtSecretSpec.hs
mit
-- }}} spec :: SpecWith Application spec = describe "server started with binary JWT secret" $ -- this test will stop working 9999999999s after the UNIX EPOCH it "succeeds with jwt token encoded with a binary secret" $ do let auth = authHeaderJWT "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk5OTk5OTk5OTksIn...
499
spec :: SpecWith Application spec = describe "server started with binary JWT secret" $ -- this test will stop working 9999999999s after the UNIX EPOCH it "succeeds with jwt token encoded with a binary secret" $ do let auth = authHeaderJWT "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk5OTk5OTk5OTksInJvbGUiOi...
491
spec = describe "server started with binary JWT secret" $ -- this test will stop working 9999999999s after the UNIX EPOCH it "succeeds with jwt token encoded with a binary secret" $ do let auth = authHeaderJWT "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk5OTk5OTk5OTksInJvbGUiOiJwb3N0Z3Jlc3RfdGVzdF9hdXRob3I...
462
true
true
0
11
70
63
31
32
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F22.hs
bsd-3-clause
ptr_glProgramUniformMatrix2fvEXT :: FunPtr (GLuint -> GLint -> GLsizei -> GLboolean -> Ptr GLfloat -> IO ()) ptr_glProgramUniformMatrix2fvEXT = unsafePerformIO $ getCommand "glProgramUniformMatrix2fvEXT"
203
ptr_glProgramUniformMatrix2fvEXT :: FunPtr (GLuint -> GLint -> GLsizei -> GLboolean -> Ptr GLfloat -> IO ()) ptr_glProgramUniformMatrix2fvEXT = unsafePerformIO $ getCommand "glProgramUniformMatrix2fvEXT"
203
ptr_glProgramUniformMatrix2fvEXT = unsafePerformIO $ getCommand "glProgramUniformMatrix2fvEXT"
94
false
true
0
13
21
52
25
27
null
null
y-kamiya/parallel-concurrent-haskell
src/Cancel/Main.hs
gpl-2.0
async :: IO a -> IO (Async a) async action = do mvar <- newEmptyMVar tid <- forkIO $ do e <- try action putMVar mvar e return $ Async tid mvar
156
async :: IO a -> IO (Async a) async action = do mvar <- newEmptyMVar tid <- forkIO $ do e <- try action putMVar mvar e return $ Async tid mvar
156
async action = do mvar <- newEmptyMVar tid <- forkIO $ do e <- try action putMVar mvar e return $ Async tid mvar
126
false
true
0
12
45
78
34
44
null
null
AlexanderPankiv/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) = sdocWithDynFlags $ \dflags -> case topInfoTable proc of Nothing -> case blocks of [] -> -- special case for split markers: pprLabel lbl blocks -> -- special case for code without info table: pprSe...
1,535
pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) = sdocWithDynFlags $ \dflags -> case topInfoTable proc of Nothing -> case blocks of [] -> -- special case for split markers: pprLabel lbl blocks -> -- special case for code without info table: pprSe...
1,535
pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) = sdocWithDynFlags $ \dflags -> case topInfoTable proc of Nothing -> case blocks of [] -> -- special case for split markers: pprLabel lbl blocks -> -- special case for code without info table: pprSe...
1,535
false
false
3
16
516
332
163
169
null
null
yiannist/ganeti
src/Ganeti/HTools/Loader.hs
bsd-2-clause
-- | Update instance with desired location tags list. updateDesiredLocationTags :: [String] -> Instance.Instance -> Instance.Instance updateDesiredLocationTags tl inst = let allTags = Instance.allTags inst dsrdLocTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags in inst { Instance.dsrdLocTags = Set.fr...
340
updateDesiredLocationTags :: [String] -> Instance.Instance -> Instance.Instance updateDesiredLocationTags tl inst = let allTags = Instance.allTags inst dsrdLocTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags in inst { Instance.dsrdLocTags = Set.fromList dsrdLocTags }
286
updateDesiredLocationTags tl inst = let allTags = Instance.allTags inst dsrdLocTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags in inst { Instance.dsrdLocTags = Set.fromList dsrdLocTags }
206
true
true
0
13
52
92
49
43
null
null
beni55/old-openresty
haskell/src/OpenResty/Request.hs
bsd-3-clause
parsePath :: B.ByteString -> CGI (B.ByteString, B.ByteString, [B.ByteString], B.ByteString) parsePath path = if B.isPrefixOf "/=/" path then splitPath $ B.drop 3 path else throwDyn $ URIError "URL must be preceded by \"/=/\"."
234
parsePath :: B.ByteString -> CGI (B.ByteString, B.ByteString, [B.ByteString], B.ByteString) parsePath path = if B.isPrefixOf "/=/" path then splitPath $ B.drop 3 path else throwDyn $ URIError "URL must be preceded by \"/=/\"."
234
parsePath path = if B.isPrefixOf "/=/" path then splitPath $ B.drop 3 path else throwDyn $ URIError "URL must be preceded by \"/=/\"."
142
false
true
0
9
39
79
41
38
null
null
dlewissandy/lambda-blas
test/Gen.hs
bsd-3-clause
-- | Generate a floating number between approximately epsilon/2 and -- the smallest squareable non-denormalized number of the given type. genSmall :: (Random a, RealFloat a) => a -> Gen a genSmall x = choose $ smallRange x
222
genSmall :: (Random a, RealFloat a) => a -> Gen a genSmall x = choose $ smallRange x
84
genSmall x = choose $ smallRange x
34
true
true
0
8
37
49
24
25
null
null
leroux/bf-interpreter
bf.hs
bsd-3-clause
-- `<` | decrement the data pointer (to the point to the next cell to the left). (^<) :: Cells a -> Cells a (^<) ([], _, _) = error "(^<): hit lower bound"
155
(^<) :: Cells a -> Cells a (^<) ([], _, _) = error "(^<): hit lower bound"
74
(^<) ([], _, _) = error "(^<): hit lower bound"
47
true
true
0
7
33
43
24
19
null
null
aconbere/shrimp
Shrimp.hs
mit
removeHead' handle h = do t <- hGetLine handle if t == "" then (return h) else (removeHead' handle (h ++ [t]))
134
removeHead' handle h = do t <- hGetLine handle if t == "" then (return h) else (removeHead' handle (h ++ [t]))
134
removeHead' handle h = do t <- hGetLine handle if t == "" then (return h) else (removeHead' handle (h ++ [t]))
134
false
false
0
12
45
60
30
30
null
null
jgoerzen/gopherbot
DB.hs
gpl-2.0
-- Don't care if the insert fails; that means we already know of it. queueItemNL :: Connection -> GAddress -> IO () queueItemNL conn g = handleSqlError $ queueItemNLNT conn g NotVisited ""
198
queueItemNL :: Connection -> GAddress -> IO () queueItemNL conn g = handleSqlError $ queueItemNLNT conn g NotVisited ""
123
queueItemNL conn g = handleSqlError $ queueItemNLNT conn g NotVisited ""
76
true
true
0
9
42
49
22
27
null
null
pbrandwijk/robatira
src/Robatira/Model/Game.hs
gpl-3.0
removeCurrentPlayer :: Game -> IO Game removeCurrentPlayer (Game ds ts cp ops) = do nDs <- shuffle $ ds ++ (hand cp) let nCp = head ops let nOps = tail ops return (Game nDs ts nCp nOps) -- The game is over when the current player has no cards left after throwing a -- card on the throwing stack. In this case t...
484
removeCurrentPlayer :: Game -> IO Game removeCurrentPlayer (Game ds ts cp ops) = do nDs <- shuffle $ ds ++ (hand cp) let nCp = head ops let nOps = tail ops return (Game nDs ts nCp nOps) -- The game is over when the current player has no cards left after throwing a -- card on the throwing stack. In this case t...
484
removeCurrentPlayer (Game ds ts cp ops) = do nDs <- shuffle $ ds ++ (hand cp) let nCp = head ops let nOps = tail ops return (Game nDs ts nCp nOps) -- The game is over when the current player has no cards left after throwing a -- card on the throwing stack. In this case the current player is the winner. -- The...
445
false
true
0
11
103
105
49
56
null
null
rleshchinskiy/vector
Data/Vector/Generic.hs
bsd-3-clause
elem x = Bundle.elem x . stream
31
elem x = Bundle.elem x . stream
31
elem x = Bundle.elem x . stream
31
false
false
0
7
6
18
8
10
null
null
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/CountPendingDecisionTasks.hs
mpl-2.0
-- | The number of tasks in the task list. cpdtrCount :: Lens' CountPendingDecisionTasksResponse Natural cpdtrCount = lens _cpdtrCount (\s a -> s { _cpdtrCount = a }) . _Nat
173
cpdtrCount :: Lens' CountPendingDecisionTasksResponse Natural cpdtrCount = lens _cpdtrCount (\s a -> s { _cpdtrCount = a }) . _Nat
130
cpdtrCount = lens _cpdtrCount (\s a -> s { _cpdtrCount = a }) . _Nat
68
true
true
0
10
29
44
24
20
null
null
caiorss/Functional-Programming
haskell/rwh/ch05/SimpleJSON2.hs
unlicense
isNull :: JValue -> Bool isNull JNull = True
45
isNull :: JValue -> Bool isNull JNull = True
44
isNull JNull = True
19
false
true
0
7
9
24
10
14
null
null
nomeata/ghc
compiler/nativeGen/PPC/Regs.hs
bsd-3-clause
freeReg REG_F4 = fastBool False
31
freeReg REG_F4 = fastBool False
31
freeReg REG_F4 = fastBool False
31
false
false
1
5
4
15
5
10
null
null
brendanhay/gogol
gogol-games-management/gen/Network/Google/GamesManagement/Types/Product.hs
mpl-2.0
-- | Uniquely identifies the type of this resource. Value is always the fixed -- string \`gamesManagement#achievementResetMultipleForAllRequest\`. armfarKind :: Lens' AchievementResetMultipleForAllRequest (Maybe Text) armfarKind = lens _armfarKind (\ s a -> s{_armfarKind = a})
279
armfarKind :: Lens' AchievementResetMultipleForAllRequest (Maybe Text) armfarKind = lens _armfarKind (\ s a -> s{_armfarKind = a})
132
armfarKind = lens _armfarKind (\ s a -> s{_armfarKind = a})
61
true
true
1
9
35
53
26
27
null
null
lukemaurer/sequent-core
src/Language/SequentCore/Annot.hs
bsd-3-clause
ppr_binds_with :: (OutputableBndr b, Outputable a) => SDoc -> SDoc -> SDoc -> [AnnBind b a] -> SDoc ppr_binds_with open mid close binds = vcat $ intersperse space $ ppr_block open mid close (map ppr binds)
205
ppr_binds_with :: (OutputableBndr b, Outputable a) => SDoc -> SDoc -> SDoc -> [AnnBind b a] -> SDoc ppr_binds_with open mid close binds = vcat $ intersperse space $ ppr_block open mid close (map ppr binds)
205
ppr_binds_with open mid close binds = vcat $ intersperse space $ ppr_block open mid close (map ppr binds)
105
false
true
0
11
35
87
43
44
null
null
OS2World/DEV-UTIL-HUGS
oldlib/LeftistHeap.hs
bsd-3-clause
lookupWithDefault :: Ord a => a -> Heap a -> a -> a lookupWithDefault = lookupWithDefaultUsingLookupM
101
lookupWithDefault :: Ord a => a -> Heap a -> a -> a lookupWithDefault = lookupWithDefaultUsingLookupM
101
lookupWithDefault = lookupWithDefaultUsingLookupM
49
false
true
0
8
15
33
16
17
null
null
gcampax/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
unliftedTypeKindTyCon = mkKindTyCon unliftedTypeKindTyConName superKind
71
unliftedTypeKindTyCon = mkKindTyCon unliftedTypeKindTyConName superKind
71
unliftedTypeKindTyCon = mkKindTyCon unliftedTypeKindTyConName superKind
71
false
false
0
5
4
11
5
6
null
null
sdiehl/ghc
testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs
bsd-3-clause
changeBind :: UniqFM [ReplaceWith] -> Maybe String -> CoreBind -> CoreM CoreBind changeBind anns mb_replacement (NonRec b e) = changeBindPr anns mb_replacement b e >>= (return . uncurry NonRec)
193
changeBind :: UniqFM [ReplaceWith] -> Maybe String -> CoreBind -> CoreM CoreBind changeBind anns mb_replacement (NonRec b e) = changeBindPr anns mb_replacement b e >>= (return . uncurry NonRec)
193
changeBind anns mb_replacement (NonRec b e) = changeBindPr anns mb_replacement b e >>= (return . uncurry NonRec)
112
false
true
0
8
28
73
35
38
null
null
luzhuomi/xhaskell
Language/XHaskell/TypeSpec.hs
bsd-3-clause
inj cenv [] r1 r2 | posEps r1 = [| \v -> if $(isEmpty r1) v then $(mkEmpty r2) else error ("inj is given an empty literal set rt " ++ $(liftString $ show r1) ++ " <=" ++ $(liftString $ show r2)) |] | otherwise = [| erro...
361
inj cenv [] r1 r2 | posEps r1 = [| \v -> if $(isEmpty r1) v then $(mkEmpty r2) else error ("inj is given an empty literal set rt " ++ $(liftString $ show r1) ++ " <=" ++ $(liftString $ show r2)) |] | otherwise = [| erro...
361
inj cenv [] r1 r2 | posEps r1 = [| \v -> if $(isEmpty r1) v then $(mkEmpty r2) else error ("inj is given an empty literal set rt " ++ $(liftString $ show r1) ++ " <=" ++ $(liftString $ show r2)) |] | otherwise = [| erro...
361
false
false
0
8
157
42
21
21
null
null
pjones/byline
src/Byline/Internal/Color.hs
bsd-2-clause
vivid c = c
11
vivid c = c
11
vivid c = c
11
false
false
0
5
3
9
4
5
null
null
spechub/Hets
Common/Lexer.hs
gpl-2.0
scanUnderlineWord :: CharParser st String scanUnderlineWord = singleUnderline <:> many1 scanLPD
95
scanUnderlineWord :: CharParser st String scanUnderlineWord = singleUnderline <:> many1 scanLPD
95
scanUnderlineWord = singleUnderline <:> many1 scanLPD
53
false
true
0
6
10
23
11
12
null
null
mcschroeder/ghc
compiler/stgSyn/StgLint.hs
bsd-3-clause
checkInScope :: Id -> LintM () checkInScope id = LintM $ \loc scope errs -> if isLocalId id && not (id `elemVarSet` scope) then ((), addErr errs (hsep [ppr id, text "is out of scope"]) loc) else ((), errs)
226
checkInScope :: Id -> LintM () checkInScope id = LintM $ \loc scope errs -> if isLocalId id && not (id `elemVarSet` scope) then ((), addErr errs (hsep [ppr id, text "is out of scope"]) loc) else ((), errs)
226
checkInScope id = LintM $ \loc scope errs -> if isLocalId id && not (id `elemVarSet` scope) then ((), addErr errs (hsep [ppr id, text "is out of scope"]) loc) else ((), errs)
195
false
true
0
13
59
109
56
53
null
null
bgaster/blocks
Blocks.hs
mit
printBoard :: Board -> IO () printBoard = mapM_ (\row -> printRow row >> putStr "\n") where printRow = mapM_ (\v -> putStr (show v) >> putStr " ")
147
printBoard :: Board -> IO () printBoard = mapM_ (\row -> printRow row >> putStr "\n") where printRow = mapM_ (\v -> putStr (show v) >> putStr " ")
147
printBoard = mapM_ (\row -> printRow row >> putStr "\n") where printRow = mapM_ (\v -> putStr (show v) >> putStr " ")
118
false
true
0
11
29
76
37
39
null
null
flipstone/orville
orville-postgresql/src/Database/Orville/PostgreSQL/Internal/RelationalMap.hs
mit
prefixMap prefix (RM_Apply rmF rmA) = RM_Apply (prefixMap prefix rmF) (prefixMap prefix rmA)
94
prefixMap prefix (RM_Apply rmF rmA) = RM_Apply (prefixMap prefix rmF) (prefixMap prefix rmA)
94
prefixMap prefix (RM_Apply rmF rmA) = RM_Apply (prefixMap prefix rmF) (prefixMap prefix rmA)
94
false
false
0
7
14
40
19
21
null
null
hepek/MPEG-TS
Codec/Video/MpegTS.hs
gpl-3.0
esTag 34 = FmxBufferSize_descriptor
36
esTag 34 = FmxBufferSize_descriptor
36
esTag 34 = FmxBufferSize_descriptor
36
false
false
0
5
4
9
4
5
null
null
snapframework/io-streams
src/System/IO/Streams/ByteString.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | Splits a bytestring 'InputStream' into words. See 'splitOn' and -- 'Prelude.words'. -- -- Example: -- -- @ -- ghci> is \<- Streams.'System.IO.Streams.fromList' [\"Hello, world!\"] >>= Streams.'words' -- ghci> replicateM 3 (Streams.'read...
603
words :: InputStream ByteString -> IO (InputStream ByteString) words = splitOn isSpace >=> filterM (return . not . S.all isSpace)
129
words = splitOn isSpace >=> filterM (return . not . S.all isSpace)
66
true
true
0
10
80
67
39
28
null
null
sdiehl/ghc
compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs
bsd-3-clause
-- handle a branch target. joinToTargets' block_live new_blocks block_id instr (dest:dests) = do -- get the map of where the vregs are stored on entry to each basic block. block_assig <- getBlockAssigR -- get the assignment on entry to the branch instruction. assig <- get...
1,603
joinToTargets' block_live new_blocks block_id instr (dest:dests) = do -- get the map of where the vregs are stored on entry to each basic block. block_assig <- getBlockAssigR -- get the assignment on entry to the branch instruction. assig <- getAssigR -- adjust t...
1,576
joinToTargets' block_live new_blocks block_id instr (dest:dests) = do -- get the map of where the vregs are stored on entry to each basic block. block_assig <- getBlockAssigR -- get the assignment on entry to the branch instruction. assig <- getAssigR -- adjust t...
1,576
true
false
0
14
593
224
111
113
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp AtomicallyOp = _ILIT(333)
38
tagOf_PrimOp AtomicallyOp = _ILIT(333)
38
tagOf_PrimOp AtomicallyOp = _ILIT(333)
38
false
false
0
6
3
16
7
9
null
null
vituscze/logic
src/Logic/PrenexTree.hs
bsd-3-clause
swapAll :: PrenexTree a -> PrenexTree a swapAll Nil = Nil
69
swapAll :: PrenexTree a -> PrenexTree a swapAll Nil = Nil
69
swapAll Nil = Nil
29
false
true
0
6
22
28
12
16
null
null
icyfork/shellcheck
ShellCheck/Parser.hs
gpl-3.0
readExtglobPart = do id <- getNextId x <- many (readExtglobGroup <|> readNormalWordPart "" <|> readSpacePart <|> readExtglobLiteral) return $ T_NormalWord id x where readExtglobGroup = do id <- getNextId char '(' contents <- readExtglobPart `sepBy` char '|' char ')' ...
481
readExtglobPart = do id <- getNextId x <- many (readExtglobGroup <|> readNormalWordPart "" <|> readSpacePart <|> readExtglobLiteral) return $ T_NormalWord id x where readExtglobGroup = do id <- getNextId char '(' contents <- readExtglobPart `sepBy` char '|' char ')' ...
481
readExtglobPart = do id <- getNextId x <- many (readExtglobGroup <|> readNormalWordPart "" <|> readSpacePart <|> readExtglobLiteral) return $ T_NormalWord id x where readExtglobGroup = do id <- getNextId char '(' contents <- readExtglobPart `sepBy` char '|' char ')' ...
481
false
false
3
13
146
160
67
93
null
null
amccausl/Swish
Swish/HaskellUtils/LookupMapTest.hs
lgpl-2.1
rlm00 :: RevTestMap rlm00 = reverseLookupMap lm00
50
rlm00 :: RevTestMap rlm00 = reverseLookupMap lm00
49
rlm00 = reverseLookupMap lm00
29
false
true
0
6
7
21
8
13
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/IDBDatabase.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase.createObjectStore Mozilla IDBDatabase.createObjectStore documentation> createObjectStore_ :: (MonadDOM m, ToJSString name) => IDBDatabase -> name -> Maybe IDBObjectStoreParameters -> m () createObjectStore_ self ...
450
createObjectStore_ :: (MonadDOM m, ToJSString name) => IDBDatabase -> name -> Maybe IDBObjectStoreParameters -> m () createObjectStore_ self name parameters = liftDOM (void (self ^. jsf "createObjectStore" [toJSVal name, toJSVal parameters]))
311
createObjectStore_ self name parameters = liftDOM (void (self ^. jsf "createObjectStore" [toJSVal name, toJSVal parameters]))
154
true
true
0
12
106
92
44
48
null
null
pmiddend/sneakybeaky
src/SneakyBeaky/Coord.hs
gpl-3.0
pairPlus :: Num a => (a,a) -> (a,a) -> (a,a) pairPlus (a1, a2) (b1, b2) = (a1 + b1, a2 + b2)
92
pairPlus :: Num a => (a,a) -> (a,a) -> (a,a) pairPlus (a1, a2) (b1, b2) = (a1 + b1, a2 + b2)
92
pairPlus (a1, a2) (b1, b2) = (a1 + b1, a2 + b2)
47
false
true
0
8
21
75
43
32
null
null
deweyvm/pone
src/Pone/Parser/Type.hs
gpl-3.0
extractError :: Show a => Either String a -> String extractError (Left err) = err
81
extractError :: Show a => Either String a -> String extractError (Left err) = err
81
extractError (Left err) = err
29
false
true
0
7
14
36
17
19
null
null
randen/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
renameLDecl :: LHsDecl Name -> RnM (LHsDecl DocName) renameLDecl (L loc d) = return . L loc =<< renameDecl d
108
renameLDecl :: LHsDecl Name -> RnM (LHsDecl DocName) renameLDecl (L loc d) = return . L loc =<< renameDecl d
108
renameLDecl (L loc d) = return . L loc =<< renameDecl d
55
false
true
1
9
19
57
25
32
null
null
sopvop/snap
test/suite/Snap/Snaplet/Internal/LensT/Tests.hs
bsd-3-clause
------------------------------------------------------------------------------ defaultState :: TestType defaultState = TestType 1 $ TestSubType 2 999 $ TestBotType 3
165
defaultState :: TestType defaultState = TestType 1 $ TestSubType 2 999 $ TestBotType 3
86
defaultState = TestType 1 $ TestSubType 2 999 $ TestBotType 3
61
true
true
0
7
14
31
15
16
null
null
michaelficarra/purescript
src/Language/PureScript/Docs/AsMarkdown.hs
mit
tell' :: String -> Docs tell' = tell . (:[])
44
tell' :: String -> Docs tell' = tell . (:[])
44
tell' = tell . (:[])
20
false
true
1
7
9
33
15
18
null
null
copumpkin/charm
src/Architecture/ARM/Instructions/UAL.hs
bsd-3-clause
cond :: a -> a -> Bool -> a cond f t False = f
46
cond :: a -> a -> Bool -> a cond f t False = f
46
cond f t False = f
18
false
true
0
9
14
36
16
20
null
null
fmapfmapfmap/amazonka
amazonka-sqs/gen/Network/AWS/SQS/ChangeMessageVisibility.hs
mpl-2.0
-- | Creates a value of 'ChangeMessageVisibilityResponse' with the minimum fields required to make a request. -- changeMessageVisibilityResponse :: ChangeMessageVisibilityResponse changeMessageVisibilityResponse = ChangeMessageVisibilityResponse'
250
changeMessageVisibilityResponse :: ChangeMessageVisibilityResponse changeMessageVisibilityResponse = ChangeMessageVisibilityResponse'
137
changeMessageVisibilityResponse = ChangeMessageVisibilityResponse'
66
true
true
0
4
26
13
8
5
null
null
siddhanathan/yi
yi-core/src/Yi/Interact.hs
gpl-2.0
-- --------------------------------------------------------------------------- -- Operations over P runWrite :: Eq w => P event w -> [event] -> [w] runWrite _ [] = []
167
runWrite :: Eq w => P event w -> [event] -> [w] runWrite _ [] = []
66
runWrite _ [] = []
18
true
true
0
10
23
54
26
28
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/System/Posix/Internals.hs
bsd-3-clause
c_open :: CFilePath -> CInt -> CMode -> IO CInt c_open = error "c_open not implemented"
87
c_open :: CFilePath -> CInt -> CMode -> IO CInt c_open = error "c_open not implemented"
87
c_open = error "c_open not implemented"
39
false
true
0
8
15
29
14
15
null
null
massudaw/mtk
filters/attitude/Attitude.hs
bsd-3-clause
{- data Filtro = Filtro { _time :: V1 Double , _se3 :: SE3 Double , _speed :: V3 Double , _orientationOffset :: SO3 Double , _accCalib :: LinearParamV3 Double , _magCalib :: LinearParamV3 Double , _gyroCalib:: LinearParamV3 Double , _gravityMagnitude :: V1 Double }deriving(Show...
377
position = se3 . sndPL1
25
position = se3 . sndPL1
25
true
false
0
5
98
11
6
5
null
null
abayley/netpoll
src/System/Process/Text.hs
gpl-3.0
readProcessWithExitCode :: FilePath -- ^ Filename of the executable (see 'proc' for details) -> [String] -- ^ any arguments -> Text.Text -- ^ standard input -> IO (Exit.ExitCode, Text.Text, Text.Text) -- ^ exitcode, stdout, stderr readProcessWithExitCode...
1,505
readProcessWithExitCode :: FilePath -- ^ Filename of the executable (see 'proc' for details) -> [String] -- ^ any arguments -> Text.Text -- ^ standard input -> IO (Exit.ExitCode, Text.Text, Text.Text) readProcessWithExitCode cmd args input = do let c...
1,475
readProcessWithExitCode cmd args input = do let cp_opts = (Process.proc cmd args) { Process.std_in = Process.CreatePipe, Process.std_out = Process.CreatePipe, Process.std_err = Process.CreatePipe } -- IO.putStrLn (show cmd ++ " " ++ ...
1,208
true
true
0
23
506
331
164
167
null
null
nomeata/ghc
compiler/cmm/CmmOpt.hs
bsd-3-clause
cmmMiniInlineStmts dflags uses (stmt@(CmmAssign (CmmLocal (LocalReg u _)) expr) : stmts) -- not used: just discard this assignment | 0 <- lookupWithDefaultUFM uses 0 u = cmmMiniInlineStmts dflags uses stmts -- used (foldable to small thing): try to inline at all the use sites | Just n <- lookupUF...
1,338
cmmMiniInlineStmts dflags uses (stmt@(CmmAssign (CmmLocal (LocalReg u _)) expr) : stmts) -- not used: just discard this assignment | 0 <- lookupWithDefaultUFM uses 0 u = cmmMiniInlineStmts dflags uses stmts -- used (foldable to small thing): try to inline at all the use sites | Just n <- lookupUF...
1,338
cmmMiniInlineStmts dflags uses (stmt@(CmmAssign (CmmLocal (LocalReg u _)) expr) : stmts) -- not used: just discard this assignment | 0 <- lookupWithDefaultUFM uses 0 u = cmmMiniInlineStmts dflags uses stmts -- used (foldable to small thing): try to inline at all the use sites | Just n <- lookupUF...
1,338
false
false
0
17
347
413
198
215
null
null
enolan/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintErr' i (Msg s) = text s
29
pprintErr' i (Msg s) = text s
29
pprintErr' i (Msg s) = text s
29
false
false
0
7
6
21
9
12
null
null
eklavya/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
-- | Reify tactics from their reflected representation reify :: IState -> Term -> ElabD PTactic reify _ (P _ n _) | n == reflm "Intros" = return Intros
151
reify :: IState -> Term -> ElabD PTactic reify _ (P _ n _) | n == reflm "Intros" = return Intros
96
reify _ (P _ n _) | n == reflm "Intros" = return Intros
55
true
true
0
9
29
54
25
29
null
null
adnelson/nixfromnpm
src/NixFromNpm/Common.hs
mit
parseURIText :: Text -> Maybe URI parseURIText = parseURI . unpack
66
parseURIText :: Text -> Maybe URI parseURIText = parseURI . unpack
66
parseURIText = parseURI . unpack
32
false
true
0
6
10
22
11
11
null
null
TOSPIO/yi
src/library/Yi/Keymap/Vim/Ex/Commands/Paste.hs
gpl-2.0
action (BoolOptionSet b) = modPaste $ const b
45
action (BoolOptionSet b) = modPaste $ const b
45
action (BoolOptionSet b) = modPaste $ const b
45
false
false
0
6
7
23
10
13
null
null