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
spacekitteh/smcghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
genericWordMul2Op _ _ = panic "genericWordMul2Op"
49
genericWordMul2Op _ _ = panic "genericWordMul2Op"
49
genericWordMul2Op _ _ = panic "genericWordMul2Op"
49
false
false
1
5
5
14
6
8
null
null
khalilfazal/sscript
src/Data/Char/SScript.hs
bsd-3-clause
formatSS (x : xs) = x : formatSS xs
43
formatSS (x : xs) = x : formatSS xs
43
formatSS (x : xs) = x : formatSS xs
43
false
false
0
7
16
23
11
12
null
null
HIPERFIT/futhark
src/Futhark/Internalise/Exps.hs
isc
internaliseAppExp _ _ (E.LetFun ofname _ _ _) = error $ "Unexpected LetFun " ++ pretty ofname
95
internaliseAppExp _ _ (E.LetFun ofname _ _ _) = error $ "Unexpected LetFun " ++ pretty ofname
95
internaliseAppExp _ _ (E.LetFun ofname _ _ _) = error $ "Unexpected LetFun " ++ pretty ofname
95
false
false
0
8
18
38
18
20
null
null
olorin/amazonka
amazonka-cloudwatch-logs/test/Test/AWS/Gen/CloudWatchLogs.hs
mpl-2.0
testDeleteMetricFilterResponse :: DeleteMetricFilterResponse -> TestTree testDeleteMetricFilterResponse = res "DeleteMetricFilterResponse" "fixture/DeleteMetricFilterResponse.proto" cloudWatchLogs (Proxy :: Proxy DeleteMetricFilter)
248
testDeleteMetricFilterResponse :: DeleteMetricFilterResponse -> TestTree testDeleteMetricFilterResponse = res "DeleteMetricFilterResponse" "fixture/DeleteMetricFilterResponse.proto" cloudWatchLogs (Proxy :: Proxy DeleteMetricFilter)
248
testDeleteMetricFilterResponse = res "DeleteMetricFilterResponse" "fixture/DeleteMetricFilterResponse.proto" cloudWatchLogs (Proxy :: Proxy DeleteMetricFilter)
175
false
true
0
6
30
36
17
19
null
null
nick8325/kbc
src/Twee/Utils.hs
bsd-3-clause
labelM :: Monad m => (a -> m b) -> [a] -> m [(a, b)] labelM f = mapM (\x -> do { y <- f x; return (x, y) })
107
labelM :: Monad m => (a -> m b) -> [a] -> m [(a, b)] labelM f = mapM (\x -> do { y <- f x; return (x, y) })
107
labelM f = mapM (\x -> do { y <- f x; return (x, y) })
54
false
true
0
11
30
90
47
43
null
null
tjakway/ghcjvm
compiler/coreSyn/PprCore.hs
bsd-3-clause
pprArg (Coercion co) = text "@~" <+> pprOptCo co
48
pprArg (Coercion co) = text "@~" <+> pprOptCo co
48
pprArg (Coercion co) = text "@~" <+> pprOptCo co
48
false
false
0
7
8
25
11
14
null
null
christiaanb/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
deTagExpr (Type ty) = Type ty
45
deTagExpr (Type ty) = Type ty
45
deTagExpr (Type ty) = Type ty
45
false
false
0
6
21
19
8
11
null
null
CarstenKoenig/DOS2015
Countdown/CountdownFast.hs
unlicense
-- diese Funktion liefert alle Möglichkeiten wie -- eine Liste in zwei Teile geteilt werden kann split :: [a] -> [ ([a],[a]) ] split [] = [ ([],[]) ]
153
split :: [a] -> [ ([a],[a]) ] split [] = [ ([],[]) ]
56
split [] = [ ([],[]) ]
26
true
true
0
10
32
59
33
26
null
null
Daniel-Diaz/FTPLine
Main.hs
bsd-3-clause
runCom "clear" _ = do hand_ cleanFile outputStrLn "Memory Cleared."
76
runCom "clear" _ = do hand_ cleanFile outputStrLn "Memory Cleared."
76
runCom "clear" _ = do hand_ cleanFile outputStrLn "Memory Cleared."
76
false
false
0
7
18
23
9
14
null
null
nshepperd/funn
AI/Funn/CL/MonadCL.hs
mit
runCompiled :: MonadIO m => CL.Kernel -> [KernelArg] -> [CL.ClSize] -> [CL.ClSize] -> [CL.ClSize] -> m () runCompiled kernel args globalOffsets globalSizes localSizes = do queue <- getCommandQueue let go [] real_args = do CL.setKernelArgs kernel (real_args []) ev <- CL.enqueueNDRangeKernel queue ker...
495
runCompiled :: MonadIO m => CL.Kernel -> [KernelArg] -> [CL.ClSize] -> [CL.ClSize] -> [CL.ClSize] -> m () runCompiled kernel args globalOffsets globalSizes localSizes = do queue <- getCommandQueue let go [] real_args = do CL.setKernelArgs kernel (real_args []) ev <- CL.enqueueNDRangeKernel queue ker...
495
runCompiled kernel args globalOffsets globalSizes localSizes = do queue <- getCommandQueue let go [] real_args = do CL.setKernelArgs kernel (real_args []) ev <- CL.enqueueNDRangeKernel queue kernel globalOffsets globalSizes localSizes [] CL.waitForEvents [ev] go (KernelArg f : fs) real...
389
false
true
0
16
104
209
102
107
null
null
pgj/bead
src/Bead/Controller/Pages.hs
bsd-3-clause
isEvaluationTable _ = False
27
isEvaluationTable _ = False
27
isEvaluationTable _ = False
27
false
false
0
5
3
9
4
5
null
null
niteria/haddock
haddock-api/src/Haddock/InterfaceFile.hs
bsd-2-clause
serialiseName :: BinHandle -> Name -> UniqFM (Int,Name) -> IO () serialiseName bh name _ = do let modu = nameModule name put_ bh (moduleUnitId modu, moduleName modu, nameOccName name) ------------------------------------------------------------------------------- -- * GhcBinary instances -------------------------...
374
serialiseName :: BinHandle -> Name -> UniqFM (Int,Name) -> IO () serialiseName bh name _ = do let modu = nameModule name put_ bh (moduleUnitId modu, moduleName modu, nameOccName name) ------------------------------------------------------------------------------- -- * GhcBinary instances -------------------------...
374
serialiseName bh name _ = do let modu = nameModule name put_ bh (moduleUnitId modu, moduleName modu, nameOccName name) ------------------------------------------------------------------------------- -- * GhcBinary instances -------------------------------------------------------------------------------
309
false
true
0
10
41
91
43
48
null
null
lukexi/ghc-7.8-arm64
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
withState :: FCode a -> CgState -> FCode (a,CgState) withState (FCode fcode) newstate = FCode $ \info_down state -> case fcode info_down newstate of (# retval, state2 #) -> (# (retval,state2), state #)
207
withState :: FCode a -> CgState -> FCode (a,CgState) withState (FCode fcode) newstate = FCode $ \info_down state -> case fcode info_down newstate of (# retval, state2 #) -> (# (retval,state2), state #)
207
withState (FCode fcode) newstate = FCode $ \info_down state -> case fcode info_down newstate of (# retval, state2 #) -> (# (retval,state2), state #)
154
false
true
0
12
38
89
45
44
null
null
edsko/cabal
Cabal/tests/PackageTests/PackageTester.hs
bsd-3-clause
packageDBParams :: PackageDBStack -> [String] packageDBParams dbs = "--package-db=clear" : map (("--package-db=" ++) . convert) dbs where convert :: PackageDB -> String convert GlobalPackageDB = "global" convert UserPackageDB = "user" convert (SpecificPackageDB ...
435
packageDBParams :: PackageDBStack -> [String] packageDBParams dbs = "--package-db=clear" : map (("--package-db=" ++) . convert) dbs where convert :: PackageDB -> String convert GlobalPackageDB = "global" convert UserPackageDB = "user" convert (SpecificPackageDB ...
435
packageDBParams dbs = "--package-db=clear" : map (("--package-db=" ++) . convert) dbs where convert :: PackageDB -> String convert GlobalPackageDB = "global" convert UserPackageDB = "user" convert (SpecificPackageDB path) = path --------------------------------...
389
false
true
0
9
99
85
45
40
null
null
ihc/futhark
src/Futhark/Analysis/Alias.hs
isc
analyseLambda :: (Attributes lore, CanBeAliased (Op lore)) => Lambda lore -> Lambda (Aliases lore) analyseLambda lam = let body = analyseBody $ lambdaBody lam in lam { lambdaBody = body , lambdaParams = lambdaParams lam }
260
analyseLambda :: (Attributes lore, CanBeAliased (Op lore)) => Lambda lore -> Lambda (Aliases lore) analyseLambda lam = let body = analyseBody $ lambdaBody lam in lam { lambdaBody = body , lambdaParams = lambdaParams lam }
260
analyseLambda lam = let body = analyseBody $ lambdaBody lam in lam { lambdaBody = body , lambdaParams = lambdaParams lam }
144
false
true
0
10
74
90
44
46
null
null
tgdavies/codeworld
codeworld-api/src/CodeWorld/Color.hs
apache-2.0
chartreuse = fromHSL (3 / 6 * pi) 0.75 0.5
42
chartreuse = fromHSL (3 / 6 * pi) 0.75 0.5
42
chartreuse = fromHSL (3 / 6 * pi) 0.75 0.5
42
false
false
1
8
9
27
12
15
null
null
bitemyapp/ganeti
src/Ganeti/Query/Query.hs
bsd-2-clause
getRequestedNames :: Query -> [String] getRequestedNames qry = case needsNames qry of Just names -> getAllQuotedStrings names Nothing -> [] -- | Compute the requested job IDs. This is custom since we need to -- handle both strings and integers.
258
getRequestedNames :: Query -> [String] getRequestedNames qry = case needsNames qry of Just names -> getAllQuotedStrings names Nothing -> [] -- | Compute the requested job IDs. This is custom since we need to -- handle both strings and integers.
258
getRequestedNames qry = case needsNames qry of Just names -> getAllQuotedStrings names Nothing -> [] -- | Compute the requested job IDs. This is custom since we need to -- handle both strings and integers.
219
false
true
0
8
53
50
25
25
null
null
mimi1vx/gtk2hs
tools/apiGen/src/Api.hs
gpl-3.0
extractParameter :: Xml.Content -> Parameter extractParameter (Xml.CElem (Xml.Elem "parameter" [("ellipsis", _)] [])) = VarArgs
151
extractParameter :: Xml.Content -> Parameter extractParameter (Xml.CElem (Xml.Elem "parameter" [("ellipsis", _)] [])) = VarArgs
151
extractParameter (Xml.CElem (Xml.Elem "parameter" [("ellipsis", _)] [])) = VarArgs
106
false
true
0
13
37
57
28
29
null
null
jxv/cis-194-winter-2016
src/Homework/Week04/Assignment.hs
mit
-- #16 firstLetters :: [String] -> [Char] firstLetters = catMaybes . map safeHead
81
firstLetters :: [String] -> [Char] firstLetters = catMaybes . map safeHead
74
firstLetters = catMaybes . map safeHead
39
true
true
0
6
12
29
16
13
null
null
rueshyna/gogol
gogol-resourceviews/gen/Network/Google/Resource/ResourceViews/ZoneViews/ListResources.hs
mpl-2.0
-- | Specifies a nextPageToken returned by a previous list request. This -- token can be used to request the next page of results from a previous -- list request. zvlrPageToken :: Lens' ZoneViewsListResources (Maybe Text) zvlrPageToken = lens _zvlrPageToken (\ s a -> s{_zvlrPageToken = a})
298
zvlrPageToken :: Lens' ZoneViewsListResources (Maybe Text) zvlrPageToken = lens _zvlrPageToken (\ s a -> s{_zvlrPageToken = a})
135
zvlrPageToken = lens _zvlrPageToken (\ s a -> s{_zvlrPageToken = a})
76
true
true
0
9
54
50
27
23
null
null
ssaavedra/liquidhaskell
benchmarks/kmeans-0.1.2/Data/KMeans.orig.hs
bsd-3-clause
-- | A generalized kmeans function. This function operates not on points, but an arbitrary type which may be projected into a Euclidian space. Since the projection may be chosen freely, this allows for weighting dimensions to different degrees, etc. kmeansGen :: (a -> [Double]) -> Int -> [a] -> [[a]] kmeansGen f k poin...
393
kmeansGen :: (a -> [Double]) -> Int -> [a] -> [[a]] kmeansGen f k points = map (map getVal) . kmeans' k . map (\x -> WrapType (f x) x) $ points
143
kmeansGen f k points = map (map getVal) . kmeans' k . map (\x -> WrapType (f x) x) $ points
91
true
true
0
12
71
96
50
46
null
null
bmsherman/cublas
Foreign/CUDA/Cublas/TH.hs
bsd-3-clause
outMarshall (EnumC "cufftResult") = ([| FFT.resultIfOk |], id)
62
outMarshall (EnumC "cufftResult") = ([| FFT.resultIfOk |], id)
62
outMarshall (EnumC "cufftResult") = ([| FFT.resultIfOk |], id)
62
false
false
0
7
7
24
14
10
null
null
brendanhay/gogol
gogol-dns/gen/Network/Google/Resource/DNS/ManagedZoneOperations/Get.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). mzogUploadProtocol :: Lens' ManagedZoneOperationsGet (Maybe Text) mzogUploadProtocol = lens _mzogUploadProtocol (\ s a -> s{_mzogUploadProtocol = a})
219
mzogUploadProtocol :: Lens' ManagedZoneOperationsGet (Maybe Text) mzogUploadProtocol = lens _mzogUploadProtocol (\ s a -> s{_mzogUploadProtocol = a})
157
mzogUploadProtocol = lens _mzogUploadProtocol (\ s a -> s{_mzogUploadProtocol = a})
91
true
true
1
9
33
51
25
26
null
null
LudvikGalois/Fay-IFS
Fern.hs
gpl-3.0
drawDot :: Double -> Double -> Fay () drawDot = ffi "document.getElementById(\"fractal\").getContext(\"2d\").fillRect((%1+3)*100, 600 - %2*60, 1, 1)"
149
drawDot :: Double -> Double -> Fay () drawDot = ffi "document.getElementById(\"fractal\").getContext(\"2d\").fillRect((%1+3)*100, 600 - %2*60, 1, 1)"
149
drawDot = ffi "document.getElementById(\"fractal\").getContext(\"2d\").fillRect((%1+3)*100, 600 - %2*60, 1, 1)"
111
false
true
0
8
16
27
13
14
null
null
spatial-reasoning/zeno
src/Helpful/Random.hs
bsd-2-clause
shuffle :: (RandomGen g) => [a] -> g -> ([a], g) shuffle [] gen = ([], gen)
75
shuffle :: (RandomGen g) => [a] -> g -> ([a], g) shuffle [] gen = ([], gen)
75
shuffle [] gen = ([], gen)
26
false
true
0
9
16
55
31
24
null
null
jlouis/combinatorrent
src/Protocol/BCode.hs
bsd-2-clause
toBS :: String -> B.ByteString toBS = B.pack . map toW8
55
toBS :: String -> B.ByteString toBS = B.pack . map toW8
55
toBS = B.pack . map toW8
24
false
true
0
6
10
26
13
13
null
null
Noeda/dfterm3
src/Dfterm3/Admin.hs
isc
-- | Attempts to make a new admin session by checking a password. -- -- Returns `Nothing` if authentication fails for some reason (incorrect -- password or disabled password). -- -- The returned `SessionID` is used to perform administrator actions. newSessionByPassword :: B.ByteString -- ^ The password. ...
1,004
newSessionByPassword :: B.ByteString -- ^ The password. -> Int -- ^ How many seconds the -- session ID should be valid. -> Storage -> IO (Maybe SessionID) newSessionByPassword pas...
755
newSessionByPassword password expiry_time (readPersistentStorage -> ps) = do new_session_id <- newSessionID now <- getCurrentTime let session = Session new_session_id (fromIntegral expiry_time `addUTCTime` now) did_it_w...
459
true
true
0
13
363
135
70
65
null
null
brendanhay/gogol
gogol-cloudprivatecatalogproducer/gen/Network/Google/Resource/CloudPrivateCatalogProducer/Catalogs/List.hs
mpl-2.0
-- | A pagination token returned from a previous call to ListCatalogs that -- indicates where this listing should continue from. This field is -- optional. clPageToken :: Lens' CatalogsList (Maybe Text) clPageToken = lens _clPageToken (\ s a -> s{_clPageToken = a})
267
clPageToken :: Lens' CatalogsList (Maybe Text) clPageToken = lens _clPageToken (\ s a -> s{_clPageToken = a})
111
clPageToken = lens _clPageToken (\ s a -> s{_clPageToken = a})
64
true
true
1
9
44
54
27
27
null
null
pparkkin/eta
compiler/ETA/Main/DynFlags.hs
bsd-3-clause
unsafeFlagsForInfer = unsafeFlags ++ -- TODO: Can we do better than this for inference? [ ("-XOverlappingInstances", overlapInstLoc, xopt Opt_OverlappingInstances, flip xopt_unset Opt_OverlappingInstances) , ("-XIncoherentInstances", incohere...
451
unsafeFlagsForInfer = unsafeFlags ++ -- TODO: Can we do better than this for inference? [ ("-XOverlappingInstances", overlapInstLoc, xopt Opt_OverlappingInstances, flip xopt_unset Opt_OverlappingInstances) , ("-XIncoherentInstances", incohere...
451
unsafeFlagsForInfer = unsafeFlags ++ -- TODO: Can we do better than this for inference? [ ("-XOverlappingInstances", overlapInstLoc, xopt Opt_OverlappingInstances, flip xopt_unset Opt_OverlappingInstances) , ("-XIncoherentInstances", incohere...
451
false
false
0
8
158
57
32
25
null
null
wavewave/hoodle-render
src/Graphics/Hoodle/Render/Type/Select.hs
bsd-2-clause
selectedLayer :: Simple Lens HLayers HLayer selectedLayer = lens hlyrt_selectedLayer (\f a -> f { hlyrt_selectedLayer=a })
123
selectedLayer :: Simple Lens HLayers HLayer selectedLayer = lens hlyrt_selectedLayer (\f a -> f { hlyrt_selectedLayer=a })
122
selectedLayer = lens hlyrt_selectedLayer (\f a -> f { hlyrt_selectedLayer=a })
78
false
true
0
9
17
47
23
24
null
null
mainland/dph
dph-prim-par/Data/Array/Parallel/Unlifted.hs
bsd-3-clause
-- Permutation ---------------------------------------------------------------- permute arrSrc arrIxs = tracePrim (TracePermute (Seq.length arrSrc)) $! Seq.permute arrSrc arrIxs
194
permute arrSrc arrIxs = tracePrim (TracePermute (Seq.length arrSrc)) $! Seq.permute arrSrc arrIxs
114
permute arrSrc arrIxs = tracePrim (TracePermute (Seq.length arrSrc)) $! Seq.permute arrSrc arrIxs
114
true
false
0
11
31
40
19
21
null
null
johan--/twitter-conduit
Web/Twitter/Conduit/Api.hs
bsd-2-clause
-- | Returns post data which follows the user specified in the ID parameter. -- -- You can perform request by using 'call': -- -- @ -- res <- 'call' twInfo mgr '$' 'friendshipsCreate' ('ScreenNameParam' \"thimura\") -- @ -- -- >>> friendshipsCreate (ScreenNameParam "thimura") -- APIRequestPost "https://api.twitter.com/...
688
friendshipsCreate :: UserParam -> APIRequest FriendshipsCreate User friendshipsCreate user = APIRequestPost (endpoint ++ "friendships/create.json") (mkUserParam user)
166
friendshipsCreate user = APIRequestPost (endpoint ++ "friendships/create.json") (mkUserParam user)
98
true
true
0
7
72
53
32
21
null
null
JacquesCarette/literate-scientific-software
code/drasil-lang/Language/Drasil/ShortHands.hs
bsd-2-clause
lV = Variable "v"
17
lV = Variable "v"
17
lV = Variable "v"
17
false
false
1
5
3
13
4
9
null
null
iphydf/hs-toxcore
src/Data/Binary/Bits/Get.hs
gpl-3.0
mkInitState :: Get S mkInitState = do str <- get put B.empty return (S str 0)
83
mkInitState :: Get S mkInitState = do str <- get put B.empty return (S str 0)
83
mkInitState = do str <- get put B.empty return (S str 0)
62
false
true
0
10
21
49
20
29
null
null
brendanhay/gogol
gogol-videointelligence/gen/Network/Google/Resource/VideoIntelligence/Videos/Annotate.hs
mpl-2.0
-- | Multipart request metadata. vaPayload :: Lens' VideosAnnotate GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoRequest vaPayload = lens _vaPayload (\ s a -> s{_vaPayload = a})
184
vaPayload :: Lens' VideosAnnotate GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoRequest vaPayload = lens _vaPayload (\ s a -> s{_vaPayload = a})
151
vaPayload = lens _vaPayload (\ s a -> s{_vaPayload = a})
58
true
true
1
9
22
46
22
24
null
null
kmate/HaRe
old/refactorer/RefacMerge.hs
bsd-3-clause
parseFile ('>':xs) mod = (checkCursor fileName (read row) (read col) mod) : (parseFile (tail rest3) mod) where (fileName, rest) = parseFileName xs (row, rest2) = parseRow rest (col, rest3) = parseCol rest...
321
parseFile ('>':xs) mod = (checkCursor fileName (read row) (read col) mod) : (parseFile (tail rest3) mod) where (fileName, rest) = parseFileName xs (row, rest2) = parseRow rest (col, rest3) = parseCol rest...
321
parseFile ('>':xs) mod = (checkCursor fileName (read row) (read col) mod) : (parseFile (tail rest3) mod) where (fileName, rest) = parseFileName xs (row, rest2) = parseRow rest (col, rest3) = parseCol rest...
321
false
false
0
9
147
107
55
52
null
null
CarstenKoenig/AdventOfCode2016
Day12/Main.hs
mit
movePointer :: Int -> Maybe CmdPointer -> Maybe CmdPointer movePointer _ Nothing = Nothing
90
movePointer :: Int -> Maybe CmdPointer -> Maybe CmdPointer movePointer _ Nothing = Nothing
90
movePointer _ Nothing = Nothing
31
false
true
0
7
13
30
14
16
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Component/Table/TdComb.hs
bsd-3-clause
-- | A lens. tdfTdAttr ∷ Lens' (TdFuns t m a r) (ActiveState t ActElem r → Dynamic t E.Td) tdfTdAttr f (TdFuns f1 f2 f3 f4 f5) = fmap (\g → TdFuns f1 f2 g f4 f5) (f f3)
168
tdfTdAttr ∷ Lens' (TdFuns t m a r) (ActiveState t ActElem r → Dynamic t E.Td) tdfTdAttr f (TdFuns f1 f2 f3 f4 f5) = fmap (\g → TdFuns f1 f2 g f4 f5) (f f3)
155
tdfTdAttr f (TdFuns f1 f2 f3 f4 f5) = fmap (\g → TdFuns f1 f2 g f4 f5) (f f3)
77
true
true
1
9
39
101
49
52
null
null
todays-mitsui/discussion
src/Discussion/Bool.hs
mit
isClosed' vs (VarT v) = v `elem` vs
41
isClosed' vs (VarT v) = v `elem` vs
41
isClosed' vs (VarT v) = v `elem` vs
41
false
false
0
7
13
23
12
11
null
null
higgsd/euler
hs/30.hs
bsd-2-clause
nn = 5
6
nn = 5
6
nn = 5
6
false
false
1
5
2
10
3
7
null
null
limansky/wbxml
src/Wbxml/SimpleRender.hs
bsd-3-clause
renderAttr a = attrName a ++ "=\"" ++ (renderAttrValue $ attrValue a) ++ "\""
77
renderAttr a = attrName a ++ "=\"" ++ (renderAttrValue $ attrValue a) ++ "\""
77
renderAttr a = attrName a ++ "=\"" ++ (renderAttrValue $ attrValue a) ++ "\""
77
false
false
0
9
13
34
16
18
null
null
sixears/getopt
src/Console/Getopt.hs
mit
err_multsopt :: Show a => Char -> [a] -> String err_multsopt s os = printf "option short name '%c' is used for multiple options:" s ++ (("\n " ++) =<< fmap show os)
172
err_multsopt :: Show a => Char -> [a] -> String err_multsopt s os = printf "option short name '%c' is used for multiple options:" s ++ (("\n " ++) =<< fmap show os)
172
err_multsopt s os = printf "option short name '%c' is used for multiple options:" s ++ (("\n " ++) =<< fmap show os)
124
false
true
2
8
40
61
30
31
null
null
pdmurray/haskell-book-ex
src/ch3/exercises3.hs
bsd-3-clause
thirdLetter :: String -> Char thirdLetter x = x !! y where y :: Int y = 3
87
thirdLetter :: String -> Char thirdLetter x = x !! y where y :: Int y = 3
87
thirdLetter x = x !! y where y :: Int y = 3
57
false
true
1
5
31
36
18
18
null
null
vincenthz/cryptonite
Crypto/KDF/Argon2.hs
bsd-3-clause
defaultOptions :: Options defaultOptions = Options { iterations = 1 , memory = 2 ^ (17 :: Int) , parallelism = 4 , variant = Argon2i , version = Version13 }
234
defaultOptions :: Options defaultOptions = Options { iterations = 1 , memory = 2 ^ (17 :: Int) , parallelism = 4 , variant = Argon2i , version = Version13 }
234
defaultOptions = Options { iterations = 1 , memory = 2 ^ (17 :: Int) , parallelism = 4 , variant = Argon2i , version = Version13 }
208
false
true
0
8
108
53
33
20
null
null
tomberek/rulestesting
Examples.hs
bsd-3-clause
inverse :: Bij a b -> Bij b a inverse (Bij a b) = Bij b a
57
inverse :: Bij a b -> Bij b a inverse (Bij a b) = Bij b a
57
inverse (Bij a b) = Bij b a
27
false
true
0
7
16
41
19
22
null
null
acowley/ghc
compiler/basicTypes/VarEnv.hs
bsd-3-clause
rnOccR (RV2 { envR = env }) v = lookupVarEnv env v `orElse` v
61
rnOccR (RV2 { envR = env }) v = lookupVarEnv env v `orElse` v
61
rnOccR (RV2 { envR = env }) v = lookupVarEnv env v `orElse` v
61
false
false
1
7
13
38
18
20
null
null
nushio3/unittyped
src/UnitTyped/Type.hs
lgpl-2.1
toSuperScript '2' = '\178'
26
toSuperScript '2' = '\178'
26
toSuperScript '2' = '\178'
26
false
false
1
5
3
13
4
9
null
null
relrod/rhelsearch
src/Main.hs
bsd-2-clause
info' :: InfoOptions -> GlobalOptions -> IO () info' (InfoOptions ver query) (GlobalOptions offline _) = do res <- jsonFile (toVersionError ver) offline False case res of Just r -> case decode r :: Maybe PkgResults of Just res' -> case responsePackages res' ^. at (T.pack query) of ...
956
info' :: InfoOptions -> GlobalOptions -> IO () info' (InfoOptions ver query) (GlobalOptions offline _) = do res <- jsonFile (toVersionError ver) offline False case res of Just r -> case decode r :: Maybe PkgResults of Just res' -> case responsePackages res' ^. at (T.pack query) of ...
956
info' (InfoOptions ver query) (GlobalOptions offline _) = do res <- jsonFile (toVersionError ver) offline False case res of Just r -> case decode r :: Maybe PkgResults of Just res' -> case responsePackages res' ^. at (T.pack query) of Just pkg -> do pkgPrint pkg...
909
false
true
0
18
279
293
131
162
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/THNames.hs
bsd-3-clause
sigDName = libFun (fsLit "sigD") sigDIdKey
90
sigDName = libFun (fsLit "sigD") sigDIdKey
90
sigDName = libFun (fsLit "sigD") sigDIdKey
90
false
false
0
7
53
17
8
9
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs
bsd-3-clause
gl_RENDERBUFFER_BINDING :: GLenum gl_RENDERBUFFER_BINDING = 0x8CA7
66
gl_RENDERBUFFER_BINDING :: GLenum gl_RENDERBUFFER_BINDING = 0x8CA7
66
gl_RENDERBUFFER_BINDING = 0x8CA7
32
false
true
0
4
5
11
6
5
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F31.hs
bsd-3-clause
ptr_glVertexAttribL3dEXT :: FunPtr (GLuint -> GLdouble -> GLdouble -> GLdouble -> IO ()) ptr_glVertexAttribL3dEXT = unsafePerformIO $ getCommand "glVertexAttribL3dEXT"
167
ptr_glVertexAttribL3dEXT :: FunPtr (GLuint -> GLdouble -> GLdouble -> GLdouble -> IO ()) ptr_glVertexAttribL3dEXT = unsafePerformIO $ getCommand "glVertexAttribL3dEXT"
167
ptr_glVertexAttribL3dEXT = unsafePerformIO $ getCommand "glVertexAttribL3dEXT"
78
false
true
0
12
18
45
22
23
null
null
brendanhay/gogol
gogol-dlp/gen/Network/Google/DLP/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GooglePrivacyDlpV2ValueFrequency' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gpdvvfValue' -- -- * 'gpdvvfCount' googlePrivacyDlpV2ValueFrequency :: GooglePrivacyDlpV2ValueFrequency googlePrivacyDlpV2V...
424
googlePrivacyDlpV2ValueFrequency :: GooglePrivacyDlpV2ValueFrequency googlePrivacyDlpV2ValueFrequency = GooglePrivacyDlpV2ValueFrequency' {_gpdvvfValue = Nothing, _gpdvvfCount = Nothing}
196
googlePrivacyDlpV2ValueFrequency = GooglePrivacyDlpV2ValueFrequency' {_gpdvvfValue = Nothing, _gpdvvfCount = Nothing}
123
true
true
0
6
59
32
22
10
null
null
mbg/system-f-with-kind-polymorphism
Main.hs
mit
run (':' : '!' : ' ' : xs) = do expr <- inlineInput xs check expr $ do liftIO $ print $ fix reduceBNF expr loop
211
run (':' : '!' : ' ' : xs) = do expr <- inlineInput xs check expr $ do liftIO $ print $ fix reduceBNF expr loop
211
run (':' : '!' : ' ' : xs) = do expr <- inlineInput xs check expr $ do liftIO $ print $ fix reduceBNF expr loop
211
false
false
0
11
126
63
28
35
null
null
LTI2000/monad-challenges
src/Set1.hs
bsd-3-clause
fiveRands :: [Integer] fiveRands = let s0 = mkSeed 1 (i1, s1) = rand s0 (i2, s2) = rand s1 (i3, s3) = rand s2 (i4, s4) = rand s3 (i5, s5) = rand s4 in [i1, i2, i3, i4, i5]
206
fiveRands :: [Integer] fiveRands = let s0 = mkSeed 1 (i1, s1) = rand s0 (i2, s2) = rand s1 (i3, s3) = rand s2 (i4, s4) = rand s3 (i5, s5) = rand s4 in [i1, i2, i3, i4, i5]
206
fiveRands = let s0 = mkSeed 1 (i1, s1) = rand s0 (i2, s2) = rand s1 (i3, s3) = rand s2 (i4, s4) = rand s3 (i5, s5) = rand s4 in [i1, i2, i3, i4, i5]
183
false
true
0
9
75
125
65
60
null
null
nablaa/hchesslib
test/Chess/GameTests.hs
gpl-2.0
applyMoveSpec :: Spec applyMoveSpec = describe "applyMove" $ do it "should update board, player and full move counter correctly" $ testApplyingMove "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" (Movement (Piece White Pawn) (coord "e2") (coord "e3")) "rnbqkbnr/pppppppp/8/...
3,586
applyMoveSpec :: Spec applyMoveSpec = describe "applyMove" $ do it "should update board, player and full move counter correctly" $ testApplyingMove "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" (Movement (Piece White Pawn) (coord "e2") (coord "e3")) "rnbqkbnr/pppppppp/8/...
3,586
applyMoveSpec = describe "applyMove" $ do it "should update board, player and full move counter correctly" $ testApplyingMove "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" (Movement (Piece White Pawn) (coord "e2") (coord "e3")) "rnbqkbnr/pppppppp/8/8/8/4P3/PPPP1PPP/RNBQK...
3,564
false
true
0
13
716
586
275
311
null
null
raichoo/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
pairTy = sNS (sUN "Pair") ["Builtins"]
41
pairTy = sNS (sUN "Pair") ["Builtins"]
41
pairTy = sNS (sUN "Pair") ["Builtins"]
41
false
false
0
7
8
20
10
10
null
null
chrisdone/haskellnews
upstream/snap-app/src/Data/Pagination.hs
bsd-3-clause
pnPageCount :: Pagination -> Integer pnPageCount Pagination{..} = max 1 $ if total/perpage > fromIntegral (round (total/perpage)) then round (total/perpage) + 1 else round (total/perpage) where total = fromIntegral pnTotal perpage = fromIntegral pnPerPage -- | Add the current page of the paginati...
344
pnPageCount :: Pagination -> Integer pnPageCount Pagination{..} = max 1 $ if total/perpage > fromIntegral (round (total/perpage)) then round (total/perpage) + 1 else round (total/perpage) where total = fromIntegral pnTotal perpage = fromIntegral pnPerPage -- | Add the current page of the paginati...
344
pnPageCount Pagination{..} = max 1 $ if total/perpage > fromIntegral (round (total/perpage)) then round (total/perpage) + 1 else round (total/perpage) where total = fromIntegral pnTotal perpage = fromIntegral pnPerPage -- | Add the current page of the pagination from the current URI.
307
false
true
1
12
69
107
54
53
null
null
k0001/gtk2hs
tools/c2hs/base/state/State.hs
gpl-3.0
readMV :: StateTrans.MVar a -> PreCST e s a readMV = CST . StateTrans.readMV
77
readMV :: StateTrans.MVar a -> PreCST e s a readMV = CST . StateTrans.readMV
77
readMV = CST . StateTrans.readMV
33
false
true
0
8
14
39
17
22
null
null
eightyeight/atom-msp430
Language/Atom/MSP430/DigitalIO.hs
mit
-- port2InterruptEnable = word8' "P2IE"
41
port2InterruptEnable = word8' "P2IE"
36
port2InterruptEnable = word8' "P2IE"
36
true
false
1
5
6
13
5
8
null
null
rvion/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/Layout.hs
gpl-3.0
internalToAlignedWidget (LayoutBox orientation boxComponents) = boxComponentsToWidget orientation boxComponents
115
internalToAlignedWidget (LayoutBox orientation boxComponents) = boxComponentsToWidget orientation boxComponents
115
internalToAlignedWidget (LayoutBox orientation boxComponents) = boxComponentsToWidget orientation boxComponents
115
false
false
0
7
11
22
10
12
null
null
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/Concepts/Documentation.hs
bsd-2-clause
client = nc "client" (cn' "client" )
68
client = nc "client" (cn' "client" )
68
client = nc "client" (cn' "client" )
68
false
false
1
7
38
20
8
12
null
null
tjakway/ghcjvm
compiler/utils/Util.hs
bsd-3-clause
mapSnd f xys = [(x, f y) | (x,y) <- xys]
40
mapSnd f xys = [(x, f y) | (x,y) <- xys]
40
mapSnd f xys = [(x, f y) | (x,y) <- xys]
40
false
false
1
9
10
42
20
22
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
eqReprPrimTyConKey = mkPreludeTyConUnique 54
65
eqReprPrimTyConKey = mkPreludeTyConUnique 54
65
eqReprPrimTyConKey = mkPreludeTyConUnique 54
65
false
false
0
5
24
9
4
5
null
null
florianpilz/autotool
server/gen/JSerializer.hs
gpl-2.0
package :: String package = base ++ ".xmlrpc.serialize"
55
package :: String package = base ++ ".xmlrpc.serialize"
55
package = base ++ ".xmlrpc.serialize"
37
false
true
0
5
7
15
8
7
null
null
harendra-kumar/asyncly
src/Streamly/Streams/StreamK/Type.hs
bsd-3-clause
foldStreamShared :: IsStream t => State Stream m a -> (a -> t m a -> m r) -> (a -> m r) -> m r -> t m a -> m r foldStreamShared st yld sng stp m = let yieldk a x = yld a (fromStream x) MkStream k = toStream m in k st yieldk sng stp
276
foldStreamShared :: IsStream t => State Stream m a -> (a -> t m a -> m r) -> (a -> m r) -> m r -> t m a -> m r foldStreamShared st yld sng stp m = let yieldk a x = yld a (fromStream x) MkStream k = toStream m in k st yieldk sng stp
276
foldStreamShared st yld sng stp m = let yieldk a x = yld a (fromStream x) MkStream k = toStream m in k st yieldk sng stp
137
false
true
0
12
104
151
67
84
null
null
gcampax/ghc
compiler/codeGen/StgCmmUtils.hs
bsd-3-clause
mkSimpleLit _ (MachFloat r) = CmmFloat r W32
53
mkSimpleLit _ (MachFloat r) = CmmFloat r W32
53
mkSimpleLit _ (MachFloat r) = CmmFloat r W32
53
false
false
0
7
16
22
10
12
null
null
ezyang/ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- | Creates cached lookup for the 'mi_fix_fn' field of 'ModIface' mkIfaceFixCache :: [(OccName, Fixity)] -> OccName -> Maybe Fixity mkIfaceFixCache pairs = \n -> lookupOccEnv env n where env = mkOccEnv pairs
215
mkIfaceFixCache :: [(OccName, Fixity)] -> OccName -> Maybe Fixity mkIfaceFixCache pairs = \n -> lookupOccEnv env n where env = mkOccEnv pairs
148
mkIfaceFixCache pairs = \n -> lookupOccEnv env n where env = mkOccEnv pairs
82
true
true
0
7
39
56
29
27
null
null
bixuanzju/SCore
src/Template.hs
gpl-3.0
showAddr :: Addr -> Iseq showAddr addr = iStr (show addr)
57
showAddr :: Addr -> Iseq showAddr addr = iStr (show addr)
57
showAddr addr = iStr (show addr)
32
false
true
0
7
10
27
13
14
null
null
nikki-and-the-robots/nikki
src/Data/Indexable.hs
lgpl-3.0
catMaybes :: Indexable (Maybe a) -> Indexable a catMaybes = Data.Indexable.filter isJust >>> fmap fromJust
106
catMaybes :: Indexable (Maybe a) -> Indexable a catMaybes = Data.Indexable.filter isJust >>> fmap fromJust
106
catMaybes = Data.Indexable.filter isJust >>> fmap fromJust
58
false
true
0
9
14
45
20
25
null
null
NorfairKing/the-notes
src/Macro/Section.hs
gpl-2.0
chapter :: Text -> Note -> Note chapter n func = do raw "\n" note n $ do HT.chapter (raw n) func
120
chapter :: Text -> Note -> Note chapter n func = do raw "\n" note n $ do HT.chapter (raw n) func
120
chapter n func = do raw "\n" note n $ do HT.chapter (raw n) func
88
false
true
0
12
45
57
25
32
null
null
leksah/leksah-server
src/IDE/Utils/GHCUtils.hs
gpl-2.0
maybeOrLibraryName :: Maybe UnqualComponentName -> LibraryName maybeOrLibraryName Nothing = LMainLibName
104
maybeOrLibraryName :: Maybe UnqualComponentName -> LibraryName maybeOrLibraryName Nothing = LMainLibName
104
maybeOrLibraryName Nothing = LMainLibName
41
false
true
0
6
9
21
10
11
null
null
phischu/fragnix
tests/packages/scotty/Network.HPACK.Table.Dynamic.hs
bsd-3-clause
newDynamicTable :: Size -> CodeInfo -> IO DynamicTable newDynamicTable maxsiz info = do tbl <- newArray (0,end) dummyEntry DynamicTable info <$> newIORef tbl -- circularTable <*> newIORef end -- offset <*> newIORef 0 -- numOfEntries ...
608
newDynamicTable :: Size -> CodeInfo -> IO DynamicTable newDynamicTable maxsiz info = do tbl <- newArray (0,end) dummyEntry DynamicTable info <$> newIORef tbl -- circularTable <*> newIORef end -- offset <*> newIORef 0 -- numOfEntries ...
608
newDynamicTable maxsiz info = do tbl <- newArray (0,end) dummyEntry DynamicTable info <$> newIORef tbl -- circularTable <*> newIORef end -- offset <*> newIORef 0 -- numOfEntries <*> newIORef maxN -- maxNumOfEntries ...
553
false
true
0
13
220
123
59
64
null
null
roelvandijk/aeson
Data/Aeson/TH.hs
bsd-3-clause
parseArgs _ _ (NormalC conName [_]) (Right valName) = caseE (varE valName) $ parseUnaryMatches conName
104
parseArgs _ _ (NormalC conName [_]) (Right valName) = caseE (varE valName) $ parseUnaryMatches conName
104
parseArgs _ _ (NormalC conName [_]) (Right valName) = caseE (varE valName) $ parseUnaryMatches conName
104
false
false
0
8
16
48
23
25
null
null
mydaum/cabal
cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
bsd-3-clause
dbBuildable1 :: ExampleDb dbBuildable1 = [ Right $ exAv "pkg" 1 [ exFlagged "flag1" [ExAny "flag1-true"] [ExAny "flag1-false"] , exFlagged "flag2" [ExAny "flag2-true"] [ExAny "flag2-false"]] `withExes` [ ExExe "exe1" [ ExAny "unknown" , ExFlagged "flag1" (Buildab...
754
dbBuildable1 :: ExampleDb dbBuildable1 = [ Right $ exAv "pkg" 1 [ exFlagged "flag1" [ExAny "flag1-true"] [ExAny "flag1-false"] , exFlagged "flag2" [ExAny "flag2-true"] [ExAny "flag2-false"]] `withExes` [ ExExe "exe1" [ ExAny "unknown" , ExFlagged "flag1" (Buildab...
754
dbBuildable1 = [ Right $ exAv "pkg" 1 [ exFlagged "flag1" [ExAny "flag1-true"] [ExAny "flag1-false"] , exFlagged "flag2" [ExAny "flag2-true"] [ExAny "flag2-false"]] `withExes` [ ExExe "exe1" [ ExAny "unknown" , ExFlagged "flag1" (Buildable []) NotBuildable ...
728
false
true
0
17
246
245
124
121
null
null
jmct/IterativeCompiler
frontend/Language.hs
mit
-- If the pattern matching gets here, it's false {-******************************************************************** - The Prelude for the Core Lanuage - - The prelude will define the usual SKI combinators along with combinators - for composition (compose) and for repeating function application (twice). - **...
1,151
preludeDefs :: CoreProgram preludeDefs = [ ("I", ["x"], EVar "x"), ("K", ["x", "y"], EVar "x"), ("K1", ["x", "y"], EVar "y"), ("S", ["f", "g", "x"], EAp (EAp (EVar "f") (EVar "x")) ...
762
preludeDefs = [ ("I", ["x"], EVar "x"), ("K", ["x", "y"], EVar "x"), ("K1", ["x", "y"], EVar "y"), ("S", ["f", "g", "x"], EAp (EAp (EVar "f") (EVar "x")) (EAp (EVar "g") ...
735
true
true
0
11
517
237
135
102
null
null
bgwines/hueue
src/Git/API.hs
bsd-3-clause
rebase :: T.Text -> IO () rebase branchName = Shelly.shelly $ Shelly.run_ "git" ["rebase", "-p", branchName]
112
rebase :: T.Text -> IO () rebase branchName = Shelly.shelly $ Shelly.run_ "git" ["rebase", "-p", branchName]
112
rebase branchName = Shelly.shelly $ Shelly.run_ "git" ["rebase", "-p", branchName]
86
false
true
0
7
19
47
24
23
null
null
pmlodawski/ini
src/Data/Ini.hs
bsd-3-clause
-- | Parse a value using a reader from "Data.Attoparsec.Text". parseValue :: Text -> Text -> Parser a -> Ini -> Either String a parseValue section key f ini = lookupValue section key ini >>= parseOnly (f <* (skipSpace >> endOfInput))
257
parseValue :: Text -> Text -> Parser a -> Ini -> Either String a parseValue section key f ini = lookupValue section key ini >>= parseOnly (f <* (skipSpace >> endOfInput))
194
parseValue section key f ini = lookupValue section key ini >>= parseOnly (f <* (skipSpace >> endOfInput))
107
true
true
0
10
64
73
36
37
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
detuneCount :: String -> ControlPattern detuneCount name = pStateF "detune" name (maybe 0 (+1))
95
detuneCount :: String -> ControlPattern detuneCount name = pStateF "detune" name (maybe 0 (+1))
95
detuneCount name = pStateF "detune" name (maybe 0 (+1))
55
false
true
0
8
13
45
20
25
null
null
kmels/hledger
hledger-lib/Hledger/Utils.hs
gpl-3.0
fourth5 (_,_,_,x,_) = x
23
fourth5 (_,_,_,x,_) = x
23
fourth5 (_,_,_,x,_) = x
23
false
false
0
5
3
25
14
11
null
null
diagrams/diagrams-input
src/Diagrams/SVG/ReadSVG.hs
bsd-3-clause
-- should always be last! -- parseDesc, parseMetaData, parseTitle] -- descriptive Elements --------------------------------------------------------------------------- -- | Parse \<g\>, see <http://www.w3.org/TR/SVG/struct.html#GElement> parseG :: (MonadThrow m, InputConstraints b n, Renderable (TT.Text n) b, Rea...
945
parseG :: (MonadThrow m, InputConstraints b n, Renderable (TT.Text n) b, Read n) => Consumer Event m (Maybe (Tag b n)) parseG = tagName "{http://www.w3.org/2000/svg}g" gAttrs $ \(cpa,ca,gea,pa,class_,style,ext,tr) -> do insideGs <- many gContent let st hmaps = (parseStyles style hmaps) ++ ...
701
parseG = tagName "{http://www.w3.org/2000/svg}g" gAttrs $ \(cpa,ca,gea,pa,class_,style,ext,tr) -> do insideGs <- many gContent let st hmaps = (parseStyles style hmaps) ++ (parsePA pa hmaps) ++ (cssStylesFromMap hmaps "g" (id1 ca) class_) return $ SubTree Tru...
573
true
true
2
17
310
256
131
125
null
null
spockz/lhs2texhl
src/Language/Markup.hs
mit
markup :: String -> String markup = m' . b . break (\ a -> a == '_' || isDigit a) . rtrim "_" where m' (str, []) = str m' (str, sub) = str ++ "_{" ++ sub ++ "}" b (a , b) = (a , ltrim "_" b)
211
markup :: String -> String markup = m' . b . break (\ a -> a == '_' || isDigit a) . rtrim "_" where m' (str, []) = str m' (str, sub) = str ++ "_{" ++ sub ++ "}" b (a , b) = (a , ltrim "_" b)
211
markup = m' . b . break (\ a -> a == '_' || isDigit a) . rtrim "_" where m' (str, []) = str m' (str, sub) = str ++ "_{" ++ sub ++ "}" b (a , b) = (a , ltrim "_" b)
184
false
true
2
11
71
123
64
59
null
null
brendanhay/gogol
gogol-cloudasset/gen/Network/Google/Resource/CloudAsset/ExportAssets.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). eaUploadProtocol :: Lens' ExportAssets (Maybe Text) eaUploadProtocol = lens _eaUploadProtocol (\ s a -> s{_eaUploadProtocol = a})
199
eaUploadProtocol :: Lens' ExportAssets (Maybe Text) eaUploadProtocol = lens _eaUploadProtocol (\ s a -> s{_eaUploadProtocol = a})
137
eaUploadProtocol = lens _eaUploadProtocol (\ s a -> s{_eaUploadProtocol = a})
85
true
true
0
9
33
48
25
23
null
null
bergey/diagrams-opengl
examples/fillRule.hs
bsd-3-clause
loopyStar :: Diagram OpenGL R2 loopyStar = mconcat . map (cubicSpline True) . pathVertices . star (StarSkip 3) $ rp
145
loopyStar :: Diagram OpenGL R2 loopyStar = mconcat . map (cubicSpline True) . pathVertices . star (StarSkip 3) $ rp
145
loopyStar = mconcat . map (cubicSpline True) . pathVertices . star (StarSkip 3) $ rp
114
false
true
0
11
49
50
24
26
null
null
aopp-pred/fp-truncate
test/Truncate/Test/Truncatable/Convert.hs
apache-2.0
prop_roundTripHex32Bin32 :: Word32 -> Bool prop_roundTripHex32Bin32 b = (toHex . toBin) hex == hex where hex = fromBits (WordF32 b) :: Hexadecimal
152
prop_roundTripHex32Bin32 :: Word32 -> Bool prop_roundTripHex32Bin32 b = (toHex . toBin) hex == hex where hex = fromBits (WordF32 b) :: Hexadecimal
152
prop_roundTripHex32Bin32 b = (toHex . toBin) hex == hex where hex = fromBits (WordF32 b) :: Hexadecimal
109
false
true
0
8
27
55
27
28
null
null
cocreature/ml-experiments
src/Helpers.hs
isc
single :: Record '[s:->x] -> x single = singleV . toVinyl
57
single :: Record '[s:->x] -> x single = singleV . toVinyl
57
single = singleV . toVinyl
26
false
true
0
9
10
31
16
15
null
null
cchalmers/lens
src/Control/Lens/Lens.hs
bsd-3-clause
-- | Fuse a composition of lenses using 'Yoneda' to provide 'fmap' fusion. -- -- In general, given a pair of lenses 'foo' and 'bar' -- -- @ -- fusing (foo.bar) = foo.bar -- @ -- -- however, @foo@ and @bar@ are either going to 'fmap' internally or they are trivial. -- -- 'fusing' exploits the 'Yoneda' lemma to merge the...
749
fusing :: Functor f => LensLike (Yoneda f) s t a b -> LensLike f s t a b fusing t = \f -> lowerYoneda . t (liftYoneda . f)
122
fusing t = \f -> lowerYoneda . t (liftYoneda . f)
49
true
true
0
9
151
91
54
37
null
null
li-zhirui/EoplLangs
src/ExplicitRefs/Evaluator.hs
bsd-3-clause
valueOf (DeRefExpr expr) env = evalDeRefExpr expr env
63
valueOf (DeRefExpr expr) env = evalDeRefExpr expr env
63
valueOf (DeRefExpr expr) env = evalDeRefExpr expr env
63
false
false
1
7
17
24
10
14
null
null
yannick-cw/haskell_katas
test/Chapter12/MaybeSpec.hs
bsd-3-clause
myUnfoldr :: (b -> Maybe (a, b)) -> b -> [a] myUnfoldr f b = undefined
70
myUnfoldr :: (b -> Maybe (a, b)) -> b -> [a] myUnfoldr f b = undefined
70
myUnfoldr f b = undefined
25
false
true
0
9
15
43
23
20
null
null
ntc2/cryptol
src/Cryptol/TypeCheck/Solver/Numeric/SMT.hs
bsd-3-clause
desugarProp :: Prop -> IfExpr Prop desugarProp prop = case prop of PFalse -> return PFalse PTrue -> return PTrue Not p -> Not `fmap` desugarProp p p :&& q -> (:&&) `fmap` desugarProp p `ap` desugarProp q p :|| q -> (:||) `fmap` desugarProp p `ap` desugarProp q Fin (V...
652
desugarProp :: Prop -> IfExpr Prop desugarProp prop = case prop of PFalse -> return PFalse PTrue -> return PTrue Not p -> Not `fmap` desugarProp p p :&& q -> (:&&) `fmap` desugarProp p `ap` desugarProp q p :|| q -> (:||) `fmap` desugarProp p `ap` desugarProp q Fin (V...
652
desugarProp prop = case prop of PFalse -> return PFalse PTrue -> return PTrue Not p -> Not `fmap` desugarProp p p :&& q -> (:&&) `fmap` desugarProp p `ap` desugarProp q p :|| q -> (:||) `fmap` desugarProp p `ap` desugarProp q Fin (Var _) -> return prop x :==: y ...
617
false
true
1
10
207
272
137
135
null
null
Muzietto/transformerz
haskell/grabmuller/grabmuller_01.hs
mit
eval0 env (Var varName) = fromJust $ Map.lookup varName env
64
eval0 env (Var varName) = fromJust $ Map.lookup varName env
64
eval0 env (Var varName) = fromJust $ Map.lookup varName env
64
false
false
0
7
14
30
13
17
null
null
jkozlowski/kdb-haskell
src/Database/Kdb/Internal/Types/KdbTypes.hs
mit
numElements (V (KLongV x)) = SV.length x
45
numElements (V (KLongV x)) = SV.length x
45
numElements (V (KLongV x)) = SV.length x
45
false
false
0
9
11
26
12
14
null
null
katydid/haslapse
src/Data/Katydid/Relapse/Expr.hs
bsd-3-clause
assertDouble (AnyExpr desc _) = Left $ "expected <" ++ show desc ++ "> to be of type double"
94
assertDouble (AnyExpr desc _) = Left $ "expected <" ++ show desc ++ "> to be of type double"
94
assertDouble (AnyExpr desc _) = Left $ "expected <" ++ show desc ++ "> to be of type double"
94
false
false
0
7
20
32
15
17
null
null
ku-fpg/blank-canvas
examples/html5canvastutorial/Main.hs
bsd-3-clause
example_1_7_1 EC{ecPrincessURL = princessURL} = do img <- newImage princessURL drawImage(img,[69,50])
117
example_1_7_1 EC{ecPrincessURL = princessURL} = do img <- newImage princessURL drawImage(img,[69,50])
117
example_1_7_1 EC{ecPrincessURL = princessURL} = do img <- newImage princessURL drawImage(img,[69,50])
117
false
false
0
9
26
46
23
23
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_C_NUMBER :: Int wxSTC_C_NUMBER = 4
40
wxSTC_C_NUMBER :: Int wxSTC_C_NUMBER = 4
40
wxSTC_C_NUMBER = 4
18
false
true
0
6
5
18
7
11
null
null
ksaveljev/hake-2
src/Game/Monsters/MPlayer.hs
bsd-3-clause
frameAttack8 :: Int frameAttack8 = 53
37
frameAttack8 :: Int frameAttack8 = 53
37
frameAttack8 = 53
17
false
true
0
4
5
11
6
5
null
null
urbanslug/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (RecordCon con_id _ rbinds) = hang (ppr con_id) 2 (ppr rbinds)
73
ppr_expr (RecordCon con_id _ rbinds) = hang (ppr con_id) 2 (ppr rbinds)
73
ppr_expr (RecordCon con_id _ rbinds) = hang (ppr con_id) 2 (ppr rbinds)
73
false
false
0
7
13
38
18
20
null
null
egaburov/funstuff
Haskell/swierstra_datatypes_a_le_carte/01.hs
apache-2.0
eval (Add x y) = eval x + eval y
32
eval (Add x y) = eval x + eval y
32
eval (Add x y) = eval x + eval y
32
false
false
0
7
9
27
12
15
null
null
jaspervdj/firefly
src/Firefly/Audio.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Play some sound. -- -- This call is non-blocking. playSound :: Sound -> IO () playSound (Sound fptr) = withForeignPtr fptr ff_playSound
219
playSound :: Sound -> IO () playSound (Sound fptr) = withForeignPtr fptr ff_playSound
85
playSound (Sound fptr) = withForeignPtr fptr ff_playSound
57
true
true
0
9
23
42
21
21
null
null
kim/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/GetStreamingDistributionConfig.hs
mpl-2.0
-- | 'GetStreamingDistributionConfig' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'gsdcId' @::@ 'Text' -- getStreamingDistributionConfig :: Text -- ^ 'gsdcId' -> GetStreamingDistributionConfig getStreamingDistributionConfig p1 = GetStreamingDistribut...
354
getStreamingDistributionConfig :: Text -- ^ 'gsdcId' -> GetStreamingDistributionConfig getStreamingDistributionConfig p1 = GetStreamingDistributionConfig { _gsdcId = p1 }
209
getStreamingDistributionConfig p1 = GetStreamingDistributionConfig { _gsdcId = p1 }
91
true
true
0
6
75
33
21
12
null
null
Airtnp/Freshman_Simple_Haskell_Lib
Utils/alg.hs
mit
isPrime2 :: Integer -> Bool isPrime2 n | n < 0 = isPrime (-n) | n == 0 = False | n == 1 = False | n == 2 = True | otherwise = and $ map (jb . (mod n)) [2..truncate(sqrt(fromInteger n))] where jb 0 = False jb _ = True -- square = join (*)
258
isPrime2 :: Integer -> Bool isPrime2 n | n < 0 = isPrime (-n) | n == 0 = False | n == 1 = False | n == 2 = True | otherwise = and $ map (jb . (mod n)) [2..truncate(sqrt(fromInteger n))] where jb 0 = False jb _ = True -- square = join (*)
258
isPrime2 n | n < 0 = isPrime (-n) | n == 0 = False | n == 1 = False | n == 2 = True | otherwise = and $ map (jb . (mod n)) [2..truncate(sqrt(fromInteger n))] where jb 0 = False jb _ = True -- square = join (*)
230
false
true
5
12
78
144
70
74
null
null