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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
uwap/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | highestFC (PPatvar fc _) = Just fc | 34 | highestFC (PPatvar fc _) = Just fc | 34 | highestFC (PPatvar fc _) = Just fc | 34 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
ghc-android/ghc | libraries/base/GHC/Arr.hs | bsd-3-clause | unsafeAccum :: (e -> a -> e) -> Array i e -> [(Int, a)] -> Array i e
unsafeAccum f arr ies = runST (do
STArray l u n marr# <- thawSTArray arr
ST (foldr (adjust f marr#) (done l u n marr#) ies)) | 201 | unsafeAccum :: (e -> a -> e) -> Array i e -> [(Int, a)] -> Array i e
unsafeAccum f arr ies = runST (do
STArray l u n marr# <- thawSTArray arr
ST (foldr (adjust f marr#) (done l u n marr#) ies)) | 201 | unsafeAccum f arr ies = runST (do
STArray l u n marr# <- thawSTArray arr
ST (foldr (adjust f marr#) (done l u n marr#) ies)) | 132 | false | true | 0 | 13 | 51 | 126 | 60 | 66 | null | null |
RJ-Russell/ChordsandScales | chord-gen.hs | mit | fretHeader :: SingleNote -> Int -> String
fretHeader root minFret = "\nRoot: " ++ show root ++ "\nMin. Fret: " ++ show minFret | 126 | fretHeader :: SingleNote -> Int -> String
fretHeader root minFret = "\nRoot: " ++ show root ++ "\nMin. Fret: " ++ show minFret | 126 | fretHeader root minFret = "\nRoot: " ++ show root ++ "\nMin. Fret: " ++ show minFret | 84 | false | true | 0 | 8 | 22 | 47 | 21 | 26 | null | null |
nlogax/norby | src/Parser.hs | bsd-3-clause | command :: Parser ByteString
command = takeWhile1 letter <|> takeWhile1 number | 78 | command :: Parser ByteString
command = takeWhile1 letter <|> takeWhile1 number | 78 | command = takeWhile1 letter <|> takeWhile1 number | 49 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
TomMD/ghc | compiler/prelude/THNames.hs | bsd-3-clause | expQTyConName = libTc (fsLit "ExpQ") expQTyConKey | 69 | expQTyConName = libTc (fsLit "ExpQ") expQTyConKey | 69 | expQTyConName = libTc (fsLit "ExpQ") expQTyConKey | 69 | false | false | 0 | 7 | 25 | 17 | 8 | 9 | null | null |
ghc-android/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gen_Show_binds :: (Name -> Fixity) -> SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Show_binds get_fixity loc tycon
= (listToBag [shows_prec, show_list], emptyBag)
where
-----------------------------------------------------------------------
show_list = mkHsVarBind loc showList_RDR
... | 4,383 | gen_Show_binds :: (Name -> Fixity) -> SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Show_binds get_fixity loc tycon
= (listToBag [shows_prec, show_list], emptyBag)
where
-----------------------------------------------------------------------
show_list = mkHsVarBind loc showList_RDR
... | 4,382 | gen_Show_binds get_fixity loc tycon
= (listToBag [shows_prec, show_list], emptyBag)
where
-----------------------------------------------------------------------
show_list = mkHsVarBind loc showList_RDR
(nlHsApp (nlHsVar showList___RDR) (nlHsPar (nlHsApp (nlHsVar showsPrec_RDR) (nlHsIntLit... | 4,290 | false | true | 32 | 14 | 1,702 | 606 | 349 | 257 | null | null |
stepcut/plugins | testsuite/dynload/simple/Plugin.hs | lgpl-2.1 | my_fun = plugin { function = "plugin says \"hello\"" } | 54 | my_fun = plugin { function = "plugin says \"hello\"" } | 54 | my_fun = plugin { function = "plugin says \"hello\"" } | 54 | false | false | 0 | 6 | 9 | 14 | 8 | 6 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter6.hs | mit | -- Properties for Pictures
-- ^^^^^^^^^^^^^^^^^^^^^^^
prop_AboveFlipV, prop_AboveFlipH :: Picture -> Picture -> Bool
prop_AboveFlipV pic1 pic2 =
flipV (pic1 `above` pic2) == (flipV pic1) `above` (flipV pic2) | 214 | prop_AboveFlipV, prop_AboveFlipH :: Picture -> Picture -> Bool
prop_AboveFlipV pic1 pic2 =
flipV (pic1 `above` pic2) == (flipV pic1) `above` (flipV pic2) | 158 | prop_AboveFlipV pic1 pic2 =
flipV (pic1 `above` pic2) == (flipV pic1) `above` (flipV pic2) | 95 | true | true | 2 | 8 | 34 | 68 | 35 | 33 | null | null |
iconnect/aws-sign4 | Aws/Sign4.hs | bsd-3-clause | -- s4Authz_, s4Singn4_, s4StringToSign_ & s4CanonicalRequest all generate
-- from Sign4 parameters that have been completed (see complete_sign4, below).
s4Authz_ :: Sign4 -> B.ByteString
s4Authz_ s4@Sign4{..} =
Bl.toByteString . mconcat $
[ Bl.copyByteString algorithm
, Bl.copyByteString " Cre... | 684 | s4Authz_ :: Sign4 -> B.ByteString
s4Authz_ s4@Sign4{..} =
Bl.toByteString . mconcat $
[ Bl.copyByteString algorithm
, Bl.copyByteString " Credential="
, Bl.copyByteString $ accessKeyID s4Credentials
, Bl.copyByteString "/"
, Bl.copyByteString $ credential_scope s4
... | 529 | s4Authz_ s4@Sign4{..} =
Bl.toByteString . mconcat $
[ Bl.copyByteString algorithm
, Bl.copyByteString " Credential="
, Bl.copyByteString $ accessKeyID s4Credentials
, Bl.copyByteString "/"
, Bl.copyByteString $ credential_scope s4
, Bl.copyByteString ", Signed... | 495 | true | true | 14 | 8 | 166 | 127 | 66 | 61 | null | null |
cchalmers/optical | src/Optical/Containers.hs | bsd-3-clause | -- Is this better then @pack . toListOf l@?
toLTextOf :: Getting TBuilder.Builder s Char -> s -> LText
toLTextOf l = TBuilder.toLazyText . views l TBuilder.singleton | 165 | toLTextOf :: Getting TBuilder.Builder s Char -> s -> LText
toLTextOf l = TBuilder.toLazyText . views l TBuilder.singleton | 121 | toLTextOf l = TBuilder.toLazyText . views l TBuilder.singleton | 62 | true | true | 4 | 6 | 26 | 49 | 22 | 27 | null | null |
jtdaugherty/vty | src/Graphics/Vty/Image.hs | bsd-3-clause | -- | Translates an image by padding or cropping its top.
translateY :: Int -> Image -> Image
translateY y i
| y < 0 && (abs y > imageHeight i) = emptyImage
| y < 0 = let s = abs y in CropTop i s (imageWidth i) (imageHeight i - s)
| y == 0 = i
| otherwise = let w = imageWidth i in VertJoin (BGFill... | 349 | translateY :: Int -> Image -> Image
translateY y i
| y < 0 && (abs y > imageHeight i) = emptyImage
| y < 0 = let s = abs y in CropTop i s (imageWidth i) (imageHeight i - s)
| y == 0 = i
| otherwise = let w = imageWidth i in VertJoin (BGFill w y) i w (imageHeight i + y) | 292 | translateY y i
| y < 0 && (abs y > imageHeight i) = emptyImage
| y < 0 = let s = abs y in CropTop i s (imageWidth i) (imageHeight i - s)
| y == 0 = i
| otherwise = let w = imageWidth i in VertJoin (BGFill w y) i w (imageHeight i + y) | 256 | true | true | 0 | 11 | 100 | 167 | 78 | 89 | null | null |
danipozodg/dependency | haskell_test.hs | gpl-3.0 | -- Convert Inline instances occuring on parsed input to human readable text.
inlineToText :: Inline -> String
inlineToText (Str s) = s | 134 | inlineToText :: Inline -> String
inlineToText (Str s) = s | 57 | inlineToText (Str s) = s | 24 | true | true | 0 | 7 | 21 | 25 | 13 | 12 | null | null |
sdiehl/ghc | compiler/main/Plugins.hs | bsd-3-clause | purePlugin, impurePlugin, flagRecompile :: [CommandLineOption] -> IO PluginRecompile
purePlugin _args = return NoForceRecompile | 127 | purePlugin, impurePlugin, flagRecompile :: [CommandLineOption] -> IO PluginRecompile
purePlugin _args = return NoForceRecompile | 127 | purePlugin _args = return NoForceRecompile | 42 | false | true | 0 | 6 | 12 | 31 | 17 | 14 | null | null |
olsner/ghc | compiler/prelude/THNames.hs | bsd-3-clause | sourceLazyKey = mkPreludeMiscIdUnique 355 | 51 | sourceLazyKey = mkPreludeMiscIdUnique 355 | 51 | sourceLazyKey = mkPreludeMiscIdUnique 355 | 51 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
acowley/ghc | compiler/types/Type.hs | bsd-3-clause | mkCoerciblePred :: Type -> Type -> PredType
mkCoerciblePred ty1 ty2
= WARN( not (k `eqKind` typeKind ty2), ppr ty1 $$ ppr ty2 $$ ppr k $$ ppr (typeKind ty2) )
TyConApp coercibleTyCon [k, ty1, ty2]
where
k = typeKind ty1 | 231 | mkCoerciblePred :: Type -> Type -> PredType
mkCoerciblePred ty1 ty2
= WARN( not (k `eqKind` typeKind ty2), ppr ty1 $$ ppr ty2 $$ ppr k $$ ppr (typeKind ty2) )
TyConApp coercibleTyCon [k, ty1, ty2]
where
k = typeKind ty1 | 231 | mkCoerciblePred ty1 ty2
= WARN( not (k `eqKind` typeKind ty2), ppr ty1 $$ ppr ty2 $$ ppr k $$ ppr (typeKind ty2) )
TyConApp coercibleTyCon [k, ty1, ty2]
where
k = typeKind ty1 | 187 | false | true | 0 | 9 | 51 | 111 | 53 | 58 | null | null |
DavidAlphaFox/ghc | utils/haddock/haddock-api/src/Haddock/Interface.hs | bsd-3-clause | withTempDir :: (ExceptionMonad m, MonadIO m) => FilePath -> m a -> m a
withTempDir dir = gbracket_ (liftIO $ createDirectory dir)
(liftIO $ removeDirectoryRecursive dir) | 197 | withTempDir :: (ExceptionMonad m, MonadIO m) => FilePath -> m a -> m a
withTempDir dir = gbracket_ (liftIO $ createDirectory dir)
(liftIO $ removeDirectoryRecursive dir) | 197 | withTempDir dir = gbracket_ (liftIO $ createDirectory dir)
(liftIO $ removeDirectoryRecursive dir) | 126 | false | true | 0 | 8 | 53 | 68 | 33 | 35 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLC_SINGLE_SEL :: Int
wxLC_SINGLE_SEL = 8192 | 45 | wxLC_SINGLE_SEL :: Int
wxLC_SINGLE_SEL = 8192 | 45 | wxLC_SINGLE_SEL = 8192 | 22 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
mcapodici/haskelllearn | firstlang/simple/src/Nameless/Evaluation.hs | mit | evaluate :: (NamelessExp -> Maybe NamelessExp) -> NamelessExp -> [NamelessExp]
evaluate step t = case step t of
Just t' -> t : (evaluate step t')
_ -> [t] | 158 | evaluate :: (NamelessExp -> Maybe NamelessExp) -> NamelessExp -> [NamelessExp]
evaluate step t = case step t of
Just t' -> t : (evaluate step t')
_ -> [t] | 158 | evaluate step t = case step t of
Just t' -> t : (evaluate step t')
_ -> [t] | 79 | false | true | 0 | 10 | 32 | 74 | 37 | 37 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT50.hs | gpl-3.0 | -- Definitions
True && x = x | 29 | True && x = x | 13 | True && x = x | 13 | true | false | 0 | 5 | 7 | 13 | 6 | 7 | null | null |
fpco/inline-c-nag | examples/c06puce.hs | mit | main :: IO ()
main = do
bounds <- parseBounds
x <- parseData bounds
void $ printGenComplxMat "\n Original data values\n" x
void $ sumFftComplex2d <$> [C.exp| int{ Nag_ForwardTransform } |] <*> return x
void $ printGenComplxMat "\n Components of discrete Fourier transform\n" x
void $ sumFftComplex2d <$> [C.e... | 455 | main :: IO ()
main = do
bounds <- parseBounds
x <- parseData bounds
void $ printGenComplxMat "\n Original data values\n" x
void $ sumFftComplex2d <$> [C.exp| int{ Nag_ForwardTransform } |] <*> return x
void $ printGenComplxMat "\n Components of discrete Fourier transform\n" x
void $ sumFftComplex2d <$> [C.e... | 455 | main = do
bounds <- parseBounds
x <- parseData bounds
void $ printGenComplxMat "\n Original data values\n" x
void $ sumFftComplex2d <$> [C.exp| int{ Nag_ForwardTransform } |] <*> return x
void $ printGenComplxMat "\n Components of discrete Fourier transform\n" x
void $ sumFftComplex2d <$> [C.exp| int{ Nag_B... | 441 | false | true | 0 | 9 | 81 | 117 | 56 | 61 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The targeting object contains basic targeting settings about the channel
-- section.
csTargeting :: Lens' ChannelSection (Maybe ChannelSectionTargeting)
csTargeting
= lens _csTargeting (\ s a -> s{_csTargeting = a}) | 222 | csTargeting :: Lens' ChannelSection (Maybe ChannelSectionTargeting)
csTargeting
= lens _csTargeting (\ s a -> s{_csTargeting = a}) | 132 | csTargeting
= lens _csTargeting (\ s a -> s{_csTargeting = a}) | 64 | true | true | 0 | 9 | 32 | 49 | 26 | 23 | null | null |
spacekitteh/smcghc | compiler/main/DynFlags.hs | bsd-3-clause | dynamicTooMkDynamicDynFlags :: DynFlags -> DynFlags
dynamicTooMkDynamicDynFlags dflags0
= let dflags1 = addWay' WayDyn dflags0
dflags2 = dflags1 {
outputFile = dynOutputFile dflags1,
hiSuf = dynHiSuf dflags1,
objectSuf = dynObjectSuf ... | 464 | dynamicTooMkDynamicDynFlags :: DynFlags -> DynFlags
dynamicTooMkDynamicDynFlags dflags0
= let dflags1 = addWay' WayDyn dflags0
dflags2 = dflags1 {
outputFile = dynOutputFile dflags1,
hiSuf = dynHiSuf dflags1,
objectSuf = dynObjectSuf ... | 464 | dynamicTooMkDynamicDynFlags dflags0
= let dflags1 = addWay' WayDyn dflags0
dflags2 = dflags1 {
outputFile = dynOutputFile dflags1,
hiSuf = dynHiSuf dflags1,
objectSuf = dynObjectSuf dflags1
}
dflags3 = up... | 412 | false | true | 0 | 11 | 173 | 86 | 44 | 42 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/Range.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/Range.endContainer Mozilla Range.endContainer documentation>
getEndContainer :: (MonadDOM m) => Range -> m Node
getEndContainer self
= liftDOM ((self ^. js "endContainer") >>= fromJSValUnchecked) | 253 | getEndContainer :: (MonadDOM m) => Range -> m Node
getEndContainer self
= liftDOM ((self ^. js "endContainer") >>= fromJSValUnchecked) | 136 | getEndContainer self
= liftDOM ((self ^. js "endContainer") >>= fromJSValUnchecked) | 85 | true | true | 0 | 10 | 27 | 51 | 26 | 25 | null | null |
allanderek/ipclib | Language/Pepa/MainControl.hs | gpl-2.0 | hasResult (FatalError _ _) = False | 36 | hasResult (FatalError _ _) = False | 36 | hasResult (FatalError _ _) = False | 36 | false | false | 0 | 7 | 7 | 17 | 8 | 9 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Pattern.hs | mit | pureSuitTerminals = Pattern "Pure Suit Terminals" "一色全帶么九" 320 | 82 | pureSuitTerminals = Pattern "Pure Suit Terminals" "一色全帶么九" 320 | 82 | pureSuitTerminals = Pattern "Pure Suit Terminals" "一色全帶么九" 320 | 82 | false | false | 0 | 5 | 27 | 13 | 6 | 7 | null | null |
li-zhirui/EoplLangs | src/SimpleModule/Parser.hs | bsd-3-clause | identifier :: Parser String
identifier = lexeme (p >>= check)
where
p = (:) <$> letterChar <*> many alphaNumChar
check x = if x `elem` reservedWords
then fail $
concat ["keyword ", show x, " cannot be an identifier"]
else return x | 296 | identifier :: Parser String
identifier = lexeme (p >>= check)
where
p = (:) <$> letterChar <*> many alphaNumChar
check x = if x `elem` reservedWords
then fail $
concat ["keyword ", show x, " cannot be an identifier"]
else return x | 296 | identifier = lexeme (p >>= check)
where
p = (:) <$> letterChar <*> many alphaNumChar
check x = if x `elem` reservedWords
then fail $
concat ["keyword ", show x, " cannot be an identifier"]
else return x | 268 | false | true | 0 | 9 | 107 | 89 | 47 | 42 | null | null |
ksaveljev/hake-2 | src/Util/QuakeFile.hs | bsd-3-clause | readFloat :: QuakeFile -> IO Float
readFloat (QuakeFile h) = do
num <- BL.hGet h 4
print ("readFloat = " ++ show (runGet getFloat num))
return (runGet getFloat num) | 176 | readFloat :: QuakeFile -> IO Float
readFloat (QuakeFile h) = do
num <- BL.hGet h 4
print ("readFloat = " ++ show (runGet getFloat num))
return (runGet getFloat num) | 176 | readFloat (QuakeFile h) = do
num <- BL.hGet h 4
print ("readFloat = " ++ show (runGet getFloat num))
return (runGet getFloat num) | 141 | false | true | 0 | 12 | 40 | 79 | 36 | 43 | null | null |
da-x/lamdu | Lamdu/Sugar/Convert/Hole.hs | gpl-3.0 | eitherToListT (Right x) = return x | 34 | eitherToListT (Right x) = return x | 34 | eitherToListT (Right x) = return x | 34 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
DarrenMowat/blackbox | tests/results/SplitTests.hs | unlicense | test6 (Heart, Queen) = 0 | 24 | test6 (Heart, Queen) = 0 | 24 | test6 (Heart, Queen) = 0 | 24 | false | false | 0 | 5 | 4 | 16 | 8 | 8 | null | null |
aaronc/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectRawQuotePattern unq RType =
do fill (Var (reflm "RType"))
solve | 77 | reflectRawQuotePattern unq RType =
do fill (Var (reflm "RType"))
solve | 77 | reflectRawQuotePattern unq RType =
do fill (Var (reflm "RType"))
solve | 77 | false | false | 1 | 11 | 16 | 37 | 14 | 23 | null | null |
unisonweb/platform | unison-core/src/Unison/Util/Monoid.hs | mit | fromMaybe :: Monoid a => Maybe a -> a
fromMaybe Nothing = mempty | 64 | fromMaybe :: Monoid a => Maybe a -> a
fromMaybe Nothing = mempty | 64 | fromMaybe Nothing = mempty | 26 | false | true | 0 | 7 | 12 | 28 | 13 | 15 | null | null |
semaj/ants | src/Main.hs | bsd-3-clause | wakeAnts :: [Ant] -> [Ant]
wakeAnts ants = cyclePredAnts ants ants 60.0 (\x -> (state x) == Forage) (> 1) (\ a -> a { state = Forage }) | 135 | wakeAnts :: [Ant] -> [Ant]
wakeAnts ants = cyclePredAnts ants ants 60.0 (\x -> (state x) == Forage) (> 1) (\ a -> a { state = Forage }) | 135 | wakeAnts ants = cyclePredAnts ants ants 60.0 (\x -> (state x) == Forage) (> 1) (\ a -> a { state = Forage }) | 108 | false | true | 0 | 10 | 28 | 75 | 42 | 33 | null | null |
olsner/ghc | compiler/iface/ToIface.hs | bsd-3-clause | mkIfaceApps :: IfaceExpr -> [CoreExpr] -> IfaceExpr
mkIfaceApps f as = foldl (\f a -> IfaceApp f (toIfaceExpr a)) f as | 118 | mkIfaceApps :: IfaceExpr -> [CoreExpr] -> IfaceExpr
mkIfaceApps f as = foldl (\f a -> IfaceApp f (toIfaceExpr a)) f as | 118 | mkIfaceApps f as = foldl (\f a -> IfaceApp f (toIfaceExpr a)) f as | 66 | false | true | 0 | 10 | 20 | 55 | 28 | 27 | null | null |
dosenfrucht/beagle | src/Bytecode.hs | gpl-2.0 | flatten (Unwind i : xs) = if n == 0 then [] else [Unwind n]
where n = sum $ map unCallOrUnUnwind (Unwind i : xs) | 116 | flatten (Unwind i : xs) = if n == 0 then [] else [Unwind n]
where n = sum $ map unCallOrUnUnwind (Unwind i : xs) | 116 | flatten (Unwind i : xs) = if n == 0 then [] else [Unwind n]
where n = sum $ map unCallOrUnUnwind (Unwind i : xs) | 116 | false | false | 0 | 11 | 29 | 65 | 33 | 32 | null | null |
jabaraster/minibas-web | Settings.hs | mit | combineStylesheets :: Name -> [Route Static] -> Q Exp
combineStylesheets = combineStylesheets'
(appSkipCombining compileTimeAppSettings)
combineSettings | 160 | combineStylesheets :: Name -> [Route Static] -> Q Exp
combineStylesheets = combineStylesheets'
(appSkipCombining compileTimeAppSettings)
combineSettings | 160 | combineStylesheets = combineStylesheets'
(appSkipCombining compileTimeAppSettings)
combineSettings | 106 | false | true | 0 | 9 | 22 | 46 | 20 | 26 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | Indicates if there was a suggested change to bold.
tsssBoldSuggested :: Lens' TextStyleSuggestionState (Maybe Bool)
tsssBoldSuggested
= lens _tsssBoldSuggested
(\ s a -> s{_tsssBoldSuggested = a}) | 209 | tsssBoldSuggested :: Lens' TextStyleSuggestionState (Maybe Bool)
tsssBoldSuggested
= lens _tsssBoldSuggested
(\ s a -> s{_tsssBoldSuggested = a}) | 153 | tsssBoldSuggested
= lens _tsssBoldSuggested
(\ s a -> s{_tsssBoldSuggested = a}) | 88 | true | true | 0 | 9 | 35 | 48 | 25 | 23 | null | null |
rzetterberg/x11-xinput | Graphics/X11/XInput/Devices.hs | bsd-3-clause | deviceByName :: String -> DevicesMap -> Maybe DeviceInfo
deviceByName name dmap = M.lookup name (byName dmap) | 109 | deviceByName :: String -> DevicesMap -> Maybe DeviceInfo
deviceByName name dmap = M.lookup name (byName dmap) | 109 | deviceByName name dmap = M.lookup name (byName dmap) | 52 | false | true | 0 | 7 | 15 | 40 | 19 | 21 | null | null |
trbauer/clr | src/Util.hs | bsd-2-clause | prefixLines :: String -> String -> String
prefixLines pfx = unlines . map (pfx++) . lines | 89 | prefixLines :: String -> String -> String
prefixLines pfx = unlines . map (pfx++) . lines | 89 | prefixLines pfx = unlines . map (pfx++) . lines | 47 | false | true | 0 | 8 | 15 | 43 | 20 | 23 | null | null |
teuffy/min-var-ci | src/FP/ImportWizard/SourceWizard.hs | mit | iwPageTitle IWInvalidPage = "Invalid data handling" | 57 | iwPageTitle IWInvalidPage = "Invalid data handling" | 57 | iwPageTitle IWInvalidPage = "Invalid data handling" | 57 | false | false | 0 | 5 | 11 | 9 | 4 | 5 | null | null |
jeremyjh/distributed-process-lifted | test/Control/Distributed/Process/Lifted/Tests.hs | bsd-3-clause | testMonitorNormalTermination :: TestTransport -> Bool -> Bool -> Assertion
testMonitorNormalTermination TestTransport{..} mOrL un = do
monitorSetup <- newEmptyMVar
monitoredProcess <- newEmptyMVar
done <- newEmptyMVar
forkIO $ do
localNode <- newLocalNode testTransport initRemoteTable
addr <- forkProce... | 698 | testMonitorNormalTermination :: TestTransport -> Bool -> Bool -> Assertion
testMonitorNormalTermination TestTransport{..} mOrL un = do
monitorSetup <- newEmptyMVar
monitoredProcess <- newEmptyMVar
done <- newEmptyMVar
forkIO $ do
localNode <- newLocalNode testTransport initRemoteTable
addr <- forkProce... | 698 | testMonitorNormalTermination TestTransport{..} mOrL un = do
monitorSetup <- newEmptyMVar
monitoredProcess <- newEmptyMVar
done <- newEmptyMVar
forkIO $ do
localNode <- newLocalNode testTransport initRemoteTable
addr <- forkProcess localNode $
liftIO $ readMVar monitorSetup
putMVar monitoredPr... | 623 | false | true | 0 | 13 | 128 | 170 | 75 | 95 | null | null |
jezen/mail-for-muggles | src/Main.hs | bsd-3-clause | fromHeader (_:hs) = fromHeader hs | 42 | fromHeader (_:hs) = fromHeader hs | 42 | fromHeader (_:hs) = fromHeader hs | 42 | false | false | 0 | 7 | 13 | 19 | 9 | 10 | null | null |
GaloisInc/halvm-ghc | compiler/types/Coercion.hs | bsd-3-clause | -- | Try one stepper and then try the next, if the first doesn't make
-- progress.
-- So if it returns NS_Done, it means that both steppers are satisfied
composeSteppers :: NormaliseStepper ev -> NormaliseStepper ev
-> NormaliseStepper ev
composeSteppers step1 step2 rec_nts tc tys
= case step1 rec_nts... | 598 | composeSteppers :: NormaliseStepper ev -> NormaliseStepper ev
-> NormaliseStepper ev
composeSteppers step1 step2 rec_nts tc tys
= case step1 rec_nts tc tys of
success@(NS_Step {}) -> success
NS_Done -> step2 rec_nts tc tys
NS_Abort -> NS_Abort
-- | A 'Normal... | 444 | composeSteppers step1 step2 rec_nts tc tys
= case step1 rec_nts tc tys of
success@(NS_Step {}) -> success
NS_Done -> step2 rec_nts tc tys
NS_Abort -> NS_Abort
-- | A 'NormaliseStepper' that unwraps newtypes, careful not to fall into
-- a loop. If it would fall into a loop, ... | 343 | true | true | 0 | 10 | 152 | 95 | 47 | 48 | null | null |
chreekat/stack | src/Stack/Upload.hs | bsd-3-clause | fromMemory :: Text -> Text -> HackageCredsSource
fromMemory u p = HackageCredsSource $ return (HackageCreds
{ hcUsername = u
, hcPassword = p
}, False) | 163 | fromMemory :: Text -> Text -> HackageCredsSource
fromMemory u p = HackageCredsSource $ return (HackageCreds
{ hcUsername = u
, hcPassword = p
}, False) | 163 | fromMemory u p = HackageCredsSource $ return (HackageCreds
{ hcUsername = u
, hcPassword = p
}, False) | 114 | false | true | 0 | 9 | 36 | 51 | 28 | 23 | null | null |
EFulmer/haskell-scheme-wikibook | src/Exercises/Ch2/Pt1/Ex2.hs | bsd-3-clause | readExpr :: String -> String
readExpr input = case parse parseExpr "lisp" input of
Left err -> "No match: " ++ show err
Right val -> "Found value" | 150 | readExpr :: String -> String
readExpr input = case parse parseExpr "lisp" input of
Left err -> "No match: " ++ show err
Right val -> "Found value" | 150 | readExpr input = case parse parseExpr "lisp" input of
Left err -> "No match: " ++ show err
Right val -> "Found value" | 121 | false | true | 3 | 6 | 31 | 46 | 24 | 22 | null | null |
rzeigler/advent-of-code-2016 | Lib/AoC/Day11.hs | mit | shortinput = Floors 2 (V.fromList ["hydrogen", "lithium"]) (V.fromList [0, 1, 0, 2]) 0 | 86 | shortinput = Floors 2 (V.fromList ["hydrogen", "lithium"]) (V.fromList [0, 1, 0, 2]) 0 | 86 | shortinput = Floors 2 (V.fromList ["hydrogen", "lithium"]) (V.fromList [0, 1, 0, 2]) 0 | 86 | false | false | 0 | 8 | 12 | 49 | 27 | 22 | null | null |
Warbo/nix-eval | src/Language/Eval/Internal.hs | gpl-3.0 | haveNix :: IO Bool
haveNix = haveCommand "nix-shell" | 52 | haveNix :: IO Bool
haveNix = haveCommand "nix-shell" | 52 | haveNix = haveCommand "nix-shell" | 33 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
OS2World/DEV-UTIL-HUGS | oldlib/SkewHeap.hs | bsd-3-clause | lookupM (T y a b) x =
case compare x y of
LT -> Nothing
EQ -> Just y
GT -> lookupM b x `mplus` lookupM a x | 120 | lookupM (T y a b) x =
case compare x y of
LT -> Nothing
EQ -> Just y
GT -> lookupM b x `mplus` lookupM a x | 120 | lookupM (T y a b) x =
case compare x y of
LT -> Nothing
EQ -> Just y
GT -> lookupM b x `mplus` lookupM a x | 120 | false | false | 0 | 9 | 41 | 67 | 32 | 35 | null | null |
nikita-volkov/stm-containers | test/Main/BimapTests.hs | mit | test_insertOverwrites = do
m <- newIO :: IO (Bimap Int Int)
atomically $ insertRight 3 1 m
assertEqual 1 =<< atomically (size m)
atomically $ insertRight 3 2 m
assertEqual 1 =<< atomically (size m)
assertEqual Nothing =<< atomically (lookupRight 1 m)
assertEqual (Just 3) =<< atomically (lookupRight 2 m)
... | 761 | test_insertOverwrites = do
m <- newIO :: IO (Bimap Int Int)
atomically $ insertRight 3 1 m
assertEqual 1 =<< atomically (size m)
atomically $ insertRight 3 2 m
assertEqual 1 =<< atomically (size m)
assertEqual Nothing =<< atomically (lookupRight 1 m)
assertEqual (Just 3) =<< atomically (lookupRight 2 m)
... | 761 | test_insertOverwrites = do
m <- newIO :: IO (Bimap Int Int)
atomically $ insertRight 3 1 m
assertEqual 1 =<< atomically (size m)
atomically $ insertRight 3 2 m
assertEqual 1 =<< atomically (size m)
assertEqual Nothing =<< atomically (lookupRight 1 m)
assertEqual (Just 3) =<< atomically (lookupRight 2 m)
... | 761 | false | false | 1 | 12 | 139 | 338 | 147 | 191 | null | null |
mhuesch/scheme_compiler | src/L1Tox64/Compile.hs | bsd-3-clause | assembleX (Xw RAX) = "%rax" | 27 | assembleX (Xw RAX) = "%rax" | 27 | assembleX (Xw RAX) = "%rax" | 27 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
uduki/hsQt | examples/DiagramScene/DiagramItem.hs | bsd-2-clause | umDeleteItem :: DiagramScene -> DiagramItem -> QGraphicsPolygonItem () -> IO ()
umDeleteItem ds ni item
= do
removeArrows ds ni
let cid = di_id ni
modifyIORef (ds_items_io ds) (\x -> rli x cid)
modifyIORef (ds_avs_io ds) (\x -> x + 1)
modifyIORef (ds_avn_io ds) (\xs -> [cid] ++ xs)
modifyIORef... | 577 | umDeleteItem :: DiagramScene -> DiagramItem -> QGraphicsPolygonItem () -> IO ()
umDeleteItem ds ni item
= do
removeArrows ds ni
let cid = di_id ni
modifyIORef (ds_items_io ds) (\x -> rli x cid)
modifyIORef (ds_avs_io ds) (\x -> x + 1)
modifyIORef (ds_avn_io ds) (\xs -> [cid] ++ xs)
modifyIORef... | 577 | umDeleteItem ds ni item
= do
removeArrows ds ni
let cid = di_id ni
modifyIORef (ds_items_io ds) (\x -> rli x cid)
modifyIORef (ds_avs_io ds) (\x -> x + 1)
modifyIORef (ds_avn_io ds) (\xs -> [cid] ++ xs)
modifyIORef (ds_isn_io ds) (\x -> x - 1)
removeItem (ds_o ds) (di_o ni)
diagramItem... | 497 | false | true | 0 | 11 | 162 | 271 | 132 | 139 | null | null |
mpkh/Idris-dev | src/Idris/Directives.hs | bsd-3-clause | -- | Run the action corresponding to a directive
directiveAction :: Directive -> Idris ()
directiveAction (DLib cgn lib) = do
addLib cgn lib
addIBC (IBCLib cgn lib) | 168 | directiveAction :: Directive -> Idris ()
directiveAction (DLib cgn lib) = do
addLib cgn lib
addIBC (IBCLib cgn lib) | 119 | directiveAction (DLib cgn lib) = do
addLib cgn lib
addIBC (IBCLib cgn lib) | 78 | true | true | 0 | 9 | 31 | 54 | 25 | 29 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | typeable5ClassKey = mkPreludeClassUnique 25 | 49 | typeable5ClassKey = mkPreludeClassUnique 25 | 49 | typeable5ClassKey = mkPreludeClassUnique 25 | 49 | false | false | 0 | 5 | 9 | 9 | 4 | 5 | null | null |
juhp/hircules | src/Hircules/Config.hs | mit | configDirName :: FilePath
configDirName = ".hircules" | 53 | configDirName :: FilePath
configDirName = ".hircules" | 53 | configDirName = ".hircules" | 27 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
johnpmayer/elm-compiler | src/Parse/Parse.hs | bsd-3-clause | declarations :: IParser [D.SourceDecl]
declarations =
(:) <$> Decl.declaration
<*> many freshDef | 104 | declarations :: IParser [D.SourceDecl]
declarations =
(:) <$> Decl.declaration
<*> many freshDef | 104 | declarations =
(:) <$> Decl.declaration
<*> many freshDef | 65 | false | true | 0 | 7 | 19 | 34 | 18 | 16 | null | null |
chadaustin/battery | src/Battery/Test.hs | bsd-3-clause | defaultMain :: [Test] -> IO ()
defaultMain tests = do
forM_ tests $ \(Test name testLocation action) -> do
recordTestStart $ name
result <- action
case result of
TRSuccess -> recordTestSuccess name
TRFailure failureLocation reason -> recordTestFailure name failureLoca... | 381 | defaultMain :: [Test] -> IO ()
defaultMain tests = do
forM_ tests $ \(Test name testLocation action) -> do
recordTestStart $ name
result <- action
case result of
TRSuccess -> recordTestSuccess name
TRFailure failureLocation reason -> recordTestFailure name failureLoca... | 381 | defaultMain tests = do
forM_ tests $ \(Test name testLocation action) -> do
recordTestStart $ name
result <- action
case result of
TRSuccess -> recordTestSuccess name
TRFailure failureLocation reason -> recordTestFailure name failureLocation reason
TRDisab... | 350 | false | true | 0 | 14 | 107 | 108 | 50 | 58 | null | null |
AlexeyRaga/eta | compiler/ETA/TypeCheck/TcType.hs | bsd-3-clause | tcEqType :: TcType -> TcType -> Bool
-- tcEqType is a proper, sensible type-equality function, that does
-- just what you'd expect The function Type.eqType (currently) has a
-- grotesque hack that makes OpenKind = *, and that is NOT what we
-- want in the type checker! Otherwise, for example, TcCanonical.reOrient
-- t... | 1,400 | tcEqType :: TcType -> TcType -> Bool
tcEqType ty1 ty2
= go init_env ty1 ty2
where
init_env = mkRnEnv2 (mkInScopeSet (tyVarsOfType ty1 `unionVarSet` tyVarsOfType ty2))
go env t1 t2 | Just t1' <- tcView t1 = go env t1' t2
| Just t2' <- tcView t2 = go env t1 t2'
go env (TyVarTy tv1) ... | 996 | tcEqType ty1 ty2
= go init_env ty1 ty2
where
init_env = mkRnEnv2 (mkInScopeSet (tyVarsOfType ty1 `unionVarSet` tyVarsOfType ty2))
go env t1 t2 | Just t1' <- tcView t1 = go env t1' t2
| Just t2' <- tcView t2 = go env t1 t2'
go env (TyVarTy tv1) (TyVarTy tv2) = rnOccL env tv1 ==... | 959 | true | true | 11 | 9 | 432 | 530 | 238 | 292 | null | null |
YoEight/machines | src/Data/Machine/Tee.hs | bsd-3-clause | cappedT L = Refl | 16 | cappedT L = Refl | 16 | cappedT L = Refl | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
MnO2/r3 | src/Text/R3/Internal/C2HS.hs | bsd-3-clause | peekIntConv :: (Storable a, Integral a, Integral b) => Ptr a -> IO b
peekIntConv = liftM cIntConv . peek | 104 | peekIntConv :: (Storable a, Integral a, Integral b) => Ptr a -> IO b
peekIntConv = liftM cIntConv . peek | 104 | peekIntConv = liftM cIntConv . peek | 35 | false | true | 0 | 7 | 19 | 49 | 24 | 25 | null | null |
nevrenato/HetsAlloy | Propositional/Sign.hs | gpl-2.0 | -- | Adds an Id to the signature
addToSig :: Sign -> Id -> Sign
addToSig sig tok = Sign {items = Set.insert tok $ items sig} | 124 | addToSig :: Sign -> Id -> Sign
addToSig sig tok = Sign {items = Set.insert tok $ items sig} | 91 | addToSig sig tok = Sign {items = Set.insert tok $ items sig} | 60 | true | true | 0 | 10 | 26 | 54 | 25 | 29 | null | null |
svenkeidel/gnome-citadel | bench/AStarBench.hs | gpl-3.0 | main :: IO ()
main = defaultMainWith | 36 | main :: IO ()
main = defaultMainWith | 36 | main = defaultMainWith | 22 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
lukexi/infinitybox | src/Types.hs | bsd-3-clause | cubeScale :: GLfloat
cubeScale = 0.4 | 36 | cubeScale :: GLfloat
cubeScale = 0.4 | 36 | cubeScale = 0.4 | 15 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
JPMoresmau/leksah | src/IDE/TextEditor/CodeMirror.hs | gpl-2.0 | lastLine = js0 "lastLine" . to valToNumber | 51 | lastLine = js0 "lastLine" . to valToNumber | 51 | lastLine = js0 "lastLine" . to valToNumber | 51 | false | false | 0 | 6 | 15 | 16 | 7 | 9 | null | null |
jcberentsen/causality | src/Examples/DihybridCross.hs | bsd-3-clause | allele_b = truly "b" | 20 | allele_b = truly "b" | 20 | allele_b = truly "b" | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
conal/DeepArrow | src/Language/Haskell/Parens.hs | bsd-3-clause | opName :: HsQOp -> HsName
opName = getName . opQName | 52 | opName :: HsQOp -> HsName
opName = getName . opQName | 52 | opName = getName . opQName | 26 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
noinia/diagrams-ipe | src/Diagrams/Backend/Ipe/Attributes.hs | bsd-3-clause | author :: HasStyle a => Text -> a -> a
author = applyAt Author | 62 | author :: HasStyle a => Text -> a -> a
author = applyAt Author | 62 | author = applyAt Author | 23 | false | true | 0 | 7 | 13 | 29 | 14 | 15 | null | null |
sebastiaanvisser/orchid | src/Network/Orchid/Core/Handler.hs | bsd-3-clause | hViewer
:: (MonadIO m, HttpM' m, SendM m, QueueM m, BodyM Request m, Alternative m)
=> FilePath -> m ()
hViewer dir =
hPath "/"
(hFileResource (dir /+ "show.html"))
(hExtendedFileSystem dir) | 202 | hViewer
:: (MonadIO m, HttpM' m, SendM m, QueueM m, BodyM Request m, Alternative m)
=> FilePath -> m ()
hViewer dir =
hPath "/"
(hFileResource (dir /+ "show.html"))
(hExtendedFileSystem dir) | 202 | hViewer dir =
hPath "/"
(hFileResource (dir /+ "show.html"))
(hExtendedFileSystem dir) | 94 | false | true | 0 | 9 | 42 | 97 | 46 | 51 | null | null |
fnoble/3dconnexion-haskell | Test.hs | bsd-3-clause | scaleRotation :: GLdouble
scaleRotation = 2e-3/4000.0 | 53 | scaleRotation :: GLdouble
scaleRotation = 2e-3/4000.0 | 53 | scaleRotation = 2e-3/4000.0 | 27 | false | true | 0 | 6 | 5 | 22 | 9 | 13 | null | null |
mettekou/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | tVarPrimTyConName = mkPrimTc (fsLit "TVar#") tVarPrimTyConKey tVarPrimTyCon | 87 | tVarPrimTyConName = mkPrimTc (fsLit "TVar#") tVarPrimTyConKey tVarPrimTyCon | 87 | tVarPrimTyConName = mkPrimTc (fsLit "TVar#") tVarPrimTyConKey tVarPrimTyCon | 87 | false | false | 0 | 7 | 18 | 19 | 9 | 10 | null | null |
RaminHAL9001/rose-trie | src/Data/Tree/RoseTrie.hs | gpl-3.0 | alterM :: (Monad m, Ord p) => (Maybe o -> m (Maybe o)) -> [p] -> RoseTrie p o -> m (RoseTrie p o)
alterM f p = alter' (path p) f | 128 | alterM :: (Monad m, Ord p) => (Maybe o -> m (Maybe o)) -> [p] -> RoseTrie p o -> m (RoseTrie p o)
alterM f p = alter' (path p) f | 128 | alterM f p = alter' (path p) f | 30 | false | true | 0 | 11 | 31 | 92 | 45 | 47 | null | null |
uduki/hsQt | Qtc/Gui/QPen.hs | bsd-2-clause | joinStyle :: QPen a -> (()) -> IO (PenJoinStyle)
joinStyle x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QPen_joinStyle cobj_x0 | 152 | joinStyle :: QPen a -> (()) -> IO (PenJoinStyle)
joinStyle x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QPen_joinStyle cobj_x0 | 152 | joinStyle x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QPen_joinStyle cobj_x0 | 103 | false | true | 0 | 8 | 31 | 59 | 29 | 30 | null | null |
jeremyjh/free-agent | core/src/FreeAgent/Core/Action/Composition.hs | bsd-3-clause | thenExec :: Runnable a => ActionPlan -> a -> ActionPlan
thenExec = combinePlan Sequential | 89 | thenExec :: Runnable a => ActionPlan -> a -> ActionPlan
thenExec = combinePlan Sequential | 89 | thenExec = combinePlan Sequential | 33 | false | true | 0 | 7 | 13 | 29 | 14 | 15 | null | null |
ezyang/ghc | testsuite/tests/unboxedsums/unboxedsums3.hs | bsd-3-clause | showAlt0 (# | | () #) = "(# | | () #)" | 38 | showAlt0 (# | | () #) = "(# | | () #)" | 38 | showAlt0 (# | | () #) = "(# | | () #)" | 38 | false | false | 0 | 7 | 11 | 15 | 8 | 7 | null | null |
termite2/bv | BV/Util.hs | bsd-3-clause | relToHaskell Neq = "./=" | 24 | relToHaskell Neq = "./=" | 24 | relToHaskell Neq = "./=" | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
castaway/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | macron 'I' = 'Ī' | 16 | macron 'I' = 'Ī' | 16 | macron 'I' = 'Ī' | 16 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
blamario/monoid-subclasses | src/Data/Monoid/Instances/Positioned.hs | bsd-3-clause | -- zero width joiner
isZeroWidth '\xfeff' = True | 48 | isZeroWidth '\xfeff' = True | 27 | isZeroWidth '\xfeff' = True | 27 | true | false | 1 | 5 | 7 | 14 | 5 | 9 | null | null |
sixohsix/hmidi | System/MacOSX/CoreMIDI.hs | bsd-3-clause | MIDIPropertyName = unsafePerformIO $ peek ptr_kMIDIPropertyName
| 72 | kMIDIPropertyName = unsafePerformIO $ peek ptr_kMIDIPropertyName | 72 | kMIDIPropertyName = unsafePerformIO $ peek ptr_kMIDIPropertyName | 72 | false | false | 1 | 6 | 14 | 16 | 6 | 10 | null | null |
kqr/pacmANN | src/Step.hs | bsd-3-clause | moveGhosts :: Float -> Float -> Level -> Rand StdGen [Ghost]
moveGhosts delta speed lvl =
mapM (ghostMove delta speed lvl) (lvl ^. ghosts) | 142 | moveGhosts :: Float -> Float -> Level -> Rand StdGen [Ghost]
moveGhosts delta speed lvl =
mapM (ghostMove delta speed lvl) (lvl ^. ghosts) | 142 | moveGhosts delta speed lvl =
mapM (ghostMove delta speed lvl) (lvl ^. ghosts) | 81 | false | true | 0 | 9 | 27 | 60 | 30 | 30 | null | null |
kfish/hogg | Codec/Container/Ogg/ContentType.hs | bsd-3-clause | -- Extract sample rate from OggPCM2 BOS header
oggpcm2Metadata :: L.ByteString -> MessageHeaders
oggpcm2Metadata d = MessageHeaders (fromList headerVals)
where headerVals = [samplerate, channels]
samplerate = ("Audio-Samplerate", [printf "%d Hz" srate])
channels = ("Audio-Channels", [show c])
... | 379 | oggpcm2Metadata :: L.ByteString -> MessageHeaders
oggpcm2Metadata d = MessageHeaders (fromList headerVals)
where headerVals = [samplerate, channels]
samplerate = ("Audio-Samplerate", [printf "%d Hz" srate])
channels = ("Audio-Channels", [show c])
srate = (be32At 16 d) :: Int
c = (u8At ... | 332 | oggpcm2Metadata d = MessageHeaders (fromList headerVals)
where headerVals = [samplerate, channels]
samplerate = ("Audio-Samplerate", [printf "%d Hz" srate])
channels = ("Audio-Channels", [show c])
srate = (be32At 16 d) :: Int
c = (u8At 21 d) :: Int | 282 | true | true | 6 | 8 | 83 | 118 | 62 | 56 | null | null |
hansroland/FunctionalImages | src/Main.hs | bsd-3-clause | main :: IO ()
main = mainWidgetWithHead headElement bodyElement | 63 | main :: IO ()
main = mainWidgetWithHead headElement bodyElement | 63 | main = mainWidgetWithHead headElement bodyElement | 49 | false | true | 0 | 7 | 8 | 26 | 11 | 15 | null | null |
ucsd-progsys/nanomaly | src/NanoML/Pretty.hs | bsd-3-clause | prettyRedex env e = let ?env = env
in prettyPrec 0 e | 72 | prettyRedex env e = let ?env = env
in prettyPrec 0 e | 72 | prettyRedex env e = let ?env = env
in prettyPrec 0 e | 72 | false | false | 0 | 8 | 31 | 27 | 12 | 15 | null | null |
kRITZCREEK/psc-ide | src/PureScript/Ide/Externs.hs | mit | convertImport :: PE.ExternsImport -> ExternDecl
convertImport ei =
Dependency
(moduleNameToText (PE.eiModule ei))
[]
(moduleNameToText <$> PE.eiImportedAs ei) | 166 | convertImport :: PE.ExternsImport -> ExternDecl
convertImport ei =
Dependency
(moduleNameToText (PE.eiModule ei))
[]
(moduleNameToText <$> PE.eiImportedAs ei) | 166 | convertImport ei =
Dependency
(moduleNameToText (PE.eiModule ei))
[]
(moduleNameToText <$> PE.eiImportedAs ei) | 118 | false | true | 0 | 9 | 24 | 61 | 28 | 33 | null | null |
silkapp/regular-xmlpickler | tests/Main.hs | bsd-3-clause | case_sumRecord = do
bidir "<h1><h1>1</h1></h1>" H1 { h1 = 1 }
bidir "<h2><h2>aap</h2></h2>" H2 { h2 = "aap" } | 113 | case_sumRecord = do
bidir "<h1><h1>1</h1></h1>" H1 { h1 = 1 }
bidir "<h2><h2>aap</h2></h2>" H2 { h2 = "aap" } | 113 | case_sumRecord = do
bidir "<h1><h1>1</h1></h1>" H1 { h1 = 1 }
bidir "<h2><h2>aap</h2></h2>" H2 { h2 = "aap" } | 113 | false | false | 1 | 10 | 22 | 42 | 19 | 23 | null | null |
JacquesCarette/literate-scientific-software | People/Dan/Presentations/CommitteeMeeting4/BodyNew.hs | bsd-2-clause | phys_sys_desc_list = enumSimple 1 (short physSyst) phys_sys_desc_list_physys | 76 | phys_sys_desc_list = enumSimple 1 (short physSyst) phys_sys_desc_list_physys | 76 | phys_sys_desc_list = enumSimple 1 (short physSyst) phys_sys_desc_list_physys | 76 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
gcampax/ghc | compiler/main/DynFlags.hs | bsd-3-clause | setVerbosity :: Maybe Int -> DynP ()
setVerbosity mb_n = upd (\dfs -> dfs{ verbosity = mb_n `orElse` 3 }) | 105 | setVerbosity :: Maybe Int -> DynP ()
setVerbosity mb_n = upd (\dfs -> dfs{ verbosity = mb_n `orElse` 3 }) | 105 | setVerbosity mb_n = upd (\dfs -> dfs{ verbosity = mb_n `orElse` 3 }) | 68 | false | true | 0 | 10 | 19 | 55 | 28 | 27 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxRELATIONSHIP_ABOVE :: Int
wxRELATIONSHIP_ABOVE = 3 | 52 | wxRELATIONSHIP_ABOVE :: Int
wxRELATIONSHIP_ABOVE = 3 | 52 | wxRELATIONSHIP_ABOVE = 3 | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
andregrigon/Lambda | executable/Main.hs | mit | leftmostReduction :: Term -> Maybe Term
leftmostReduction (Var _) = Nothing | 75 | leftmostReduction :: Term -> Maybe Term
leftmostReduction (Var _) = Nothing | 75 | leftmostReduction (Var _) = Nothing | 35 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
quintype/ringo | src/Ringo/Generator/Sql.hs | mit | member :: ScalarExpr -> ScalarExpr -> ScalarExpr
member = BinaryOp ea (name ".") | 80 | member :: ScalarExpr -> ScalarExpr -> ScalarExpr
member = BinaryOp ea (name ".") | 80 | member = BinaryOp ea (name ".") | 31 | false | true | 0 | 7 | 12 | 30 | 15 | 15 | null | null |
twittner/cql | src/Database/CQL/Protocol/Codec.hs | mpl-2.0 | encodeColumnType VarCharColumn = encodeShort 0x000D | 56 | encodeColumnType VarCharColumn = encodeShort 0x000D | 56 | encodeColumnType VarCharColumn = encodeShort 0x000D | 56 | false | false | 0 | 5 | 9 | 12 | 5 | 7 | null | null |
eijian/raytracer | test/TestPhoton.hs | bsd-3-clause | pt = Vector3 0 2 2 | 18 | pt = Vector3 0 2 2 | 18 | pt = Vector3 0 2 2 | 18 | false | false | 1 | 5 | 5 | 19 | 6 | 13 | null | null |
nomeata/ghc | compiler/codeGen/StgCmmUtils.hs | bsd-3-clause | assignTemp :: CmmExpr -> FCode LocalReg
-- Make sure the argument is in a local register.
-- We don't bother being particularly aggressive with avoiding
-- unnecessary local registers, since we can rely on a later
-- optimization pass to inline as necessary (and skipping out
-- on things like global registers can be a ... | 505 | assignTemp :: CmmExpr -> FCode LocalReg
assignTemp (CmmReg (CmmLocal reg)) = return reg | 87 | assignTemp (CmmReg (CmmLocal reg)) = return reg | 47 | true | true | 0 | 8 | 85 | 47 | 25 | 22 | null | null |
phaazon/GLFW-b | Test.hs | bsd-2-clause | test_getVersionString :: IO ()
test_getVersionString = do
mvs <- GLFW.getVersionString
case mvs of
Just vs -> assertBool "" $ v `isPrefixOf` vs
Nothing -> assertFailure ""
where
v = intercalate "." $ map show [versionMajor, versionMinor] | 263 | test_getVersionString :: IO ()
test_getVersionString = do
mvs <- GLFW.getVersionString
case mvs of
Just vs -> assertBool "" $ v `isPrefixOf` vs
Nothing -> assertFailure ""
where
v = intercalate "." $ map show [versionMajor, versionMinor] | 263 | test_getVersionString = do
mvs <- GLFW.getVersionString
case mvs of
Just vs -> assertBool "" $ v `isPrefixOf` vs
Nothing -> assertFailure ""
where
v = intercalate "." $ map show [versionMajor, versionMinor] | 232 | false | true | 0 | 12 | 61 | 89 | 43 | 46 | null | null |
olsner/ghc | compiler/main/HscTypes.hs | bsd-3-clause | linkableObjs :: Linkable -> [FilePath]
linkableObjs l = [ f | DotO f <- linkableUnlinked l ] | 92 | linkableObjs :: Linkable -> [FilePath]
linkableObjs l = [ f | DotO f <- linkableUnlinked l ] | 92 | linkableObjs l = [ f | DotO f <- linkableUnlinked l ] | 53 | false | true | 0 | 9 | 16 | 44 | 20 | 24 | null | null |
ghc-android/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | -- treated just like a variable V
pushAtom d p (AnnVar v)
| UnaryRep rep_ty <- repType (idType v)
, V <- typeArgRep rep_ty
= return (nilOL, 0)
| isFCallId v
= pprPanic "pushAtom: shouldn't get an FCallId here" (ppr v)
| Just primop <- isPrimOpId_maybe v
= return (unitOL (PUSH_PRIMOP primop), 1)
... | 1,334 | pushAtom d p (AnnVar v)
| UnaryRep rep_ty <- repType (idType v)
, V <- typeArgRep rep_ty
= return (nilOL, 0)
| isFCallId v
= pprPanic "pushAtom: shouldn't get an FCallId here" (ppr v)
| Just primop <- isPrimOpId_maybe v
= return (unitOL (PUSH_PRIMOP primop), 1)
| Just d_v <- lookupBCEnv_maybe... | 1,299 | pushAtom d p (AnnVar v)
| UnaryRep rep_ty <- repType (idType v)
, V <- typeArgRep rep_ty
= return (nilOL, 0)
| isFCallId v
= pprPanic "pushAtom: shouldn't get an FCallId here" (ppr v)
| Just primop <- isPrimOpId_maybe v
= return (unitOL (PUSH_PRIMOP primop), 1)
| Just d_v <- lookupBCEnv_maybe... | 1,299 | true | false | 0 | 15 | 500 | 333 | 159 | 174 | null | null |
FranklinChen/Hugs | dotnet/lib/Dotnet/System/Xml/XmlNodeType.hs | bsd-3-clause | toXmlNodeType :: XmlNodeTypeTy -> XmlNodeType ()
toXmlNodeType tag = IOExts.unsafePerformIO (Dotnet.System.Enum.parse (IOExts.unsafePerformIO (Dotnet.System.Type.getType "System.Xml.XmlNodeType, Dotnet.System.Xml, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")) (show tag)) | 297 | toXmlNodeType :: XmlNodeTypeTy -> XmlNodeType ()
toXmlNodeType tag = IOExts.unsafePerformIO (Dotnet.System.Enum.parse (IOExts.unsafePerformIO (Dotnet.System.Type.getType "System.Xml.XmlNodeType, Dotnet.System.Xml, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")) (show tag)) | 297 | toXmlNodeType tag = IOExts.unsafePerformIO (Dotnet.System.Enum.parse (IOExts.unsafePerformIO (Dotnet.System.Type.getType "System.Xml.XmlNodeType, Dotnet.System.Xml, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")) (show tag)) | 248 | false | true | 0 | 12 | 19 | 64 | 33 | 31 | null | null |
cstrahan/gochan | src/Control/Concurrent/GoChan.hs | mit | dequeueSuspend :: SuspQ -> SomeSuspend -> IO ()
dequeueSuspend !q someS@(SomeSuspend s) = do
!mx <- readIORef (_prev s)
!my <- readIORef (_next s)
case mx of
Just someX@(SomeSuspend x) ->
case my of
Just someY@(SomeSuspend y) -> do
writeIORef (_next x)... | 1,392 | dequeueSuspend :: SuspQ -> SomeSuspend -> IO ()
dequeueSuspend !q someS@(SomeSuspend s) = do
!mx <- readIORef (_prev s)
!my <- readIORef (_next s)
case mx of
Just someX@(SomeSuspend x) ->
case my of
Just someY@(SomeSuspend y) -> do
writeIORef (_next x)... | 1,392 | dequeueSuspend !q someS@(SomeSuspend s) = do
!mx <- readIORef (_prev s)
!my <- readIORef (_next s)
case mx of
Just someX@(SomeSuspend x) ->
case my of
Just someY@(SomeSuspend y) -> do
writeIORef (_next x) (Just someY)
writeIORef (_p... | 1,344 | false | true | 1 | 25 | 625 | 432 | 197 | 235 | null | null |
olsner/ghc | compiler/cmm/CmmExpr.hs | bsd-3-clause | plusRegSet = Set.union | 28 | plusRegSet = Set.union | 28 | plusRegSet = Set.union | 28 | false | false | 0 | 5 | 8 | 8 | 4 | 4 | null | null |
olsner/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | pprStmt (RecStmt { recS_stmts = segment, recS_rec_ids = rec_ids
, recS_later_ids = later_ids })
= text "rec" <+>
vcat [ ppr_do_stmts segment
, ifPprDebug (vcat [ text "rec_ids=" <> ppr rec_ids
, text "later_ids=" <> ppr later_ids])] | 292 | pprStmt (RecStmt { recS_stmts = segment, recS_rec_ids = rec_ids
, recS_later_ids = later_ids })
= text "rec" <+>
vcat [ ppr_do_stmts segment
, ifPprDebug (vcat [ text "rec_ids=" <> ppr rec_ids
, text "later_ids=" <> ppr later_ids])] | 292 | pprStmt (RecStmt { recS_stmts = segment, recS_rec_ids = rec_ids
, recS_later_ids = later_ids })
= text "rec" <+>
vcat [ ppr_do_stmts segment
, ifPprDebug (vcat [ text "rec_ids=" <> ppr rec_ids
, text "later_ids=" <> ppr later_ids])] | 292 | false | false | 0 | 13 | 96 | 87 | 44 | 43 | null | null |
thalerjonathan/phd | coding/libraries/chimera/src/FRP/Chimera/Simulation/Common.hs | gpl-3.0 | observableAgents :: [AgentId]
-> [AgentOut s m e]
-> [AgentObservable s]
observableAgents ais aos = foldl observableAgents [] (zip ais aos)
where
observableAgents :: [AgentObservable s]
-> (AgentId, AgentOut s m e)
-> [Age... | 493 | observableAgents :: [AgentId]
-> [AgentOut s m e]
-> [AgentObservable s]
observableAgents ais aos = foldl observableAgents [] (zip ais aos)
where
observableAgents :: [AgentObservable s]
-> (AgentId, AgentOut s m e)
-> [Age... | 493 | observableAgents ais aos = foldl observableAgents [] (zip ais aos)
where
observableAgents :: [AgentObservable s]
-> (AgentId, AgentOut s m e)
-> [AgentObservable s]
observableAgents acc (aid, ao)
| isJust mayObs = (aid, fromJust mayObs) : acc
... | 378 | false | true | 0 | 8 | 190 | 158 | 79 | 79 | null | null |
ulricha/dsh | src/Database/DSH/Tests/ComprehensionTests.hs | bsd-3-clause | hantijoin_range :: (BackendVector b, VectorLang v) => DSHAssertion (v TExpr TExpr) b
hantijoin_range = makeEqAssertion "hantijoin_range" C.antijoin_range res
where
res = [1, 3, 5, 6, 7] | 191 | hantijoin_range :: (BackendVector b, VectorLang v) => DSHAssertion (v TExpr TExpr) b
hantijoin_range = makeEqAssertion "hantijoin_range" C.antijoin_range res
where
res = [1, 3, 5, 6, 7] | 191 | hantijoin_range = makeEqAssertion "hantijoin_range" C.antijoin_range res
where
res = [1, 3, 5, 6, 7] | 106 | false | true | 0 | 8 | 31 | 71 | 38 | 33 | null | null |
energyflowanalysis/efa-2.1 | examples/advanced/vehicle/src/Main.hs | bsd-3-clause | sectionMapping :: [Sequ.List a] -> [Sequ.List a]
sectionMapping = map (Sequ.reIndex [8,11,13,14,18,32,37::Int]) | 111 | sectionMapping :: [Sequ.List a] -> [Sequ.List a]
sectionMapping = map (Sequ.reIndex [8,11,13,14,18,32,37::Int]) | 111 | sectionMapping = map (Sequ.reIndex [8,11,13,14,18,32,37::Int]) | 62 | false | true | 0 | 10 | 11 | 73 | 38 | 35 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.