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
sdiehl/ghc
hadrian/src/Settings/Flavours/Quick.hs
bsd-3-clause
-- Please update doc/flavours.md when changing this file. quickFlavour :: Flavour quickFlavour = defaultFlavour { name = "quick" , args = defaultBuilderArgs <> quickArgs <> defaultPackageArgs , libraryWays = mconcat [ pure [vanilla] , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] ] , rtsWays = mconcat [ pure [ vanilla, threaded, logging, debug , threadedDebug, threadedLogging, threaded ] , notStage0 ? platformSupportsSharedLibs ? pure [ dynamic, debugDynamic, threadedDynamic, loggingDynamic , threadedDebugDynamic, threadedLoggingDynamic ] ] }
780
quickFlavour :: Flavour quickFlavour = defaultFlavour { name = "quick" , args = defaultBuilderArgs <> quickArgs <> defaultPackageArgs , libraryWays = mconcat [ pure [vanilla] , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] ] , rtsWays = mconcat [ pure [ vanilla, threaded, logging, debug , threadedDebug, threadedLogging, threaded ] , notStage0 ? platformSupportsSharedLibs ? pure [ dynamic, debugDynamic, threadedDynamic, loggingDynamic , threadedDebugDynamic, threadedLoggingDynamic ] ] }
722
quickFlavour = defaultFlavour { name = "quick" , args = defaultBuilderArgs <> quickArgs <> defaultPackageArgs , libraryWays = mconcat [ pure [vanilla] , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] ] , rtsWays = mconcat [ pure [ vanilla, threaded, logging, debug , threadedDebug, threadedLogging, threaded ] , notStage0 ? platformSupportsSharedLibs ? pure [ dynamic, debugDynamic, threadedDynamic, loggingDynamic , threadedDebugDynamic, threadedLoggingDynamic ] ] }
698
true
true
0
12
295
147
82
65
null
null
syoyo/lucille
rnd/HaskellRSLCompiler/RSL/AST.hs
bsd-3-clause
isVectorTy :: Type -> Bool isVectorTy ty = case ty of TyVector -> True TyColor -> True TyPoint -> True TyNormal -> True _ -> False
149
isVectorTy :: Type -> Bool isVectorTy ty = case ty of TyVector -> True TyColor -> True TyPoint -> True TyNormal -> True _ -> False
149
isVectorTy ty = case ty of TyVector -> True TyColor -> True TyPoint -> True TyNormal -> True _ -> False
122
false
true
0
7
44
52
26
26
null
null
vikraman/ghc
compiler/basicTypes/VarSet.hs
bsd-3-clause
seqVarSet :: VarSet -> () seqVarSet s = sizeVarSet s `seq` ()
61
seqVarSet :: VarSet -> () seqVarSet s = sizeVarSet s `seq` ()
61
seqVarSet s = sizeVarSet s `seq` ()
35
false
true
0
6
11
31
16
15
null
null
h3nnn4n/rubiks-cube-haskell
Rubik.hs
gpl-3.0
turn_cw (Corner Orange Green Yellow) = (Corner Green Yellow Orange)
67
turn_cw (Corner Orange Green Yellow) = (Corner Green Yellow Orange)
67
turn_cw (Corner Orange Green Yellow) = (Corner Green Yellow Orange)
67
false
false
0
7
9
29
14
15
null
null
davdar/quals
src/FP/Pretty.hs
bsd-3-clause
keyPun :: (MonadPretty m) => String -> m () keyPun = format keyPunFmt . text
76
keyPun :: (MonadPretty m) => String -> m () keyPun = format keyPunFmt . text
76
keyPun = format keyPunFmt . text
32
false
true
1
9
14
43
19
24
null
null
paulp/unison
parser-typechecker/src/Unison/Typechecker.hs
mit
-- | `checkAdmissible' e t` tests that `(f : t -> r) e` is well-typed. -- If `t` has quantifiers, these are moved outside, so if `t : forall a . a`, -- this will check that `(f : forall a . a -> a) e` is well typed. -- checkAdmissible' :: Var v => Term v -> Type v -> Either Note (Type v) -- checkAdmissible' term typ = -- synthesize' (Term.blank() `Term.ann_` tweak typ `Term.app_` term) -- where -- tweak (Type.ForallNamed' v body) = Type.forall() v (tweak body) -- tweak t = Type.arrow() t t -- | Returns `True` if the expression is well-typed, `False` otherwise wellTyped :: (Monad f, Var v) => Env f v loc -> Term v loc -> f Bool wellTyped env term = isJust . result <$> synthesize env term
708
wellTyped :: (Monad f, Var v) => Env f v loc -> Term v loc -> f Bool wellTyped env term = isJust . result <$> synthesize env term
129
wellTyped env term = isJust . result <$> synthesize env term
60
true
true
0
8
149
77
42
35
null
null
tamarin-prover/tamarin-prover
lib/term/src/Term/LTerm.hs
gpl-3.0
fromFree (Bound i) = error $ "fromFree: bound variable '" ++ show i ++ "'"
74
fromFree (Bound i) = error $ "fromFree: bound variable '" ++ show i ++ "'"
74
fromFree (Bound i) = error $ "fromFree: bound variable '" ++ show i ++ "'"
74
false
false
0
7
14
31
14
17
null
null
OpenXT/xclibs
xchutils/Tools/File.hs
lgpl-2.1
getDirectoryContents_nonDotted :: FilePath -> IO [FilePath] getDirectoryContents_nonDotted = fmap (filter $ not . dotted) . getDirectoryContents
144
getDirectoryContents_nonDotted :: FilePath -> IO [FilePath] getDirectoryContents_nonDotted = fmap (filter $ not . dotted) . getDirectoryContents
144
getDirectoryContents_nonDotted = fmap (filter $ not . dotted) . getDirectoryContents
84
false
true
0
9
15
39
20
19
null
null
osa1/rho-torrent
src/Rho/PeerComms/PeerConnection.hs
bsd-3-clause
sendInterested :: IORef PeerConn -> PieceIdx -> IO () sendInterested peer pIdx = do pc <- amIORef peer $ \pc -> pc{pcInterested=True, pcRequest=Just pIdx} void $ sendMessage pc Interested
195
sendInterested :: IORef PeerConn -> PieceIdx -> IO () sendInterested peer pIdx = do pc <- amIORef peer $ \pc -> pc{pcInterested=True, pcRequest=Just pIdx} void $ sendMessage pc Interested
195
sendInterested peer pIdx = do pc <- amIORef peer $ \pc -> pc{pcInterested=True, pcRequest=Just pIdx} void $ sendMessage pc Interested
141
false
true
0
12
36
80
39
41
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | The format of the video stream that you are sending to Youtube. csFormat :: Lens' CdnSettings (Maybe Text) csFormat = lens _csFormat (\ s a -> s{_csFormat = a})
165
csFormat :: Lens' CdnSettings (Maybe Text) csFormat = lens _csFormat (\ s a -> s{_csFormat = a})
96
csFormat = lens _csFormat (\ s a -> s{_csFormat = a})
53
true
true
0
9
30
46
25
21
null
null
anchor/ceilometer-common
lib/Ceilometer/Tags.hs
bsd-3-clause
valFalse = pack "0"
24
valFalse = pack "0"
24
valFalse = pack "0"
24
false
false
0
5
8
9
4
5
null
null
tphyahoo/haskoin
haskoin-node/Network/Haskoin/Node/STM.hs
unlicense
minorDoS :: PeerHostScore -> PeerHostScore minorDoS = (+ 1)
59
minorDoS :: PeerHostScore -> PeerHostScore minorDoS = (+ 1)
59
minorDoS = (+ 1)
16
false
true
0
7
8
26
12
14
null
null
rueshyna/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | Replaces all shapes matching some criteria with an image. reqReplaceAllShapesWithImage :: Lens' Request' (Maybe ReplaceAllShapesWithImageRequest) reqReplaceAllShapesWithImage = lens _reqReplaceAllShapesWithImage (\ s a -> s{_reqReplaceAllShapesWithImage = a})
272
reqReplaceAllShapesWithImage :: Lens' Request' (Maybe ReplaceAllShapesWithImageRequest) reqReplaceAllShapesWithImage = lens _reqReplaceAllShapesWithImage (\ s a -> s{_reqReplaceAllShapesWithImage = a})
209
reqReplaceAllShapesWithImage = lens _reqReplaceAllShapesWithImage (\ s a -> s{_reqReplaceAllShapesWithImage = a})
121
true
true
0
9
35
48
25
23
null
null
dalaing/type-systems
src/Fragment/Int/Rules/Kind/Infer/SyntaxDirected.hs
bsd-3-clause
intInferKindRules :: IntInferKindContext e w s r m ki ty a => InferKindInput e w s r m ki ty a intInferKindRules = InferKindInput [InferKindBase inferTyInt]
180
intInferKindRules :: IntInferKindContext e w s r m ki ty a => InferKindInput e w s r m ki ty a intInferKindRules = InferKindInput [InferKindBase inferTyInt]
180
intInferKindRules = InferKindInput [InferKindBase inferTyInt]
67
false
true
0
7
49
58
28
30
null
null
AriaFallah/leetcode
haskell/ReverseList.hs
mit
reverseList :: LinkedList a -> LinkedList a reverseList = foldListL addToList Empty
83
reverseList :: LinkedList a -> LinkedList a reverseList = foldListL addToList Empty
83
reverseList = foldListL addToList Empty
39
false
true
0
7
11
33
13
20
null
null
lpeterse/koka
src/Lib/PPrint.hs
apache-2.0
displayP :: Printer p => p -> Int -> SimpleDoc -> IO () displayP p w simpleDoc = do display 0 simpleDoc return () where display k s = seq k (display' k s) display' k SEmpty = return (k,SEmpty) display' k (SChar i c x) | k+1 >= w && i+1 < w = display k (SLine (i+1) (skipSpaces (SChar i c x))) display' k (SChar i c x) = do{ writeText p (T.pack [c]); display (k+1) x } display' k (SText i s x) | k+(T.length s) >= w && i+(T.length s) < w = display k (SLine (i+1) (skipSpaces (SText i s x))) display' k (SText i s x) = do{ writeText p s; display (k+(T.length s)) x } display' k (SLine i x) = do{ writeTextLn p T.empty; writeText p (spaces i); display i x } display' k (SColorOpen f c x)= do{ let with = if f then withColor else withBackColor ; (kc,cont) <- with p c (display k x) ; display kc cont } display' k (SColorClose x) = return (k,x) skipSpaces (SChar i c x) | isSpace c = skipSpaces x skipSpaces (SText i s x) | T.null s' = skipSpaces x | otherwise = SText i s' x where s' = T.dropWhile isSpace s skipSpaces s = s isSpace c = (c==' ' || c=='\t') -- | Display a document on a 'Printer'.
1,508
displayP :: Printer p => p -> Int -> SimpleDoc -> IO () displayP p w simpleDoc = do display 0 simpleDoc return () where display k s = seq k (display' k s) display' k SEmpty = return (k,SEmpty) display' k (SChar i c x) | k+1 >= w && i+1 < w = display k (SLine (i+1) (skipSpaces (SChar i c x))) display' k (SChar i c x) = do{ writeText p (T.pack [c]); display (k+1) x } display' k (SText i s x) | k+(T.length s) >= w && i+(T.length s) < w = display k (SLine (i+1) (skipSpaces (SText i s x))) display' k (SText i s x) = do{ writeText p s; display (k+(T.length s)) x } display' k (SLine i x) = do{ writeTextLn p T.empty; writeText p (spaces i); display i x } display' k (SColorOpen f c x)= do{ let with = if f then withColor else withBackColor ; (kc,cont) <- with p c (display k x) ; display kc cont } display' k (SColorClose x) = return (k,x) skipSpaces (SChar i c x) | isSpace c = skipSpaces x skipSpaces (SText i s x) | T.null s' = skipSpaces x | otherwise = SText i s' x where s' = T.dropWhile isSpace s skipSpaces s = s isSpace c = (c==' ' || c=='\t') -- | Display a document on a 'Printer'.
1,508
displayP p w simpleDoc = do display 0 simpleDoc return () where display k s = seq k (display' k s) display' k SEmpty = return (k,SEmpty) display' k (SChar i c x) | k+1 >= w && i+1 < w = display k (SLine (i+1) (skipSpaces (SChar i c x))) display' k (SChar i c x) = do{ writeText p (T.pack [c]); display (k+1) x } display' k (SText i s x) | k+(T.length s) >= w && i+(T.length s) < w = display k (SLine (i+1) (skipSpaces (SText i s x))) display' k (SText i s x) = do{ writeText p s; display (k+(T.length s)) x } display' k (SLine i x) = do{ writeTextLn p T.empty; writeText p (spaces i); display i x } display' k (SColorOpen f c x)= do{ let with = if f then withColor else withBackColor ; (kc,cont) <- with p c (display k x) ; display kc cont } display' k (SColorClose x) = return (k,x) skipSpaces (SChar i c x) | isSpace c = skipSpaces x skipSpaces (SText i s x) | T.null s' = skipSpaces x | otherwise = SText i s' x where s' = T.dropWhile isSpace s skipSpaces s = s isSpace c = (c==' ' || c=='\t') -- | Display a document on a 'Printer'.
1,452
false
true
0
15
646
674
329
345
null
null
hausdorff/pyli
src/Parser.hs
mit
zeroPlusAnds :: Parser String zeroPlusAnds = noMoreAnds <|> xor <~> andExpr <~> zeroPlusAnds ==> emitZeroPlusAnds where noMoreAnds = eps "" xor = ter "^" -- corresponds to `shift_expr` in grammar
228
zeroPlusAnds :: Parser String zeroPlusAnds = noMoreAnds <|> xor <~> andExpr <~> zeroPlusAnds ==> emitZeroPlusAnds where noMoreAnds = eps "" xor = ter "^" -- corresponds to `shift_expr` in grammar
228
zeroPlusAnds = noMoreAnds <|> xor <~> andExpr <~> zeroPlusAnds ==> emitZeroPlusAnds where noMoreAnds = eps "" xor = ter "^" -- corresponds to `shift_expr` in grammar
198
false
true
5
7
62
58
27
31
null
null
bitemyapp/wreq
Network/Wreq/Internal.hs
bsd-3-clause
setProxy :: Options -> Request -> Request setProxy = maybe id f . proxy where f (Proxy host port) = addProxy host port
120
setProxy :: Options -> Request -> Request setProxy = maybe id f . proxy where f (Proxy host port) = addProxy host port
120
setProxy = maybe id f . proxy where f (Proxy host port) = addProxy host port
78
false
true
0
7
24
51
25
26
null
null
sdiehl/ghc
compiler/nativeGen/PIC.hs
bsd-3-clause
-- all other platforms howToAccessLabel dflags _ _ _ _ _ | not (positionIndependent dflags) = AccessDirectly | otherwise = panic "howToAccessLabel: PIC not defined for this platform"
215
howToAccessLabel dflags _ _ _ _ _ | not (positionIndependent dflags) = AccessDirectly | otherwise = panic "howToAccessLabel: PIC not defined for this platform"
192
howToAccessLabel dflags _ _ _ _ _ | not (positionIndependent dflags) = AccessDirectly | otherwise = panic "howToAccessLabel: PIC not defined for this platform"
192
true
false
0
10
60
49
22
27
null
null
alexander-at-github/eta
libraries/base/Debug/Trace.hs
bsd-3-clause
-- $tracing -- -- The 'trace', 'traceShow' and 'traceIO' functions print messages to an output -- stream. They are intended for \"printf debugging\", that is: tracing the flow -- of execution and printing interesting values. -- -- All these functions evaluate the message completely before printing -- it; so if the message is not fully defined, none of it will be -- printed. -- -- The usual output stream is 'System.IO.stderr'. For Windows GUI applications -- (that have no stderr) the output is directed to the Windows debug console. -- Some implementations of these functions may decorate the string that\'s -- output to indicate that you\'re tracing. -- | The 'traceIO' function outputs the trace message from the IO monad. -- This sequences the output with respect to other IO actions. -- -- @since 4.5.0.0 traceIO :: String -> IO () traceIO msg = do withCString "%s\n" $ \cfmt -> do -- NB: debugBelch can't deal with null bytes, so filter them -- out so we don't accidentally truncate the message. See Trac #9395 let (nulls, msg') = partition (=='\0') msg withCString msg' $ \cmsg -> debugBelch cfmt cmsg when (not (null nulls)) $ withCString "WARNING: previous trace message had null bytes" $ \cmsg -> debugBelch cfmt cmsg -- don't use debugBelch() directly, because we cannot call varargs functions -- using the FFI.
1,379
traceIO :: String -> IO () traceIO msg = do withCString "%s\n" $ \cfmt -> do -- NB: debugBelch can't deal with null bytes, so filter them -- out so we don't accidentally truncate the message. See Trac #9395 let (nulls, msg') = partition (=='\0') msg withCString msg' $ \cmsg -> debugBelch cfmt cmsg when (not (null nulls)) $ withCString "WARNING: previous trace message had null bytes" $ \cmsg -> debugBelch cfmt cmsg -- don't use debugBelch() directly, because we cannot call varargs functions -- using the FFI.
565
traceIO msg = do withCString "%s\n" $ \cfmt -> do -- NB: debugBelch can't deal with null bytes, so filter them -- out so we don't accidentally truncate the message. See Trac #9395 let (nulls, msg') = partition (=='\0') msg withCString msg' $ \cmsg -> debugBelch cfmt cmsg when (not (null nulls)) $ withCString "WARNING: previous trace message had null bytes" $ \cmsg -> debugBelch cfmt cmsg -- don't use debugBelch() directly, because we cannot call varargs functions -- using the FFI.
538
true
true
0
18
276
149
81
68
null
null
leshchevds/ganeti
src/Ganeti/Ssconf.hs
bsd-2-clause
parseIPFamily :: Int -> Result Socket.Family parseIPFamily fam | fam == AutoConf.pyAfInet4 = Ok Socket.AF_INET | fam == AutoConf.pyAfInet6 = Ok Socket.AF_INET6 | otherwise = Bad $ "Unknown af_family value: " ++ show fam
255
parseIPFamily :: Int -> Result Socket.Family parseIPFamily fam | fam == AutoConf.pyAfInet4 = Ok Socket.AF_INET | fam == AutoConf.pyAfInet6 = Ok Socket.AF_INET6 | otherwise = Bad $ "Unknown af_family value: " ++ show fam
255
parseIPFamily fam | fam == AutoConf.pyAfInet4 = Ok Socket.AF_INET | fam == AutoConf.pyAfInet6 = Ok Socket.AF_INET6 | otherwise = Bad $ "Unknown af_family value: " ++ show fam
210
false
true
0
9
69
80
36
44
null
null
AlbinTheander/oden
src/Oden/Compiler/Instantiate.hs
mit
replace (Poly.TRecord si r) = Poly.TRecord si <$> replace r
59
replace (Poly.TRecord si r) = Poly.TRecord si <$> replace r
59
replace (Poly.TRecord si r) = Poly.TRecord si <$> replace r
59
false
false
0
8
9
31
14
17
null
null
arne-schroppe/dash
src/Language/Dash/Normalization/Normalization.hs
mit
nameExprList :: [Expr] -> ([NstVar] -> Norm NstExpr) -> Norm NstExpr nameExprList exprList = nameExprList' exprList [] where nameExprList' [] acc k' = k' $ reverse acc nameExprList' expLs acc k' = nameExpr (head expLs) "" $ \ var -> nameExprList' (tail expLs) (var : acc) k' -- Used for the local name of a constant we're let-binding in the -- current scope (So that subsequent uses of that constant can reuse -- that local var and don't have to rebind that constant)
500
nameExprList :: [Expr] -> ([NstVar] -> Norm NstExpr) -> Norm NstExpr nameExprList exprList = nameExprList' exprList [] where nameExprList' [] acc k' = k' $ reverse acc nameExprList' expLs acc k' = nameExpr (head expLs) "" $ \ var -> nameExprList' (tail expLs) (var : acc) k' -- Used for the local name of a constant we're let-binding in the -- current scope (So that subsequent uses of that constant can reuse -- that local var and don't have to rebind that constant)
500
nameExprList exprList = nameExprList' exprList [] where nameExprList' [] acc k' = k' $ reverse acc nameExprList' expLs acc k' = nameExpr (head expLs) "" $ \ var -> nameExprList' (tail expLs) (var : acc) k' -- Used for the local name of a constant we're let-binding in the -- current scope (So that subsequent uses of that constant can reuse -- that local var and don't have to rebind that constant)
431
false
true
1
9
115
125
64
61
null
null
futurice/pulmurice-client
src/Options.hs
mit
simpleStrArgument :: String -> Parser String simpleStrArgument mv = argument str (metavar mv)
93
simpleStrArgument :: String -> Parser String simpleStrArgument mv = argument str (metavar mv)
93
simpleStrArgument mv = argument str (metavar mv)
48
false
true
0
7
12
32
15
17
null
null
stevezhee/grm
Grm/Lex.hs
bsd-3-clause
unTUsym :: Token t -> String unTUsym (TUsym _ b) = b
52
unTUsym :: Token t -> String unTUsym (TUsym _ b) = b
52
unTUsym (TUsym _ b) = b
23
false
true
0
7
11
29
14
15
null
null
brendanhay/gogol
gogol-doubleclick-bids/gen/Network/Google/Resource/DoubleClickBidManager/Lineitems/Downloadlineitems.hs
mpl-2.0
-- | JSONP ldCallback :: Lens' LineitemsDownloadlineitems (Maybe Text) ldCallback = lens _ldCallback (\ s a -> s{_ldCallback = a})
132
ldCallback :: Lens' LineitemsDownloadlineitems (Maybe Text) ldCallback = lens _ldCallback (\ s a -> s{_ldCallback = a})
121
ldCallback = lens _ldCallback (\ s a -> s{_ldCallback = a})
61
true
true
1
9
21
50
25
25
null
null
rahulmutt/ghcvm
compiler/Eta/StgSyn/StgSyn.hs
bsd-3-clause
pprSRT (SRT off _) {-_)-} = parens (ppr off <> comma <> text "*bitmap*")
75
pprSRT (SRT off _) {-_)-} = parens (ppr off <> comma <> text "*bitmap*")
75
pprSRT (SRT off _) {-_)-} = parens (ppr off <> comma <> text "*bitmap*")
75
false
false
0
9
16
39
18
21
null
null
UCSD-PL/nano-js
Language/Nano/Types.hs
bsd-3-clause
eProp (InfixExpr _ OpGT e1 e2) = F.PAtom F.Gt (F.expr e1) (F.expr e2)
71
eProp (InfixExpr _ OpGT e1 e2) = F.PAtom F.Gt (F.expr e1) (F.expr e2)
71
eProp (InfixExpr _ OpGT e1 e2) = F.PAtom F.Gt (F.expr e1) (F.expr e2)
71
false
false
0
8
14
49
23
26
null
null
Helkafen/haddock
haddock-api/src/Haddock/Interface/LexParseRn.hs
bsd-2-clause
outOfScope :: DynFlags -> RdrName -> Doc a outOfScope dflags x = case x of Unqual occ -> monospaced occ Qual mdl occ -> DocIdentifierUnchecked (mdl, occ) Orig _ occ -> monospaced occ Exact name -> monospaced name -- Shouldn't happen since x is out of scope where monospaced a = DocMonospaced (DocString (showPpr dflags a))
347
outOfScope :: DynFlags -> RdrName -> Doc a outOfScope dflags x = case x of Unqual occ -> monospaced occ Qual mdl occ -> DocIdentifierUnchecked (mdl, occ) Orig _ occ -> monospaced occ Exact name -> monospaced name -- Shouldn't happen since x is out of scope where monospaced a = DocMonospaced (DocString (showPpr dflags a))
347
outOfScope dflags x = case x of Unqual occ -> monospaced occ Qual mdl occ -> DocIdentifierUnchecked (mdl, occ) Orig _ occ -> monospaced occ Exact name -> monospaced name -- Shouldn't happen since x is out of scope where monospaced a = DocMonospaced (DocString (showPpr dflags a))
304
false
true
0
9
80
117
55
62
null
null
rleshchinskiy/vector
Data/Vector/Storable.hs
bsd-3-clause
foldl' = G.foldl'
17
foldl' = G.foldl'
17
foldl' = G.foldl'
17
false
false
1
6
2
12
4
8
null
null
yav/allegro
examples/hs/clicks.hs
bsd-3-clause
age :: [Thing] -> [Thing] age xs = [ Thing { life = life - 1, .. } | Thing { .. } <- xs, life > 0.1 ]
101
age :: [Thing] -> [Thing] age xs = [ Thing { life = life - 1, .. } | Thing { .. } <- xs, life > 0.1 ]
101
age xs = [ Thing { life = life - 1, .. } | Thing { .. } <- xs, life > 0.1 ]
75
false
true
0
10
28
70
36
34
null
null
nkaretnikov/ghc
compiler/utils/Outputable.hs
bsd-3-clause
speakNth 6 = ptext (sLit "sixth")
33
speakNth 6 = ptext (sLit "sixth")
33
speakNth 6 = ptext (sLit "sixth")
33
false
false
0
7
5
18
8
10
null
null
rvion/stack
src/Stack/Image.hs
bsd-3-clause
stageExesInDir :: Build e m => Path Abs Dir -> m () stageExesInDir dir = do srcBinPath <- (</> $(mkRelDir "bin")) <$> installationRootLocal let destBinPath = dir </> $(mkRelDir "usr/local/bin") createTree destBinPath copyDirectoryRecursive srcBinPath destBinPath -- | Add any additional files into the temp directory, respecting the -- (Source, Destination) mapping.
411
stageExesInDir :: Build e m => Path Abs Dir -> m () stageExesInDir dir = do srcBinPath <- (</> $(mkRelDir "bin")) <$> installationRootLocal let destBinPath = dir </> $(mkRelDir "usr/local/bin") createTree destBinPath copyDirectoryRecursive srcBinPath destBinPath -- | Add any additional files into the temp directory, respecting the -- (Source, Destination) mapping.
411
stageExesInDir dir = do srcBinPath <- (</> $(mkRelDir "bin")) <$> installationRootLocal let destBinPath = dir </> $(mkRelDir "usr/local/bin") createTree destBinPath copyDirectoryRecursive srcBinPath destBinPath -- | Add any additional files into the temp directory, respecting the -- (Source, Destination) mapping.
359
false
true
0
13
95
95
44
51
null
null
ags/haskell-robot
app/Main.hs
mit
repl :: Table -> Robot -> IO () repl table robot = do maybeCommand <- readCommand let newRobot = runCommand table robot maybeCommand print newRobot eof <- isEOF unless eof (repl table newRobot)
203
repl :: Table -> Robot -> IO () repl table robot = do maybeCommand <- readCommand let newRobot = runCommand table robot maybeCommand print newRobot eof <- isEOF unless eof (repl table newRobot)
203
repl table robot = do maybeCommand <- readCommand let newRobot = runCommand table robot maybeCommand print newRobot eof <- isEOF unless eof (repl table newRobot)
171
false
true
0
10
42
81
36
45
null
null
brendanhay/gogol
gogol-serviceconsumermanagement/gen/Network/Google/Resource/ServiceConsumerManagement/Operations/List.hs
mpl-2.0
-- | OAuth access token. olAccessToken :: Lens' OperationsList (Maybe Text) olAccessToken = lens _olAccessToken (\ s a -> s{_olAccessToken = a})
152
olAccessToken :: Lens' OperationsList (Maybe Text) olAccessToken = lens _olAccessToken (\ s a -> s{_olAccessToken = a})
127
olAccessToken = lens _olAccessToken (\ s a -> s{_olAccessToken = a})
76
true
true
0
9
29
48
25
23
null
null
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs
mpl-2.0
-- | Creates a value of 'EventReminders' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'erOverrides' -- -- * 'erUseDefault' eventReminders :: EventReminders eventReminders = EventReminders' {_erOverrides = Nothing, _erUseDefault = Nothing}
332
eventReminders :: EventReminders eventReminders = EventReminders' {_erOverrides = Nothing, _erUseDefault = Nothing}
121
eventReminders = EventReminders' {_erOverrides = Nothing, _erUseDefault = Nothing}
84
true
true
0
7
55
42
24
18
null
null
ulrikrasmussen/BoxProver
src/Boxprover.hs
mit
example1 :: IO () example1 = do let bin = "/home/ulrik/twelf/bin/twelf-server" Right () <- checkProof bin myProof (n, a, m) <- extractProof bin myProof putStrLn $ "Proof name: " ++ n putStrLn $ show a putStrLn $ show m
230
example1 :: IO () example1 = do let bin = "/home/ulrik/twelf/bin/twelf-server" Right () <- checkProof bin myProof (n, a, m) <- extractProof bin myProof putStrLn $ "Proof name: " ++ n putStrLn $ show a putStrLn $ show m
230
example1 = do let bin = "/home/ulrik/twelf/bin/twelf-server" Right () <- checkProof bin myProof (n, a, m) <- extractProof bin myProof putStrLn $ "Proof name: " ++ n putStrLn $ show a putStrLn $ show m
212
false
true
0
10
50
100
44
56
null
null
input-output-hk/daedalus
installers/common/MacInstaller.hs
apache-2.0
getBackendVersion :: Backend -> IO Text getBackendVersion (Cardano bridge) = readCardanoVersionFile bridge
110
getBackendVersion :: Backend -> IO Text getBackendVersion (Cardano bridge) = readCardanoVersionFile bridge
110
getBackendVersion (Cardano bridge) = readCardanoVersionFile bridge
70
false
true
0
9
15
34
15
19
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLOutputElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLOutputElement.reportValidity Mozilla HTMLOutputElement.reportValidity documentation> reportValidity_ :: (MonadDOM m) => HTMLOutputElement -> m () reportValidity_ self = liftDOM (void (self ^. jsf "reportValidity" ()))
279
reportValidity_ :: (MonadDOM m) => HTMLOutputElement -> m () reportValidity_ self = liftDOM (void (self ^. jsf "reportValidity" ()))
134
reportValidity_ self = liftDOM (void (self ^. jsf "reportValidity" ()))
73
true
true
0
11
27
56
28
28
null
null
orclev/crazyflie-haskell
src/Network/Crazyflie.hs
lgpl-3.0
isInterruptInput :: EndpointDesc -> Bool isInterruptInput = isEndpointType Interrupt In
87
isInterruptInput :: EndpointDesc -> Bool isInterruptInput = isEndpointType Interrupt In
87
isInterruptInput = isEndpointType Interrupt In
46
false
true
0
5
9
20
10
10
null
null
frantisekfarka/ghc-dsi
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
doVecInsertOp :: Maybe MachOp -- Cast from element to vector component -> CmmType -- Vector type -> CmmExpr -- Source vector -> CmmExpr -- Element -> CmmExpr -- Index at which to insert element -> CmmFormal -- Destination for result -> FCode () doVecInsertOp maybe_pre_write_cast ty src e idx res = do dflags <- getDynFlags -- vector indices are always 32-bits let idx' :: CmmExpr idx' = CmmMachOp (MO_SS_Conv (wordWidth dflags) W32) [idx] if isFloatType (vecElemType ty) then emitAssign (CmmLocal res) (CmmMachOp (MO_VF_Insert len wid) [src, cast e, idx']) else emitAssign (CmmLocal res) (CmmMachOp (MO_V_Insert len wid) [src, cast e, idx']) where cast :: CmmExpr -> CmmExpr cast val = case maybe_pre_write_cast of Nothing -> val Just cast -> CmmMachOp cast [val] len :: Length len = vecLength ty wid :: Width wid = typeWidth (vecElemType ty) ------------------------------------------------------------------------------ -- Helpers for translating prefetching.
1,176
doVecInsertOp :: Maybe MachOp -- Cast from element to vector component -> CmmType -- Vector type -> CmmExpr -- Source vector -> CmmExpr -- Element -> CmmExpr -- Index at which to insert element -> CmmFormal -- Destination for result -> FCode () doVecInsertOp maybe_pre_write_cast ty src e idx res = do dflags <- getDynFlags -- vector indices are always 32-bits let idx' :: CmmExpr idx' = CmmMachOp (MO_SS_Conv (wordWidth dflags) W32) [idx] if isFloatType (vecElemType ty) then emitAssign (CmmLocal res) (CmmMachOp (MO_VF_Insert len wid) [src, cast e, idx']) else emitAssign (CmmLocal res) (CmmMachOp (MO_V_Insert len wid) [src, cast e, idx']) where cast :: CmmExpr -> CmmExpr cast val = case maybe_pre_write_cast of Nothing -> val Just cast -> CmmMachOp cast [val] len :: Length len = vecLength ty wid :: Width wid = typeWidth (vecElemType ty) ------------------------------------------------------------------------------ -- Helpers for translating prefetching.
1,176
doVecInsertOp maybe_pre_write_cast ty src e idx res = do dflags <- getDynFlags -- vector indices are always 32-bits let idx' :: CmmExpr idx' = CmmMachOp (MO_SS_Conv (wordWidth dflags) W32) [idx] if isFloatType (vecElemType ty) then emitAssign (CmmLocal res) (CmmMachOp (MO_VF_Insert len wid) [src, cast e, idx']) else emitAssign (CmmLocal res) (CmmMachOp (MO_V_Insert len wid) [src, cast e, idx']) where cast :: CmmExpr -> CmmExpr cast val = case maybe_pre_write_cast of Nothing -> val Just cast -> CmmMachOp cast [val] len :: Length len = vecLength ty wid :: Width wid = typeWidth (vecElemType ty) ------------------------------------------------------------------------------ -- Helpers for translating prefetching.
818
false
true
0
14
356
307
151
156
null
null
mettekou/ghc
compiler/typecheck/TcSigs.hs
bsd-3-clause
tcIdSigName :: TcIdSigInfo -> Name tcIdSigName (CompleteSig { sig_bndr = id }) = idName id
90
tcIdSigName :: TcIdSigInfo -> Name tcIdSigName (CompleteSig { sig_bndr = id }) = idName id
90
tcIdSigName (CompleteSig { sig_bndr = id }) = idName id
55
false
true
0
9
14
33
17
16
null
null
tebello-thejane/bitx-haskell
test/Network/Bitcoin/BitX/Spec/Specs/LensSpec.hs
bsd-3-clause
_feeInfo :: Maybe Int _feeInfo = do let x = BitX.FeeInfo 0 0 0 let _ = x ^. BitX.makerFee let _ = x ^. BitX.takerFee let _ = x ^. BitX.thirtyDayVolume Nothing
168
_feeInfo :: Maybe Int _feeInfo = do let x = BitX.FeeInfo 0 0 0 let _ = x ^. BitX.makerFee let _ = x ^. BitX.takerFee let _ = x ^. BitX.thirtyDayVolume Nothing
168
_feeInfo = do let x = BitX.FeeInfo 0 0 0 let _ = x ^. BitX.makerFee let _ = x ^. BitX.takerFee let _ = x ^. BitX.thirtyDayVolume Nothing
146
false
true
0
11
42
83
37
46
null
null
sdiehl/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
mkPlainWarnMsg dflags locn msg = mk_err_msg dflags SevWarning locn alwaysQualify (ErrDoc [msg] [] [])
114
mkPlainWarnMsg dflags locn msg = mk_err_msg dflags SevWarning locn alwaysQualify (ErrDoc [msg] [] [])
114
mkPlainWarnMsg dflags locn msg = mk_err_msg dflags SevWarning locn alwaysQualify (ErrDoc [msg] [] [])
114
false
false
0
8
26
41
20
21
null
null
alios/geojson-types
src/Data/GeoJSON/Position.hs
bsd-3-clause
toPosition3 :: Num a => Position a -> Position a toPosition3 (Position2 (x,y)) = Position3 (x,y, 0)
99
toPosition3 :: Num a => Position a -> Position a toPosition3 (Position2 (x,y)) = Position3 (x,y, 0)
99
toPosition3 (Position2 (x,y)) = Position3 (x,y, 0)
50
false
true
0
8
16
55
28
27
null
null
hesselink/stack
src/Network/HTTP/Download/Verified.hs
bsd-3-clause
displayCheckHexDigest (CheckHexDigestByteString s) = displayByteString s ++ " (ByteString)"
91
displayCheckHexDigest (CheckHexDigestByteString s) = displayByteString s ++ " (ByteString)"
91
displayCheckHexDigest (CheckHexDigestByteString s) = displayByteString s ++ " (ByteString)"
91
false
false
0
6
8
23
10
13
null
null
lihuanglx/disjoint-intersection
src/Target/TypeCheck.hs
bsd-3-clause
typecheck :: Expr -> Either T.Text Type typecheck = runTcMonad . check
70
typecheck :: Expr -> Either T.Text Type typecheck = runTcMonad . check
70
typecheck = runTcMonad . check
30
false
true
0
7
11
26
13
13
null
null
yliu120/K3
src/Language/K3/Analysis/SEffects/Constructors.hs
apache-2.0
fdata :: Maybe [Identifier] -> [K3 Effect] -> K3 Effect fdata idOpt ch = Node (FData idOpt :@: []) ch
101
fdata :: Maybe [Identifier] -> [K3 Effect] -> K3 Effect fdata idOpt ch = Node (FData idOpt :@: []) ch
101
fdata idOpt ch = Node (FData idOpt :@: []) ch
45
false
true
0
8
19
56
27
29
null
null
eijian/raytracer
src/Parser.hs
bsd-3-clause
ambient :: Parser Param ambient = do _ <- string rAmbient _ <- separator r <- radiance _ <- blanc return (rAmbient, show r) {- | >>> parse maxrad pname "maxradiance : 0.1" Right ("maxradiance","0.1") -}
213
ambient :: Parser Param ambient = do _ <- string rAmbient _ <- separator r <- radiance _ <- blanc return (rAmbient, show r) {- | >>> parse maxrad pname "maxradiance : 0.1" Right ("maxradiance","0.1") -}
213
ambient = do _ <- string rAmbient _ <- separator r <- radiance _ <- blanc return (rAmbient, show r) {- | >>> parse maxrad pname "maxradiance : 0.1" Right ("maxradiance","0.1") -}
189
false
true
0
9
46
61
28
33
null
null
kadena-io/pact
src/Pact/Native/Capabilities.hs
bsd-3-clause
requireCapability :: NativeDef requireCapability = defNative "require-capability" requireCapability' (funType tTyBool [("capability",TyFun $ funType' tTyBool [])]) [LitExample "(require-capability (TRANSFER src dest))"] "Specifies and tests for existing grant of CAPABILITY, failing if not found in environment." where requireCapability' :: NativeFun e requireCapability' i [TApp a@App{} _] = gasUnreduced i [] $ do (cap,_,_) <- appToCap a granted <- capabilityAcquired cap unless granted $ evalError' i $ "require-capability: not granted: " <> pretty cap return $ toTerm True requireCapability' i as = argsError' i as
664
requireCapability :: NativeDef requireCapability = defNative "require-capability" requireCapability' (funType tTyBool [("capability",TyFun $ funType' tTyBool [])]) [LitExample "(require-capability (TRANSFER src dest))"] "Specifies and tests for existing grant of CAPABILITY, failing if not found in environment." where requireCapability' :: NativeFun e requireCapability' i [TApp a@App{} _] = gasUnreduced i [] $ do (cap,_,_) <- appToCap a granted <- capabilityAcquired cap unless granted $ evalError' i $ "require-capability: not granted: " <> pretty cap return $ toTerm True requireCapability' i as = argsError' i as
664
requireCapability = defNative "require-capability" requireCapability' (funType tTyBool [("capability",TyFun $ funType' tTyBool [])]) [LitExample "(require-capability (TRANSFER src dest))"] "Specifies and tests for existing grant of CAPABILITY, failing if not found in environment." where requireCapability' :: NativeFun e requireCapability' i [TApp a@App{} _] = gasUnreduced i [] $ do (cap,_,_) <- appToCap a granted <- capabilityAcquired cap unless granted $ evalError' i $ "require-capability: not granted: " <> pretty cap return $ toTerm True requireCapability' i as = argsError' i as
633
false
true
2
11
127
201
88
113
null
null
RayRacine/aws
Aws/S3/Core.hs
bsd-3-clause
writeCannedAcl AclPublicReadWrite = "public-read-write"
62
writeCannedAcl AclPublicReadWrite = "public-read-write"
62
writeCannedAcl AclPublicReadWrite = "public-read-write"
62
false
false
0
5
10
9
4
5
null
null
kawu/tagger
src/Data/LincDataSetTrie.hs
bsd-3-clause
alphabetFrom :: Tagset -> [LayerCompiled] -> [FilePath] -> IO C.Alphabet alphabetFrom tagset layers paths = do words <- return $ readWords tagset layers paths alphabet <- C.fromWordsIO words (length layers) return alphabet
234
alphabetFrom :: Tagset -> [LayerCompiled] -> [FilePath] -> IO C.Alphabet alphabetFrom tagset layers paths = do words <- return $ readWords tagset layers paths alphabet <- C.fromWordsIO words (length layers) return alphabet
234
alphabetFrom tagset layers paths = do words <- return $ readWords tagset layers paths alphabet <- C.fromWordsIO words (length layers) return alphabet
161
false
true
0
11
43
90
41
49
null
null
vladimir-ipatov/ganeti
test/hs/Test/Ganeti/Types.hs
gpl-2.0
prop_NICMode_serialisation :: NICMode -> Property prop_NICMode_serialisation = testSerialisation
96
prop_NICMode_serialisation :: NICMode -> Property prop_NICMode_serialisation = testSerialisation
96
prop_NICMode_serialisation = testSerialisation
46
false
true
0
5
7
15
8
7
null
null
swamp-agr/carbuyer-advisor
fay/Widget.hs
mit
addBudgetEvent :: Fay () addBudgetEvent = do btn <- getElementById "budget" setValue btn "" propagateAction btn budgetEvent [onChange, onClick, onFocus, onKeyUp]
167
addBudgetEvent :: Fay () addBudgetEvent = do btn <- getElementById "budget" setValue btn "" propagateAction btn budgetEvent [onChange, onClick, onFocus, onKeyUp]
167
addBudgetEvent = do btn <- getElementById "budget" setValue btn "" propagateAction btn budgetEvent [onChange, onClick, onFocus, onKeyUp]
142
false
true
0
8
26
56
27
29
null
null
fmthoma/ghc
compiler/types/TypeRep.hs
bsd-3-clause
isKindVar :: Var -> Bool isKindVar v = isTKVar v && isSuperKind (varType v)
75
isKindVar :: Var -> Bool isKindVar v = isTKVar v && isSuperKind (varType v)
75
isKindVar v = isTKVar v && isSuperKind (varType v)
50
false
true
0
8
13
34
16
18
null
null
UCSD-PL/RefScript
src/Language/Rsc/Errors.hs
bsd-3-clause
bugNoCasts l e = mkErr l $ text $ printf "BUG: No casts found for expression '%s'" (ppshow e)
108
bugNoCasts l e = mkErr l $ text $ printf "BUG: No casts found for expression '%s'" (ppshow e)
108
bugNoCasts l e = mkErr l $ text $ printf "BUG: No casts found for expression '%s'" (ppshow e)
108
false
false
0
8
33
33
15
18
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\x2F975' = "\x262D9"
35
decomposeChar '\x2F975' = "\x262D9"
35
decomposeChar '\x2F975' = "\x262D9"
35
false
false
0
5
3
9
4
5
null
null
xnning/fcore
lib/typeCheck/TypeCheck.hs
bsd-2-clause
checkExpr (L loc (Merge e1 e2)) = do (t1, e1') <- checkExpr e1 (t2, e2') <- checkExpr e2 return (And t1 t2, Merge e1' e2' `withLoc` e1')
148
checkExpr (L loc (Merge e1 e2)) = do (t1, e1') <- checkExpr e1 (t2, e2') <- checkExpr e2 return (And t1 t2, Merge e1' e2' `withLoc` e1')
148
checkExpr (L loc (Merge e1 e2)) = do (t1, e1') <- checkExpr e1 (t2, e2') <- checkExpr e2 return (And t1 t2, Merge e1' e2' `withLoc` e1')
148
false
false
0
10
38
85
42
43
null
null
rhennigan/code
haskell/pcdSimplification/src/paperFunctions.hs
gpl-2.0
tr' x = map head' x : tr' (map tail' x)
39
tr' x = map head' x : tr' (map tail' x)
39
tr' x = map head' x : tr' (map tail' x)
39
false
false
3
7
10
35
13
22
null
null
k0001/haskell-money
safe-money-serialise/test/Main.hs
bsd-3-clause
rawDis0 :: Money.Discrete "USD" "cent" rawDis0 = Money.discrete 4
65
rawDis0 :: Money.Discrete "USD" "cent" rawDis0 = Money.discrete 4
65
rawDis0 = Money.discrete 4
26
false
true
1
6
8
26
11
15
null
null
igorii/LogicProver
LogicProver/Parse.hs
mit
opTable = [ [Prefix (reservedOp "~" >> return PNegate)] , [Infix (reservedOp "and" >> return PAnd) AssocLeft] , [Infix (reservedOp "or" >> return POr) AssocLeft] , [Infix (reservedOp "->" >> return PCond) AssocLeft] ]
283
opTable = [ [Prefix (reservedOp "~" >> return PNegate)] , [Infix (reservedOp "and" >> return PAnd) AssocLeft] , [Infix (reservedOp "or" >> return POr) AssocLeft] , [Infix (reservedOp "->" >> return PCond) AssocLeft] ]
283
opTable = [ [Prefix (reservedOp "~" >> return PNegate)] , [Infix (reservedOp "and" >> return PAnd) AssocLeft] , [Infix (reservedOp "or" >> return POr) AssocLeft] , [Infix (reservedOp "->" >> return PCond) AssocLeft] ]
283
false
false
0
10
99
100
50
50
null
null
brendanhay/gogol
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Folders/SetIAMPolicy.hs
mpl-2.0
-- | V1 error format. fsipXgafv :: Lens' FoldersSetIAMPolicy (Maybe Xgafv) fsipXgafv = lens _fsipXgafv (\ s a -> s{_fsipXgafv = a})
133
fsipXgafv :: Lens' FoldersSetIAMPolicy (Maybe Xgafv) fsipXgafv = lens _fsipXgafv (\ s a -> s{_fsipXgafv = a})
111
fsipXgafv = lens _fsipXgafv (\ s a -> s{_fsipXgafv = a})
58
true
true
0
9
23
48
25
23
null
null
bergmark/http2
Network/HTTP2/Types.hs
bsd-3-clause
-- | -- >>> isControl 0 -- True -- >>> isControl 1 -- False isControl :: StreamId -> Bool isControl 0 = True
108
isControl :: StreamId -> Bool isControl 0 = True
48
isControl 0 = True
18
true
true
0
7
22
29
15
14
null
null
mrehayden1/harmony
Console/Args.hs
bsd-3-clause
passwordOptionP :: Parser Options passwordOptionP = string "-p" *> (updatePassword <$> optionArgumentP) where updatePassword p = option $ \a -> a { password = Just p }
170
passwordOptionP :: Parser Options passwordOptionP = string "-p" *> (updatePassword <$> optionArgumentP) where updatePassword p = option $ \a -> a { password = Just p }
170
passwordOptionP = string "-p" *> (updatePassword <$> optionArgumentP) where updatePassword p = option $ \a -> a { password = Just p }
136
false
true
0
9
29
59
30
29
null
null
DougBurke/swish
src/Swish/Commands.hs
lgpl-2.1
swishOutputPart :: (Label lb) => Maybe String -> Handle -> Maybe (GraphPartition lb) -> SwishStateIO () swishOutputPart _ hnd part = let out = maybe "\n(No arcs)" (partitionShowP "\n") part in lift $ hPutStrLn hnd out
241
swishOutputPart :: (Label lb) => Maybe String -> Handle -> Maybe (GraphPartition lb) -> SwishStateIO () swishOutputPart _ hnd part = let out = maybe "\n(No arcs)" (partitionShowP "\n") part in lift $ hPutStrLn hnd out
241
swishOutputPart _ hnd part = let out = maybe "\n(No arcs)" (partitionShowP "\n") part in lift $ hPutStrLn hnd out
118
false
true
2
12
59
96
43
53
null
null
pranjaltale16/codeworld
funblocks-client/src/Blocks/Types.hs
apache-2.0
cwMixed = standardFunction "cwMixed" "mixed" (Just "pot-mix.svg") [typeColor, typeColor, typeColor] ["COL1", "COL2"] colorColor "Two mix of two colors"
164
cwMixed = standardFunction "cwMixed" "mixed" (Just "pot-mix.svg") [typeColor, typeColor, typeColor] ["COL1", "COL2"] colorColor "Two mix of two colors"
164
cwMixed = standardFunction "cwMixed" "mixed" (Just "pot-mix.svg") [typeColor, typeColor, typeColor] ["COL1", "COL2"] colorColor "Two mix of two colors"
164
false
false
1
7
30
45
23
22
null
null
fmapfmapfmap/amazonka
amazonka-dynamodb-streams/gen/Network/AWS/DynamoDBStreams/Types/Product.hs
mpl-2.0
-- | The DynamoDB table with which the stream is associated. sdTableName :: Lens' StreamDescription (Maybe Text) sdTableName = lens _sdTableName (\ s a -> s{_sdTableName = a})
175
sdTableName :: Lens' StreamDescription (Maybe Text) sdTableName = lens _sdTableName (\ s a -> s{_sdTableName = a})
114
sdTableName = lens _sdTableName (\ s a -> s{_sdTableName = a})
62
true
true
0
9
27
46
25
21
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/DiffCheck.hs
bsd-3-clause
isDiff :: [Int] -> Located a -> Bool isDiff ls x = any hits ls where hits i = line x <= i && i <= lineE x ------------------------------------------------------------------------- -- | @thin@ returns a subset of the @[CoreBind]@ given which correspond -- to those binders that depend on any of the @Var@s provided. -------------------------------------------------------------------------
398
isDiff :: [Int] -> Located a -> Bool isDiff ls x = any hits ls where hits i = line x <= i && i <= lineE x ------------------------------------------------------------------------- -- | @thin@ returns a subset of the @[CoreBind]@ given which correspond -- to those binders that depend on any of the @Var@s provided. -------------------------------------------------------------------------
398
isDiff ls x = any hits ls where hits i = line x <= i && i <= lineE x ------------------------------------------------------------------------- -- | @thin@ returns a subset of the @[CoreBind]@ given which correspond -- to those binders that depend on any of the @Var@s provided. -------------------------------------------------------------------------
361
false
true
3
8
63
79
36
43
null
null
ezyang/ghc
compiler/simplCore/SimplEnv.hs
bsd-3-clause
{- Note [Setting the right in-scope set] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider \x. (let x = e in b) arg[x] where the let shadows the lambda. Really this means something like \x1. (let x2 = e in b) arg[x1] - When we capture the 'arg' in an ApplyToVal continuation, we capture the environment, which says what 'x' is bound to, namely x1 - Then that continuation gets pushed under the let - Finally we simplify 'arg'. We want - the static, lexical environment bindig x :-> x1 - the in-scopeset from "here", under the 'let' which includes both x1 and x2 It's important to have the right in-scope set, else we may rename a variable to one that is already in scope. So we must pick up the in-scope set from "here", but otherwise use the environment we captured along with 'arg'. This transfer of in-scope set is done by setInScopeFromE. -} --------------------- zapSubstEnv :: SimplEnv -> SimplEnv zapSubstEnv env = env {seTvSubst = emptyVarEnv, seCvSubst = emptyVarEnv, seIdSubst = emptyVarEnv}
1,033
zapSubstEnv :: SimplEnv -> SimplEnv zapSubstEnv env = env {seTvSubst = emptyVarEnv, seCvSubst = emptyVarEnv, seIdSubst = emptyVarEnv}
133
zapSubstEnv env = env {seTvSubst = emptyVarEnv, seCvSubst = emptyVarEnv, seIdSubst = emptyVarEnv}
97
true
true
0
7
199
49
26
23
null
null
spinda/liquidhaskell
tests/gsoc15/unknown/pos/HaskellMeasure.hs
bsd-3-clause
llen :: [a] -> Int llen [] = 0
30
llen :: [a] -> Int llen [] = 0
30
llen [] = 0
11
false
true
0
6
8
23
12
11
null
null
grayjay/json-rpc-server
src/Network/JsonRpc/Types.hs
mit
idKey = "id"
12
idKey = "id"
12
idKey = "id"
12
false
false
0
4
2
6
3
3
null
null
sdiehl/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (SUBFO reg1 reg2 reg3) = pprLogic (sLit "subfo") reg1 reg2 (RIReg reg3)
80
pprInstr (SUBFO reg1 reg2 reg3) = pprLogic (sLit "subfo") reg1 reg2 (RIReg reg3)
80
pprInstr (SUBFO reg1 reg2 reg3) = pprLogic (sLit "subfo") reg1 reg2 (RIReg reg3)
80
false
false
0
7
12
41
19
22
null
null
timtylin/scholdoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
pipeBreak :: MarkdownParser [Alignment] pipeBreak = try $ do nonindentSpaces openPipe <- (True <$ char '|') <|> return False first <- pipeTableHeaderPart rest <- many $ sepPipe *> pipeTableHeaderPart -- surrounding pipes needed for a one-column table: guard $ not (null rest && not openPipe) optional (char '|') blankline return (first:rest)
359
pipeBreak :: MarkdownParser [Alignment] pipeBreak = try $ do nonindentSpaces openPipe <- (True <$ char '|') <|> return False first <- pipeTableHeaderPart rest <- many $ sepPipe *> pipeTableHeaderPart -- surrounding pipes needed for a one-column table: guard $ not (null rest && not openPipe) optional (char '|') blankline return (first:rest)
359
pipeBreak = try $ do nonindentSpaces openPipe <- (True <$ char '|') <|> return False first <- pipeTableHeaderPart rest <- many $ sepPipe *> pipeTableHeaderPart -- surrounding pipes needed for a one-column table: guard $ not (null rest && not openPipe) optional (char '|') blankline return (first:rest)
319
false
true
0
12
68
122
56
66
null
null
shepheb/go10c
Compiler.hs
bsd-3-clause
saveRegsForCall :: String -> Compiler ([Asm], [Asm]) saveRegsForCall r = do rs <- regsToSave r return (map (SET PUSH . Reg) (reverse rs), map (\r -> SET (Reg r) POP) rs)
189
saveRegsForCall :: String -> Compiler ([Asm], [Asm]) saveRegsForCall r = do rs <- regsToSave r return (map (SET PUSH . Reg) (reverse rs), map (\r -> SET (Reg r) POP) rs)
189
saveRegsForCall r = do rs <- regsToSave r return (map (SET PUSH . Reg) (reverse rs), map (\r -> SET (Reg r) POP) rs)
136
false
true
0
14
50
100
50
50
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Fsharp.hs
gpl-2.0
parseRules ("FSharp","Struct") = (((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_end >>= withAttribute KeywordTok) >>~ (popContext)) <|> ((parseRules ("FSharp","Normal"))) <|> (currentContext >>= \x -> guard (x == ("FSharp","Struct")) >> pDefault >>= withAttribute NormalTok))
293
parseRules ("FSharp","Struct") = (((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_end >>= withAttribute KeywordTok) >>~ (popContext)) <|> ((parseRules ("FSharp","Normal"))) <|> (currentContext >>= \x -> guard (x == ("FSharp","Struct")) >> pDefault >>= withAttribute NormalTok))
293
parseRules ("FSharp","Struct") = (((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_end >>= withAttribute KeywordTok) >>~ (popContext)) <|> ((parseRules ("FSharp","Normal"))) <|> (currentContext >>= \x -> guard (x == ("FSharp","Struct")) >> pDefault >>= withAttribute NormalTok))
293
false
false
0
15
42
105
57
48
null
null
rob-b/pivotal
app/Main.hs
bsd-3-clause
main :: IO () main = do maybeEnvToken <- lookupEnvWith (Token . BC.pack) "PIVOTAL_TOKEN" maybeEnvProjectId <- lookupEnvWith (ProjectId . T.pack) "PIVOTAL_PROJECT_ID" -- Get the ARGV values. When determining the token|project-id to use we prefer: -- 1. ARGV -- 2. Env var -- 3. (one day) local config file options <- execParser optionsWithInfo -- FIXME: some commands don't need token + project-id bestToken <- failIf (options ^. optionsToken <|> maybeEnvToken) "Must set PIVOTAL_TOKEN" bestProjectId <- failIf (options ^. optionsProjectId <|> maybeEnvProjectId) "Must set PIVOTAL_PROJECT_ID" let app = mkApp bestToken bestProjectId (options ^. optionsCommand) run app >>= TIO.putStrLn where lookupEnvWith :: (String -> b) -> String -> IO (Maybe b) lookupEnvWith f = fmap (fmap f) . lookupEnv failIf :: Maybe b -> T.Text -> IO b failIf cmp msg = case cmp of Nothing -> do TIO.putStrLn msg exitWith $ ExitFailure 1 Just t -> return t
1,031
main :: IO () main = do maybeEnvToken <- lookupEnvWith (Token . BC.pack) "PIVOTAL_TOKEN" maybeEnvProjectId <- lookupEnvWith (ProjectId . T.pack) "PIVOTAL_PROJECT_ID" -- Get the ARGV values. When determining the token|project-id to use we prefer: -- 1. ARGV -- 2. Env var -- 3. (one day) local config file options <- execParser optionsWithInfo -- FIXME: some commands don't need token + project-id bestToken <- failIf (options ^. optionsToken <|> maybeEnvToken) "Must set PIVOTAL_TOKEN" bestProjectId <- failIf (options ^. optionsProjectId <|> maybeEnvProjectId) "Must set PIVOTAL_PROJECT_ID" let app = mkApp bestToken bestProjectId (options ^. optionsCommand) run app >>= TIO.putStrLn where lookupEnvWith :: (String -> b) -> String -> IO (Maybe b) lookupEnvWith f = fmap (fmap f) . lookupEnv failIf :: Maybe b -> T.Text -> IO b failIf cmp msg = case cmp of Nothing -> do TIO.putStrLn msg exitWith $ ExitFailure 1 Just t -> return t
1,031
main = do maybeEnvToken <- lookupEnvWith (Token . BC.pack) "PIVOTAL_TOKEN" maybeEnvProjectId <- lookupEnvWith (ProjectId . T.pack) "PIVOTAL_PROJECT_ID" -- Get the ARGV values. When determining the token|project-id to use we prefer: -- 1. ARGV -- 2. Env var -- 3. (one day) local config file options <- execParser optionsWithInfo -- FIXME: some commands don't need token + project-id bestToken <- failIf (options ^. optionsToken <|> maybeEnvToken) "Must set PIVOTAL_TOKEN" bestProjectId <- failIf (options ^. optionsProjectId <|> maybeEnvProjectId) "Must set PIVOTAL_PROJECT_ID" let app = mkApp bestToken bestProjectId (options ^. optionsCommand) run app >>= TIO.putStrLn where lookupEnvWith :: (String -> b) -> String -> IO (Maybe b) lookupEnvWith f = fmap (fmap f) . lookupEnv failIf :: Maybe b -> T.Text -> IO b failIf cmp msg = case cmp of Nothing -> do TIO.putStrLn msg exitWith $ ExitFailure 1 Just t -> return t
1,017
false
true
0
12
245
278
133
145
null
null
ezyang/ghc
compiler/utils/Pretty.hs
bsd-3-clause
-- p can't be Empty, so no need for mkNest aboveNest (NilAbove p) g k q = nilAbove_ (aboveNest p g k q)
111
aboveNest (NilAbove p) g k q = nilAbove_ (aboveNest p g k q)
67
aboveNest (NilAbove p) g k q = nilAbove_ (aboveNest p g k q)
67
true
false
0
7
30
37
18
19
null
null
pascal-knodel/haskell-craft
_/links/E'10'30.hs
mit
-- ... superimpose :: Picture -> Picture -> Picture superimpose a b = zipWith superimposeString a b
105
superimpose :: Picture -> Picture -> Picture superimpose a b = zipWith superimposeString a b
95
superimpose a b = zipWith superimposeString a b
50
true
true
0
6
22
32
16
16
null
null
forestbelton/orb
test/Style/ParserSpec.hs
bsd-3-clause
testRed s = parseStyle ("background-color:" ++ s) `shouldBe` style [(BackgroundColor, red)]
91
testRed s = parseStyle ("background-color:" ++ s) `shouldBe` style [(BackgroundColor, red)]
91
testRed s = parseStyle ("background-color:" ++ s) `shouldBe` style [(BackgroundColor, red)]
91
false
false
0
8
10
37
20
17
null
null
mettekou/ghc
compiler/utils/Bag.hs
bsd-3-clause
mapAccumBagLM f s (TwoBags b1 b2) = do { (s1, b1') <- mapAccumBagLM f s b1 ; (s2, b2') <- mapAccumBagLM f s1 b2 ; return (s2, TwoBags b1' b2') }
223
mapAccumBagLM f s (TwoBags b1 b2) = do { (s1, b1') <- mapAccumBagLM f s b1 ; (s2, b2') <- mapAccumBagLM f s1 b2 ; return (s2, TwoBags b1' b2') }
223
mapAccumBagLM f s (TwoBags b1 b2) = do { (s1, b1') <- mapAccumBagLM f s b1 ; (s2, b2') <- mapAccumBagLM f s1 b2 ; return (s2, TwoBags b1' b2') }
223
false
false
0
9
109
82
42
40
null
null
sjoerdvisscher/fmlist
tests.hs
bsd-3-clause
t5 ff lf = quickCheck ((\s t -> F.toList (ff (F.fromList s) (F.fromList t)) == lf s t) :: [Int] -> [Int] -> Bool)
113
t5 ff lf = quickCheck ((\s t -> F.toList (ff (F.fromList s) (F.fromList t)) == lf s t) :: [Int] -> [Int] -> Bool)
113
t5 ff lf = quickCheck ((\s t -> F.toList (ff (F.fromList s) (F.fromList t)) == lf s t) :: [Int] -> [Int] -> Bool)
113
false
false
0
15
23
82
42
40
null
null
kumasento/accelerate
Data/Array/Accelerate/Smart.hs
bsd-3-clause
mkRecip :: (Elt t, IsFloating t) => Exp t -> Exp t mkRecip x = Exp $ PrimRecip floatingType `PrimApp` x
103
mkRecip :: (Elt t, IsFloating t) => Exp t -> Exp t mkRecip x = Exp $ PrimRecip floatingType `PrimApp` x
103
mkRecip x = Exp $ PrimRecip floatingType `PrimApp` x
52
false
true
0
7
20
52
26
26
null
null
dvolk/hoodie
Main.hs
gpl-3.0
mkVwall :: Char -> Int -> Vector2 -> TileMapPart mkVwall ch len (x,y) = zip (zip (repeat x) [y..(y-1+len)]) (repeat ch)
119
mkVwall :: Char -> Int -> Vector2 -> TileMapPart mkVwall ch len (x,y) = zip (zip (repeat x) [y..(y-1+len)]) (repeat ch)
119
mkVwall ch len (x,y) = zip (zip (repeat x) [y..(y-1+len)]) (repeat ch)
70
false
true
0
11
20
77
40
37
null
null
stappit/fit-parser
library/ProfileParser.hs
gpl-3.0
sInt16P :: Arch -> Parser (Maybe Int16) sInt16P arch = do w <- num16P arch if w == 0x7FFF then return Nothing else return $ Just w
150
sInt16P :: Arch -> Parser (Maybe Int16) sInt16P arch = do w <- num16P arch if w == 0x7FFF then return Nothing else return $ Just w
150
sInt16P arch = do w <- num16P arch if w == 0x7FFF then return Nothing else return $ Just w
110
false
true
0
9
46
62
29
33
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F07.hs
bsd-3-clause
ptr_glEnableClientState :: FunPtr (GLenum -> IO ()) ptr_glEnableClientState = unsafePerformIO $ getCommand "glEnableClientState"
128
ptr_glEnableClientState :: FunPtr (GLenum -> IO ()) ptr_glEnableClientState = unsafePerformIO $ getCommand "glEnableClientState"
128
ptr_glEnableClientState = unsafePerformIO $ getCommand "glEnableClientState"
76
false
true
0
9
12
33
16
17
null
null
leksah/yi
src/library/Yi/Editor.hs
gpl-2.0
withOtherWindow :: MonadEditor m => m a -> m a withOtherWindow f = do shiftOtherWindow x <- f withEditor prevWinE return x
130
withOtherWindow :: MonadEditor m => m a -> m a withOtherWindow f = do shiftOtherWindow x <- f withEditor prevWinE return x
130
withOtherWindow f = do shiftOtherWindow x <- f withEditor prevWinE return x
83
false
true
0
7
29
53
22
31
null
null
cirquit/quizlearner
quizlearner/Handler/Upload.hs
mit
postUploadR :: Handler Html postUploadR = do memail <- lookupSession "_ID" ((result, widget), enctype) <- runFormPost fileMForm case result of (FormSuccess fileInfo) -> do bytestring <- runResourceT $ fileSource fileInfo $$ sinkLbs maybeExam <- liftIO $ tryXMLEvaluation bytestring case maybeExam of Just newExam -> do (publicExams, privateExams) <- runDB $ do _ <- insert $ newExam memail (publicExams, privateExams) <- getAllExams memail return (publicExams, privateExams) let middleWidget = [whamlet| <span class=simpleWhite>_{MsgFileRec $ fileName fileInfo}|] >> postWidget enctype widget defaultLayout $(widgetFile "upload") Nothing -> do (publicExams, privateExams) <- runDB $ getAllExams memail let middleWidget = [whamlet|<div style="margin: 20px;"> <span class=simpleWhite> _{MsgErrInXML_P1} <a href=@{ExampleXMLR} style="font-weight:bold; color:#FFA500;"> _{MsgErrInXML_P2} |] >> postWidget enctype widget defaultLayout $(widgetFile "upload") (_) -> do (publicExams, privateExams) <- runDB $ getAllExams memail let middleWidget = [whamlet|<span class=smallWhite> _{MsgChooseXML}|] >> postWidget enctype widget defaultLayout $(widgetFile "upload") -- | Basic file input form
1,924
postUploadR :: Handler Html postUploadR = do memail <- lookupSession "_ID" ((result, widget), enctype) <- runFormPost fileMForm case result of (FormSuccess fileInfo) -> do bytestring <- runResourceT $ fileSource fileInfo $$ sinkLbs maybeExam <- liftIO $ tryXMLEvaluation bytestring case maybeExam of Just newExam -> do (publicExams, privateExams) <- runDB $ do _ <- insert $ newExam memail (publicExams, privateExams) <- getAllExams memail return (publicExams, privateExams) let middleWidget = [whamlet| <span class=simpleWhite>_{MsgFileRec $ fileName fileInfo}|] >> postWidget enctype widget defaultLayout $(widgetFile "upload") Nothing -> do (publicExams, privateExams) <- runDB $ getAllExams memail let middleWidget = [whamlet|<div style="margin: 20px;"> <span class=simpleWhite> _{MsgErrInXML_P1} <a href=@{ExampleXMLR} style="font-weight:bold; color:#FFA500;"> _{MsgErrInXML_P2} |] >> postWidget enctype widget defaultLayout $(widgetFile "upload") (_) -> do (publicExams, privateExams) <- runDB $ getAllExams memail let middleWidget = [whamlet|<span class=smallWhite> _{MsgChooseXML}|] >> postWidget enctype widget defaultLayout $(widgetFile "upload") -- | Basic file input form
1,923
postUploadR = do memail <- lookupSession "_ID" ((result, widget), enctype) <- runFormPost fileMForm case result of (FormSuccess fileInfo) -> do bytestring <- runResourceT $ fileSource fileInfo $$ sinkLbs maybeExam <- liftIO $ tryXMLEvaluation bytestring case maybeExam of Just newExam -> do (publicExams, privateExams) <- runDB $ do _ <- insert $ newExam memail (publicExams, privateExams) <- getAllExams memail return (publicExams, privateExams) let middleWidget = [whamlet| <span class=simpleWhite>_{MsgFileRec $ fileName fileInfo}|] >> postWidget enctype widget defaultLayout $(widgetFile "upload") Nothing -> do (publicExams, privateExams) <- runDB $ getAllExams memail let middleWidget = [whamlet|<div style="margin: 20px;"> <span class=simpleWhite> _{MsgErrInXML_P1} <a href=@{ExampleXMLR} style="font-weight:bold; color:#FFA500;"> _{MsgErrInXML_P2} |] >> postWidget enctype widget defaultLayout $(widgetFile "upload") (_) -> do (publicExams, privateExams) <- runDB $ getAllExams memail let middleWidget = [whamlet|<span class=smallWhite> _{MsgChooseXML}|] >> postWidget enctype widget defaultLayout $(widgetFile "upload") -- | Basic file input form
1,895
false
true
0
23
882
334
162
172
null
null
swift-nav/plover
src/Language/Plover/CodeGen.hs
mit
-- | Type is normalized type of vector. Creates a vector based on -- using C indexing of the expression, assuming the expression is -- stored linearly in memory. mkVecLoc :: Type -> C.Exp -> CmLoc mkVecLoc ty exp = mkVecLoc' exp NoOffset (denormalizeTypes ty)
260
mkVecLoc :: Type -> C.Exp -> CmLoc mkVecLoc ty exp = mkVecLoc' exp NoOffset (denormalizeTypes ty)
97
mkVecLoc ty exp = mkVecLoc' exp NoOffset (denormalizeTypes ty)
62
true
true
0
8
45
47
23
24
null
null
ssaavedra/liquidhaskell
benchmarks/base-4.5.1.0/Control/Concurrent/SampleVar.hs
bsd-3-clause
isEmptySampleVar :: SampleVar a -> IO Bool isEmptySampleVar (SampleVar svar) = do (readers, _) <- readMVar svar return (readers <= 0)
139
isEmptySampleVar :: SampleVar a -> IO Bool isEmptySampleVar (SampleVar svar) = do (readers, _) <- readMVar svar return (readers <= 0)
139
isEmptySampleVar (SampleVar svar) = do (readers, _) <- readMVar svar return (readers <= 0)
96
false
true
0
9
26
63
29
34
null
null
siddhanathan/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
deNoteType ty = ty
18
deNoteType ty = ty
18
deNoteType ty = ty
18
false
false
1
5
3
13
4
9
null
null
rueshyna/gogol
gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Policy' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pAuditConfigs' -- -- * 'pEtag' -- -- * 'pRules' -- -- * 'pVersion' -- -- * 'pBindings' -- -- * 'pIAMOwned' policy :: Policy policy = Policy' { _pAuditConfigs = Nothing , _pEtag = Nothing , _pRules = Nothing , _pVersion = Nothing , _pBindings = Nothing , _pIAMOwned = Nothing }
479
policy :: Policy policy = Policy' { _pAuditConfigs = Nothing , _pEtag = Nothing , _pRules = Nothing , _pVersion = Nothing , _pBindings = Nothing , _pIAMOwned = Nothing }
205
policy = Policy' { _pAuditConfigs = Nothing , _pEtag = Nothing , _pRules = Nothing , _pVersion = Nothing , _pBindings = Nothing , _pIAMOwned = Nothing }
184
true
true
0
6
120
64
46
18
null
null
GetShopTV/swagger2
src/Data/Swagger/Internal/Schema/Validation.hs
bsd-3-clause
-- | Default @'Config'@: -- -- @ -- defaultConfig = 'Config' -- { 'configPatternChecker' = \\_pattern _str -> True -- , 'configDefinitions' = mempty -- } -- @ defaultConfig :: Config defaultConfig = Config { configPatternChecker = \_pattern _str -> True , configDefinitions = mempty }
302
defaultConfig :: Config defaultConfig = Config { configPatternChecker = \_pattern _str -> True , configDefinitions = mempty }
134
defaultConfig = Config { configPatternChecker = \_pattern _str -> True , configDefinitions = mempty }
110
true
true
0
8
63
50
29
21
null
null
emk/haskell-probability-monads
Control/Monad/Perhaps.hs
bsd-3-clause
perhaps :: b -> (a -> b) -> Perhaps a -> b perhaps defaultValue f ph | impossible ph = defaultValue | otherwise = f (perhapsValue ph)
163
perhaps :: b -> (a -> b) -> Perhaps a -> b perhaps defaultValue f ph | impossible ph = defaultValue | otherwise = f (perhapsValue ph)
163
perhaps defaultValue f ph | impossible ph = defaultValue | otherwise = f (perhapsValue ph)
120
false
true
0
8
56
67
31
36
null
null
UCSD-PL/RefScript
src/Language/Rsc/Liquid/Checker.hs
bsd-3-clause
whenJustM Nothing _ = return []
32
whenJustM Nothing _ = return []
32
whenJustM Nothing _ = return []
32
false
false
0
6
6
16
7
9
null
null
mike-k-houghton/Builder
src/BF.hs
bsd-3-clause
defaultOptions :: Options defaultOptions = Options { optHelp = False , optVersion = False , optAction = Interpret}
169
defaultOptions :: Options defaultOptions = Options { optHelp = False , optVersion = False , optAction = Interpret}
169
defaultOptions = Options { optHelp = False , optVersion = False , optAction = Interpret}
143
false
true
0
6
72
31
19
12
null
null
dmagyar/scurry
src/Scurry/TapConfig.hs
bsd-3-clause
getTapHandle :: ScurryAddress -> ScurryMask -> IO (Either CInt (TapDesc,MACAddr)) getTapHandle ip mask = open_tap ip mask
121
getTapHandle :: ScurryAddress -> ScurryMask -> IO (Either CInt (TapDesc,MACAddr)) getTapHandle ip mask = open_tap ip mask
121
getTapHandle ip mask = open_tap ip mask
39
false
true
0
10
16
50
24
26
null
null
fpco/hlint
data/Default.hs
bsd-3-clause
warn = (case x of Just a -> a; Nothing -> y) ==> fromMaybe y x
64
warn = (case x of Just a -> a; Nothing -> y) ==> fromMaybe y x
64
warn = (case x of Just a -> a; Nothing -> y) ==> fromMaybe y x
64
false
false
0
10
17
38
19
19
null
null
bcoppens/HaskellSshClient
tests/Ssh/NetworkIO/Tests.hs
gpl-3.0
boolGetTests = genericGetCheck "Bool" getBool boolGetTestValues
63
boolGetTests = genericGetCheck "Bool" getBool boolGetTestValues
63
boolGetTests = genericGetCheck "Bool" getBool boolGetTestValues
63
false
false
0
5
5
13
6
7
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_TEXTURE_COORD_ARRAY_LENGTH_NV :: GLenum gl_TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F
84
gl_TEXTURE_COORD_ARRAY_LENGTH_NV :: GLenum gl_TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F
84
gl_TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F
41
false
true
0
4
5
11
6
5
null
null
notcome/indescript
src/Language/Indescript/Parser/Lexer.hs
bsd-3-clause
-- # Regex.Applicative combinator extension symClass :: [Char] -> RE Char Char symClass cls = psym (\x -> x `elem` cls)
122
symClass :: [Char] -> RE Char Char symClass cls = psym (\x -> x `elem` cls)
75
symClass cls = psym (\x -> x `elem` cls)
40
true
true
0
8
23
44
24
20
null
null