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
39aldo39/klfc
src/Layout/Modifier.hs
gpl-3.0
toBaseModifier modifier = modifier
34
toBaseModifier modifier = modifier
34
toBaseModifier modifier = modifier
34
false
false
0
5
3
9
4
5
null
null
ekmett/ghc
compiler/utils/Platform.hs
bsd-3-clause
sBinariesAreStaticLibs _ = False
37
osBinariesAreStaticLibs _ = False
37
osBinariesAreStaticLibs _ = False
37
false
false
0
5
8
9
4
5
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 272855 = 2146
33
getValueFromProduct 272855 = 2146
33
getValueFromProduct 272855 = 2146
33
false
false
0
5
3
9
4
5
null
null
izuk/tellme
src/System/TellMe/Monitor.hs
bsd-3-clause
mkText :: Monitor String mkText = M $ do label <- labelNew (Nothing :: Maybe String) return (toWidget label, labelSetText label)
132
mkText :: Monitor String mkText = M $ do label <- labelNew (Nothing :: Maybe String) return (toWidget label, labelSetText label)
132
mkText = M $ do label <- labelNew (Nothing :: Maybe String) return (toWidget label, labelSetText label)
107
false
true
0
11
24
55
26
29
null
null
mcschroeder/ghc
compiler/typecheck/TcGenGenerics.hs
bsd-3-clause
tc_mkRepFamInsts :: GenericKind -- Gen0 or Gen1 -> TyCon -- The type to generate representation for -> Module -- Used as the location of the new RepTy -> TcM (FamInst) -- Generated representation0 coercion tc_mkRepFamInsts gk tycon mod = -- Co...
2,196
tc_mkRepFamInsts :: GenericKind -- Gen0 or Gen1 -> TyCon -- The type to generate representation for -> Module -- Used as the location of the new RepTy -> TcM (FamInst) tc_mkRepFamInsts gk tycon mod = -- Consider the example input tycon `D`, wher...
2,156
tc_mkRepFamInsts gk tycon mod = -- Consider the example input tycon `D`, where data D a b = D_ a -- Also consider `R:DInt`, where { data family D x y :: * -> * -- ; data instance D Int a b = D_ a } do { -- `rep` = GHC.Generics.Rep or GHC.Generics.Rep1 (type family) ...
1,920
true
true
0
23
922
393
203
190
null
null
nickspinale/euler
complete/012.hs
mit
main = print $ find ( (> 500) . product . map ((+ 1) . length) . group . reduce primes ) $ map (sum . enumFromTo 1) [1..]
241
main = print $ find ( (> 500) . product . map ((+ 1) . length) . group . reduce primes ) $ map (sum . enumFromTo 1) [1..]
241
main = print $ find ( (> 500) . product . map ((+ 1) . length) . group . reduce primes ) $ map (sum . enumFromTo 1) [1..]
241
false
false
5
12
148
80
39
41
null
null
glguy/ssh-hans
src/Network/SSH/Packet.hs
bsd-3-clause
-- | Smart constructor for 'SshIdent'. sshIdent :: S.ByteString -> SshIdent sshIdent version = SshIdent $ "SSH-2.0-" <> version
127
sshIdent :: S.ByteString -> SshIdent sshIdent version = SshIdent $ "SSH-2.0-" <> version
88
sshIdent version = SshIdent $ "SSH-2.0-" <> version
51
true
true
0
6
18
29
15
14
null
null
gsdlab/clafer
src/Language/Clafer/Intermediate/TypeSystem.hs
mit
(TUnion un1) +++ (TUnion un2) = collapseUnion (TUnion $ nub $ un1 ++ un2)
79
(TUnion un1) +++ (TUnion un2) = collapseUnion (TUnion $ nub $ un1 ++ un2)
79
(TUnion un1) +++ (TUnion un2) = collapseUnion (TUnion $ nub $ un1 ++ un2)
79
false
false
0
9
19
42
20
22
null
null
aartifact/aartifact-verifier
src/ContextNorm.hs
mit
multNorm0 e exp = [(e,exp)]
60
multNorm0 e exp = [(e,exp)]
60
multNorm0 e exp = [(e,exp)]
60
false
false
0
6
37
20
11
9
null
null
BartAdv/idris-cil
src/IRTS/CodegenCil.hs
bsd-3-clause
publicStruct :: TypeName -> [FieldDef] -> [MethodDef] -> [TypeDef] -> TypeDef publicStruct name = classDef [CaPublic] name (extends "[mscorlib]System.ValueType") noImplements
174
publicStruct :: TypeName -> [FieldDef] -> [MethodDef] -> [TypeDef] -> TypeDef publicStruct name = classDef [CaPublic] name (extends "[mscorlib]System.ValueType") noImplements
174
publicStruct name = classDef [CaPublic] name (extends "[mscorlib]System.ValueType") noImplements
96
false
true
0
10
19
62
31
31
null
null
google/codeworld
codeworld-base/src/Sketches.hs
apache-2.0
-- | Rough sketch of a bell sketchedBell :: HasCallStack => Picture sketchedBell = withFrozenCallStack $ CWPic CW.sketchedBell
126
sketchedBell :: HasCallStack => Picture sketchedBell = withFrozenCallStack $ CWPic CW.sketchedBell
98
sketchedBell = withFrozenCallStack $ CWPic CW.sketchedBell
58
true
true
0
7
17
26
13
13
null
null
nick0x01/Win32-services
src/System/Win32/SystemServices/Services/SERVICE_ACCEPT.hs
bsd-3-clause
fromDWORD 0x00000008 = Right ACCEPT_PARAMCHANGE
47
fromDWORD 0x00000008 = Right ACCEPT_PARAMCHANGE
47
fromDWORD 0x00000008 = Right ACCEPT_PARAMCHANGE
47
false
false
1
5
4
15
5
10
null
null
ekmett/ghc
compiler/utils/GraphOps.hs
bsd-3-clause
coalesceGraph' :: (Uniquable k, Ord k, Eq cls, Outputable k) => Bool -> Triv k cls color -> Graph k cls color -> [(k, k)] -> ( Graph k cls color , [(k, k)]) coalesceGraph' aggressive triv graph kkPairsAcc = let -- find all the nodes that have coalescen...
1,778
coalesceGraph' :: (Uniquable k, Ord k, Eq cls, Outputable k) => Bool -> Triv k cls color -> Graph k cls color -> [(k, k)] -> ( Graph k cls color , [(k, k)]) coalesceGraph' aggressive triv graph kkPairsAcc = let -- find all the nodes that have coalescen...
1,778
coalesceGraph' aggressive triv graph kkPairsAcc = let -- find all the nodes that have coalescence edges cNodes = filter (\node -> not $ isEmptyUniqSet (nodeCoalesce node)) $ eltsUFM $ graphMap graph -- build a list of pairs of keys for node's we'll try and coalesce -- ...
1,562
false
true
0
17
615
292
156
136
null
null
ion1/swtor-ui
src/SWTOR/UIProfile/Layout.hs
mit
missionTracker = MissionTracker{ elemScale = 1 , elemFlipVertical = False , elemHeight = 500 , elemOffset = (0,0) }
239
missionTracker = MissionTracker{ elemScale = 1 , elemFlipVertical = False , elemHeight = 500 , elemOffset = (0,0) }
239
missionTracker = MissionTracker{ elemScale = 1 , elemFlipVertical = False , elemHeight = 500 , elemOffset = (0,0) }
239
false
false
0
7
142
38
24
14
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Metrics which are compatible to be selected in the \"metricNames\" -- section of the report. ptcrcfMetrics :: Lens' PathToConversionReportCompatibleFields [Metric] ptcrcfMetrics = lens _ptcrcfMetrics (\ s a -> s{_ptcrcfMetrics = a}) . _Default . _Coerce
278
ptcrcfMetrics :: Lens' PathToConversionReportCompatibleFields [Metric] ptcrcfMetrics = lens _ptcrcfMetrics (\ s a -> s{_ptcrcfMetrics = a}) . _Default . _Coerce
180
ptcrcfMetrics = lens _ptcrcfMetrics (\ s a -> s{_ptcrcfMetrics = a}) . _Default . _Coerce
109
true
true
3
8
56
59
29
30
null
null
tomlokhorst/language-cil
examples/04_Branches.hs
bsd-3-clause
hellos :: MethodDef hellos = Method [MaStatic, MaPublic] Void "hellos" [Param Nothing Int32 "x"] [ maxStack 4 , localsInit [ Local Int32 "i" ] , ldarg 0 , stloc 0 , br "Test" , label "Loop" , ldstr "Hello!" , call [] Void "mscorlib" "System.Console" "WriteLine" [String] , ldloc 0 , ldc_...
413
hellos :: MethodDef hellos = Method [MaStatic, MaPublic] Void "hellos" [Param Nothing Int32 "x"] [ maxStack 4 , localsInit [ Local Int32 "i" ] , ldarg 0 , stloc 0 , br "Test" , label "Loop" , ldstr "Hello!" , call [] Void "mscorlib" "System.Console" "WriteLine" [String] , ldloc 0 , ldc_...
413
hellos = Method [MaStatic, MaPublic] Void "hellos" [Param Nothing Int32 "x"] [ maxStack 4 , localsInit [ Local Int32 "i" ] , ldarg 0 , stloc 0 , br "Test" , label "Loop" , ldstr "Hello!" , call [] Void "mscorlib" "System.Console" "WriteLine" [String] , ldloc 0 , ldc_i4 1 , sub , stl...
393
false
true
0
8
121
158
81
77
null
null
isomorphism/hackage2
Data/StringTable.hs
bsd-3-clause
-- | Look up a string in the token table. If the string is present, return -- its corresponding index. -- lookup :: Enum id => StringTable id -> String -> Maybe id lookup (StringTable bs tbl) str = binarySearch 0 (topBound-1) (BS.pack str) where (0, topBound) = A.bounds tbl binarySearch a b key | a > b...
548
lookup :: Enum id => StringTable id -> String -> Maybe id lookup (StringTable bs tbl) str = binarySearch 0 (topBound-1) (BS.pack str) where (0, topBound) = A.bounds tbl binarySearch a b key | a > b = Nothing | otherwise = case compare key (index' bs tbl mid) of LT -> binarySearch a ...
442
lookup (StringTable bs tbl) str = binarySearch 0 (topBound-1) (BS.pack str) where (0, topBound) = A.bounds tbl binarySearch a b key | a > b = Nothing | otherwise = case compare key (index' bs tbl mid) of LT -> binarySearch a (mid-1) key EQ -> Just (toEnum mid) GT...
384
true
true
1
10
158
215
107
108
null
null
MauriceIsAG/HaskellScratch
.stack-work/intero/intero1846heo.hs
bsd-3-clause
dupl :: [a] -> [a] dupl [] = []
31
dupl :: [a] -> [a] dupl [] = []
31
dupl [] = []
12
false
true
0
6
8
28
15
13
null
null
ratatosk/traceblade
Match.hs
bsd-3-clause
boolLit :: Parser Bool boolLit = char '#' >> ((char 'f' >> return False) <|> (char 't' >> return True))
103
boolLit :: Parser Bool boolLit = char '#' >> ((char 'f' >> return False) <|> (char 't' >> return True))
103
boolLit = char '#' >> ((char 'f' >> return False) <|> (char 't' >> return True))
80
false
true
2
10
19
61
27
34
null
null
yesodweb/shakespeare
Text/Internal/Css.hs
mit
compressBlock :: Block Unresolved -> Block Unresolved compressBlock (Block x y blocks mixins) = Block (map cc x) (map go y) (map (second compressBlock) blocks) mixins where go (Attr k v) = Attr (cc k) (cc v) cc [] = [] cc (ContentRaw a:ContentRaw b:c) = cc $ ContentRaw (a ++ b) : c c...
338
compressBlock :: Block Unresolved -> Block Unresolved compressBlock (Block x y blocks mixins) = Block (map cc x) (map go y) (map (second compressBlock) blocks) mixins where go (Attr k v) = Attr (cc k) (cc v) cc [] = [] cc (ContentRaw a:ContentRaw b:c) = cc $ ContentRaw (a ++ b) : c c...
338
compressBlock (Block x y blocks mixins) = Block (map cc x) (map go y) (map (second compressBlock) blocks) mixins where go (Attr k v) = Attr (cc k) (cc v) cc [] = [] cc (ContentRaw a:ContentRaw b:c) = cc $ ContentRaw (a ++ b) : c cc (a:b) = a : cc b
270
false
true
0
9
96
188
91
97
null
null
tpsinnem/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
intToStr :: [Const] -> Maybe Const intToStr val | [i] <- getInt val = Just $ Str (show i)
89
intToStr :: [Const] -> Maybe Const intToStr val | [i] <- getInt val = Just $ Str (show i)
89
intToStr val | [i] <- getInt val = Just $ Str (show i)
54
false
true
0
9
18
57
26
31
null
null
oldmanmike/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
cmmOffsetExprB :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr cmmOffsetExprB = cmmOffsetExpr
90
cmmOffsetExprB :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr cmmOffsetExprB = cmmOffsetExpr
90
cmmOffsetExprB = cmmOffsetExpr
30
false
true
0
7
11
23
12
11
null
null
kazu-yamamoto/wai
wai-extra/test/WaiExtraSpec.hs
mit
streamLBSApp :: Application streamLBSApp = streamFile $ \_ f -> f $ responseLBS status200 [("Content-Type", "text/plain")] "test"
137
streamLBSApp :: Application streamLBSApp = streamFile $ \_ f -> f $ responseLBS status200 [("Content-Type", "text/plain")] "test"
137
streamLBSApp = streamFile $ \_ f -> f $ responseLBS status200 [("Content-Type", "text/plain")] "test"
109
false
true
0
8
24
44
23
21
null
null
Regulareveryday/our_sorting_algos
src/Heapsort.hs
bsd-3-clause
-- |Function which creates a heap out of a table buildHeap :: (Ord a) => [a] -> Int -> [a] buildHeap [] _ = []
110
buildHeap :: (Ord a) => [a] -> Int -> [a] buildHeap [] _ = []
61
buildHeap [] _ = []
19
true
true
0
8
24
44
24
20
null
null
davdar/quals
src/Lang/Lam/Parser.hs
bsd-3-clause
nameExp :: Parser Token Name nameExp = Name . tokenVal ^$ litP tokenP ((==) Id . tokenType) $ P.text "an identifier"
116
nameExp :: Parser Token Name nameExp = Name . tokenVal ^$ litP tokenP ((==) Id . tokenType) $ P.text "an identifier"
116
nameExp = Name . tokenVal ^$ litP tokenP ((==) Id . tokenType) $ P.text "an identifier"
87
false
true
3
9
20
58
26
32
null
null
rkaippully/real-world-haskell
RWH/Chapter4.hs
gpl-3.0
splitWith :: (a -> Bool) -> [a] -> [[a]] splitWith f xs = let (elm, rest) = accumulateWhile ([], xs) accumulateWhile (e, []) = (e, []) accumulateWhile (e, y:ys) = if f y then (e, dropWhile f ys) else accumulateWhile (e ++ [y], ys) in if ...
368
splitWith :: (a -> Bool) -> [a] -> [[a]] splitWith f xs = let (elm, rest) = accumulateWhile ([], xs) accumulateWhile (e, []) = (e, []) accumulateWhile (e, y:ys) = if f y then (e, dropWhile f ys) else accumulateWhile (e ++ [y], ys) in if ...
368
splitWith f xs = let (elm, rest) = accumulateWhile ([], xs) accumulateWhile (e, []) = (e, []) accumulateWhile (e, y:ys) = if f y then (e, dropWhile f ys) else accumulateWhile (e ++ [y], ys) in if null rest then [elm] else elm : splitWith...
327
false
true
0
13
138
177
95
82
null
null
brendanhay/gogol
gogol-billing/gen/Network/Google/Resource/CloudBilling/BillingAccounts/SetIAMPolicy.hs
mpl-2.0
-- | Creates a value of 'BillingAccountsSetIAMPolicy' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'basipXgafv' -- -- * 'basipUploadProtocol' -- -- * 'basipAccessToken' -- -- * 'basipUploadType' -- -- * 'basipPayload' -- -- * 'basip...
833
billingAccountsSetIAMPolicy :: SetIAMPolicyRequest -- ^ 'basipPayload' -> Text -- ^ 'basipResource' -> BillingAccountsSetIAMPolicy billingAccountsSetIAMPolicy pBasipPayload_ pBasipResource_ = BillingAccountsSetIAMPolicy' { _basipXgafv = Nothing , _basipUploadProtocol = Nothing , _basipAccessTo...
479
billingAccountsSetIAMPolicy pBasipPayload_ pBasipResource_ = BillingAccountsSetIAMPolicy' { _basipXgafv = Nothing , _basipUploadProtocol = Nothing , _basipAccessToken = Nothing , _basipUploadType = Nothing , _basipPayload = pBasipPayload_ , _basipResource = pBasipResource_ , _basipCallback...
336
true
true
0
8
150
96
62
34
null
null
ekmett/ermine
src/Ermine/Builtin/Core.hs
bsd-2-clause
cPutStrLn :: AsConvention cc => Core cc a cPutStrLn = Lam [_Convention # C] . Scope $ Case (Var (B 0)) (M.singleton 0 . Match [_Convention # N] stringg . Scope . App (_Convention # N) (_Id._Global # putStrLng) $ Var (B 1)) Nothing
256
cPutStrLn :: AsConvention cc => Core cc a cPutStrLn = Lam [_Convention # C] . Scope $ Case (Var (B 0)) (M.singleton 0 . Match [_Convention # N] stringg . Scope . App (_Convention # N) (_Id._Global # putStrLng) $ Var (B 1)) Nothing
256
cPutStrLn = Lam [_Convention # C] . Scope $ Case (Var (B 0)) (M.singleton 0 . Match [_Convention # N] stringg . Scope . App (_Convention # N) (_Id._Global # putStrLng) $ Var (B 1)) Nothing
214
false
true
0
12
69
134
63
71
null
null
ben-schulz/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
compileJS' indent (JSDelete js) = "delete " `T.append` compileJS' 0 js
72
compileJS' indent (JSDelete js) = "delete " `T.append` compileJS' 0 js
72
compileJS' indent (JSDelete js) = "delete " `T.append` compileJS' 0 js
72
false
false
0
6
12
36
16
20
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (HsOverLit lit) = ppr lit
34
ppr_expr (HsOverLit lit) = ppr lit
34
ppr_expr (HsOverLit lit) = ppr lit
34
false
false
0
6
5
19
8
11
null
null
beni55/cps-core
GHC/Syntax.hs
bsd-3-clause
valueType (Data dc utys xtys xs) = nTimes (length xs) funResTy $ foldl' instTy (dataConType dc) (utys ++ xtys)
110
valueType (Data dc utys xtys xs) = nTimes (length xs) funResTy $ foldl' instTy (dataConType dc) (utys ++ xtys)
110
valueType (Data dc utys xtys xs) = nTimes (length xs) funResTy $ foldl' instTy (dataConType dc) (utys ++ xtys)
110
false
false
0
8
18
57
27
30
null
null
soupi/pureli
src/Language/Pureli/Repl.hs
bsd-3-clause
-- | -- a help message to be shown when user enters :help helpMsg :: String helpMsg = unlines $ ([""," Available Commands:",""] ++) $ displayCommands spaceOpener commandsDesc
175
helpMsg :: String helpMsg = unlines $ ([""," Available Commands:",""] ++) $ displayCommands spaceOpener commandsDesc
117
helpMsg = unlines $ ([""," Available Commands:",""] ++) $ displayCommands spaceOpener commandsDesc
99
true
true
0
8
28
39
23
16
null
null
rueshyna/gogol
gogol-taskqueue/gen/Network/Google/Resource/TaskQueue/Tasks/Insert.hs
mpl-2.0
-- | The project under which the queue lies tiProject :: Lens' TasksInsert Text tiProject = lens _tiProject (\ s a -> s{_tiProject = a})
138
tiProject :: Lens' TasksInsert Text tiProject = lens _tiProject (\ s a -> s{_tiProject = a})
94
tiProject = lens _tiProject (\ s a -> s{_tiProject = a})
58
true
true
0
9
26
42
22
20
null
null
justinethier/husk-scheme
hs-src/Language/Scheme/Core.hs
mit
-- Skip over continuation argument evalfuncLoad _ = throwError $ NumArgs (Just 1) []
84
evalfuncLoad _ = throwError $ NumArgs (Just 1) []
49
evalfuncLoad _ = throwError $ NumArgs (Just 1) []
49
true
false
0
8
13
27
13
14
null
null
RJ-Russell/ChordsandScales
chord-gen.hs
mit
halfStepD n = pred n
20
halfStepD n = pred n
20
halfStepD n = pred n
20
false
false
1
5
4
16
5
11
null
null
bitemyapp/amqp
Network/AMQP/Types.hs
bsd-3-clause
-- performs runGet on a bytestring until the string is empty readMany :: (Show a, Binary a) => BL.ByteString -> [a] readMany = runGet (readMany' [] 0)
150
readMany :: (Show a, Binary a) => BL.ByteString -> [a] readMany = runGet (readMany' [] 0)
89
readMany = runGet (readMany' [] 0)
34
true
true
0
8
26
49
26
23
null
null
paulkoerbitz/hsbci
test/TestHsBCI.hs
agpl-3.0
main :: IO () main = do hbciPlus <- getXml "resources/hbci-plus.xml" defaultMain (standaloneTests ++ map ($ hbciPlus) xmlTests)
131
main :: IO () main = do hbciPlus <- getXml "resources/hbci-plus.xml" defaultMain (standaloneTests ++ map ($ hbciPlus) xmlTests)
131
main = do hbciPlus <- getXml "resources/hbci-plus.xml" defaultMain (standaloneTests ++ map ($ hbciPlus) xmlTests)
117
false
true
0
11
21
48
23
25
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/PositionErrorCallback.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/PositionErrorCallback Mozilla PositionErrorCallback documentation> newPositionErrorCallbackSync :: (MonadDOM m) => (PositionError -> JSM ()) -> m PositionErrorCallback newPositionErrorCallbackSync callbac...
497
newPositionErrorCallbackSync :: (MonadDOM m) => (PositionError -> JSM ()) -> m PositionErrorCallback newPositionErrorCallbackSync callback = liftDOM (PositionErrorCallback . Callback <$> function (\ _ _ [error] -> from...
374
newPositionErrorCallbackSync callback = liftDOM (PositionErrorCallback . Callback <$> function (\ _ _ [error] -> fromJSValUnchecked error >>= \ error' -> callback error'))
213
true
true
0
12
142
90
46
44
null
null
tolysz/wai
warp-tls/Network/Wai/Handler/WarpTLS.hs
mit
---------------------------------------------------------------- plainHTTP :: TLSSettings -> Socket -> S.ByteString -> IO (Connection, Transport) plainHTTP TLSSettings{..} s bs0 = case onInsecure of AllowInsecure -> do conn' <- socketConnection s cachedRef <- I.newIORef bs0 let conn'' = con...
1,540
plainHTTP :: TLSSettings -> Socket -> S.ByteString -> IO (Connection, Transport) plainHTTP TLSSettings{..} s bs0 = case onInsecure of AllowInsecure -> do conn' <- socketConnection s cachedRef <- I.newIORef bs0 let conn'' = conn' { connRecv = recvPlain cachedRef (connRecv conn...
1,474
plainHTTP TLSSettings{..} s bs0 = case onInsecure of AllowInsecure -> do conn' <- socketConnection s cachedRef <- I.newIORef bs0 let conn'' = conn' { connRecv = recvPlain cachedRef (connRecv conn') } return (conn'', TCP) DenyInsecure lbs -> do ...
1,393
true
true
1
18
405
190
94
96
null
null
Tener/deeplearning-thesis
lib/AgentGeneric.hs
bsd-3-clause
evalGameNetwork :: (NeuralNetwork nn, Game2 g, Repr (GameRepr g)) => nn -> g -> Double evalGameNetwork tn g = V.sumElements $ computeNetworkSigmoid tn (toReprNN g)
163
evalGameNetwork :: (NeuralNetwork nn, Game2 g, Repr (GameRepr g)) => nn -> g -> Double evalGameNetwork tn g = V.sumElements $ computeNetworkSigmoid tn (toReprNN g)
163
evalGameNetwork tn g = V.sumElements $ computeNetworkSigmoid tn (toReprNN g)
76
false
true
0
8
24
68
34
34
null
null
jsnajder/multext-east-msd
src/Data/MultextEastMsd.hs
bsd-3-clause
unset :: (Enum a) => Attribute a -> Msd -> Msd unset a (Msd p fs) = Msd p $ deleteBy eq (a x_) fs
97
unset :: (Enum a) => Attribute a -> Msd -> Msd unset a (Msd p fs) = Msd p $ deleteBy eq (a x_) fs
97
unset a (Msd p fs) = Msd p $ deleteBy eq (a x_) fs
50
false
true
0
8
24
69
32
37
null
null
ganeti/ganeti
src/Ganeti/HTools/Backend/Rapi.hs
bsd-2-clause
readData :: String -- ^ URL to use as source -> IO (Result String, Result String, Result String, Result String) readData url = if filePrefix `isPrefixOf` url then readDataFile (drop (length filePrefix) url) else readDataHttp url
247
readData :: String -- ^ URL to use as source -> IO (Result String, Result String, Result String, Result String) readData url = if filePrefix `isPrefixOf` url then readDataFile (drop (length filePrefix) url) else readDataHttp url
247
readData url = if filePrefix `isPrefixOf` url then readDataFile (drop (length filePrefix) url) else readDataHttp url
126
false
true
0
10
54
80
41
39
null
null
kwibus/myLang
src/InfixFix.hs
bsd-3-clause
unwindStack (v1 : v2 : vs) (o : os) = uncurry unwindStack (Appl (Appl o v2) v1 : vs, os)
88
unwindStack (v1 : v2 : vs) (o : os) = uncurry unwindStack (Appl (Appl o v2) v1 : vs, os)
88
unwindStack (v1 : v2 : vs) (o : os) = uncurry unwindStack (Appl (Appl o v2) v1 : vs, os)
88
false
false
0
10
19
57
29
28
null
null
leepike/copilot-language
src/Copilot/Language/Operators/Ord.hs
bsd-3-clause
(>) :: (P.Ord a, Typed a) => Stream a -> Stream a -> Stream Bool (Const x) > (Const y) = Const (x P.> y)
104
(>) :: (P.Ord a, Typed a) => Stream a -> Stream a -> Stream Bool (Const x) > (Const y) = Const (x P.> y)
104
(Const x) > (Const y) = Const (x P.> y)
39
false
true
0
8
24
80
39
41
null
null
kim/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/CreateReplicationGroup.hs
mpl-2.0
-- | The identifier of the cache cluster that will serve as the primary for this -- replication group. This cache cluster must already exist and have a status of /available/. -- -- This parameter is not required if /NumCacheClusters/ is specified. crgPrimaryClusterId :: Lens' CreateReplicationGroup (Maybe Text) crgPrim...
405
crgPrimaryClusterId :: Lens' CreateReplicationGroup (Maybe Text) crgPrimaryClusterId = lens _crgPrimaryClusterId (\s a -> s { _crgPrimaryClusterId = a })
157
crgPrimaryClusterId = lens _crgPrimaryClusterId (\s a -> s { _crgPrimaryClusterId = a })
92
true
true
0
9
64
49
28
21
null
null
adolenc/AlexanderTheGreat
src/Artist.hs
mit
twist' z (knot, (nw, ne, se, sw)) West = (twistTangle knot z sw nw West, (sw, ne, se, nw))
92
twist' z (knot, (nw, ne, se, sw)) West = (twistTangle knot z sw nw West, (sw, ne, se, nw))
92
twist' z (knot, (nw, ne, se, sw)) West = (twistTangle knot z sw nw West, (sw, ne, se, nw))
92
false
false
1
7
20
63
35
28
null
null
ditto/ditto
src/Ditto/Pretty.hs
gpl-3.0
ppErr ren (RConv a b) = text "Terms not convertible" <+> code (ppExp ren a <+> nconv <+> ppExp ren b)
102
ppErr ren (RConv a b) = text "Terms not convertible" <+> code (ppExp ren a <+> nconv <+> ppExp ren b)
102
ppErr ren (RConv a b) = text "Terms not convertible" <+> code (ppExp ren a <+> nconv <+> ppExp ren b)
102
false
false
2
9
21
51
23
28
null
null
danr/hipspec
src/HipSpec/Lang/Monomorphise.hs
gpl-3.0
member :: (Ord a,Ord b) => (Trigger a,[Type a b]) -> Records a b -> Bool (t,ts) `member` r = maybe False (ts `S.member`) (M.lookup t r)
135
member :: (Ord a,Ord b) => (Trigger a,[Type a b]) -> Records a b -> Bool (t,ts) `member` r = maybe False (ts `S.member`) (M.lookup t r)
135
(t,ts) `member` r = maybe False (ts `S.member`) (M.lookup t r)
62
false
true
0
9
26
95
51
44
null
null
brendanhay/gogol
gogol-redis/gen/Network/Google/Resource/Redis/Projects/Locations/Operations/Get.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). plogUploadProtocol :: Lens' ProjectsLocationsOperationsGet (Maybe Text) plogUploadProtocol = lens _plogUploadProtocol (\ s a -> s{_plogUploadProtocol = a})
225
plogUploadProtocol :: Lens' ProjectsLocationsOperationsGet (Maybe Text) plogUploadProtocol = lens _plogUploadProtocol (\ s a -> s{_plogUploadProtocol = a})
163
plogUploadProtocol = lens _plogUploadProtocol (\ s a -> s{_plogUploadProtocol = a})
91
true
true
1
9
33
51
25
26
null
null
snoyberg/ghc
compiler/main/HscTypes.hs
bsd-3-clause
typeEnvClasses env = [cl | tc <- typeEnvTyCons env, Just cl <- [tyConClass_maybe tc]]
114
typeEnvClasses env = [cl | tc <- typeEnvTyCons env, Just cl <- [tyConClass_maybe tc]]
114
typeEnvClasses env = [cl | tc <- typeEnvTyCons env, Just cl <- [tyConClass_maybe tc]]
114
false
false
1
10
42
44
19
25
null
null
ellej/mire
test/Mire/Test/Mxp.hs
bsd-3-clause
mxpEqTest :: String -> [Flow Char] -> Assertion mxpEqTest text result = (assertEqual "" result (runMxpTest text))
113
mxpEqTest :: String -> [Flow Char] -> Assertion mxpEqTest text result = (assertEqual "" result (runMxpTest text))
113
mxpEqTest text result = (assertEqual "" result (runMxpTest text))
65
false
true
0
8
16
46
23
23
null
null
matterhorn-chat/matterhorn
src/Matterhorn/Login.hs
bsd-3-clause
-- | Run an IO action and convert various kinds of thrown exceptions -- into a returned AuthenticationException. convertLoginExceptions :: IO a -> IO (Either AuthenticationException a) convertLoginExceptions act = (Right <$> act) `catch` (\e -> return $ Left $ ResolveError e) `catch` (\e -> return $...
525
convertLoginExceptions :: IO a -> IO (Either AuthenticationException a) convertLoginExceptions act = (Right <$> act) `catch` (\e -> return $ Left $ ResolveError e) `catch` (\e -> return $ Left $ ConnectError e) `catchIOError` (\e -> return $ Left $ AuthIOError e) `catch` (\e -> retur...
412
convertLoginExceptions act = (Right <$> act) `catch` (\e -> return $ Left $ ResolveError e) `catch` (\e -> return $ Left $ ConnectError e) `catchIOError` (\e -> return $ Left $ AuthIOError e) `catch` (\e -> return $ Left $ MattermostServerError e) `catch` (\e -> return $ Left...
340
true
true
0
10
121
186
97
89
null
null
trskop/cabal
Cabal/Distribution/Simple/Test/Log.hs
bsd-3-clause
-- | A 'PackageLog' with package and platform information specified. localPackageLog :: PD.PackageDescription -> LBI.LocalBuildInfo -> PackageLog localPackageLog pkg_descr lbi = PackageLog { package = PD.package pkg_descr , compiler = compilerId $ LBI.compiler lbi , platform = LBI.hostPlatform lbi , tes...
338
localPackageLog :: PD.PackageDescription -> LBI.LocalBuildInfo -> PackageLog localPackageLog pkg_descr lbi = PackageLog { package = PD.package pkg_descr , compiler = compilerId $ LBI.compiler lbi , platform = LBI.hostPlatform lbi , testSuites = [] }
269
localPackageLog pkg_descr lbi = PackageLog { package = PD.package pkg_descr , compiler = compilerId $ LBI.compiler lbi , platform = LBI.hostPlatform lbi , testSuites = [] }
192
true
true
0
10
63
80
42
38
null
null
pseudonom/haskell-mechanism
src/Mechanism/Examples/PrisonersDilemma.hs
agpl-3.0
player1 :: Actions Cooperate -> Util Int player1 acs = case F.toList $ runAction <$> acs of [Cooperate, Cooperate] -> 2 [Cooperate, Defect] -> 0 [Defect, Cooperate] -> 3 [Defect, Defect] -> 1
221
player1 :: Actions Cooperate -> Util Int player1 acs = case F.toList $ runAction <$> acs of [Cooperate, Cooperate] -> 2 [Cooperate, Defect] -> 0 [Defect, Cooperate] -> 3 [Defect, Defect] -> 1
221
player1 acs = case F.toList $ runAction <$> acs of [Cooperate, Cooperate] -> 2 [Cooperate, Defect] -> 0 [Defect, Cooperate] -> 3 [Defect, Defect] -> 1
180
false
true
0
8
62
86
46
40
null
null
gnn/Hets
OWL2/Profiles.hs
gpl-2.0
qlProfile :: Profiles qlProfile = Profiles False True False
59
qlProfile :: Profiles qlProfile = Profiles False True False
59
qlProfile = Profiles False True False
37
false
true
0
5
8
18
9
9
null
null
hvr/jhc
src/GenUtil.hs
mit
foldlM_ :: Monad m => (a -> b -> m a) -> a -> [b] -> m () foldlM_ f v xs = foldlM f v xs >> return ()
101
foldlM_ :: Monad m => (a -> b -> m a) -> a -> [b] -> m () foldlM_ f v xs = foldlM f v xs >> return ()
101
foldlM_ f v xs = foldlM f v xs >> return ()
43
false
true
0
10
29
75
36
39
null
null
koba-e964/tigress
test/EvalTest.hs
bsd-3-clause
testsAdd :: TF.Test testsAdd = TF.testGroup "+" [ evalCheck "eval_add1" "1+1" (FVInt 2) ,evalCheck "eval_add2" "-19+4" (FVInt (-15)) ,evalCheck "eval_add3" "-1234567890+12345678901" (FVInt 11111111011) ]
210
testsAdd :: TF.Test testsAdd = TF.testGroup "+" [ evalCheck "eval_add1" "1+1" (FVInt 2) ,evalCheck "eval_add2" "-19+4" (FVInt (-15)) ,evalCheck "eval_add3" "-1234567890+12345678901" (FVInt 11111111011) ]
210
testsAdd = TF.testGroup "+" [ evalCheck "eval_add1" "1+1" (FVInt 2) ,evalCheck "eval_add2" "-19+4" (FVInt (-15)) ,evalCheck "eval_add3" "-1234567890+12345678901" (FVInt 11111111011) ]
190
false
true
0
11
30
79
38
41
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Constraint/System/Dot.hs
gpl-3.0
dotNode :: NodeId -> SeDot D.NodeId dotNode v = dotOnce dsNodes v $ do (se, colorMap) <- ask let nodes = get sNodes se dot info moreStyle facts = do vId <- liftDot $ D.node $ [("label", show v ++ info),("shape","ellipse")] ++ moreStyle _ <- f...
1,815
dotNode :: NodeId -> SeDot D.NodeId dotNode v = dotOnce dsNodes v $ do (se, colorMap) <- ask let nodes = get sNodes se dot info moreStyle facts = do vId <- liftDot $ D.node $ [("label", show v ++ info),("shape","ellipse")] ++ moreStyle _ <- f...
1,815
dotNode v = dotOnce dsNodes v $ do (se, colorMap) <- ask let nodes = get sNodes se dot info moreStyle facts = do vId <- liftDot $ D.node $ [("label", show v ++ info),("shape","ellipse")] ++ moreStyle _ <- facts vId return vId ...
1,779
false
true
7
21
708
544
260
284
null
null
truls/language-vhdl-quote
src/Language/VHDL/Parser/Internal.hs
mpl-2.0
binOpPrec4 :: Parser BinOp binOpPrec4 = choice [binOp "+" Plus, binOp "-" Minus, binOp "&" Concat]
98
binOpPrec4 :: Parser BinOp binOpPrec4 = choice [binOp "+" Plus, binOp "-" Minus, binOp "&" Concat]
98
binOpPrec4 = choice [binOp "+" Plus, binOp "-" Minus, binOp "&" Concat]
71
false
true
0
7
15
41
20
21
null
null
randen/cabal
Cabal/Distribution/Simple/BuildTarget.hs
bsd-3-clause
matchPlus a@(InexactMatch _ _ ) (NoMatch _ _ ) = a
60
matchPlus a@(InexactMatch _ _ ) (NoMatch _ _ ) = a
60
matchPlus a@(InexactMatch _ _ ) (NoMatch _ _ ) = a
60
false
false
0
8
20
30
15
15
null
null
kfish/vacuum
src/GHC/Vacuum.hs
lgpl-3.0
insertG :: HNodeId -> HNode -> H () insertG i n = do g <- gets graph modify (\e->e{graph = IM.insert i n g})
112
insertG :: HNodeId -> HNode -> H () insertG i n = do g <- gets graph modify (\e->e{graph = IM.insert i n g})
112
insertG i n = do g <- gets graph modify (\e->e{graph = IM.insert i n g})
76
false
true
0
13
27
70
34
36
null
null
andrewthad/yesod-crud-persist
src/Yesod/Crud/Simple.hs
mit
basicHierarchySimpleCrud :: (PersistCrudEntity site a, SqlClosure a c) => (CrudRoute (Maybe (Key a)) a -> Route site) -> SimpleCrud site (Maybe (Key a)) a basicHierarchySimpleCrud tp = applyBasicLayoutsAndForms (emptyHierarchySimpleCrud tp)
248
basicHierarchySimpleCrud :: (PersistCrudEntity site a, SqlClosure a c) => (CrudRoute (Maybe (Key a)) a -> Route site) -> SimpleCrud site (Maybe (Key a)) a basicHierarchySimpleCrud tp = applyBasicLayoutsAndForms (emptyHierarchySimpleCrud tp)
248
basicHierarchySimpleCrud tp = applyBasicLayoutsAndForms (emptyHierarchySimpleCrud tp)
88
false
true
0
14
37
93
45
48
null
null
plancalculus/sloth
Test/Sloth/TestCase.hs
bsd-3-clause
isFailure config (TestCase _ l) = any (\(_,s) -> not (isBottom (extract s)) && (isCompleteT s || getSum (execWriter (runSearchT s)) >= minSamples)) l where minSamples = minInfSize config -- | Check whether a TestCase should be displayed under a -- configuration
277
isFailure config (TestCase _ l) = any (\(_,s) -> not (isBottom (extract s)) && (isCompleteT s || getSum (execWriter (runSearchT s)) >= minSamples)) l where minSamples = minInfSize config -- | Check whether a TestCase should be displayed under a -- configuration
277
isFailure config (TestCase _ l) = any (\(_,s) -> not (isBottom (extract s)) && (isCompleteT s || getSum (execWriter (runSearchT s)) >= minSamples)) l where minSamples = minInfSize config -- | Check whether a TestCase should be displayed under a -- configuration
277
false
false
1
16
57
106
50
56
null
null
spl/generic-deriving-extras
src/Generics/Deriving/Zipper/Base.hs
bsd-3-clause
down :: (Zipper a, Zipper b) => Dir -> Loc a r c -> Maybe (Loc b r (a ': c)) down d (Loc h cs) = fromPair cs <$> split d (from h)
129
down :: (Zipper a, Zipper b) => Dir -> Loc a r c -> Maybe (Loc b r (a ': c)) down d (Loc h cs) = fromPair cs <$> split d (from h)
129
down d (Loc h cs) = fromPair cs <$> split d (from h)
52
false
true
0
12
33
94
46
48
null
null
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/Types.hs
mpl-2.0
-- | If the principal is an AWS account, it provides the Canonical User ID. If the -- principal is an IAM User, it provides a user ARN value. iID :: Lens' Initiator (Maybe Text) iID = lens _iID (\s a -> s { _iID = a })
218
iID :: Lens' Initiator (Maybe Text) iID = lens _iID (\s a -> s { _iID = a })
76
iID = lens _iID (\s a -> s { _iID = a })
40
true
true
0
9
47
47
26
21
null
null
foreverbell/project-euler-solutions
src/512.hs
bsd-3-clause
f :: Int -> [Int] f 1 = [1]
27
f :: Int -> [Int] f 1 = [1]
27
f 1 = [1]
9
false
true
0
8
8
30
14
16
null
null
robashton/ghcmud
src/WorldDefinitionLoading.hs
bsd-3-clause
getRooms :: FilePath -> IO [FilePath] getRooms = fmap (filter (`notElem` [".", ".."])) . getDirectoryContents
109
getRooms :: FilePath -> IO [FilePath] getRooms = fmap (filter (`notElem` [".", ".."])) . getDirectoryContents
109
getRooms = fmap (filter (`notElem` [".", ".."])) . getDirectoryContents
71
false
true
0
10
14
46
26
20
null
null
tibbe/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
mkBasicIndexedWrite :: ByteOff -- Initial offset in bytes -> Maybe MachOp -- Optional value cast -> CmmExpr -- Base address -> CmmType -- Type of element by which we are indexing -> CmmExpr -- Index -...
545
mkBasicIndexedWrite :: ByteOff -- Initial offset in bytes -> Maybe MachOp -- Optional value cast -> CmmExpr -- Base address -> CmmType -- Type of element by which we are indexing -> CmmExpr -- Index -...
545
mkBasicIndexedWrite off Nothing base idx_ty idx val = do dflags <- getDynFlags emitStore (cmmIndexOffExpr dflags off (typeWidth idx_ty) base idx) val
160
false
true
0
12
220
97
49
48
null
null
green-haskell/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
-- | Change the name of the function the rule is keyed on on all of the 'CoreRule's setSpecInfoHead :: Name -> SpecInfo -> SpecInfo setSpecInfoHead fn (SpecInfo rules fvs) = SpecInfo (map (setRuleIdName fn) rules) fvs
219
setSpecInfoHead :: Name -> SpecInfo -> SpecInfo setSpecInfoHead fn (SpecInfo rules fvs) = SpecInfo (map (setRuleIdName fn) rules) fvs
135
setSpecInfoHead fn (SpecInfo rules fvs) = SpecInfo (map (setRuleIdName fn) rules) fvs
87
true
true
0
9
38
58
27
31
null
null
tittoassini/flat
src/Flat/Encoder/Size.hs
bsd-3-clause
blkBitsBS :: B.ByteString -> NumBits blkBitsBS = blksBits . B.length
68
blkBitsBS :: B.ByteString -> NumBits blkBitsBS = blksBits . B.length
68
blkBitsBS = blksBits . B.length
31
false
true
0
6
9
23
12
11
null
null
urbanslug/ghc
compiler/utils/Encoding.hs
bsd-3-clause
decode_lower 'i' = '.'
22
decode_lower 'i' = '.'
22
decode_lower 'i' = '.'
22
false
false
0
5
3
9
4
5
null
null
smaccm/capDL-tool
CapDL/PrintXml.hs
bsd-2-clause
printUntypedCovers :: CoverMap -> Doc printUntypedCovers untypedCovers = xmlSurround "untypedCovers" [] $ vcat (map printCover (Map.toList untypedCovers))
158
printUntypedCovers :: CoverMap -> Doc printUntypedCovers untypedCovers = xmlSurround "untypedCovers" [] $ vcat (map printCover (Map.toList untypedCovers))
158
printUntypedCovers untypedCovers = xmlSurround "untypedCovers" [] $ vcat (map printCover (Map.toList untypedCovers))
120
false
true
0
11
20
48
23
25
null
null
snoyberg/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isAtomicHsExpr (HsWrap _ e) = isAtomicHsExpr e
51
isAtomicHsExpr (HsWrap _ e) = isAtomicHsExpr e
51
isAtomicHsExpr (HsWrap _ e) = isAtomicHsExpr e
51
false
false
0
7
11
20
9
11
null
null
locaweb/leela
src/warpdrive/src/Leela/Logger.hs
apache-2.0
info (Logger p logger) s | INFO >= p = pushLogStr logger =<< format INFO s | otherwise = return ()
110
info (Logger p logger) s | INFO >= p = pushLogStr logger =<< format INFO s | otherwise = return ()
110
info (Logger p logger) s | INFO >= p = pushLogStr logger =<< format INFO s | otherwise = return ()
110
false
false
1
8
32
53
24
29
null
null
DominikDitoIvosevic/Uni
IRG/src/Irg/Lab4/Shading2/Callbacks.hs
mit
mousePassiveMoveCallback :: GameState -> GLUT.Position -> IO () mousePassiveMoveCallback gameState pos@(GLUT.Position x y) = displayCallback newGameState 0 where newGameState = gameState { mouseCoords = V4 ((fromIntegral x - 400) / 400) ((fromIntegral y - 400) / 400) 3 1 }
275
mousePassiveMoveCallback :: GameState -> GLUT.Position -> IO () mousePassiveMoveCallback gameState pos@(GLUT.Position x y) = displayCallback newGameState 0 where newGameState = gameState { mouseCoords = V4 ((fromIntegral x - 400) / 400) ((fromIntegral y - 400) / 400) 3 1 }
275
mousePassiveMoveCallback gameState pos@(GLUT.Position x y) = displayCallback newGameState 0 where newGameState = gameState { mouseCoords = V4 ((fromIntegral x - 400) / 400) ((fromIntegral y - 400) / 400) 3 1 }
211
false
true
0
12
41
108
55
53
null
null
mheinzel/Rome
src/Utils.hs
mit
-- | Builds a string representing the remote path to framework zip archive. remoteFrameworkPath :: TargetPlatform -> InvertedRepositoryMap -> FrameworkName -> Version -> String remoteFrameworkPath p r f v = remoteCacheDirectory p r f ++ frameworkArchiveName f v
261
remoteFrameworkPath :: TargetPlatform -> InvertedRepositoryMap -> FrameworkName -> Version -> String remoteFrameworkPath p r f v = remoteCacheDirectory p r f ++ frameworkArchiveName f v
185
remoteFrameworkPath p r f v = remoteCacheDirectory p r f ++ frameworkArchiveName f v
84
true
true
0
8
37
53
26
27
null
null
Michaelt293/Lipid-Haskell
src/Lipid/Parsers/UnknownSn/Glycerophospholipid.hs
gpl-3.0
piMaybeOmegaP :: Parser (PI (Maybe OmegaPosition)) piMaybeOmegaP = piP radylMaybeOmegaP
87
piMaybeOmegaP :: Parser (PI (Maybe OmegaPosition)) piMaybeOmegaP = piP radylMaybeOmegaP
87
piMaybeOmegaP = piP radylMaybeOmegaP
36
false
true
0
9
9
29
14
15
null
null
krapsh/kraps-haskell
src/Spark/IO/Internal/Json.hs
apache-2.0
{-| Reads a source of data expected to be in the JSON format. The schema is not required and Spark will infer the schema of the source. However, all the data contained in the source may end up being read in the process. -} jsonOpt :: forall a. (SQLTypeable a) => JsonOptions -> SparkPath -> SparkState (Try (Dataset a))...
483
jsonOpt :: forall a. (SQLTypeable a) => JsonOptions -> SparkPath -> SparkState (Try (Dataset a)) jsonOpt jo sp = let sqlt = buildType :: SQLType a dt = unSQLType sqlt jo' = jo { jsonSchema = UseSchema dt } in castType' sqlt <$> jsonOpt' jo' sp
259
jsonOpt jo sp = let sqlt = buildType :: SQLType a dt = unSQLType sqlt jo' = jo { jsonSchema = UseSchema dt } in castType' sqlt <$> jsonOpt' jo' sp
162
true
true
2
14
106
112
55
57
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
idiskSize :: String idiskSize = "size"
38
idiskSize :: String idiskSize = "size"
38
idiskSize = "size"
18
false
true
0
6
5
18
7
11
null
null
dsj36/dropray
src/BabyRays/Color.hs
gpl-3.0
midgrey = (0.5, 0.5, 0.5)
25
midgrey = (0.5, 0.5, 0.5)
25
midgrey = (0.5, 0.5, 0.5)
25
false
false
1
5
4
18
9
9
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The Availability Zone for the volume. vAvailabilityZone :: Lens' Volume Text vAvailabilityZone = lens _vAvailabilityZone (\s a -> s { _vAvailabilityZone = a })
168
vAvailabilityZone :: Lens' Volume Text vAvailabilityZone = lens _vAvailabilityZone (\s a -> s { _vAvailabilityZone = a })
125
vAvailabilityZone = lens _vAvailabilityZone (\s a -> s { _vAvailabilityZone = a })
86
true
true
0
9
29
40
22
18
null
null
li-zhirui/EoplLangs
src/ProcLang/Parser.hs
bsd-3-clause
unaryOpExpr :: Parser Expression unaryOpExpr = do op <- unaryOp expr <- parens expression return $ UnaryOpExpr op expr -- | IfExpr ::= if Expression then Expression
171
unaryOpExpr :: Parser Expression unaryOpExpr = do op <- unaryOp expr <- parens expression return $ UnaryOpExpr op expr -- | IfExpr ::= if Expression then Expression
171
unaryOpExpr = do op <- unaryOp expr <- parens expression return $ UnaryOpExpr op expr -- | IfExpr ::= if Expression then Expression
138
false
true
1
9
33
48
20
28
null
null
icostan/haskell-lang
learnyouahaskell.hs
lgpl-3.0
doubleMe x = x + x
18
doubleMe x = x + x
18
doubleMe x = x + x
18
false
false
0
5
5
13
6
7
null
null
Oblosys/webviews
src/lib/HtmlLib.hs
mit
boxedEx :: Int -> Int -> Html -> Html boxedEx lineWidth padding elt = div_!!![style $ "border:solid; border-width:"++show lineWidth++"px; padding:"++show padding++"px;"] << elt
176
boxedEx :: Int -> Int -> Html -> Html boxedEx lineWidth padding elt = div_!!![style $ "border:solid; border-width:"++show lineWidth++"px; padding:"++show padding++"px;"] << elt
176
boxedEx lineWidth padding elt = div_!!![style $ "border:solid; border-width:"++show lineWidth++"px; padding:"++show padding++"px;"] << elt
138
false
true
0
12
22
67
33
34
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Processes.hs
gpl-3.0
preDefProcess WGDijet = "\ngenerate P P > w+ gg QED=99, w+ > l+ vl, gg > J J @1 \nadd process P P > w- gg QED=99, w- > l- vl~, gg > J J @2 \n"
142
preDefProcess WGDijet = "\ngenerate P P > w+ gg QED=99, w+ > l+ vl, gg > J J @1 \nadd process P P > w- gg QED=99, w- > l- vl~, gg > J J @2 \n"
142
preDefProcess WGDijet = "\ngenerate P P > w+ gg QED=99, w+ > l+ vl, gg > J J @1 \nadd process P P > w- gg QED=99, w- > l- vl~, gg > J J @2 \n"
142
false
false
0
5
36
9
4
5
null
null
jdublu10/toy_lang
src/Main.hs
mit
prog :: State prog = State [Bind "fact" fact, Bind "countTo" countTo, Bind "mult" mult, Bind "result" (App (Ident "countTo") (App (Ident "fact") (Lit (LInt 4)))), Bind "r2" $ appList (Ident "mult") [(Ident "result"), (Lit $ LInt 4)] ] []
293
prog :: State prog = State [Bind "fact" fact, Bind "countTo" countTo, Bind "mult" mult, Bind "result" (App (Ident "countTo") (App (Ident "fact") (Lit (LInt 4)))), Bind "r2" $ appList (Ident "mult") [(Ident "result"), (Lit $ LInt 4)] ] []
293
prog = State [Bind "fact" fact, Bind "countTo" countTo, Bind "mult" mult, Bind "result" (App (Ident "countTo") (App (Ident "fact") (Lit (LInt 4)))), Bind "r2" $ appList (Ident "mult") [(Ident "result"), (Lit $ LInt 4)] ] []
279
false
true
0
15
95
133
67
66
null
null
s9gf4ult/yesod
yesod-form/Yesod/Form/Fields.hs
mit
optionsPersistKey filts ords toDisplay = fmap mkOptionList $ do mr <- getMessageRender pairs <- runDB $ selectList filts ords return $ map (\(Entity key value) -> Option { optionDisplay = mr (toDisplay value) , optionInternalValue = key , optionExternalValue = toPathPiece key ...
493
optionsPersistKey filts ords toDisplay = fmap mkOptionList $ do mr <- getMessageRender pairs <- runDB $ selectList filts ords return $ map (\(Entity key value) -> Option { optionDisplay = mr (toDisplay value) , optionInternalValue = key , optionExternalValue = toPathPiece key ...
493
optionsPersistKey filts ords toDisplay = fmap mkOptionList $ do mr <- getMessageRender pairs <- runDB $ selectList filts ords return $ map (\(Entity key value) -> Option { optionDisplay = mr (toDisplay value) , optionInternalValue = key , optionExternalValue = toPathPiece key ...
493
false
false
0
16
115
109
55
54
null
null
GaloisInc/gidl
src/Gidl/Interface.hs
bsd-3-clause
insertInterface :: Interface -> InterfaceEnv -> InterfaceEnv insertInterface i e@(InterfaceEnv ie) = case lookupInterface iname e of Nothing -> InterfaceEnv ((iname,i):ie) Just _ -> error ("insertInterface invariant broken: interface " ++ iname ++ "already exists") where (Interface iname _ _) = i
303
insertInterface :: Interface -> InterfaceEnv -> InterfaceEnv insertInterface i e@(InterfaceEnv ie) = case lookupInterface iname e of Nothing -> InterfaceEnv ((iname,i):ie) Just _ -> error ("insertInterface invariant broken: interface " ++ iname ++ "already exists") where (Interface iname _ _) = i
303
insertInterface i e@(InterfaceEnv ie) = case lookupInterface iname e of Nothing -> InterfaceEnv ((iname,i):ie) Just _ -> error ("insertInterface invariant broken: interface " ++ iname ++ "already exists") where (Interface iname _ _) = i
242
false
true
6
8
47
104
54
50
null
null
jpbetz/protolang
haskell/Emit.hs
apache-2.0
cgen (S.Var x) = getvar x >>= load
34
cgen (S.Var x) = getvar x >>= load
34
cgen (S.Var x) = getvar x >>= load
34
false
false
2
7
7
28
12
16
null
null
frelindb/agsyHOL
Lex.hs
mit
lexer cont ('\n':cs) = \line -> lexer cont cs (line+1)
54
lexer cont ('\n':cs) = \line -> lexer cont cs (line+1)
54
lexer cont ('\n':cs) = \line -> lexer cont cs (line+1)
54
false
false
0
8
9
37
19
18
null
null
zxl20zxl/learnyouahaskell
Zippers.hs
mit
------------------ -- Watch your step ------------------ goLeft :: Zipper a -> Maybe (Zipper a) goLeft (Node x l r, bs) = Just (l, LeftCrumb x r:bs)
149
goLeft :: Zipper a -> Maybe (Zipper a) goLeft (Node x l r, bs) = Just (l, LeftCrumb x r:bs)
91
goLeft (Node x l r, bs) = Just (l, LeftCrumb x r:bs)
52
true
true
0
9
26
68
34
34
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Input/InputConstants.hs
mit
keyX :: Int keyX = fromIntegral $ [C.pure| int {KEY_X} |]
57
keyX :: Int keyX = fromIntegral $ [C.pure| int {KEY_X} |]
57
keyX = fromIntegral $ [C.pure| int {KEY_X} |]
45
false
true
0
6
10
21
13
8
null
null
thomie/vector
Data/Vector/Mutable.hs
bsd-3-clause
unsafeSlice = G.unsafeSlice
27
unsafeSlice = G.unsafeSlice
27
unsafeSlice = G.unsafeSlice
27
false
false
0
5
2
8
4
4
null
null
keera-studios/pang-a-lambda
Experiments/splitballs/Physics/TwoDimensions/GameCollisions.hs
gpl-3.0
-- | Detect collisions between one specific moving object and every existing -- object. Each collision is idependent of the rest (which is not necessarily -- what should happen, but since the transformed velocities are eventually -- added, there isn't much difference in the end). detectCollisions'' :: Foldable t => (Eq...
456
detectCollisions'' :: Foldable t => (Eq n, PhysicalObject o n Shape) => t o -> o -> [Collision n] detectCollisions'' objsT m = concatMap (detectCollisions''' m) (toList objsT)
175
detectCollisions'' objsT m = concatMap (detectCollisions''' m) (toList objsT)
77
true
true
0
10
72
80
41
39
null
null
polux/snippets
HRM.hs
apache-2.0
bumpDownAt :: Address -> HRM () bumpDownAt address = writeInstruction (BumpDownAt address)
90
bumpDownAt :: Address -> HRM () bumpDownAt address = writeInstruction (BumpDownAt address)
90
bumpDownAt address = writeInstruction (BumpDownAt address)
58
false
true
0
7
11
32
15
17
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F19.hs
bsd-3-clause
-- glNormalPointervINTEL ------------------------------------------------------- glNormalPointervINTEL :: MonadIO m => GLenum -- ^ @type@ of type [NormalPointerType](Graphics-GL-Groups.html#NormalPointerType). -> Ptr (Ptr a) -- ^ @pointer@ pointing to @4@ elements of type @Ptr a@. -> m () glNormalPointervINTEL...
376
glNormalPointervINTEL :: MonadIO m => GLenum -- ^ @type@ of type [NormalPointerType](Graphics-GL-Groups.html#NormalPointerType). -> Ptr (Ptr a) -- ^ @pointer@ pointing to @4@ elements of type @Ptr a@. -> m () glNormalPointervINTEL v1 v2 = liftIO $ dyn279 ptr_glNormalPointervINTEL v1 v2
294
glNormalPointervINTEL v1 v2 = liftIO $ dyn279 ptr_glNormalPointervINTEL v1 v2
77
true
true
0
11
51
63
30
33
null
null
linusyang/barrelfish
tools/flounder/UMPCommon.hs
mit
-- Name of the accept function accept_fn_name p n = ump_ifscope p n "accept"
76
accept_fn_name p n = ump_ifscope p n "accept"
45
accept_fn_name p n = ump_ifscope p n "accept"
45
true
false
0
5
13
19
9
10
null
null
fehu/haskell-java-bridge-fork
src/Foreign/Java/Types.hs
mit
double = D
11
double = D
11
double = D
11
false
false
0
4
3
6
3
3
null
null
brendanhay/gogol
gogol-docs/gen/Network/Google/Docs/Types/Product.hs
mpl-2.0
-- | Creates a value of 'InsertTextRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'iLocation' -- -- * 'iText' -- -- * 'iEndOfSegmentLocation' insertTextRequest :: InsertTextRequest insertTextRequest = InsertTextRequest'...
399
insertTextRequest :: InsertTextRequest insertTextRequest = InsertTextRequest' {_iLocation = Nothing, _iText = Nothing, _iEndOfSegmentLocation = Nothing}
162
insertTextRequest = InsertTextRequest' {_iLocation = Nothing, _iText = Nothing, _iEndOfSegmentLocation = Nothing}
119
true
true
0
6
66
40
28
12
null
null
DougBurke/swish
src/Swish/GraphClass.hs
lgpl-2.1
-- | Return just the subject and object labels in the arc. arcNodes :: Arc lb -> [lb] arcNodes (Arc lb1 _ lb3) = [lb1,lb3]
122
arcNodes :: Arc lb -> [lb] arcNodes (Arc lb1 _ lb3) = [lb1,lb3]
63
arcNodes (Arc lb1 _ lb3) = [lb1,lb3]
36
true
true
0
7
24
41
22
19
null
null