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
notae/haskell-exercise
monad/Writer.hs
bsd-3-clause
test :: (((), [String]), [String]) test = runWriter $ do tell ["start"] (a, w) <- listen $ tell ["foo"] tell ["end"] return (a, w)
138
test :: (((), [String]), [String]) test = runWriter $ do tell ["start"] (a, w) <- listen $ tell ["foo"] tell ["end"] return (a, w)
138
test = runWriter $ do tell ["start"] (a, w) <- listen $ tell ["foo"] tell ["end"] return (a, w)
103
false
true
0
12
31
95
48
47
null
null
llhotka/tiphys
test/Data/Aeson/JsonPointerSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "descent" $ do it "object in object" $ getValue (tloc >>= descend "/root/bar") `shouldBe` Bool True it "nonexistent member" $ getValue (tloc >>= descend "/root/baz") `shouldBe` Null it "second entry of foo" $ getValue (tloc >>= descend "/root/foo/1") `shouldBe` Number 2 it "in two steps" $ getValue (tloc >>= descend "/root" >>= descend "/foo/1") `shouldBe` Number 2 it "nonexistent array entry" $ getValue (tloc >>= descend "/root/foo/-") `shouldBe` Null where tloc = decode "{\"root\": {\"foo\": [1,2], \"bar\": true}}" >>= anchor
687
spec :: Spec spec = do describe "descent" $ do it "object in object" $ getValue (tloc >>= descend "/root/bar") `shouldBe` Bool True it "nonexistent member" $ getValue (tloc >>= descend "/root/baz") `shouldBe` Null it "second entry of foo" $ getValue (tloc >>= descend "/root/foo/1") `shouldBe` Number 2 it "in two steps" $ getValue (tloc >>= descend "/root" >>= descend "/foo/1") `shouldBe` Number 2 it "nonexistent array entry" $ getValue (tloc >>= descend "/root/foo/-") `shouldBe` Null where tloc = decode "{\"root\": {\"foo\": [1,2], \"bar\": true}}" >>= anchor
687
spec = do describe "descent" $ do it "object in object" $ getValue (tloc >>= descend "/root/bar") `shouldBe` Bool True it "nonexistent member" $ getValue (tloc >>= descend "/root/baz") `shouldBe` Null it "second entry of foo" $ getValue (tloc >>= descend "/root/foo/1") `shouldBe` Number 2 it "in two steps" $ getValue (tloc >>= descend "/root" >>= descend "/foo/1") `shouldBe` Number 2 it "nonexistent array entry" $ getValue (tloc >>= descend "/root/foo/-") `shouldBe` Null where tloc = decode "{\"root\": {\"foo\": [1,2], \"bar\": true}}" >>= anchor
674
false
true
0
16
208
197
93
104
null
null
lunaris/hindent
src/HIndent/Pretty.hs
bsd-3-clause
exp x@ParArrayFromTo{} = pretty' x
34
exp x@ParArrayFromTo{} = pretty' x
34
exp x@ParArrayFromTo{} = pretty' x
34
false
false
1
7
4
23
10
13
null
null
phylake/avm3
vm/store.hs
mit
xform_opCode {- 0x02 -} i u d s m t (Abc.Nop) = [Nop]
53
xform_opCode {- 0x02 -} i u d s m t (Abc.Nop) = [Nop]
53
xform_opCode {- 0x02 -} i u d s m t (Abc.Nop) = [Nop]
53
false
false
0
7
12
30
16
14
null
null
mauriciofierrom/cis194-homework
homework01/int.hs
mit
hailstoneSeq :: Integer -> [Integer] hailstoneSeq 1 = [1]
57
hailstoneSeq :: Integer -> [Integer] hailstoneSeq 1 = [1]
57
hailstoneSeq 1 = [1]
20
false
true
0
6
8
24
13
11
null
null
noexc/mapview-noexc
src/KD8ZRC/Flight/NBP4/Main.hs
mit
mvConfig :: Chan.Chan BS.ByteString -> MapviewConfig TelemetryLine mvConfig _ch = MapviewConfig { _telemetry = modemStdout (stdoutConfig _ch) }
157
mvConfig :: Chan.Chan BS.ByteString -> MapviewConfig TelemetryLine mvConfig _ch = MapviewConfig { _telemetry = modemStdout (stdoutConfig _ch) }
157
mvConfig _ch = MapviewConfig { _telemetry = modemStdout (stdoutConfig _ch) }
90
false
true
0
10
31
53
24
29
null
null
ihc/futhark
src/Futhark/CodeGen/ImpGen.hs
isc
subExpToDimSize (Constant (IntValue (Int32Value i))) = return $ Imp.ConstSize $ fromIntegral i
96
subExpToDimSize (Constant (IntValue (Int32Value i))) = return $ Imp.ConstSize $ fromIntegral i
96
subExpToDimSize (Constant (IntValue (Int32Value i))) = return $ Imp.ConstSize $ fromIntegral i
96
false
false
0
11
13
40
19
21
null
null
jean-edouard/manager
xenmgr/XenMgr/Expose/HostObject.hs
gpl-2.0
_GetBuildInfo = do bi <- liftIO readBuildInfo edition <- liftIO appGetPlatformFlavour let m = M.fromList [ ("version", biVersion bi) , ("build", biBuildNum bi) , ("branch", biBuildBranch bi) , ("build_date_time", biBuildDate bi) , ("tools", biTools bi) , ("release", biRelease bi) , ("edition", edition)] return m -- List iso images in our iso folder
506
_GetBuildInfo = do bi <- liftIO readBuildInfo edition <- liftIO appGetPlatformFlavour let m = M.fromList [ ("version", biVersion bi) , ("build", biBuildNum bi) , ("branch", biBuildBranch bi) , ("build_date_time", biBuildDate bi) , ("tools", biTools bi) , ("release", biRelease bi) , ("edition", edition)] return m -- List iso images in our iso folder
506
_GetBuildInfo = do bi <- liftIO readBuildInfo edition <- liftIO appGetPlatformFlavour let m = M.fromList [ ("version", biVersion bi) , ("build", biBuildNum bi) , ("branch", biBuildBranch bi) , ("build_date_time", biBuildDate bi) , ("tools", biTools bi) , ("release", biRelease bi) , ("edition", edition)] return m -- List iso images in our iso folder
506
false
false
1
14
207
132
68
64
null
null
andyarvanitis/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintTerm' :: IState -> [(Name, Bool)] -> PTerm -> Doc OutputAnnotation pprintTerm' ist bnd tm = pprintPTerm (ppOptionIst ist) bnd [] (idris_infixes ist) tm
157
pprintTerm' :: IState -> [(Name, Bool)] -> PTerm -> Doc OutputAnnotation pprintTerm' ist bnd tm = pprintPTerm (ppOptionIst ist) bnd [] (idris_infixes ist) tm
157
pprintTerm' ist bnd tm = pprintPTerm (ppOptionIst ist) bnd [] (idris_infixes ist) tm
84
false
true
0
8
23
67
34
33
null
null
stefanocerruti/haskell-primer-alpha
src/Playground14.hs
bsd-3-clause
intToBits' n = if(remainder == 0) then False : intToBits' nextVal else True : intToBits' nextVal where remainder = mod n 2 nextVal = div n 2
206
intToBits' n = if(remainder == 0) then False : intToBits' nextVal else True : intToBits' nextVal where remainder = mod n 2 nextVal = div n 2
206
intToBits' n = if(remainder == 0) then False : intToBits' nextVal else True : intToBits' nextVal where remainder = mod n 2 nextVal = div n 2
206
false
false
0
7
92
60
30
30
null
null
gsnewmark/cis194
src/Cis194/Week4/Assignment.hs
apache-2.0
fun1 (x:xs) | even x = (x - 2) * fun1 xs | otherwise = fun1 xs
69
fun1 (x:xs) | even x = (x - 2) * fun1 xs | otherwise = fun1 xs
69
fun1 (x:xs) | even x = (x - 2) * fun1 xs | otherwise = fun1 xs
69
false
false
1
8
23
49
23
26
null
null
jokusi/Astview
src/gui/Language/Astview/Gui/Init.hs
mit
buildSourceView :: ScrolledWindow -> IO SourceBuffer buildSourceView sw = do sourceBuffer <- sourceBufferNew Nothing sourceBufferSetHighlightSyntax sourceBuffer True sourceView <- sourceViewNewWithBuffer sourceBuffer sourceViewSetShowLineNumbers sourceView True sourceViewSetHighlightCurrentLine sourceView True srcfont <- fontDescriptionFromString $ font defaultValue ++" "++show (fsize defaultValue) widgetModifyFont sourceView (Just srcfont) containerAdd sw sourceView return sourceBuffer -- ** hooks -- | adds actions to widgets defined in type 'Gui'. (see 'hookNonGuiStateWidgets')
606
buildSourceView :: ScrolledWindow -> IO SourceBuffer buildSourceView sw = do sourceBuffer <- sourceBufferNew Nothing sourceBufferSetHighlightSyntax sourceBuffer True sourceView <- sourceViewNewWithBuffer sourceBuffer sourceViewSetShowLineNumbers sourceView True sourceViewSetHighlightCurrentLine sourceView True srcfont <- fontDescriptionFromString $ font defaultValue ++" "++show (fsize defaultValue) widgetModifyFont sourceView (Just srcfont) containerAdd sw sourceView return sourceBuffer -- ** hooks -- | adds actions to widgets defined in type 'Gui'. (see 'hookNonGuiStateWidgets')
606
buildSourceView sw = do sourceBuffer <- sourceBufferNew Nothing sourceBufferSetHighlightSyntax sourceBuffer True sourceView <- sourceViewNewWithBuffer sourceBuffer sourceViewSetShowLineNumbers sourceView True sourceViewSetHighlightCurrentLine sourceView True srcfont <- fontDescriptionFromString $ font defaultValue ++" "++show (fsize defaultValue) widgetModifyFont sourceView (Just srcfont) containerAdd sw sourceView return sourceBuffer -- ** hooks -- | adds actions to widgets defined in type 'Gui'. (see 'hookNonGuiStateWidgets')
553
false
true
0
11
80
126
54
72
null
null
maciasoft/wc
src/Statistics.hs
mit
-- factory functions fold :: (a -> t -> a) -> a -> Statistics t a fold f a = Statistics a (\t -> fold f (f a t))
113
fold :: (a -> t -> a) -> a -> Statistics t a fold f a = Statistics a (\t -> fold f (f a t))
91
fold f a = Statistics a (\t -> fold f (f a t))
46
true
true
0
10
29
67
34
33
null
null
LeifW/yaml2owl
src/Yaml2Schema.hs
lgpl-2.1
json2graph :: MapMap -> RDFGraph json2graph = toRDFGraph . fromList . json2triples
82
json2graph :: MapMap -> RDFGraph json2graph = toRDFGraph . fromList . json2triples
82
json2graph = toRDFGraph . fromList . json2triples
49
false
true
1
7
11
30
13
17
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 7252 = 3283
31
getValueFromProduct 7252 = 3283
31
getValueFromProduct 7252 = 3283
31
false
false
0
5
3
9
4
5
null
null
plaimi/bweakfwu
src/bweakfwu/Shape.hs
gpl-3.0
-- For Circle--Circle, the radius check was enough, so just return the normal. intersect (Circle _) (Circle _) v = Just (vecNorm v)
131
intersect (Circle _) (Circle _) v = Just (vecNorm v)
52
intersect (Circle _) (Circle _) v = Just (vecNorm v)
52
true
false
0
7
22
35
17
18
null
null
ciderpunx/exercismo
src/AtBash.hs
gpl-3.0
key = reverse alphabet
27
key = reverse alphabet
27
key = reverse alphabet
27
false
false
1
5
8
13
4
9
null
null
Thell/pandoc
src/Text/Pandoc/Writers/DokuWiki.hs
gpl-2.0
blockToDokuWiki opts (Header level _ inlines) = do -- emphasis, links etc. not allowed in headers, apparently, -- so we remove formatting: contents <- inlineListToDokuWiki opts $ removeFormatting inlines let eqs = replicate ( 7 - level ) '=' return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n"
305
blockToDokuWiki opts (Header level _ inlines) = do -- emphasis, links etc. not allowed in headers, apparently, -- so we remove formatting: contents <- inlineListToDokuWiki opts $ removeFormatting inlines let eqs = replicate ( 7 - level ) '=' return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n"
305
blockToDokuWiki opts (Header level _ inlines) = do -- emphasis, links etc. not allowed in headers, apparently, -- so we remove formatting: contents <- inlineListToDokuWiki opts $ removeFormatting inlines let eqs = replicate ( 7 - level ) '=' return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n"
305
false
false
0
12
63
88
42
46
null
null
snoyberg/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprBody :: Bool -> Body -> Doc pprBody eq body = case body of GuardedB xs -> nest nestDepth $ vcat $ map (pprGuarded eqDoc) xs NormalB e -> eqDoc <+> ppr e where eqDoc | eq = equals | otherwise = arrow ------------------------------
266
pprBody :: Bool -> Body -> Doc pprBody eq body = case body of GuardedB xs -> nest nestDepth $ vcat $ map (pprGuarded eqDoc) xs NormalB e -> eqDoc <+> ppr e where eqDoc | eq = equals | otherwise = arrow ------------------------------
266
pprBody eq body = case body of GuardedB xs -> nest nestDepth $ vcat $ map (pprGuarded eqDoc) xs NormalB e -> eqDoc <+> ppr e where eqDoc | eq = equals | otherwise = arrow ------------------------------
235
false
true
0
11
77
99
46
53
null
null
ion1/redstone-haskell
Redstone/Tests/Compression.hs
isc
comprDecompr :: CompressionType -> Maybe CompressionType -> BS.ByteString -> IO (Either RedstoneError BS.ByteString) comprDecompr cTypeCom cTypeDec dataIn = Ex.try (decompress cTypeDec =<< compress cTypeCom dataIn)
229
comprDecompr :: CompressionType -> Maybe CompressionType -> BS.ByteString -> IO (Either RedstoneError BS.ByteString) comprDecompr cTypeCom cTypeDec dataIn = Ex.try (decompress cTypeDec =<< compress cTypeCom dataIn)
229
comprDecompr cTypeCom cTypeDec dataIn = Ex.try (decompress cTypeDec =<< compress cTypeCom dataIn)
99
false
true
0
12
39
73
33
40
null
null
mietek/stack
src/main/Main.hs
bsd-3-clause
readFlag :: ReadM (Map PackageName (Map FlagName Bool)) readFlag = do s <- readerAsk case break (== ':') s of (pn, ':':mflag) -> do pn' <- case parsePackageNameFromString pn of Nothing -> readerError $ "Invalid package name: " ++ pn Just x -> return x let (b, flagS) = case mflag of '-':x -> (False, x) _ -> (True, mflag) flagN <- case parseFlagNameFromString flagS of Nothing -> readerError $ "Invalid flag name: " ++ flagS Just x -> return x return $ Map.singleton pn' $ Map.singleton flagN b _ -> readerError "Must have a colon" -- | Build the project.
808
readFlag :: ReadM (Map PackageName (Map FlagName Bool)) readFlag = do s <- readerAsk case break (== ':') s of (pn, ':':mflag) -> do pn' <- case parsePackageNameFromString pn of Nothing -> readerError $ "Invalid package name: " ++ pn Just x -> return x let (b, flagS) = case mflag of '-':x -> (False, x) _ -> (True, mflag) flagN <- case parseFlagNameFromString flagS of Nothing -> readerError $ "Invalid flag name: " ++ flagS Just x -> return x return $ Map.singleton pn' $ Map.singleton flagN b _ -> readerError "Must have a colon" -- | Build the project.
808
readFlag = do s <- readerAsk case break (== ':') s of (pn, ':':mflag) -> do pn' <- case parsePackageNameFromString pn of Nothing -> readerError $ "Invalid package name: " ++ pn Just x -> return x let (b, flagS) = case mflag of '-':x -> (False, x) _ -> (True, mflag) flagN <- case parseFlagNameFromString flagS of Nothing -> readerError $ "Invalid flag name: " ++ flagS Just x -> return x return $ Map.singleton pn' $ Map.singleton flagN b _ -> readerError "Must have a colon" -- | Build the project.
752
false
true
0
18
353
230
112
118
null
null
EnriqueNB/Exercitium
src/Ex_23.hs
bsd-3-clause
-- Trivial: nDigitosFactTrivial :: Integer -> Integer nDigitosFactTrivial n = (genericLength . show . product) [1..n]
118
nDigitosFactTrivial :: Integer -> Integer nDigitosFactTrivial n = (genericLength . show . product) [1..n]
105
nDigitosFactTrivial n = (genericLength . show . product) [1..n]
63
true
true
0
8
16
38
20
18
null
null
xmonad/xmonad-contrib
XMonad/Layout/Reflect.hs
bsd-3-clause
-- | Apply a vertical reflection (top \<--\> bottom) to a -- layout. reflectVert :: l a -> ModifiedLayout Reflect l a reflectVert = ModifiedLayout (Reflect Vert)
163
reflectVert :: l a -> ModifiedLayout Reflect l a reflectVert = ModifiedLayout (Reflect Vert)
92
reflectVert = ModifiedLayout (Reflect Vert)
43
true
true
0
7
28
36
18
18
null
null
spechub/Hets
Driver/WriteLibDefn.hs
gpl-2.0
writeLibDefnLatex :: LogicGraph -> Bool -> GlobalAnnos -> FilePath -> LIB_DEFN -> IO () writeLibDefnLatex lg lbl ga oup = writeFile oup . renderLatex Nothing . toLatexAux (StripComment False) (MkLabel lbl) ga . prettyLG lg
226
writeLibDefnLatex :: LogicGraph -> Bool -> GlobalAnnos -> FilePath -> LIB_DEFN -> IO () writeLibDefnLatex lg lbl ga oup = writeFile oup . renderLatex Nothing . toLatexAux (StripComment False) (MkLabel lbl) ga . prettyLG lg
226
writeLibDefnLatex lg lbl ga oup = writeFile oup . renderLatex Nothing . toLatexAux (StripComment False) (MkLabel lbl) ga . prettyLG lg
136
false
true
1
12
38
87
40
47
null
null
bergmark/hlint
data/Default.hs
bsd-3-clause
error = minimumBy compare ==> minimum
37
error = minimumBy compare ==> minimum
37
error = minimumBy compare ==> minimum
37
false
false
0
6
5
13
6
7
null
null
hpacheco/jasminv
src/Language/Jasmin/TypeChecker.hs
gpl-3.0
tt_expr_r l (PEGet x i) = do x' <- tt_var x False i' <- tt_index i ty <- tt_as_array l (infoTyNote "tt_expr_r_get" $ loc x') return (PEGet x' i',ty)
164
tt_expr_r l (PEGet x i) = do x' <- tt_var x False i' <- tt_index i ty <- tt_as_array l (infoTyNote "tt_expr_r_get" $ loc x') return (PEGet x' i',ty)
164
tt_expr_r l (PEGet x i) = do x' <- tt_var x False i' <- tt_index i ty <- tt_as_array l (infoTyNote "tt_expr_r_get" $ loc x') return (PEGet x' i',ty)
164
false
false
0
11
44
83
37
46
null
null
DavidAlphaFox/darcs
src/Darcs/UI/SelectChanges.hs
gpl-2.0
selected :: forall p wX wY. Patchy p => InteractiveSelectionM p wX wY [Sealed2 p] selected = do whichch <- asks whichChanges c <- gets choices (first_chs :> _ :> last_chs) <- return $ getChoices c return $ if backward whichch then mapFL (repr whichch . Sealed2 . lpPatch) last_chs else mapFL (repr whichch . Sealed2 . lpPatch) first_chs -- | Prints the list of the selected patches. See 'selected'.
470
selected :: forall p wX wY. Patchy p => InteractiveSelectionM p wX wY [Sealed2 p] selected = do whichch <- asks whichChanges c <- gets choices (first_chs :> _ :> last_chs) <- return $ getChoices c return $ if backward whichch then mapFL (repr whichch . Sealed2 . lpPatch) last_chs else mapFL (repr whichch . Sealed2 . lpPatch) first_chs -- | Prints the list of the selected patches. See 'selected'.
470
selected = do whichch <- asks whichChanges c <- gets choices (first_chs :> _ :> last_chs) <- return $ getChoices c return $ if backward whichch then mapFL (repr whichch . Sealed2 . lpPatch) last_chs else mapFL (repr whichch . Sealed2 . lpPatch) first_chs -- | Prints the list of the selected patches. See 'selected'.
377
false
true
0
13
141
142
69
73
null
null
dasuxullebt/inflate.hs
inflate.runST.hs
gpl-3.0
toplevelParser :: DeflateParse (Data.Array.Array Int Word8) toplevelParser = let block = do !headers <- nBits 2 let !ret = case headers of [True, True] -> (throwUp "Illegal Block Type 11 in toplevelParser") [False, False] -> do TRACE_BYTES("start uncompressed block") uncompressedBlock [False, True] -> do TRACE_BYTES("start dynamically compressed block") dynamicallyCompressedBlock [True, False] -> do TRACE_BYTES("start statically compressed block") staticallyCompressedBlock _ -> error "Impossible error in toplevelParser" in ret nBlock = do { singleBit False; block } lBlock = do { singleBit True; block } in do _ <- many nBlock lBlock !o <- gets out let !ro = oc2listReverse o -- rl = length ro -- arr = Data.Array.listArray (0, rl-1) -- [ case j of -- WCh x -> x -- BackRef dist -> arr Data.Array.! (i - dist) -- | (i,j) <- zip [0..] ro -- -- | i <- [0..(rl-1)] -- -- | j <- ro -- ] return $ replaceBackreferences ro
1,586
toplevelParser :: DeflateParse (Data.Array.Array Int Word8) toplevelParser = let block = do !headers <- nBits 2 let !ret = case headers of [True, True] -> (throwUp "Illegal Block Type 11 in toplevelParser") [False, False] -> do TRACE_BYTES("start uncompressed block") uncompressedBlock [False, True] -> do TRACE_BYTES("start dynamically compressed block") dynamicallyCompressedBlock [True, False] -> do TRACE_BYTES("start statically compressed block") staticallyCompressedBlock _ -> error "Impossible error in toplevelParser" in ret nBlock = do { singleBit False; block } lBlock = do { singleBit True; block } in do _ <- many nBlock lBlock !o <- gets out let !ro = oc2listReverse o -- rl = length ro -- arr = Data.Array.listArray (0, rl-1) -- [ case j of -- WCh x -> x -- BackRef dist -> arr Data.Array.! (i - dist) -- | (i,j) <- zip [0..] ro -- -- | i <- [0..(rl-1)] -- -- | j <- ro -- ] return $ replaceBackreferences ro
1,586
toplevelParser = let block = do !headers <- nBits 2 let !ret = case headers of [True, True] -> (throwUp "Illegal Block Type 11 in toplevelParser") [False, False] -> do TRACE_BYTES("start uncompressed block") uncompressedBlock [False, True] -> do TRACE_BYTES("start dynamically compressed block") dynamicallyCompressedBlock [True, False] -> do TRACE_BYTES("start statically compressed block") staticallyCompressedBlock _ -> error "Impossible error in toplevelParser" in ret nBlock = do { singleBit False; block } lBlock = do { singleBit True; block } in do _ <- many nBlock lBlock !o <- gets out let !ro = oc2listReverse o -- rl = length ro -- arr = Data.Array.listArray (0, rl-1) -- [ case j of -- WCh x -> x -- BackRef dist -> arr Data.Array.! (i - dist) -- | (i,j) <- zip [0..] ro -- -- | i <- [0..(rl-1)] -- -- | j <- ro -- ] return $ replaceBackreferences ro
1,526
false
true
1
21
817
261
125
136
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/UnbalancedSet.hs
mit
fromSeqWith = fromSeqWithUsingInsertWith
40
fromSeqWith = fromSeqWithUsingInsertWith
40
fromSeqWith = fromSeqWithUsingInsertWith
40
false
false
0
4
2
6
3
3
null
null
mightymoose/liquidhaskell
tests/pos/comprehensionTerm.hs
bsd-3-clause
{- qsort :: (Ord a) => xs:[a] -> {v:[a] | (len v) <= (len xs)} @-} qsort [] = []
84
qsort [] = []
17
qsort [] = []
17
true
false
0
6
23
14
7
7
null
null
noteed/intake
Intake/Http.hs
bsd-3-clause
handler :: MonadSnap m => Chan Command -> m () handler chan = do route [ ("workflows", method GET (format "text/plain" getWorkflows)) , ("workflows", method GET (format "application/json" getWorkflowsJSON)) , ("workflows/:name", method POST (format "text/plain" $ instanciate chan)) , ("workflows/:name", method POST (format "application/json" $ instanciateJSON chan)) , ("instances/:id/status", method GET (format "application/json" statusJSON)) ] -- TODO must be sorted.
499
handler :: MonadSnap m => Chan Command -> m () handler chan = do route [ ("workflows", method GET (format "text/plain" getWorkflows)) , ("workflows", method GET (format "application/json" getWorkflowsJSON)) , ("workflows/:name", method POST (format "text/plain" $ instanciate chan)) , ("workflows/:name", method POST (format "application/json" $ instanciateJSON chan)) , ("instances/:id/status", method GET (format "application/json" statusJSON)) ] -- TODO must be sorted.
499
handler chan = do route [ ("workflows", method GET (format "text/plain" getWorkflows)) , ("workflows", method GET (format "application/json" getWorkflowsJSON)) , ("workflows/:name", method POST (format "text/plain" $ instanciate chan)) , ("workflows/:name", method POST (format "application/json" $ instanciateJSON chan)) , ("instances/:id/status", method GET (format "application/json" statusJSON)) ] -- TODO must be sorted.
452
false
true
0
14
86
165
83
82
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
diskAccessSet :: FrozenSet String diskAccessSet = ConstantUtils.mkSet $ map Types.diskModeToRaw [minBound..]
108
diskAccessSet :: FrozenSet String diskAccessSet = ConstantUtils.mkSet $ map Types.diskModeToRaw [minBound..]
108
diskAccessSet = ConstantUtils.mkSet $ map Types.diskModeToRaw [minBound..]
74
false
true
0
7
10
30
15
15
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Insert.hs
mpl-2.0
-- | Multipart request metadata. piPayload :: Lens' PlacementsInsert Placement piPayload = lens _piPayload (\ s a -> s{_piPayload = a})
137
piPayload :: Lens' PlacementsInsert Placement piPayload = lens _piPayload (\ s a -> s{_piPayload = a})
104
piPayload = lens _piPayload (\ s a -> s{_piPayload = a})
58
true
true
1
9
22
46
22
24
null
null
parapluu/encore
src/ir/AST/Util.hs
bsd-3-clause
getChildren MethodCall {target, args} = target : args
53
getChildren MethodCall {target, args} = target : args
53
getChildren MethodCall {target, args} = target : args
53
false
false
1
7
7
28
12
16
null
null
erantapaa/hackage-server
Distribution/Client/Mirror/Session.hs
bsd-3-clause
downloadFile' :: URI -> FilePath -> HttpSession (Maybe GetError) downloadFile' uri file = do out $ "downloading " ++ show uri ++ " to " ++ file rsp <- requestGET uri case rsp of Left theError -> return (Just (GetError theError)) Right content -> do liftIO $ BS.writeFile file content --TODO: check we wrote the expected length. return Nothing
408
downloadFile' :: URI -> FilePath -> HttpSession (Maybe GetError) downloadFile' uri file = do out $ "downloading " ++ show uri ++ " to " ++ file rsp <- requestGET uri case rsp of Left theError -> return (Just (GetError theError)) Right content -> do liftIO $ BS.writeFile file content --TODO: check we wrote the expected length. return Nothing
408
downloadFile' uri file = do out $ "downloading " ++ show uri ++ " to " ++ file rsp <- requestGET uri case rsp of Left theError -> return (Just (GetError theError)) Right content -> do liftIO $ BS.writeFile file content --TODO: check we wrote the expected length. return Nothing
343
false
true
0
14
124
126
57
69
null
null
ezyang/ghc
compiler/cmm/CmmNode.hs
bsd-3-clause
mapForeignTarget _ m@(PrimTarget _) = m
46
mapForeignTarget _ m@(PrimTarget _) = m
46
mapForeignTarget _ m@(PrimTarget _) = m
46
false
false
0
8
12
24
11
13
null
null
DougBurke/swish
tests/RDFDatatypeXsdIntegerTest.hs
lgpl-2.1
testVarModifyNe04 = testVmod2 "testVarModifyNe04" (getDTMod dmodXsdIntegerNe rdfDatatypeValXsdInteger) [makeBVI [("b","100")]] []
190
testVarModifyNe04 = testVmod2 "testVarModifyNe04" (getDTMod dmodXsdIntegerNe rdfDatatypeValXsdInteger) [makeBVI [("b","100")]] []
190
testVarModifyNe04 = testVmod2 "testVarModifyNe04" (getDTMod dmodXsdIntegerNe rdfDatatypeValXsdInteger) [makeBVI [("b","100")]] []
190
false
false
0
9
70
40
21
19
null
null
termite2/tsl
Internal/IExpr.hs
bsd-3-clause
mapExpr :: (Expr -> Expr) -> Expr -> Expr mapExpr f e0 = case f e0 of e@(EVar _) -> e e@(EConst _) -> e EField e n -> EField (mapExpr f e) n EIndex a i -> EIndex (mapExpr f a) (mapExpr f i) ERange a (fr,l) -> ERange (mapExpr f a) (mapExpr f fr, mapExpr f l) ELength a -> ELength (mapExpr f a) EUnOp op e -> EUnOp op (mapExpr f e) EBinOp op e1 e2 -> EBinOp op (mapExpr f e1) (mapExpr f e2) ESlice e s -> ESlice (mapExpr f e) s ERel n as -> ERel n $ map (mapExpr f) as
706
mapExpr :: (Expr -> Expr) -> Expr -> Expr mapExpr f e0 = case f e0 of e@(EVar _) -> e e@(EConst _) -> e EField e n -> EField (mapExpr f e) n EIndex a i -> EIndex (mapExpr f a) (mapExpr f i) ERange a (fr,l) -> ERange (mapExpr f a) (mapExpr f fr, mapExpr f l) ELength a -> ELength (mapExpr f a) EUnOp op e -> EUnOp op (mapExpr f e) EBinOp op e1 e2 -> EBinOp op (mapExpr f e1) (mapExpr f e2) ESlice e s -> ESlice (mapExpr f e) s ERel n as -> ERel n $ map (mapExpr f) as
706
mapExpr f e0 = case f e0 of e@(EVar _) -> e e@(EConst _) -> e EField e n -> EField (mapExpr f e) n EIndex a i -> EIndex (mapExpr f a) (mapExpr f i) ERange a (fr,l) -> ERange (mapExpr f a) (mapExpr f fr, mapExpr f l) ELength a -> ELength (mapExpr f a) EUnOp op e -> EUnOp op (mapExpr f e) EBinOp op e1 e2 -> EBinOp op (mapExpr f e1) (mapExpr f e2) ESlice e s -> ESlice (mapExpr f e) s ERel n as -> ERel n $ map (mapExpr f) as
664
false
true
0
11
347
308
146
162
null
null
sgillespie/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
schemeR_wrk :: [Id] -> Id -> AnnExpr Id DVarSet -> ([Var], AnnExpr' Var DVarSet) -> BcM (ProtoBCO Name) schemeR_wrk fvs nm original_body (args, body) = do dflags <- getDynFlags let all_args = reverse args ++ fvs arity = length all_args -- all_args are the args in reverse order. We're compiling a function -- \fv1..fvn x1..xn -> e -- i.e. the fvs come first szsw_args = map (fromIntegral . idSizeW dflags) all_args szw_args = sum szsw_args p_init = Map.fromList (zip all_args (mkStackOffsets 0 szsw_args)) -- make the arg bitmap bits = argBits dflags (reverse (map bcIdArgRep all_args)) bitmap_size = genericLength bits bitmap = mkBitmap dflags bits body_code <- schemeER_wrk szw_args p_init body emitBc (mkProtoBCO dflags (getName nm) body_code (Right original_body) arity bitmap_size bitmap False{-not alts-}) -- introduce break instructions for ticked expressions
1,028
schemeR_wrk :: [Id] -> Id -> AnnExpr Id DVarSet -> ([Var], AnnExpr' Var DVarSet) -> BcM (ProtoBCO Name) schemeR_wrk fvs nm original_body (args, body) = do dflags <- getDynFlags let all_args = reverse args ++ fvs arity = length all_args -- all_args are the args in reverse order. We're compiling a function -- \fv1..fvn x1..xn -> e -- i.e. the fvs come first szsw_args = map (fromIntegral . idSizeW dflags) all_args szw_args = sum szsw_args p_init = Map.fromList (zip all_args (mkStackOffsets 0 szsw_args)) -- make the arg bitmap bits = argBits dflags (reverse (map bcIdArgRep all_args)) bitmap_size = genericLength bits bitmap = mkBitmap dflags bits body_code <- schemeER_wrk szw_args p_init body emitBc (mkProtoBCO dflags (getName nm) body_code (Right original_body) arity bitmap_size bitmap False{-not alts-}) -- introduce break instructions for ticked expressions
1,028
schemeR_wrk fvs nm original_body (args, body) = do dflags <- getDynFlags let all_args = reverse args ++ fvs arity = length all_args -- all_args are the args in reverse order. We're compiling a function -- \fv1..fvn x1..xn -> e -- i.e. the fvs come first szsw_args = map (fromIntegral . idSizeW dflags) all_args szw_args = sum szsw_args p_init = Map.fromList (zip all_args (mkStackOffsets 0 szsw_args)) -- make the arg bitmap bits = argBits dflags (reverse (map bcIdArgRep all_args)) bitmap_size = genericLength bits bitmap = mkBitmap dflags bits body_code <- schemeER_wrk szw_args p_init body emitBc (mkProtoBCO dflags (getName nm) body_code (Right original_body) arity bitmap_size bitmap False{-not alts-}) -- introduce break instructions for ticked expressions
924
false
true
0
14
292
258
130
128
null
null
AleXoundOS/mpv-cut
src/MPV_Cut.hs
gpl-3.0
-- compose S-X and X-E Pieces if X is first or last borderEdgeTs :: [TimeStamp] -> [Piece] borderEdgeTs [] = []
111
borderEdgeTs :: [TimeStamp] -> [Piece] borderEdgeTs [] = []
59
borderEdgeTs [] = []
20
true
true
0
8
20
35
17
18
null
null
stgm/prac-testing
week5/Week5Sol_Q5.hs
mit
solveShowNs' :: [Node] -> IO[()] solveShowNs' ns = sequence $ fmap showNode (solveNs' ns)
89
solveShowNs' :: [Node] -> IO[()] solveShowNs' ns = sequence $ fmap showNode (solveNs' ns)
89
solveShowNs' ns = sequence $ fmap showNode (solveNs' ns)
56
false
true
2
9
13
50
23
27
null
null
conal/GtkTV
src/test.hs
bsd-3-clause
total :: Show a => COutput a total = title "total" showOut
58
total :: Show a => COutput a total = title "total" showOut
58
total = title "total" showOut
29
false
true
0
6
11
26
12
14
null
null
RefactoringTools/HaRe
old/testing/evalAddEvalMon/B3_TokOut.hs
bsd-3-clause
-- test when already import strategies the import doesn't change. -- here we need to add rpar and runEval to the import list qsort (x:xs) = lsort_2 ++ [x] ++ hsort_2 where lsort = qsort (filter (<) x xs) hsort = qsort (filter (>=) x xs) (hsort_2, lsort_2) = runEval (do hsort_2 <- rpar hsort lsort_2 <- rpar lsort return (hsort_2, lsort_2))
422
qsort (x:xs) = lsort_2 ++ [x] ++ hsort_2 where lsort = qsort (filter (<) x xs) hsort = qsort (filter (>=) x xs) (hsort_2, lsort_2) = runEval (do hsort_2 <- rpar hsort lsort_2 <- rpar lsort return (hsort_2, lsort_2))
295
qsort (x:xs) = lsort_2 ++ [x] ++ hsort_2 where lsort = qsort (filter (<) x xs) hsort = qsort (filter (>=) x xs) (hsort_2, lsort_2) = runEval (do hsort_2 <- rpar hsort lsort_2 <- rpar lsort return (hsort_2, lsort_2))
295
true
false
4
10
143
131
63
68
null
null
mettekou/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
funEqCanDischargeF Derived (Wanted WOnly) = (IsSwapped, True)
71
funEqCanDischargeF Derived (Wanted WOnly) = (IsSwapped, True)
71
funEqCanDischargeF Derived (Wanted WOnly) = (IsSwapped, True)
71
false
false
0
7
16
25
12
13
null
null
tel/saltine
src/Crypto/Saltine/Internal/Auth.hs
mit
auth_bytes, auth_keybytes :: Int -- Authentication -- | Size of a @crypto_auth@ authenticator. auth_bytes = fromIntegral c_crypto_auth_bytes
144
auth_bytes, auth_keybytes :: Int auth_bytes = fromIntegral c_crypto_auth_bytes
81
auth_bytes = fromIntegral c_crypto_auth_bytes
48
true
true
0
5
20
18
11
7
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/TextureShader3.hs
bsd-3-clause
gl_OFFSET_HILO_TEXTURE_2D :: GLenum gl_OFFSET_HILO_TEXTURE_2D = 0x8854
70
gl_OFFSET_HILO_TEXTURE_2D :: GLenum gl_OFFSET_HILO_TEXTURE_2D = 0x8854
70
gl_OFFSET_HILO_TEXTURE_2D = 0x8854
34
false
true
0
4
5
11
6
5
null
null
shlevy/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
exprCtOrigin (HsTcBracketOut {})= panic "exprCtOrigin HsTcBracketOut"
69
exprCtOrigin (HsTcBracketOut {})= panic "exprCtOrigin HsTcBracketOut"
69
exprCtOrigin (HsTcBracketOut {})= panic "exprCtOrigin HsTcBracketOut"
69
false
false
0
6
5
20
9
11
null
null
cchalmers/dense
src/Data/Dense/Generic.hs
bsd-3-clause
-- | Affine traversal over a single row in a matrix. -- -- >>> traverseOf_ rows print $ m & ixRow 1 . each *~ 2 -- [a,b,c,d] -- [e * 2,f * 2,g * 2,h * 2] -- [i,j,k,l] -- -- The row vector should remain the same size to satisfy traversal -- laws but give reasonable behaviour if the size differs: -- -- >>> traverseOf_ rows print $ m & ixRow 1 .~ B.fromList [0,1] -- [a,b,c,d] -- [0,1,g,h] -- [i,j,k,l] -- -- >>> traverseOf_ rows print $ m & ixRow 1 .~ B.fromList [0..100] -- [a,b,c,d] -- [0,1,2,3] -- [i,j,k,l] ixRow :: Vector v a => Int -> IndexedTraversal' Int (Array v V2 a) (v a) ixRow i f m@(Array (l@(V2 x y)) v) | y >= 0 && i < x = Array l . G.unsafeUpd v . L.zip [a..] . G.toList . G.take y <$> indexed f i (G.slice a y v) | otherwise = pure m where a = i * y
785
ixRow :: Vector v a => Int -> IndexedTraversal' Int (Array v V2 a) (v a) ixRow i f m@(Array (l@(V2 x y)) v) | y >= 0 && i < x = Array l . G.unsafeUpd v . L.zip [a..] . G.toList . G.take y <$> indexed f i (G.slice a y v) | otherwise = pure m where a = i * y
270
ixRow i f m@(Array (l@(V2 x y)) v) | y >= 0 && i < x = Array l . G.unsafeUpd v . L.zip [a..] . G.toList . G.take y <$> indexed f i (G.slice a y v) | otherwise = pure m where a = i * y
197
true
true
22
9
185
187
106
81
null
null
input-output-hk/pos-haskell-prototype
wallet/test/unit/UTxO/ToCardano/Interpreter.hs
mit
-- | Initial interpretation context -- -- NOTE: In Cardano there is no equivalent of the boot transaction and hence -- no hash of the boot transaction. initIntCtxt :: (Monad m, DSL.Hash h Addr) => DSL.Transaction h Addr -> TranslateT e m (IntCtxt h) initIntCtxt boot = do genesis <- BlockHeaderGenesis <$> translateGenesisHeader leaders <- asks (ccInitLeaders . tcCardano) initStakes <- asks (ccStakes . tcCardano) return $ IntCtxt { _icTxMeta = Map.singleton (DSL.hash boot) TxMeta { tmTx = boot , tmHash = error "initIntCtxt: bootstrap transaction has no Cardano hash" } , _icCheckpoints = IntCheckpoint { icSlotId = translateFirstSlot , icBlockHeader = genesis , icMainBlockHdr = Nothing , icPrevMainHH = Nothing , icEpochLeaders = leaders , icStakes = initStakes , icCrucialStakes = initStakes } :| [] } {------------------------------------------------------------------------------- The interpretation monad NOTE: It is important to limit the scope of 'IntM'. See comments below about the instances of 'Interpret' that update the state. -------------------------------------------------------------------------------}
1,361
initIntCtxt :: (Monad m, DSL.Hash h Addr) => DSL.Transaction h Addr -> TranslateT e m (IntCtxt h) initIntCtxt boot = do genesis <- BlockHeaderGenesis <$> translateGenesisHeader leaders <- asks (ccInitLeaders . tcCardano) initStakes <- asks (ccStakes . tcCardano) return $ IntCtxt { _icTxMeta = Map.singleton (DSL.hash boot) TxMeta { tmTx = boot , tmHash = error "initIntCtxt: bootstrap transaction has no Cardano hash" } , _icCheckpoints = IntCheckpoint { icSlotId = translateFirstSlot , icBlockHeader = genesis , icMainBlockHdr = Nothing , icPrevMainHH = Nothing , icEpochLeaders = leaders , icStakes = initStakes , icCrucialStakes = initStakes } :| [] } {------------------------------------------------------------------------------- The interpretation monad NOTE: It is important to limit the scope of 'IntM'. See comments below about the instances of 'Interpret' that update the state. -------------------------------------------------------------------------------}
1,209
initIntCtxt boot = do genesis <- BlockHeaderGenesis <$> translateGenesisHeader leaders <- asks (ccInitLeaders . tcCardano) initStakes <- asks (ccStakes . tcCardano) return $ IntCtxt { _icTxMeta = Map.singleton (DSL.hash boot) TxMeta { tmTx = boot , tmHash = error "initIntCtxt: bootstrap transaction has no Cardano hash" } , _icCheckpoints = IntCheckpoint { icSlotId = translateFirstSlot , icBlockHeader = genesis , icMainBlockHdr = Nothing , icPrevMainHH = Nothing , icEpochLeaders = leaders , icStakes = initStakes , icCrucialStakes = initStakes } :| [] } {------------------------------------------------------------------------------- The interpretation monad NOTE: It is important to limit the scope of 'IntM'. See comments below about the instances of 'Interpret' that update the state. -------------------------------------------------------------------------------}
1,099
true
true
0
13
391
210
115
95
null
null
sinelaw/lamdu
Lamdu/Data/Expression/Infer/Rules.hs
gpl-3.0
runRecordValToType :: ExprRef -> [RefExpression2 def] -> RuleResult def runRecordValToType recordTypeRef fields = [ ( recordTypeRef , makeRefExpr . Expr.BodyRecord $ Expr.Record Expr.KType fields ) ]
217
runRecordValToType :: ExprRef -> [RefExpression2 def] -> RuleResult def runRecordValToType recordTypeRef fields = [ ( recordTypeRef , makeRefExpr . Expr.BodyRecord $ Expr.Record Expr.KType fields ) ]
217
runRecordValToType recordTypeRef fields = [ ( recordTypeRef , makeRefExpr . Expr.BodyRecord $ Expr.Record Expr.KType fields ) ]
145
false
true
0
10
43
66
32
34
null
null
CindyLinz/Haskell.js
trans/src/Desugar/List.hs
mit
deListExportSpec (EThingWith l qName cName) = EThingWith (id l) (deListQName qName) (fmap (deListCName) cName)
110
deListExportSpec (EThingWith l qName cName) = EThingWith (id l) (deListQName qName) (fmap (deListCName) cName)
110
deListExportSpec (EThingWith l qName cName) = EThingWith (id l) (deListQName qName) (fmap (deListCName) cName)
110
false
false
0
8
13
49
24
25
null
null
haskell-lisp/historic-lisk
src/Language/Lisk/Parser.hs
bsd-3-clause
liskPVar = PVar <$> liskName
28
liskPVar = PVar <$> liskName
28
liskPVar = PVar <$> liskName
28
false
false
0
5
4
10
5
5
null
null
shepheb/go10c
Compiler.hs
bsd-3-clause
compileIncDec :: (Arg -> Arg -> Asm) -> Expr -> Compiler [Asm] compileIncDec opcode (Var i) = do xt <- typeCheck (Var i) xut <- underlyingType xt when (xut /= TypeInt && xut /= TypeUint) $ typeError $ "Attempt to ++ or -- non-int type " ++ show xt locCode <- lookupLocation i >>= compileLocation return [opcode locCode (Lit 1)] -- turns a Location into the assembly string representing it
410
compileIncDec :: (Arg -> Arg -> Asm) -> Expr -> Compiler [Asm] compileIncDec opcode (Var i) = do xt <- typeCheck (Var i) xut <- underlyingType xt when (xut /= TypeInt && xut /= TypeUint) $ typeError $ "Attempt to ++ or -- non-int type " ++ show xt locCode <- lookupLocation i >>= compileLocation return [opcode locCode (Lit 1)] -- turns a Location into the assembly string representing it
410
compileIncDec opcode (Var i) = do xt <- typeCheck (Var i) xut <- underlyingType xt when (xut /= TypeInt && xut /= TypeUint) $ typeError $ "Attempt to ++ or -- non-int type " ++ show xt locCode <- lookupLocation i >>= compileLocation return [opcode locCode (Lit 1)] -- turns a Location into the assembly string representing it
347
false
true
0
14
91
144
68
76
null
null
noschinl/cyp
src/Test/Info2/Cyp/Parser.hs
mit
splitStringAt a (x:xs) h | x `elem` a = h : splitStringAt a xs [] | otherwise = splitStringAt a xs (h++[x])
115
splitStringAt a (x:xs) h | x `elem` a = h : splitStringAt a xs [] | otherwise = splitStringAt a xs (h++[x])
115
splitStringAt a (x:xs) h | x `elem` a = h : splitStringAt a xs [] | otherwise = splitStringAt a xs (h++[x])
115
false
false
1
8
29
69
35
34
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_MARK_ARROWDOWN :: Int wxSTC_MARK_ARROWDOWN = 6
52
wxSTC_MARK_ARROWDOWN :: Int wxSTC_MARK_ARROWDOWN = 6
52
wxSTC_MARK_ARROWDOWN = 6
24
false
true
0
6
5
18
7
11
null
null
axch/dysvunctional-language
haskell-fol/FOL/Compiler/JavaScript/Syntax.hs
agpl-3.0
pp' e = pp e
12
pp' e = pp e
12
pp' e = pp e
12
false
false
1
5
4
16
5
11
null
null
royopa/pandoc
pandoc.hs
gpl-2.0
readMetaValue :: String -> MetaValue readMetaValue s = case decode (UTF8.fromString s) of Just (Yaml.String t) -> MetaString $ T.unpack t Just (Yaml.Bool b) -> MetaBool b _ -> MetaString s -- Returns usage message
304
readMetaValue :: String -> MetaValue readMetaValue s = case decode (UTF8.fromString s) of Just (Yaml.String t) -> MetaString $ T.unpack t Just (Yaml.Bool b) -> MetaBool b _ -> MetaString s -- Returns usage message
304
readMetaValue s = case decode (UTF8.fromString s) of Just (Yaml.String t) -> MetaString $ T.unpack t Just (Yaml.Bool b) -> MetaBool b _ -> MetaString s -- Returns usage message
267
false
true
0
11
125
89
42
47
null
null
tidalcycles/tidal-midi
Sound/Tidal/MIDI/CC.hs
gpl-3.0
(cc6, cc6_p) = pF "cc6" (Just 0)
32
(cc6, cc6_p) = pF "cc6" (Just 0)
32
(cc6, cc6_p) = pF "cc6" (Just 0)
32
false
false
0
6
6
25
12
13
null
null
seckcoder/lang-learn
haskell/lambda-calculus/src/Main.hs
unlicense
eval2 :: Env -> Exp -> Eval2 Value eval2 env (Lit i) = return (IntVal i)
72
eval2 :: Env -> Exp -> Eval2 Value eval2 env (Lit i) = return (IntVal i)
72
eval2 env (Lit i) = return (IntVal i)
37
false
true
0
10
15
46
21
25
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
traversableClassKey = mkPreludeClassUnique 36
49
traversableClassKey = mkPreludeClassUnique 36
49
traversableClassKey = mkPreludeClassUnique 36
49
false
false
1
5
7
12
4
8
null
null
ctford/Idris-Elba-dev
src/IRTS/CodegenLLVM.hs
bsd-3-clause
stdoutName _ = "stdout"
23
stdoutName _ = "stdout"
23
stdoutName _ = "stdout"
23
false
false
0
5
3
9
4
5
null
null
gridaphobe/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pprUserTypeCtxt ExprSigCtxt = text "an expression type signature"
71
pprUserTypeCtxt ExprSigCtxt = text "an expression type signature"
71
pprUserTypeCtxt ExprSigCtxt = text "an expression type signature"
71
false
false
0
5
13
12
5
7
null
null
GaloisInc/halvm-ghc
compiler/types/Kind.hs
bsd-3-clause
okArrowResultKind = classifiesTypeWithValues
44
okArrowResultKind = classifiesTypeWithValues
44
okArrowResultKind = classifiesTypeWithValues
44
false
false
0
4
2
6
3
3
null
null
elliottt/llvm-pretty-lint
src/Text/LLVM/Lint.hs
bsd-3-clause
typesAgree (FunTy r as) (FunTy r' as') = typesAgree r r' && typeListsAgree as as'
133
typesAgree (FunTy r as) (FunTy r' as') = typesAgree r r' && typeListsAgree as as'
133
typesAgree (FunTy r as) (FunTy r' as') = typesAgree r r' && typeListsAgree as as'
133
false
false
0
7
66
41
19
22
null
null
kmate/HaRe
test/testdata/AddOneParameter/FunIn4.hs
bsd-3-clause
--Default parameters can be added to definition of functions and simple constants. --In this example: add parameter 'y' to 'foo' main::Int main = sum [x+4 |let foo =[1..4], x<-foo]
182
main::Int main = sum [x+4 |let foo =[1..4], x<-foo]
51
main = sum [x+4 |let foo =[1..4], x<-foo]
41
true
true
0
11
30
54
26
28
null
null
np/propellor
src/Utility/Monad.hs
bsd-2-clause
firstM p (x:xs) = ifM (p x) (return $ Just x , firstM p xs)
59
firstM p (x:xs) = ifM (p x) (return $ Just x , firstM p xs)
59
firstM p (x:xs) = ifM (p x) (return $ Just x , firstM p xs)
59
false
false
0
8
14
47
23
24
null
null
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/Config.hs
gpl-3.0
showConfig :: SavedConfig -> String showConfig = showConfigWithComments mempty
78
showConfig :: SavedConfig -> String showConfig = showConfigWithComments mempty
78
showConfig = showConfigWithComments mempty
42
false
true
0
5
8
18
9
9
null
null
arekfu/project_euler
p0044/p0044.hs
mit
absPentn = [ (n1, n2, n2-n1) | (i,j) <- intPairs, let n1 = pent i, let n2 = pent j, isPentagonal (n2-n1), isPentagonal (n1+n2)]
127
absPentn = [ (n1, n2, n2-n1) | (i,j) <- intPairs, let n1 = pent i, let n2 = pent j, isPentagonal (n2-n1), isPentagonal (n1+n2)]
127
absPentn = [ (n1, n2, n2-n1) | (i,j) <- intPairs, let n1 = pent i, let n2 = pent j, isPentagonal (n2-n1), isPentagonal (n1+n2)]
127
false
false
0
10
23
90
47
43
null
null
facebookincubator/duckling
Duckling/Numeral/BN/Corpus.hs
bsd-3-clause
allExamples :: [Example] allExamples = concat [ examples (NumeralValue 0) [ "শূন্য" , "০" ] , examples (NumeralValue 1) [ "এক" ] , examples (NumeralValue 2) [ "দুই" ] , examples (NumeralValue 3) [ "তিন" ] , examples (NumeralValue 4) [ "চার" ] , examples (NumeralValue 5) [ "পাঁচ" ] , examples (NumeralValue 6) [ "ছয়" ] , examples (NumeralValue 7) [ "সাত" ] , examples (NumeralValue 8) [ "আট" ] , examples (NumeralValue 9) [ "নয়" ] , examples (NumeralValue 10) [ "দশ" ] , examples (NumeralValue 11) [ "এগারো" ] , examples (NumeralValue 15) [ "পনেরো" ] , examples (NumeralValue 17) [ "সতেরো" ] , examples (NumeralValue 20) [ "কুড়ি" ] , examples (NumeralValue 22) [ "বাইশ" ] , examples (NumeralValue 24) [ "চব্বিশ" ] , examples (NumeralValue 25) [ "পঁচিশ" ] , examples (NumeralValue 26) [ "ছাব্বিশ" ] , examples (NumeralValue 28) [ "আঠাশ" ] , examples (NumeralValue 30) [ "তিরিশ" ] , examples (NumeralValue 40) [ "চল্লিশ" ] , examples (NumeralValue 50) [ "পঞ্চাশ" ] , examples (NumeralValue 70) [ "সত্তর" ] ]
1,643
allExamples :: [Example] allExamples = concat [ examples (NumeralValue 0) [ "শূন্য" , "০" ] , examples (NumeralValue 1) [ "এক" ] , examples (NumeralValue 2) [ "দুই" ] , examples (NumeralValue 3) [ "তিন" ] , examples (NumeralValue 4) [ "চার" ] , examples (NumeralValue 5) [ "পাঁচ" ] , examples (NumeralValue 6) [ "ছয়" ] , examples (NumeralValue 7) [ "সাত" ] , examples (NumeralValue 8) [ "আট" ] , examples (NumeralValue 9) [ "নয়" ] , examples (NumeralValue 10) [ "দশ" ] , examples (NumeralValue 11) [ "এগারো" ] , examples (NumeralValue 15) [ "পনেরো" ] , examples (NumeralValue 17) [ "সতেরো" ] , examples (NumeralValue 20) [ "কুড়ি" ] , examples (NumeralValue 22) [ "বাইশ" ] , examples (NumeralValue 24) [ "চব্বিশ" ] , examples (NumeralValue 25) [ "পঁচিশ" ] , examples (NumeralValue 26) [ "ছাব্বিশ" ] , examples (NumeralValue 28) [ "আঠাশ" ] , examples (NumeralValue 30) [ "তিরিশ" ] , examples (NumeralValue 40) [ "চল্লিশ" ] , examples (NumeralValue 50) [ "পঞ্চাশ" ] , examples (NumeralValue 70) [ "সত্তর" ] ]
1,643
allExamples = concat [ examples (NumeralValue 0) [ "শূন্য" , "০" ] , examples (NumeralValue 1) [ "এক" ] , examples (NumeralValue 2) [ "দুই" ] , examples (NumeralValue 3) [ "তিন" ] , examples (NumeralValue 4) [ "চার" ] , examples (NumeralValue 5) [ "পাঁচ" ] , examples (NumeralValue 6) [ "ছয়" ] , examples (NumeralValue 7) [ "সাত" ] , examples (NumeralValue 8) [ "আট" ] , examples (NumeralValue 9) [ "নয়" ] , examples (NumeralValue 10) [ "দশ" ] , examples (NumeralValue 11) [ "এগারো" ] , examples (NumeralValue 15) [ "পনেরো" ] , examples (NumeralValue 17) [ "সতেরো" ] , examples (NumeralValue 20) [ "কুড়ি" ] , examples (NumeralValue 22) [ "বাইশ" ] , examples (NumeralValue 24) [ "চব্বিশ" ] , examples (NumeralValue 25) [ "পঁচিশ" ] , examples (NumeralValue 26) [ "ছাব্বিশ" ] , examples (NumeralValue 28) [ "আঠাশ" ] , examples (NumeralValue 30) [ "তিরিশ" ] , examples (NumeralValue 40) [ "চল্লিশ" ] , examples (NumeralValue 50) [ "পঞ্চাশ" ] , examples (NumeralValue 70) [ "সত্তর" ] ]
1,618
false
true
0
8
814
428
227
201
null
null
A1kmm/declarative-fieldml-prototype
src/Data/FieldML/Level1ToLevel2.hs
bsd-3-clause
recursivelyImportExternalScopedValue :: L2.L2Model -> L2.Identifier -> L2.L2ScopedValueID -> ModelTranslation L2.L2ScopedValueID recursivelyImportExternalScopedValue = cacheWrapExternalImport mtsForeignToLocalScopedValue (\x m -> m {mtsForeignToLocalScopedValue = x}) $ \foreignMod foreignURL targetSVID -> do newSVID <- L2.l2NextScopedValueID <$> getL2Model modifyL2Model $ \mod -> mod { L2.l2NextScopedValueID = (\(L2.L2ScopedValueID i) -> L2.L2ScopedValueID (i + 1)) newSVID } return newSVID
546
recursivelyImportExternalScopedValue :: L2.L2Model -> L2.Identifier -> L2.L2ScopedValueID -> ModelTranslation L2.L2ScopedValueID recursivelyImportExternalScopedValue = cacheWrapExternalImport mtsForeignToLocalScopedValue (\x m -> m {mtsForeignToLocalScopedValue = x}) $ \foreignMod foreignURL targetSVID -> do newSVID <- L2.l2NextScopedValueID <$> getL2Model modifyL2Model $ \mod -> mod { L2.l2NextScopedValueID = (\(L2.L2ScopedValueID i) -> L2.L2ScopedValueID (i + 1)) newSVID } return newSVID
546
recursivelyImportExternalScopedValue = cacheWrapExternalImport mtsForeignToLocalScopedValue (\x m -> m {mtsForeignToLocalScopedValue = x}) $ \foreignMod foreignURL targetSVID -> do newSVID <- L2.l2NextScopedValueID <$> getL2Model modifyL2Model $ \mod -> mod { L2.l2NextScopedValueID = (\(L2.L2ScopedValueID i) -> L2.L2ScopedValueID (i + 1)) newSVID } return newSVID
417
false
true
0
18
102
142
73
69
null
null
laszlopandy/elm-compiler
src/Generate/JavaScript/Helpers.hs
bsd-3-clause
make :: [String] -> Expression () make moduleName = obj (moduleName ++ ["make"]) <| ref localRuntime
104
make :: [String] -> Expression () make moduleName = obj (moduleName ++ ["make"]) <| ref localRuntime
104
make moduleName = obj (moduleName ++ ["make"]) <| ref localRuntime
70
false
true
0
9
19
46
23
23
null
null
dudebout/game-theoretic-learning
GTL/Data/Mockup.hs
isc
arrayToMockup :: (Bounded z, Ix z, Bounded s, Ix s) => Array (z, s) Proba -> z -> Dist s arrayToMockup arr z = fromList $ elems $ ixmap boundsF (\s -> (z, s)) arr
162
arrayToMockup :: (Bounded z, Ix z, Bounded s, Ix s) => Array (z, s) Proba -> z -> Dist s arrayToMockup arr z = fromList $ elems $ ixmap boundsF (\s -> (z, s)) arr
162
arrayToMockup arr z = fromList $ elems $ ixmap boundsF (\s -> (z, s)) arr
73
false
true
0
9
34
94
49
45
null
null
noteed/hlinode
bin/hlinode.hs
bsd-3-clause
processCmd :: Cmd -> IO () processCmd CmdDomainList{..} = do apiKey <- readApiKey cmdDomainListApiKey mdomains <- domainList apiKey case mdomains of Nothing -> putStrLn "Some error occured." Just domains -> print domains
234
processCmd :: Cmd -> IO () processCmd CmdDomainList{..} = do apiKey <- readApiKey cmdDomainListApiKey mdomains <- domainList apiKey case mdomains of Nothing -> putStrLn "Some error occured." Just domains -> print domains
234
processCmd CmdDomainList{..} = do apiKey <- readApiKey cmdDomainListApiKey mdomains <- domainList apiKey case mdomains of Nothing -> putStrLn "Some error occured." Just domains -> print domains
207
false
true
0
10
45
77
34
43
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
breakpointAutoIdKey = mkPreludeMiscIdUnique 112
57
breakpointAutoIdKey = mkPreludeMiscIdUnique 112
57
breakpointAutoIdKey = mkPreludeMiscIdUnique 112
57
false
false
0
5
13
9
4
5
null
null
raptros/env-extractor
System/Environment/Extract.hs
bsd-3-clause
missingKeyFail :: TypeReport -> EnvKey -> Result a missingKeyFail tr k = singleFailRec $ MissingKey tr k
104
missingKeyFail :: TypeReport -> EnvKey -> Result a missingKeyFail tr k = singleFailRec $ MissingKey tr k
104
missingKeyFail tr k = singleFailRec $ MissingKey tr k
53
false
true
0
7
16
40
18
22
null
null
alexander-at-github/eta
compiler/ETA/Main/Packages.hs
bsd-3-clause
getPackageIncludePath :: DynFlags -> [PackageKey] -> IO [String] getPackageIncludePath dflags pkgs = collectIncludeDirs `fmap` getPreloadPackagesAnd dflags pkgs
162
getPackageIncludePath :: DynFlags -> [PackageKey] -> IO [String] getPackageIncludePath dflags pkgs = collectIncludeDirs `fmap` getPreloadPackagesAnd dflags pkgs
162
getPackageIncludePath dflags pkgs = collectIncludeDirs `fmap` getPreloadPackagesAnd dflags pkgs
97
false
true
0
8
18
44
23
21
null
null
koba-e964/tigress
test/EvalTest.hs
bsd-3-clause
evalPure :: Expr -> Either String FreezedValue evalPure expr = runST (TE.runTigressExpr testConfig expr)
104
evalPure :: Expr -> Either String FreezedValue evalPure expr = runST (TE.runTigressExpr testConfig expr)
104
evalPure expr = runST (TE.runTigressExpr testConfig expr)
57
false
true
0
8
13
40
18
22
null
null
kaoskorobase/arff
Text/ARFF.hs
bsd-2-clause
putNominal :: String -> Value -> Put putNominal _ (NominalValue x) = putAsciiStr (show x)
89
putNominal :: String -> Value -> Put putNominal _ (NominalValue x) = putAsciiStr (show x)
89
putNominal _ (NominalValue x) = putAsciiStr (show x)
52
false
true
0
7
14
39
19
20
null
null
henrytill/hecate
src/Hecate/Backend/SQLite/Database.hs
apache-2.0
query :: MonadIO m => SQLite.Connection -> Query -> m [Entry] query conn q = if queryIsEmpty q then selectAll conn else liftIO (SQLite.queryNamed conn qs nps) where (qs, nps) = generateQuery q
204
query :: MonadIO m => SQLite.Connection -> Query -> m [Entry] query conn q = if queryIsEmpty q then selectAll conn else liftIO (SQLite.queryNamed conn qs nps) where (qs, nps) = generateQuery q
204
query conn q = if queryIsEmpty q then selectAll conn else liftIO (SQLite.queryNamed conn qs nps) where (qs, nps) = generateQuery q
142
false
true
0
9
44
85
42
43
null
null
music-suite/music-preludes
examples/streams.hs
bsd-3-clause
mapEvensOdds :: (a -> b) -> (a -> b) -> [a] -> [b] mapEvensOdds f g xs = let evens [] = [] evens (x:xs) = x:odds xs odds [] = [] odds (x:xs) = evens xs in take (length xs) $ map f (evens xs) `merge` map g (odds xs)
238
mapEvensOdds :: (a -> b) -> (a -> b) -> [a] -> [b] mapEvensOdds f g xs = let evens [] = [] evens (x:xs) = x:odds xs odds [] = [] odds (x:xs) = evens xs in take (length xs) $ map f (evens xs) `merge` map g (odds xs)
238
mapEvensOdds f g xs = let evens [] = [] evens (x:xs) = x:odds xs odds [] = [] odds (x:xs) = evens xs in take (length xs) $ map f (evens xs) `merge` map g (odds xs)
187
false
true
0
11
74
161
81
80
null
null
wavewave/hxournal
lib/Application/HXournal/Coroutine/Window.hs
bsd-2-clause
eitherSplit :: SplitType -> MainCoroutine () eitherSplit stype = do xstate <- getSt let cmap = getCanvasInfoMap xstate currcid = getCurrentCanvasId xstate newcid = newCanvasId cmap fstate = get frameState xstate enewfstate = splitWindow currcid (newcid,stype) fstate case enewfstate of Left _ -> return () Right fstate' -> do case maybeError "eitherSplit" . M.lookup currcid $ cmap of CanvasInfoBox oldcinfo -> do liftIO $ putStrLn "called here" let rtwin = get rootWindow xstate rtcntr = get rootContainer xstate liftIO $ containerRemove rtcntr rtwin (xstate'',win,fstate'') <- liftIO $ constructFrame' (CanvasInfoBox oldcinfo) xstate fstate' let xstate3 = set frameState fstate'' . set rootWindow win $ xstate'' putSt xstate3 liftIO $ boxPackEnd rtcntr win PackGrow 0 liftIO $ widgetShowAll rtcntr (xstate4,_wconf) <- liftIO $ eventConnect xstate3 (get frameState xstate3) xstate5 <- liftIO $ updatePageAll (get xournalstate xstate4) xstate4 putSt xstate5 canvasZoomUpdateAll invalidateAll -- |
1,332
eitherSplit :: SplitType -> MainCoroutine () eitherSplit stype = do xstate <- getSt let cmap = getCanvasInfoMap xstate currcid = getCurrentCanvasId xstate newcid = newCanvasId cmap fstate = get frameState xstate enewfstate = splitWindow currcid (newcid,stype) fstate case enewfstate of Left _ -> return () Right fstate' -> do case maybeError "eitherSplit" . M.lookup currcid $ cmap of CanvasInfoBox oldcinfo -> do liftIO $ putStrLn "called here" let rtwin = get rootWindow xstate rtcntr = get rootContainer xstate liftIO $ containerRemove rtcntr rtwin (xstate'',win,fstate'') <- liftIO $ constructFrame' (CanvasInfoBox oldcinfo) xstate fstate' let xstate3 = set frameState fstate'' . set rootWindow win $ xstate'' putSt xstate3 liftIO $ boxPackEnd rtcntr win PackGrow 0 liftIO $ widgetShowAll rtcntr (xstate4,_wconf) <- liftIO $ eventConnect xstate3 (get frameState xstate3) xstate5 <- liftIO $ updatePageAll (get xournalstate xstate4) xstate4 putSt xstate5 canvasZoomUpdateAll invalidateAll -- |
1,331
eitherSplit stype = do xstate <- getSt let cmap = getCanvasInfoMap xstate currcid = getCurrentCanvasId xstate newcid = newCanvasId cmap fstate = get frameState xstate enewfstate = splitWindow currcid (newcid,stype) fstate case enewfstate of Left _ -> return () Right fstate' -> do case maybeError "eitherSplit" . M.lookup currcid $ cmap of CanvasInfoBox oldcinfo -> do liftIO $ putStrLn "called here" let rtwin = get rootWindow xstate rtcntr = get rootContainer xstate liftIO $ containerRemove rtcntr rtwin (xstate'',win,fstate'') <- liftIO $ constructFrame' (CanvasInfoBox oldcinfo) xstate fstate' let xstate3 = set frameState fstate'' . set rootWindow win $ xstate'' putSt xstate3 liftIO $ boxPackEnd rtcntr win PackGrow 0 liftIO $ widgetShowAll rtcntr (xstate4,_wconf) <- liftIO $ eventConnect xstate3 (get frameState xstate3) xstate5 <- liftIO $ updatePageAll (get xournalstate xstate4) xstate4 putSt xstate5 canvasZoomUpdateAll invalidateAll -- |
1,286
false
true
0
22
476
353
162
191
null
null
bitemyapp/roshask
src/executable/Parse.hs
bsd-3-clause
comment :: Parser [()] comment = many $ skipSpace *> try (char '#' *> eatLine)
78
comment :: Parser [()] comment = many $ skipSpace *> try (char '#' *> eatLine)
78
comment = many $ skipSpace *> try (char '#' *> eatLine)
55
false
true
0
9
14
40
20
20
null
null
spechub/Hets
Maude/Maude2DG.hs
gpl-2.0
{- | inserts the given specification in the development graph, updating the data structures -} insertSpec :: Spec -> DGraph -> TokenInfoMap -> TokenInfoMap -> ViewMap -> [Token] -> DGraph -> InsSpecRes insertSpec (SpecMod sp_mod) pdg ptim tim vm ths dg = (ptimUp, tim5, vm, ths, dg6) where ps = getParams sp_mod (il, _) = getImportsSorts sp_mod up = incPredImps il pdg (ptim, tim, dg) (ptimUp, timUp, dgUp) = incPredParams ps pdg up (pl, tim1, morphs, dg1) = processParameters ps timUp dgUp top_sg = Maude.Sign.fromSpec sp_mod paramSorts = getSortsParameterizedBy (paramNames ps) $ Set.toList $ sorts top_sg ips = processImports tim1 vm dg1 il (tim2, dg2) = last_da ips (tim1, dg1) sg = sign_union_morphs morphs $ sign_union top_sg ips ext_sg = makeExtSign Maude sg nm_sns = map (makeNamed "") $ Maude.Sentence.fromSpec sp_mod sens = toThSens nm_sns gt = maudeTheory ext_sg startSigId sens startThId tok = HasName.getName sp_mod name = makeName $ simpleIdToIRI tok (ns, dg3) = insGTheory dg2 name DGBasic gt tim3 = Map.insert tok (getNode ns, sg, [], pl, paramSorts) tim2 (tim4, dg4) = createEdgesImports tok ips sg tim3 dg3 dg5 = createEdgesParams tok pl morphs sg tim4 dg4 (_, tim5, dg6) = insertFreeNode tok tim4 morphs dg5
1,320
insertSpec :: Spec -> DGraph -> TokenInfoMap -> TokenInfoMap -> ViewMap -> [Token] -> DGraph -> InsSpecRes insertSpec (SpecMod sp_mod) pdg ptim tim vm ths dg = (ptimUp, tim5, vm, ths, dg6) where ps = getParams sp_mod (il, _) = getImportsSorts sp_mod up = incPredImps il pdg (ptim, tim, dg) (ptimUp, timUp, dgUp) = incPredParams ps pdg up (pl, tim1, morphs, dg1) = processParameters ps timUp dgUp top_sg = Maude.Sign.fromSpec sp_mod paramSorts = getSortsParameterizedBy (paramNames ps) $ Set.toList $ sorts top_sg ips = processImports tim1 vm dg1 il (tim2, dg2) = last_da ips (tim1, dg1) sg = sign_union_morphs morphs $ sign_union top_sg ips ext_sg = makeExtSign Maude sg nm_sns = map (makeNamed "") $ Maude.Sentence.fromSpec sp_mod sens = toThSens nm_sns gt = maudeTheory ext_sg startSigId sens startThId tok = HasName.getName sp_mod name = makeName $ simpleIdToIRI tok (ns, dg3) = insGTheory dg2 name DGBasic gt tim3 = Map.insert tok (getNode ns, sg, [], pl, paramSorts) tim2 (tim4, dg4) = createEdgesImports tok ips sg tim3 dg3 dg5 = createEdgesParams tok pl morphs sg tim4 dg4 (_, tim5, dg6) = insertFreeNode tok tim4 morphs dg5
1,225
insertSpec (SpecMod sp_mod) pdg ptim tim vm ths dg = (ptimUp, tim5, vm, ths, dg6) where ps = getParams sp_mod (il, _) = getImportsSorts sp_mod up = incPredImps il pdg (ptim, tim, dg) (ptimUp, timUp, dgUp) = incPredParams ps pdg up (pl, tim1, morphs, dg1) = processParameters ps timUp dgUp top_sg = Maude.Sign.fromSpec sp_mod paramSorts = getSortsParameterizedBy (paramNames ps) $ Set.toList $ sorts top_sg ips = processImports tim1 vm dg1 il (tim2, dg2) = last_da ips (tim1, dg1) sg = sign_union_morphs morphs $ sign_union top_sg ips ext_sg = makeExtSign Maude sg nm_sns = map (makeNamed "") $ Maude.Sentence.fromSpec sp_mod sens = toThSens nm_sns gt = maudeTheory ext_sg startSigId sens startThId tok = HasName.getName sp_mod name = makeName $ simpleIdToIRI tok (ns, dg3) = insGTheory dg2 name DGBasic gt tim3 = Map.insert tok (getNode ns, sg, [], pl, paramSorts) tim2 (tim4, dg4) = createEdgesImports tok ips sg tim3 dg3 dg5 = createEdgesParams tok pl morphs sg tim4 dg4 (_, tim5, dg6) = insertFreeNode tok tim4 morphs dg5
1,116
true
true
0
15
291
464
244
220
null
null
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/Quantities/Physics.hs
bsd-2-clause
---------------Constants----------------------------- gravitationalConstValue :: QDefinition gravitationalConstValue = mkQuantDef gravitationalConst (Dbl 6.6743E-11)
166
gravitationalConstValue :: QDefinition gravitationalConstValue = mkQuantDef gravitationalConst (Dbl 6.6743E-11)
111
gravitationalConstValue = mkQuantDef gravitationalConst (Dbl 6.6743E-11)
72
true
true
0
7
10
29
13
16
null
null
stefanocerruti/haskell-primer-alpha
src/MarcToHtml.hs
bsd-3-clause
getRecordLength :: MarcLeaderRaw -> Int getRecordLength leader = rawToInt (B.take recordLength leader)
102
getRecordLength :: MarcLeaderRaw -> Int getRecordLength leader = rawToInt (B.take recordLength leader)
102
getRecordLength leader = rawToInt (B.take recordLength leader)
62
false
true
0
8
11
31
15
16
null
null
vTurbine/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
emptyLocalRdrEnv :: LocalRdrEnv emptyLocalRdrEnv = LRE { lre_env = emptyOccEnv , lre_in_scope = emptyNameSet }
133
emptyLocalRdrEnv :: LocalRdrEnv emptyLocalRdrEnv = LRE { lre_env = emptyOccEnv , lre_in_scope = emptyNameSet }
133
emptyLocalRdrEnv = LRE { lre_env = emptyOccEnv , lre_in_scope = emptyNameSet }
101
false
true
0
6
37
25
15
10
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Commands/Pull.hs
gpl-2.0
{- Read in the specified pull-from repositories. Perform Intersection, Union, or Complement read. In patch-theory terms (stated in set algebra, where + is union and & is intersection and \ is complement): Union = ((R1 + R2 + ... + Rn) \ Rc) Intersection = ((R1 & R2 & ... & Rn) \ Rc) Complement = (R1 \ Rc) \ ((R2 + R3 + ... + Rn) \ Rc) where Rc = local repo R1 = 1st specified pull repo R2, R3, Rn = other specified pull repo Since Rc is not provided here yet, the result of readRepos is a tuple: the first patchset(s) to be complemented against Rc and then the second patchset(s) to be complemented against Rc. -} readRepos :: (RepoPatch p, ApplyState p ~ Tree) => Repository p wR wU wT -> [DarcsFlag] -> [String] -> IO (SealedPatchSet p Origin,SealedPatchSet p Origin) readRepos _ _ [] = impossible
935
readRepos :: (RepoPatch p, ApplyState p ~ Tree) => Repository p wR wU wT -> [DarcsFlag] -> [String] -> IO (SealedPatchSet p Origin,SealedPatchSet p Origin) readRepos _ _ [] = impossible
205
readRepos _ _ [] = impossible
29
true
true
0
11
285
87
44
43
null
null
seppeljordan/sdl2
src/SDL/Video/Renderer.hs
bsd-3-clause
unmanagedSurface :: Ptr Raw.Surface -> Surface unmanagedSurface s = Surface s Nothing
85
unmanagedSurface :: Ptr Raw.Surface -> Surface unmanagedSurface s = Surface s Nothing
85
unmanagedSurface s = Surface s Nothing
38
false
true
0
8
11
35
14
21
null
null
dblia/nosql-ganeti
src/Ganeti/Objects.hs
gpl-2.0
encodeDLId (LIDFile driver name) = JSArray [showJSON driver, showJSON name]
75
encodeDLId (LIDFile driver name) = JSArray [showJSON driver, showJSON name]
75
encodeDLId (LIDFile driver name) = JSArray [showJSON driver, showJSON name]
75
false
false
0
7
9
32
15
17
null
null
kazu-yamamoto/mighttpd
Config.hs
bsd-3-clause
---------------------------------------------------------------- defaultOption :: Option defaultOption = Option { opt_port = 8080 , opt_prefork_process_number = 20 , opt_thread_number_per_process = 500 , opt_connection_timer = 10 , opt_sleep_timer = 2 , opt_debug_mode = True , opt_user = "nobody" , opt_group = "nobody" , opt_syslog_facility = "local5" , opt_log_level = "info" , opt_pid_file = "/var/run/mighttpd.pid" }
446
defaultOption :: Option defaultOption = Option { opt_port = 8080 , opt_prefork_process_number = 20 , opt_thread_number_per_process = 500 , opt_connection_timer = 10 , opt_sleep_timer = 2 , opt_debug_mode = True , opt_user = "nobody" , opt_group = "nobody" , opt_syslog_facility = "local5" , opt_log_level = "info" , opt_pid_file = "/var/run/mighttpd.pid" }
380
defaultOption = Option { opt_port = 8080 , opt_prefork_process_number = 20 , opt_thread_number_per_process = 500 , opt_connection_timer = 10 , opt_sleep_timer = 2 , opt_debug_mode = True , opt_user = "nobody" , opt_group = "nobody" , opt_syslog_facility = "local5" , opt_log_level = "info" , opt_pid_file = "/var/run/mighttpd.pid" }
356
true
true
0
6
76
80
52
28
null
null
entropia/tip-toi-reveng
src/TipToiYaml.hs
mit
gameYaml2Game Game9Yaml {..} = pure Game9 <*> pure gyRounds <*> pure gyUnknownC <*> pure gyEarlyRounds <*> pure gyRepeatLastMedia <*> pure gyUnknownX <*> pure gyUnknownW <*> pure gyUnknownV <*> playListListFromYaml gyStartPlayList <*> playListListFromYaml gyRoundEndPlayList <*> playListListFromYaml gyFinishPlayList <*> playListListFromYaml gyRoundStartPlayList <*> playListListFromYaml gyLaterRoundStartPlayList <*> traverse subGameFromYaml gySubgames <*> pure gyTargetScores <*> traverse playListListFromYaml gyFinishPlayLists <*> traverse playListListFromYaml gyExtraPlayLists
708
gameYaml2Game Game9Yaml {..} = pure Game9 <*> pure gyRounds <*> pure gyUnknownC <*> pure gyEarlyRounds <*> pure gyRepeatLastMedia <*> pure gyUnknownX <*> pure gyUnknownW <*> pure gyUnknownV <*> playListListFromYaml gyStartPlayList <*> playListListFromYaml gyRoundEndPlayList <*> playListListFromYaml gyFinishPlayList <*> playListListFromYaml gyRoundStartPlayList <*> playListListFromYaml gyLaterRoundStartPlayList <*> traverse subGameFromYaml gySubgames <*> pure gyTargetScores <*> traverse playListListFromYaml gyFinishPlayLists <*> traverse playListListFromYaml gyExtraPlayLists
708
gameYaml2Game Game9Yaml {..} = pure Game9 <*> pure gyRounds <*> pure gyUnknownC <*> pure gyEarlyRounds <*> pure gyRepeatLastMedia <*> pure gyUnknownX <*> pure gyUnknownW <*> pure gyUnknownV <*> playListListFromYaml gyStartPlayList <*> playListListFromYaml gyRoundEndPlayList <*> playListListFromYaml gyFinishPlayList <*> playListListFromYaml gyRoundStartPlayList <*> playListListFromYaml gyLaterRoundStartPlayList <*> traverse subGameFromYaml gySubgames <*> pure gyTargetScores <*> traverse playListListFromYaml gyFinishPlayLists <*> traverse playListListFromYaml gyExtraPlayLists
708
false
false
0
21
184
136
59
77
null
null
arekfu/grammar-haskell
src/Grammar/Regex.hs
bsd-3-clause
simplify' (Plus (Plus r)) = Plus $ simplify' r
46
simplify' (Plus (Plus r)) = Plus $ simplify' r
46
simplify' (Plus (Plus r)) = Plus $ simplify' r
46
false
false
2
8
8
31
13
18
null
null
christiaanb/Idris-dev
src/Pkg/PParser.hs
bsd-3-clause
reservedOp= PTok.reservedOp lexer
33
reservedOp= PTok.reservedOp lexer
33
reservedOp= PTok.reservedOp lexer
33
false
false
0
6
2
11
5
6
null
null
da-x/lamdu
Lamdu/GUI/TypeView.hs
gpl-3.0
makeTFun :: Monad m => ParentPrecedence -> Type -> Type -> M m View makeTFun parentPrecedence a b = case a of T.TRecord T.CEmpty -> [text "◗ "] _ -> [ splitMake (ParentPrecedence 1) a , text " → " ] ++ [splitMake (ParentPrecedence 0) b] & sequence <&> hbox >>= parens parentPrecedence (MyPrecedence 0)
353
makeTFun :: Monad m => ParentPrecedence -> Type -> Type -> M m View makeTFun parentPrecedence a b = case a of T.TRecord T.CEmpty -> [text "◗ "] _ -> [ splitMake (ParentPrecedence 1) a , text " → " ] ++ [splitMake (ParentPrecedence 0) b] & sequence <&> hbox >>= parens parentPrecedence (MyPrecedence 0)
353
makeTFun parentPrecedence a b = case a of T.TRecord T.CEmpty -> [text "◗ "] _ -> [ splitMake (ParentPrecedence 1) a , text " → " ] ++ [splitMake (ParentPrecedence 0) b] & sequence <&> hbox >>= parens parentPrecedence (MyPrecedence 0)
285
false
true
8
11
106
137
65
72
null
null
noteed/covered
bin/covered.hs
bsd-3-clause
openTick (TopLevelDecl False _) = openTopDecl
45
openTick (TopLevelDecl False _) = openTopDecl
45
openTick (TopLevelDecl False _) = openTopDecl
45
false
false
0
7
5
17
8
9
null
null
ezyang/ghc
compiler/codeGen/CgUtils.hs
bsd-3-clause
baseRegOffset dflags Sp = oFFSET_StgRegTable_rSp dflags
72
baseRegOffset dflags Sp = oFFSET_StgRegTable_rSp dflags
72
baseRegOffset dflags Sp = oFFSET_StgRegTable_rSp dflags
72
false
false
0
5
22
14
6
8
null
null
tuura/fantasi
src/Tuura/Fantasi/VHDL/Internal/GraphWriter.hs
mit
getStructure (n:ns) nodes es = "\tdata_in(" ++ show i ++ ") <=\tDIN(" ++ show i ++ ")" ++ getInput (getConnections (unpack . head $ vertexValuesByKey n "id") nodes es) ++ getStructure ns nodes es where i = getIndex (unpack . head $ vertexValuesByKey n "id") nodes 0
375
getStructure (n:ns) nodes es = "\tdata_in(" ++ show i ++ ") <=\tDIN(" ++ show i ++ ")" ++ getInput (getConnections (unpack . head $ vertexValuesByKey n "id") nodes es) ++ getStructure ns nodes es where i = getIndex (unpack . head $ vertexValuesByKey n "id") nodes 0
375
getStructure (n:ns) nodes es = "\tdata_in(" ++ show i ++ ") <=\tDIN(" ++ show i ++ ")" ++ getInput (getConnections (unpack . head $ vertexValuesByKey n "id") nodes es) ++ getStructure ns nodes es where i = getIndex (unpack . head $ vertexValuesByKey n "id") nodes 0
375
false
false
0
12
156
116
56
60
null
null
HairyDude/pdxparse
src/EU4/Common.hs
mit
-- | Handlers for signed numeric statements handlersSignedNumeric :: (EU4Info g, Monad m) => Trie (StatementHandler g m) handlersSignedNumeric = Tr.fromList [("tolerance_to_this", numeric MsgToleranceToThis) ]
225
handlersSignedNumeric :: (EU4Info g, Monad m) => Trie (StatementHandler g m) handlersSignedNumeric = Tr.fromList [("tolerance_to_this", numeric MsgToleranceToThis) ]
181
handlersSignedNumeric = Tr.fromList [("tolerance_to_this", numeric MsgToleranceToThis) ]
104
true
true
0
8
40
55
29
26
null
null
keera-studios/hsQt
Qtc/Gui/QDataWidgetMapper.hs
bsd-2-clause
setSubmitPolicy :: QDataWidgetMapper a -> ((SubmitPolicy)) -> IO () setSubmitPolicy x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QDataWidgetMapper_setSubmitPolicy cobj_x0 (toCLong $ qEnum_toInt x1)
203
setSubmitPolicy :: QDataWidgetMapper a -> ((SubmitPolicy)) -> IO () setSubmitPolicy x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QDataWidgetMapper_setSubmitPolicy cobj_x0 (toCLong $ qEnum_toInt x1)
203
setSubmitPolicy x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QDataWidgetMapper_setSubmitPolicy cobj_x0 (toCLong $ qEnum_toInt x1)
135
false
true
0
10
29
68
34
34
null
null
rueshyna/gogol
gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs
mpl-2.0
-- | Creates a value of 'DatabaseInstanceFailoverReplica' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'difrName' -- -- * 'difrAvailable' databaseInstanceFailoverReplica :: DatabaseInstanceFailoverReplica databaseInstanceFailoverReplica = DatabaseInstanceFailoverReplica' { _difrName = Nothing , _difrAvailable = Nothing }
430
databaseInstanceFailoverReplica :: DatabaseInstanceFailoverReplica databaseInstanceFailoverReplica = DatabaseInstanceFailoverReplica' { _difrName = Nothing , _difrAvailable = Nothing }
204
databaseInstanceFailoverReplica = DatabaseInstanceFailoverReplica' { _difrName = Nothing , _difrAvailable = Nothing }
133
true
true
1
7
72
39
23
16
null
null