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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
energyflowanalysis/efa-2.1 | examples/advanced/energy/src/Modules/Utility.hs | bsd-3-clause | getMaxEta = resolveInvalidPts nan snd4 | 38 | getMaxEta = resolveInvalidPts nan snd4 | 38 | getMaxEta = resolveInvalidPts nan snd4 | 38 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/ViolinsEnsemble.hs | bsd-3-clause | note40 :: Note
note40 = Note
(Pitch 1975.53 83 "b6")
41
(Range
(NoteRange
(NoteRangeAmplitude 9877.65 5 46.53)
(NoteRangeHarmonicFreq 1 1975.53))
(NoteRange
(NoteRangeAmplitude 1975.53 1 5959.0)
(NoteRangeHarmonicFreq 5 9877.65)))
[Harmonic... | 453 | note40 :: Note
note40 = Note
(Pitch 1975.53 83 "b6")
41
(Range
(NoteRange
(NoteRangeAmplitude 9877.65 5 46.53)
(NoteRangeHarmonicFreq 1 1975.53))
(NoteRange
(NoteRangeAmplitude 1975.53 1 5959.0)
(NoteRangeHarmonicFreq 5 9877.65)))
[Harmonic... | 453 | note40 = Note
(Pitch 1975.53 83 "b6")
41
(Range
(NoteRange
(NoteRangeAmplitude 9877.65 5 46.53)
(NoteRangeHarmonicFreq 1 1975.53))
(NoteRange
(NoteRangeAmplitude 1975.53 1 5959.0)
(NoteRangeHarmonicFreq 5 9877.65)))
[Harmonic 1 1.345 5959.0... | 438 | false | true | 0 | 10 | 143 | 148 | 73 | 75 | null | null |
tolysz/hs-tls | core/Network/TLS/Handshake/Client.hs | bsd-3-clause | expectChangeCipher p = unexpected (show p) (Just "change cipher") | 80 | expectChangeCipher p = unexpected (show p) (Just "change cipher") | 80 | expectChangeCipher p = unexpected (show p) (Just "change cipher") | 80 | false | false | 0 | 7 | 23 | 26 | 12 | 14 | null | null |
janschulz/pandoc | src/Text/Pandoc/Writers/Man.hs | gpl-2.0 | blockToMan opts (Plain inlines) =
liftM vcat $ mapM (inlineListToMan opts) $ splitSentences inlines | 101 | blockToMan opts (Plain inlines) =
liftM vcat $ mapM (inlineListToMan opts) $ splitSentences inlines | 101 | blockToMan opts (Plain inlines) =
liftM vcat $ mapM (inlineListToMan opts) $ splitSentences inlines | 101 | false | false | 2 | 7 | 15 | 43 | 18 | 25 | null | null |
rueshyna/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | A user-supplied object ID. If you specify an ID, it must be unique among
-- all pages and page elements in the presentation. The ID must start with
-- an alphanumeric character or an underscore (matches regex
-- \`[a-zA-Z0-9_]\`); remaining characters may include those as well as a
-- hyphen or colon (matches rege... | 587 | creObjectId :: Lens' CreateVideoRequest (Maybe Text)
creObjectId
= lens _creObjectId (\ s a -> s{_creObjectId = a}) | 117 | creObjectId
= lens _creObjectId (\ s a -> s{_creObjectId = a}) | 64 | true | true | 0 | 9 | 103 | 54 | 31 | 23 | null | null |
acowley/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | diffExpr top env (App f1 a1) (App f2 a2)
= diffExpr top env f1 f2 ++ diffExpr top env a1 a2 | 96 | diffExpr top env (App f1 a1) (App f2 a2)
= diffExpr top env f1 f2 ++ diffExpr top env a1 a2 | 96 | diffExpr top env (App f1 a1) (App f2 a2)
= diffExpr top env f1 f2 ++ diffExpr top env a1 a2 | 96 | false | false | 0 | 7 | 25 | 53 | 25 | 28 | null | null |
jystic/data-layout | src/Data/Layout/Language.hs | bsd-3-clause | size (Offset x xs) = x + size xs | 32 | size (Offset x xs) = x + size xs | 32 | size (Offset x xs) = x + size xs | 32 | false | false | 0 | 6 | 8 | 25 | 11 | 14 | null | null |
nevrenato/Hets_Fork | CMDL/Utils.hs | gpl-2.0 | spacesAroundArrows :: String -> String
spacesAroundArrows s = case s of
[] -> []
hd : tl -> case checkArrowLink $ trimLeft s of
Just (arr, rs) -> arr ++ spacesAroundArrows rs
Nothing -> hd : spacesAroundArrows tl
{- | Given a string the function decomposes it into 4 lists,
one for ... | 455 | spacesAroundArrows :: String -> String
spacesAroundArrows s = case s of
[] -> []
hd : tl -> case checkArrowLink $ trimLeft s of
Just (arr, rs) -> arr ++ spacesAroundArrows rs
Nothing -> hd : spacesAroundArrows tl
{- | Given a string the function decomposes it into 4 lists,
one for ... | 455 | spacesAroundArrows s = case s of
[] -> []
hd : tl -> case checkArrowLink $ trimLeft s of
Just (arr, rs) -> arr ++ spacesAroundArrows rs
Nothing -> hd : spacesAroundArrows tl
{- | Given a string the function decomposes it into 4 lists,
one for node goals, the other for edges, the th... | 416 | false | true | 0 | 12 | 120 | 89 | 44 | 45 | null | null |
siddhanathan/ghc | testsuite/tests/programs/andy_cherry/Interp.hs | bsd-3-clause | parseAlgMove (PieceTok Knight:r) Nothing = parsePieceMove r Knight | 67 | parseAlgMove (PieceTok Knight:r) Nothing = parsePieceMove r Knight | 67 | parseAlgMove (PieceTok Knight:r) Nothing = parsePieceMove r Knight | 67 | false | false | 1 | 7 | 8 | 27 | 12 | 15 | null | null |
sjakobi/stack | src/Stack/Types/PackageIdentifier.hs | bsd-3-clause | parsePackageIdentifierFromString :: MonadThrow m => String -> m PackageIdentifier
parsePackageIdentifierFromString =
parsePackageIdentifier . T.pack | 150 | parsePackageIdentifierFromString :: MonadThrow m => String -> m PackageIdentifier
parsePackageIdentifierFromString =
parsePackageIdentifier . T.pack | 150 | parsePackageIdentifierFromString =
parsePackageIdentifier . T.pack | 68 | false | true | 1 | 8 | 15 | 38 | 16 | 22 | null | null |
meiersi/bytestring-builder | Data/ByteString/Lazy/Builder/BasicEncoding/Internal/Floating.hs | bsd-3-clause | encodeDoubleViaWord64F :: FixedEncoding Word64 -> FixedEncoding Double
encodeDoubleViaWord64F w64fe
| size w64fe < sizeOf (undefined :: Float) =
error $ "encodeDoubleViaWord64F: encoding not wide enough"
| otherwise = fixedEncoding (size w64fe) $ \x op -> do
poke (castPtr op) x
x' <- peek (castPtr... | 347 | encodeDoubleViaWord64F :: FixedEncoding Word64 -> FixedEncoding Double
encodeDoubleViaWord64F w64fe
| size w64fe < sizeOf (undefined :: Float) =
error $ "encodeDoubleViaWord64F: encoding not wide enough"
| otherwise = fixedEncoding (size w64fe) $ \x op -> do
poke (castPtr op) x
x' <- peek (castPtr... | 347 | encodeDoubleViaWord64F w64fe
| size w64fe < sizeOf (undefined :: Float) =
error $ "encodeDoubleViaWord64F: encoding not wide enough"
| otherwise = fixedEncoding (size w64fe) $ \x op -> do
poke (castPtr op) x
x' <- peek (castPtr op)
runF w64fe x' op | 276 | false | true | 1 | 13 | 76 | 118 | 54 | 64 | null | null |
kawamuray/ganeti | src/Ganeti/OpCodes.hs | gpl-2.0 | opSummaryVal OpInstanceMove { opInstanceName = s } = Just s | 59 | opSummaryVal OpInstanceMove { opInstanceName = s } = Just s | 59 | opSummaryVal OpInstanceMove { opInstanceName = s } = Just s | 59 | false | false | 0 | 7 | 9 | 22 | 10 | 12 | null | null |
telser/numerals | src-test/Text/Numeral/Language/COD/TestData.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Test data
--------------------------------------------------------------------------------
{-
Sources:
http://www.languagesandnumbers.com/how-to-count-in-cocama/en/cod/
-}
cardinals ∷ (Num i) ⇒ TestData i
cardinals =
[ ( "default"... | 5,067 | cardinals ∷ (Num i) ⇒ TestData i
cardinals =
[ ( "default"
, defaultInflection
, [ (1, "huepe")
, (2, "mucuica")
, (3, "mutsapɨrɨca")
, (4, "iruaca")
, (5, "pichca")
, (6, "socta")
, (7, "cansi")
, (8, "pusa")
, (9, "iscun")
, (10, "chunga")
, (11, "... | 4,807 | cardinals =
[ ( "default"
, defaultInflection
, [ (1, "huepe")
, (2, "mucuica")
, (3, "mutsapɨrɨca")
, (4, "iruaca")
, (5, "pichca")
, (6, "socta")
, (7, "cansi")
, (8, "pusa")
, (9, "iscun")
, (10, "chunga")
, (11, "chunga huepe")
, (12, "chun... | 4,774 | true | true | 0 | 8 | 1,486 | 1,263 | 840 | 423 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/signum_1.hs | mit | primEqNat :: Nat -> Nat -> MyBool;
primEqNat Zero Zero = MyTrue | 67 | primEqNat :: Nat -> Nat -> MyBool
primEqNat Zero Zero = MyTrue | 66 | primEqNat Zero Zero = MyTrue | 28 | false | true | 1 | 8 | 15 | 32 | 14 | 18 | null | null |
kindohm/Tidal | Sound/Tidal/Strategies.hs | gpl-3.0 | triple = stutter 3 | 18 | triple = stutter 3 | 18 | triple = stutter 3 | 18 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
gencer/bond | compiler/src/Language/Bond/Codegen/TypeMapping.hs | mit | cppType (BT_Nullable element) = "::bond::nullable<" <>> elementTypeName element <<> ">" | 87 | cppType (BT_Nullable element) = "::bond::nullable<" <>> elementTypeName element <<> ">" | 87 | cppType (BT_Nullable element) = "::bond::nullable<" <>> elementTypeName element <<> ">" | 87 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
plclub/lngen | src/CoqLNOutputThmSubst.hs | mit | subst_subst :: ASTAnalysis -> [NtRoot] -> M String
subst_subst aaa nt1s =
do { thms <- processNt1Nt2Mv2' aaa nt1s thm
; names <- processNt1Nt2Mv2' aaa nt1s name
; types <- processNt1 aaa nt1s ntType
; let proof = repeat (mutPfStart Prop types ++ defaultSimp ++ ".")
; mutualLemm... | 4,344 | subst_subst :: ASTAnalysis -> [NtRoot] -> M String
subst_subst aaa nt1s =
do { thms <- processNt1Nt2Mv2' aaa nt1s thm
; names <- processNt1Nt2Mv2' aaa nt1s name
; types <- processNt1 aaa nt1s ntType
; let proof = repeat (mutPfStart Prop types ++ defaultSimp ++ ".")
; mutualLemm... | 4,344 | subst_subst aaa nt1s =
do { thms <- processNt1Nt2Mv2' aaa nt1s thm
; names <- processNt1Nt2Mv2' aaa nt1s name
; types <- processNt1 aaa nt1s ntType
; let proof = repeat (mutPfStart Prop types ++ defaultSimp ++ ".")
; mutualLemmaText2 Resolve NoRewrite NoHide [hintDb] Prop names... | 4,293 | false | true | 12 | 16 | 2,381 | 1,056 | 508 | 548 | null | null |
MgaMPKAy/language-sh | Language/Sh/Glob.hs | bsd-3-clause | match' :: Regex -> String -> Maybe String
match' regex s = listToMaybe =<< match regex s [] | 91 | match' :: Regex -> String -> Maybe String
match' regex s = listToMaybe =<< match regex s [] | 91 | match' regex s = listToMaybe =<< match regex s [] | 49 | false | true | 0 | 7 | 17 | 44 | 20 | 24 | null | null |
alexander-at-github/eta | compiler/ETA/Utils/Pretty.hs | bsd-3-clause | layLeft b Empty = bPutChar b '\n' | 46 | layLeft b Empty = bPutChar b '\n' | 46 | layLeft b Empty = bPutChar b '\n' | 46 | false | false | 1 | 5 | 19 | 20 | 7 | 13 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCastList_QBrush x = qcl_QBrush [] x | 36 | qCastList_QBrush x = qcl_QBrush [] x | 36 | qCastList_QBrush x = qcl_QBrush [] x | 36 | false | false | 1 | 6 | 5 | 19 | 7 | 12 | null | null |
matthewleon/libmpd-haskell | src/Network/MPD/Applicative/CurrentPlaylist.hs | mit | -- | Specify portion of song that shall be played.
-- Both ends of the range are optional; omitting both plays everything.
rangeId :: Id -> (Maybe Double, Maybe Double) -> Command ()
rangeId id' (mbStart, mbEnd) = Command emptyResponse ["rangeid " ++ show id' ++ " " ++ arg ]
where arg = maybe "" show mbStart ++ ":" +... | 341 | rangeId :: Id -> (Maybe Double, Maybe Double) -> Command ()
rangeId id' (mbStart, mbEnd) = Command emptyResponse ["rangeid " ++ show id' ++ " " ++ arg ]
where arg = maybe "" show mbStart ++ ":" ++ maybe "" show mbEnd | 218 | rangeId id' (mbStart, mbEnd) = Command emptyResponse ["rangeid " ++ show id' ++ " " ++ arg ]
where arg = maybe "" show mbStart ++ ":" ++ maybe "" show mbEnd | 158 | true | true | 0 | 10 | 66 | 102 | 51 | 51 | null | null |
d0kt0r0/estuary | client/src/Estuary/Help/MiniTidal.hs | gpl-3.0 | referenceText "irand" = " is similar to rand, but generates a continuous oscillator of (pseudo-)random integers between 0 to n-1 inclusive. Notably used to pick random samples from a folder." | 191 | referenceText "irand" = " is similar to rand, but generates a continuous oscillator of (pseudo-)random integers between 0 to n-1 inclusive. Notably used to pick random samples from a folder." | 191 | referenceText "irand" = " is similar to rand, but generates a continuous oscillator of (pseudo-)random integers between 0 to n-1 inclusive. Notably used to pick random samples from a folder." | 191 | false | false | 0 | 5 | 29 | 9 | 4 | 5 | null | null |
svalaskevicius/hob | test/Hob/Command/FocusCommandEntrySpec.hs | gpl-3.0 | toggleFocusOnCommandEntryAndReturnState :: Context -> IO Bool
toggleFocusOnCommandEntryAndReturnState ctx = do
runCtxActions ctx $ commandExecute toggleFocusOnCommandEntryCommandHandler
widgetGetIsFocus $ HC.commandEntry . uiContext $ ctx | 246 | toggleFocusOnCommandEntryAndReturnState :: Context -> IO Bool
toggleFocusOnCommandEntryAndReturnState ctx = do
runCtxActions ctx $ commandExecute toggleFocusOnCommandEntryCommandHandler
widgetGetIsFocus $ HC.commandEntry . uiContext $ ctx | 246 | toggleFocusOnCommandEntryAndReturnState ctx = do
runCtxActions ctx $ commandExecute toggleFocusOnCommandEntryCommandHandler
widgetGetIsFocus $ HC.commandEntry . uiContext $ ctx | 184 | false | true | 0 | 10 | 29 | 51 | 23 | 28 | null | null |
yliu120/K3 | src/Language/K3/Core/Declaration.hs | apache-2.0 | drawDeclAnnotations :: [Annotation Declaration] -> (String, [String])
drawDeclAnnotations as =
let (prettyAnns, anns) = partition (\a -> isDProvenance a || isDEffect a) as
prettyDeclAnns = drawGroup $ map drawDAnnotation prettyAnns
in (drawAnnotations anns, prettyDeclAnns)
where drawDAnnotation (DProv... | 569 | drawDeclAnnotations :: [Annotation Declaration] -> (String, [String])
drawDeclAnnotations as =
let (prettyAnns, anns) = partition (\a -> isDProvenance a || isDEffect a) as
prettyDeclAnns = drawGroup $ map drawDAnnotation prettyAnns
in (drawAnnotations anns, prettyDeclAnns)
where drawDAnnotation (DProv... | 569 | drawDeclAnnotations as =
let (prettyAnns, anns) = partition (\a -> isDProvenance a || isDEffect a) as
prettyDeclAnns = drawGroup $ map drawDAnnotation prettyAnns
in (drawAnnotations anns, prettyDeclAnns)
where drawDAnnotation (DProvenance p) = ["DProvenance "] %+ either prettyLines prettyLines p
... | 499 | false | true | 0 | 13 | 111 | 177 | 86 | 91 | null | null |
brendanhay/gogol | gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs | mpl-2.0 | -- | Target ops read per seconds.
duTargetReadOpsPerSecond :: Lens' DiskUtilization (Maybe Int32)
duTargetReadOpsPerSecond
= lens _duTargetReadOpsPerSecond
(\ s a -> s{_duTargetReadOpsPerSecond = a})
. mapping _Coerce | 231 | duTargetReadOpsPerSecond :: Lens' DiskUtilization (Maybe Int32)
duTargetReadOpsPerSecond
= lens _duTargetReadOpsPerSecond
(\ s a -> s{_duTargetReadOpsPerSecond = a})
. mapping _Coerce | 197 | duTargetReadOpsPerSecond
= lens _duTargetReadOpsPerSecond
(\ s a -> s{_duTargetReadOpsPerSecond = a})
. mapping _Coerce | 133 | true | true | 2 | 8 | 40 | 59 | 28 | 31 | null | null |
geraldus/transient-universe | tests/Test.hs | mit | exampleItem :: Item
exampleItem = Item 0 "example item" | 56 | exampleItem :: Item
exampleItem = Item 0 "example item" | 55 | exampleItem = Item 0 "example item" | 35 | false | true | 0 | 6 | 9 | 24 | 9 | 15 | null | null |
aaronc/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectRawQuote unq (RApp f x) =
reflCall "RApp" [reflectRawQuote unq f, reflectRawQuote unq x] | 97 | reflectRawQuote unq (RApp f x) =
reflCall "RApp" [reflectRawQuote unq f, reflectRawQuote unq x] | 97 | reflectRawQuote unq (RApp f x) =
reflCall "RApp" [reflectRawQuote unq f, reflectRawQuote unq x] | 97 | false | false | 0 | 6 | 15 | 43 | 19 | 24 | null | null |
aleksj/lamdu | Lamdu/Sugar/AddNames.hs | gpl-3.0 | makeGuidName :: Show guid => String -> guid -> Name
makeGuidName prefix guid = Name AutoGeneratedName NoCollision $ prefix ++ show guid | 135 | makeGuidName :: Show guid => String -> guid -> Name
makeGuidName prefix guid = Name AutoGeneratedName NoCollision $ prefix ++ show guid | 135 | makeGuidName prefix guid = Name AutoGeneratedName NoCollision $ prefix ++ show guid | 83 | false | true | 0 | 7 | 21 | 47 | 22 | 25 | null | null |
polarina/sdl2 | Graphics/UI/SDL/Video.hs | bsd-3-clause | createWindowFrom :: MonadIO m => Ptr () -> m Window
createWindowFrom v1 = liftIO $ createWindowFrom' v1 | 103 | createWindowFrom :: MonadIO m => Ptr () -> m Window
createWindowFrom v1 = liftIO $ createWindowFrom' v1 | 103 | createWindowFrom v1 = liftIO $ createWindowFrom' v1 | 51 | false | true | 0 | 8 | 16 | 40 | 18 | 22 | null | null |
ComputationWithBoundedResources/tct-jbc | src/Tct/Jbc/Processor/ToTrs.hs | bsd-3-clause | toString :: [RT.Rule J.PAFun J.PAVar] -> [RT.Rule String String]
toString = map (\(RT.Rule l r) -> RT.Rule (toString' l) (toString' r))
where
toString' (RT.Fun f fs) = RT.Fun (fos f) (toString' `fmap` fs)
toString' (RT.Var v) = RT.Var (vos v)
fos f = case f of
J.UFun s -> s
J.IConst ... | 882 | toString :: [RT.Rule J.PAFun J.PAVar] -> [RT.Rule String String]
toString = map (\(RT.Rule l r) -> RT.Rule (toString' l) (toString' r))
where
toString' (RT.Fun f fs) = RT.Fun (fos f) (toString' `fmap` fs)
toString' (RT.Var v) = RT.Var (vos v)
fos f = case f of
J.UFun s -> s
J.IConst ... | 882 | toString = map (\(RT.Rule l r) -> RT.Rule (toString' l) (toString' r))
where
toString' (RT.Fun f fs) = RT.Fun (fos f) (toString' `fmap` fs)
toString' (RT.Var v) = RT.Var (vos v)
fos f = case f of
J.UFun s -> s
J.IConst i -> '@' :show i
J.BConst True -> "@true"
J.BCon... | 817 | false | true | 0 | 10 | 388 | 380 | 185 | 195 | null | null |
relrod/ba | src/Bio/Algorithm/Types.hs | bsd-2-clause | lazyTextDNA :: Prism' TL.Text DNA
lazyTextDNA = prism' (\(DNA tl) -> tl) toDNA
where
toDNA s =
if TL.length (TL.filter isDNAChar s) == TL.length s
then Just (DNA s)
else Nothing | 201 | lazyTextDNA :: Prism' TL.Text DNA
lazyTextDNA = prism' (\(DNA tl) -> tl) toDNA
where
toDNA s =
if TL.length (TL.filter isDNAChar s) == TL.length s
then Just (DNA s)
else Nothing | 201 | lazyTextDNA = prism' (\(DNA tl) -> tl) toDNA
where
toDNA s =
if TL.length (TL.filter isDNAChar s) == TL.length s
then Just (DNA s)
else Nothing | 167 | false | true | 2 | 10 | 54 | 98 | 44 | 54 | null | null |
egaburov/funstuff | Haskell/tytag/codes/PushNegF.hs | apache-2.0 | -- "((-8) + (1 + 2))"
tf1n_norm_eval = eval tf1n_norm | 53 | tf1n_norm_eval = eval tf1n_norm | 31 | tf1n_norm_eval = eval tf1n_norm | 31 | true | false | 0 | 5 | 9 | 10 | 5 | 5 | null | null |
dblia/nosql-ganeti | src/Ganeti/Types.hs | gpl-2.0 | -- | Format a submit priority as string.
fmtSubmitPriority :: OpSubmitPriority -> String
fmtSubmitPriority OpPrioLow = "low" | 127 | fmtSubmitPriority :: OpSubmitPriority -> String
fmtSubmitPriority OpPrioLow = "low" | 86 | fmtSubmitPriority OpPrioLow = "low" | 38 | true | true | 0 | 5 | 19 | 19 | 10 | 9 | null | null |
randen/cabal | Cabal/Distribution/Simple/Register.hs | bsd-3-clause | relocRegistrationInfo :: Verbosity
-> PackageDescription
-> Library
-> LocalBuildInfo
-> ComponentLocalBuildInfo
-> AbiHash
-> PackageDB
-> IO InstalledPackageInfo
re... | 714 | relocRegistrationInfo :: Verbosity
-> PackageDescription
-> Library
-> LocalBuildInfo
-> ComponentLocalBuildInfo
-> AbiHash
-> PackageDB
-> IO InstalledPackageInfo
re... | 714 | relocRegistrationInfo verbosity pkg lib lbi clbi abi_hash packageDb =
case (compilerFlavor (compiler lbi)) of
GHC -> do fs <- GHC.pkgRoot verbosity lbi packageDb
return (relocatableInstalledPackageInfo
pkg abi_hash lib lbi clbi fs)
_ -> die "Distribution.Simple.Register... | 396 | false | true | 0 | 13 | 277 | 130 | 61 | 69 | null | null |
ml9951/ghc | libraries/pastm/Control/Partial/STM.hs | bsd-3-clause | -- |Retry execution of the current memory transaction because it has seen
-- values in TVars which mean that it should not continue (e.g. the TVars
-- represent a shared buffer that is now empty). The implementation may
-- block the thread until one of the TVars that it has read from has been
-- udpated. (GHC only)
re... | 370 | retry :: STM a
retry = STM $ \c -> \s# -> pretry# s# | 52 | retry = STM $ \c -> \s# -> pretry# s# | 37 | true | true | 3 | 7 | 72 | 40 | 21 | 19 | null | null |
ford-prefect/xml2ucm | src/UCM.hs | apache-2.0 | getDisableSeq :: Config -> Device -> Sequence
getDisableSeq (Config _ _ (Sequence _ defaults)) (Device _ _ _ _ pVol cVol _ (Sequence ctl cmds) _ _) =
Sequence ctl (cmds ++ maybeDisableVolume pVol ++ maybeDisableVolume cVol)
where
maybeDisableVolume v = maybeToList $ find (findVolume v) defaults
findVolume v... | 402 | getDisableSeq :: Config -> Device -> Sequence
getDisableSeq (Config _ _ (Sequence _ defaults)) (Device _ _ _ _ pVol cVol _ (Sequence ctl cmds) _ _) =
Sequence ctl (cmds ++ maybeDisableVolume pVol ++ maybeDisableVolume cVol)
where
maybeDisableVolume v = maybeToList $ find (findVolume v) defaults
findVolume v... | 402 | getDisableSeq (Config _ _ (Sequence _ defaults)) (Device _ _ _ _ pVol cVol _ (Sequence ctl cmds) _ _) =
Sequence ctl (cmds ++ maybeDisableVolume pVol ++ maybeDisableVolume cVol)
where
maybeDisableVolume v = maybeToList $ find (findVolume v) defaults
findVolume v (CSet name _ _) = (v ++ " Volume") == name
... | 356 | false | true | 2 | 9 | 92 | 163 | 80 | 83 | null | null |
nevrenato/Hets_Fork | Comorphisms/Prop2CommonLogic.hs | gpl-2.0 | translate :: PBasic.FORMULA -> TEXT_META
translate f =
emptyTextMeta {
getText = Text [Sentence singletonUniv, Sentence $ toSen f] nullRange
}
where singletonUniv = Quant_sent (Universal [Name xName, Name yName]
$ Atom_sent (Equation (Name_term xName) (Name_term yName)) nullRange
) n... | 328 | translate :: PBasic.FORMULA -> TEXT_META
translate f =
emptyTextMeta {
getText = Text [Sentence singletonUniv, Sentence $ toSen f] nullRange
}
where singletonUniv = Quant_sent (Universal [Name xName, Name yName]
$ Atom_sent (Equation (Name_term xName) (Name_term yName)) nullRange
) n... | 328 | translate f =
emptyTextMeta {
getText = Text [Sentence singletonUniv, Sentence $ toSen f] nullRange
}
where singletonUniv = Quant_sent (Universal [Name xName, Name yName]
$ Atom_sent (Equation (Name_term xName) (Name_term yName)) nullRange
) nullRange | 287 | false | true | 0 | 12 | 75 | 109 | 54 | 55 | null | null |
paolino/hiernotify | System/Hiernotify/Controller.hs | bsd-3-clause | mkNotifier :: Int64 -- the silence time lapse in seconds to respect before notifying
-> Controller -- the implementation for the listener
-> IO Notifier -- a fresh, running Notifier using the given Controller
mkNotifier s (Controller ps0 nd0) = do
ermes <- newTVarIO (mempty,ps0) -... | 2,158 | mkNotifier :: Int64 -- the silence time lapse in seconds to respect before notifying
-> Controller -- the implementation for the listener
-> IO Notifier
mkNotifier s (Controller ps0 nd0) = do
ermes <- newTVarIO (mempty,ps0) -- last diff and relative paths
timer <- newTVarIO Nothi... | 2,101 | mkNotifier s (Controller ps0 nd0) = do
ermes <- newTVarIO (mempty,ps0) -- last diff and relative paths
timer <- newTVarIO Nothing -- timer
let delta = s * 10 ^ (6 :: Int) -- silence in microseconds
-- this waits until conditions release a new diff
let comunicate = atomically $ do
readTVar timer >>= m... | 1,912 | true | true | 0 | 21 | 557 | 418 | 207 | 211 | null | null |
Mr-Click/PFQ | user/Haskell/test/test-dispatch.hs | gpl-2.0 | recvDispatch :: Ptr PFqTag -> IO()
recvDispatch q = do
Q.dispatch q handler 1000
-- cs <- Q.getGroupId q >>= Q.getGroupCounters q
-- print cs
recvDispatch q | 188 | recvDispatch :: Ptr PFqTag -> IO()
recvDispatch q = do
Q.dispatch q handler 1000
-- cs <- Q.getGroupId q >>= Q.getGroupCounters q
-- print cs
recvDispatch q | 188 | recvDispatch q = do
Q.dispatch q handler 1000
-- cs <- Q.getGroupId q >>= Q.getGroupCounters q
-- print cs
recvDispatch q | 153 | false | true | 0 | 8 | 58 | 46 | 21 | 25 | null | null |
NicolasDP/hs-smtp | Network/SMTP/Parser.hs | bsd-3-clause | parseESMTPKeyWord :: Parser ESMTPKeyWord
parseESMTPKeyWord = parserTakeWhile $ \c -> isAlphaNum c || c == '-' | 109 | parseESMTPKeyWord :: Parser ESMTPKeyWord
parseESMTPKeyWord = parserTakeWhile $ \c -> isAlphaNum c || c == '-' | 109 | parseESMTPKeyWord = parserTakeWhile $ \c -> isAlphaNum c || c == '-' | 68 | false | true | 0 | 9 | 15 | 34 | 17 | 17 | null | null |
mariefarrell/Hets | CspCASLProver/CspProverConsts.hs | gpl-2.0 | cspProver_external_prefix_choiceAltOpPrio :: Int
cspProver_external_prefix_choiceAltOpPrio = 80 | 95 | cspProver_external_prefix_choiceAltOpPrio :: Int
cspProver_external_prefix_choiceAltOpPrio = 80 | 95 | cspProver_external_prefix_choiceAltOpPrio = 80 | 46 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
asm-products/ledger-backend | library/Ledger/Application/Middleware.hs | agpl-3.0 | policy :: CorsResourcePolicy
policy = simpleCorsResourcePolicy
{ corsMethods = map renderStdMethod [minBound .. maxBound]
, corsRequestHeaders = [hContentType, "Origin"]
} | 183 | policy :: CorsResourcePolicy
policy = simpleCorsResourcePolicy
{ corsMethods = map renderStdMethod [minBound .. maxBound]
, corsRequestHeaders = [hContentType, "Origin"]
} | 183 | policy = simpleCorsResourcePolicy
{ corsMethods = map renderStdMethod [minBound .. maxBound]
, corsRequestHeaders = [hContentType, "Origin"]
} | 154 | false | true | 0 | 9 | 31 | 52 | 27 | 25 | null | null |
yobiya/jcc | json.hs | mit | removeWhiteSpace ('\t':xs) = removeWhiteSpace xs | 49 | removeWhiteSpace ('\t':xs) = removeWhiteSpace xs | 49 | removeWhiteSpace ('\t':xs) = removeWhiteSpace xs | 49 | false | false | 0 | 7 | 5 | 19 | 9 | 10 | null | null |
rumblesan/proviz | src/Windowing.hs | bsd-3-clause | screenSize :: GLFW.VideoMode -> (Int, Int)
screenSize videoMode =
(GLFW.videoModeWidth videoMode, GLFW.videoModeHeight videoMode) | 131 | screenSize :: GLFW.VideoMode -> (Int, Int)
screenSize videoMode =
(GLFW.videoModeWidth videoMode, GLFW.videoModeHeight videoMode) | 131 | screenSize videoMode =
(GLFW.videoModeWidth videoMode, GLFW.videoModeHeight videoMode) | 88 | false | true | 0 | 7 | 14 | 42 | 22 | 20 | null | null |
typelead/epm | epm/tests/PackageTests/PackageTester.hs | bsd-3-clause | assertSandboxSucceeded :: Result -> Assertion
assertSandboxSucceeded result = unless (successful result) $
assertFailure $
"expected: \'cabal sandbox\' should succeed\n" ++
" output: " ++ outputText result | 218 | assertSandboxSucceeded :: Result -> Assertion
assertSandboxSucceeded result = unless (successful result) $
assertFailure $
"expected: \'cabal sandbox\' should succeed\n" ++
" output: " ++ outputText result | 218 | assertSandboxSucceeded result = unless (successful result) $
assertFailure $
"expected: \'cabal sandbox\' should succeed\n" ++
" output: " ++ outputText result | 172 | false | true | 0 | 11 | 38 | 46 | 22 | 24 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Element.hs | mit | uiElementGetClipBorder :: (Parent UIElement a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to UI element
-> m IntRect
uiElementGetClipBorder p = liftIO $ do
let ptr = parentPointer p
peek =<< [C.exp| const IntRect* { &$(UIElement* ptr)->GetClipBorder() } |]
-- | Return priority. | 286 | uiElementGetClipBorder :: (Parent UIElement a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to UI element
-> m IntRect
uiElementGetClipBorder p = liftIO $ do
let ptr = parentPointer p
peek =<< [C.exp| const IntRect* { &$(UIElement* ptr)->GetClipBorder() } |]
-- | Return priority. | 286 | uiElementGetClipBorder p = liftIO $ do
let ptr = parentPointer p
peek =<< [C.exp| const IntRect* { &$(UIElement* ptr)->GetClipBorder() } |]
-- | Return priority. | 166 | false | true | 0 | 11 | 54 | 82 | 41 | 41 | null | null |
Fedjmike/ngen | english.hs | gpl-3.0 | isVowel c = c `elem` "aeiou" | 28 | isVowel c = c `elem` "aeiou" | 28 | isVowel c = c `elem` "aeiou" | 28 | false | false | 0 | 5 | 5 | 15 | 8 | 7 | null | null |
cies/gelatin | gelatin-gl/src/Gelatin/GL/Shader.hs | bsd-3-clause | loadShader (ShaderDefFP fps uniforms attribs) = do
cwd <- getCurrentDirectory
srcs <- forM fps $ \(fp, shaderType) -> do
src <- B.readFile $ cwd ++ "/" ++ fp
return (src, shaderType)
loadShader $ ShaderDefBS srcs uniforms attribs
--------------------------------------------------------------... | 440 | loadShader (ShaderDefFP fps uniforms attribs) = do
cwd <- getCurrentDirectory
srcs <- forM fps $ \(fp, shaderType) -> do
src <- B.readFile $ cwd ++ "/" ++ fp
return (src, shaderType)
loadShader $ ShaderDefBS srcs uniforms attribs
--------------------------------------------------------------... | 440 | loadShader (ShaderDefFP fps uniforms attribs) = do
cwd <- getCurrentDirectory
srcs <- forM fps $ \(fp, shaderType) -> do
src <- B.readFile $ cwd ++ "/" ++ fp
return (src, shaderType)
loadShader $ ShaderDefBS srcs uniforms attribs
--------------------------------------------------------------... | 440 | false | false | 0 | 16 | 69 | 101 | 50 | 51 | null | null |
rueshyna/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/GrouplicenseUsers/List.hs | mpl-2.0 | -- | The ID of the product the group license is for, e.g.
-- \"app:com.google.android.gm\".
gulGroupLicenseId :: Lens' GrouplicenseUsersList Text
gulGroupLicenseId
= lens _gulGroupLicenseId
(\ s a -> s{_gulGroupLicenseId = a}) | 234 | gulGroupLicenseId :: Lens' GrouplicenseUsersList Text
gulGroupLicenseId
= lens _gulGroupLicenseId
(\ s a -> s{_gulGroupLicenseId = a}) | 142 | gulGroupLicenseId
= lens _gulGroupLicenseId
(\ s a -> s{_gulGroupLicenseId = a}) | 88 | true | true | 0 | 9 | 38 | 43 | 23 | 20 | null | null |
scottgw/language-eiffel | Language/Eiffel/PrettyPrint.hs | bsd-3-clause | toInterfaceDoc :: ClasInterface -> Doc
toInterfaceDoc = toDocWith True interfaceBodyDoc | 87 | toInterfaceDoc :: ClasInterface -> Doc
toInterfaceDoc = toDocWith True interfaceBodyDoc | 87 | toInterfaceDoc = toDocWith True interfaceBodyDoc | 48 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
ihc/futhark | src/Futhark/Representation/Primitive.hs | isc | commutativeBinOp And{} = True | 29 | commutativeBinOp And{} = True | 29 | commutativeBinOp And{} = True | 29 | false | false | 0 | 6 | 3 | 13 | 6 | 7 | null | null |
gsdlab/clafer | src/Language/Clafer/Intermediate/Desugarer.hs | mit | sugarAssertion :: PExp -> Assertion
sugarAssertion pexp = Assertion (_inPos pexp) $ map sugarExp [pexp] | 103 | sugarAssertion :: PExp -> Assertion
sugarAssertion pexp = Assertion (_inPos pexp) $ map sugarExp [pexp] | 103 | sugarAssertion pexp = Assertion (_inPos pexp) $ map sugarExp [pexp] | 67 | false | true | 0 | 8 | 14 | 39 | 19 | 20 | null | null |
glutamate/probably | Math/Probably/RandIO.hs | bsd-3-clause | runAdaMetRIOInterleaveInitial :: Int -> Bool -> L.Matrix Double -> AMPar -> PDF.PDF (L.Vector Double) -> RIO [L.Vector Double]
runAdaMetRIOInterleaveInitial n freeze cov ampar pdf = do
seed <- S.get
(nseed, xs) <- io $ go n seed ampar []
S.put nseed
return xs
where go 0 s amp vs = do print $ amp
... | 759 | runAdaMetRIOInterleaveInitial :: Int -> Bool -> L.Matrix Double -> AMPar -> PDF.PDF (L.Vector Double) -> RIO [L.Vector Double]
runAdaMetRIOInterleaveInitial n freeze cov ampar pdf = do
seed <- S.get
(nseed, xs) <- io $ go n seed ampar []
S.put nseed
return xs
where go 0 s amp vs = do print $ amp
... | 759 | runAdaMetRIOInterleaveInitial n freeze cov ampar pdf = do
seed <- S.get
(nseed, xs) <- io $ go n seed ampar []
S.put nseed
return xs
where go 0 s amp vs = do print $ amp
return (s, vs)
go nn s amp vs = do let (!ampn, !ns) = unSam (adaMetInterleaveInitial fre... | 632 | false | true | 0 | 18 | 276 | 319 | 157 | 162 | null | null |
katydid/haslapse | src/Data/Katydid/Relapse/Exprs.hs | bsd-3-clause | constToVar :: AnyExpr -> AnyExpr
constToVar (AnyExpr _ (BoolFunc _)) = mkBoolExpr varBoolExpr | 95 | constToVar :: AnyExpr -> AnyExpr
constToVar (AnyExpr _ (BoolFunc _)) = mkBoolExpr varBoolExpr | 95 | constToVar (AnyExpr _ (BoolFunc _)) = mkBoolExpr varBoolExpr | 62 | false | true | 0 | 9 | 14 | 35 | 17 | 18 | null | null |
shlevy/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (HsSpliceE s) = pprSplice s | 44 | ppr_expr (HsSpliceE s) = pprSplice s | 44 | ppr_expr (HsSpliceE s) = pprSplice s | 44 | false | false | 0 | 7 | 13 | 18 | 8 | 10 | null | null |
dalaing/sdl2 | src/SDL/Video/Renderer.hs | bsd-3-clause | textureColorMod :: Texture -> StateVar (V3 Word8)
textureColorMod (Texture t) = makeStateVar getTextureColorMod setTextureColorMod
where
getTextureColorMod = liftIO $
alloca $ \r ->
alloca $ \g ->
alloca $ \b -> do
throwIfNeg_ "SDL.Video.Renderer.getTextureColorMod" "SDL_GetTextureColorMod" $
... | 549 | textureColorMod :: Texture -> StateVar (V3 Word8)
textureColorMod (Texture t) = makeStateVar getTextureColorMod setTextureColorMod
where
getTextureColorMod = liftIO $
alloca $ \r ->
alloca $ \g ->
alloca $ \b -> do
throwIfNeg_ "SDL.Video.Renderer.getTextureColorMod" "SDL_GetTextureColorMod" $
... | 549 | textureColorMod (Texture t) = makeStateVar getTextureColorMod setTextureColorMod
where
getTextureColorMod = liftIO $
alloca $ \r ->
alloca $ \g ->
alloca $ \b -> do
throwIfNeg_ "SDL.Video.Renderer.getTextureColorMod" "SDL_GetTextureColorMod" $
Raw.getTextureColorMod t r g b
V3 <$> pe... | 499 | false | true | 6 | 11 | 112 | 165 | 77 | 88 | null | null |
TomMD/ghc | compiler/cmm/PprC.hs | bsd-3-clause | is_cishCC CApiConv = True | 29 | is_cishCC CApiConv = True | 29 | is_cishCC CApiConv = True | 29 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
MostAwesomeDude/lollerskates | Lol/Constraints.hs | bsd-2-clause | bestItem :: Comparator -> [Item] -> Item
bestItem attr = maximumBy' (comparing (getL attr . itemStats)) | 103 | bestItem :: Comparator -> [Item] -> Item
bestItem attr = maximumBy' (comparing (getL attr . itemStats)) | 103 | bestItem attr = maximumBy' (comparing (getL attr . itemStats)) | 62 | false | true | 0 | 10 | 15 | 44 | 22 | 22 | null | null |
csabahruska/quake3 | game-engine/GameEngine/Utils.hs | bsd-3-clause | vec3ToV3F :: Vec3 -> V3F
vec3ToV3F (Vec3 x y z) = V3 x y z | 58 | vec3ToV3F :: Vec3 -> V3F
vec3ToV3F (Vec3 x y z) = V3 x y z | 58 | vec3ToV3F (Vec3 x y z) = V3 x y z | 33 | false | true | 0 | 9 | 14 | 41 | 18 | 23 | null | null |
eugenkiss/loopgotowhile | src/Language/LoopGotoWhile/Goto/Transform.hs | bsd-3-clause | toStrictStat' (If (BOp "&&" a b) stat1 Nothing) = toStrictStat' $
If a (If b stat1 Nothing) Nothing | 103 | toStrictStat' (If (BOp "&&" a b) stat1 Nothing) = toStrictStat' $
If a (If b stat1 Nothing) Nothing | 103 | toStrictStat' (If (BOp "&&" a b) stat1 Nothing) = toStrictStat' $
If a (If b stat1 Nothing) Nothing | 103 | false | false | 0 | 9 | 21 | 51 | 24 | 27 | null | null |
kmate/raw-feldspar | src/Feldspar/Data/Queue.hs | bsd-3-clause | -- Another option would be to represent a queue as its state (the counter and
-- the array), but the above representation leaves room for other
-- implementations.
-- | Create a new cyclic queue using an existing array as buffer. The length of
-- the array determines the queue size.
initQueueFromBuffer :: forall m a .... | 1,172 | initQueueFromBuffer :: forall m a . (Syntax a, MonadComp m) =>
Arr a -> m (Queue a)
initQueueFromBuffer buf = do
ir <- initRef 0
let indexQ :: forall m2 . MonadComp m2 => Data Index -> m2 a
indexQ j = do
i <- unsafeFreezeRef ir
getArr buf $ calcIndex i j
putQ :: forall m2... | 887 | initQueueFromBuffer buf = do
ir <- initRef 0
let indexQ :: forall m2 . MonadComp m2 => Data Index -> m2 a
indexQ j = do
i <- unsafeFreezeRef ir
getArr buf $ calcIndex i j
putQ :: forall m2 . MonadComp m2 => a -> m2 ()
putQ a = do
i <- unsafeFreezeRef ir
... | 799 | true | true | 2 | 16 | 354 | 374 | 179 | 195 | null | null |
vrom911/hs-init | summoner-tui/src/Summoner/Tui/Field.hs | mit | -- | A form field with a given text value which can not be modified or changed
-- via any events. It is always valid.
strField :: forall s e n . String -> s -> FormFieldState s e n
strField t _ = FormFieldState
{ formFieldState = ()
, formFieldLens = fakeLens
, formFields = []
, formFieldRenderHelper = ... | 666 | strField :: forall s e n . String -> s -> FormFieldState s e n
strField t _ = FormFieldState
{ formFieldState = ()
, formFieldLens = fakeLens
, formFields = []
, formFieldRenderHelper = renderString
, formFieldConcat = vBox
, formFieldUpdate = flip const
}
where
-- looool
fakeLens ... | 548 | strField t _ = FormFieldState
{ formFieldState = ()
, formFieldLens = fakeLens
, formFields = []
, formFieldRenderHelper = renderString
, formFieldConcat = vBox
, formFieldUpdate = flip const
}
where
-- looool
fakeLens :: Lens' s ()
fakeLens = lens (const ()) (\s () -> s)
... | 485 | true | true | 1 | 8 | 172 | 177 | 92 | 85 | null | null |
jBugman/explore | process-haskell/test/doctest.hs | mit | main = doctest ["-isrc", "src/Process.hs"] | 42 | main = doctest ["-isrc", "src/Process.hs"] | 42 | main = doctest ["-isrc", "src/Process.hs"] | 42 | false | false | 1 | 5 | 4 | 18 | 8 | 10 | null | null |
phadej/tsatti | Tsatti.hs | mit | lookupClient :: Text -> ServerState -> Maybe Client
lookupClient nick = find ((==nick) . clientNick) | 100 | lookupClient :: Text -> ServerState -> Maybe Client
lookupClient nick = find ((==nick) . clientNick) | 100 | lookupClient nick = find ((==nick) . clientNick) | 48 | false | true | 0 | 8 | 14 | 39 | 20 | 19 | null | null |
Mahdi89/eTeak | src/Teak.hs | bsd-3-clause | makeVar :: NetworkIF network => [TeakOption] -> Pos -> Ref -> Int -> String -> [Int] ->
WhyT (NetworkMonad network) ()
makeVar opts pos ref width name builtinOffsets = do
access <- lift $ nwRemoveAccess (InstanceAccess ref)
let
breakOnWrite = findBoolSubOption opts TeakBreakVaria... | 3,378 | makeVar :: NetworkIF network => [TeakOption] -> Pos -> Ref -> Int -> String -> [Int] ->
WhyT (NetworkMonad network) ()
makeVar opts pos ref width name builtinOffsets = do
access <- lift $ nwRemoveAccess (InstanceAccess ref)
let
breakOnWrite = findBoolSubOption opts TeakBreakVariables... | 3,374 | makeVar opts pos ref width name builtinOffsets = do
access <- lift $ nwRemoveAccess (InstanceAccess ref)
let
breakOnWrite = findBoolSubOption opts TeakBreakVariablesOnWrite
sepRw (ws, rs) access@(VarAccess Read _ _ _) = (ws, access:rs)
sepRw (ws, rs) access@(VarAcces... | 3,247 | false | true | 1 | 19 | 1,249 | 921 | 453 | 468 | null | null |
FranklinChen/Ebnf2ps | src/ParseAux.hs | bsd-3-clause | yaccRules ('%':'{':cs) = yaccRules (dropCSyntax cs) | 52 | yaccRules ('%':'{':cs) = yaccRules (dropCSyntax cs) | 52 | yaccRules ('%':'{':cs) = yaccRules (dropCSyntax cs) | 52 | false | false | 0 | 8 | 6 | 29 | 14 | 15 | null | null |
mcmaniac/ghc | compiler/vectorise/Vectorise/Monad/Global.hs | bsd-3-clause | -- Vars -----------------------------------------------------------------------
-- |Add a mapping between a global var and its vectorised version to the state.
--
defGlobalVar :: Var -> Var -> VM ()
defGlobalVar v v'
= do { traceVt "add global var mapping:" (ppr v <+> text "-->" <+> ppr v')
-- check for... | 1,205 | defGlobalVar :: Var -> Var -> VM ()
defGlobalVar v v'
= do { traceVt "add global var mapping:" (ppr v <+> text "-->" <+> ppr v')
-- check for duplicate vectorisation
; currentDef <- readGEnv $ \env -> lookupVarEnv (global_vars env) v
; case currentDef of
Just old_v' -> cantVector... | 1,041 | defGlobalVar v v'
= do { traceVt "add global var mapping:" (ppr v <+> text "-->" <+> ppr v')
-- check for duplicate vectorisation
; currentDef <- readGEnv $ \env -> lookupVarEnv (global_vars env) v
; case currentDef of
Just old_v' -> cantVectorise "Variable is already vectorised:... | 1,005 | true | true | 1 | 13 | 373 | 278 | 132 | 146 | null | null |
davdar/pretty-monadic-printer | Text/PrettyPrint/Final/Demos/STLCDemo.hs | mit | (/*/) :: Exp -> Exp -> Exp
(/*/) = Bin Times | 44 | (/*/) :: Exp -> Exp -> Exp
(/*/) = Bin Times | 44 | (/*/) = Bin Times | 17 | false | true | 0 | 8 | 10 | 32 | 16 | 16 | null | null |
lpeterse/koka | src/Lib/PPrint.hs | apache-2.0 | renderPrettyB :: Float -> Int -> Doc -> B.Builder
renderPrettyB rfrac w x
= best 0 0 0 [(0, x)]
where
-- r :: the ribbon width in characters
r = max 0 (min w (round (fromIntegral w * rfrac)))
-- best :: b = base nesting
-- n = indentation of current line
-- k = cu... | 1,702 | renderPrettyB :: Float -> Int -> Doc -> B.Builder
renderPrettyB rfrac w x
= best 0 0 0 [(0, x)]
where
-- r :: the ribbon width in characters
r = max 0 (min w (round (fromIntegral w * rfrac)))
-- best :: b = base nesting
-- n = indentation of current line
-- k = cu... | 1,702 | renderPrettyB rfrac w x
= best 0 0 0 [(0, x)]
where
-- r :: the ribbon width in characters
r = max 0 (min w (round (fromIntegral w * rfrac)))
-- best :: b = base nesting
-- n = indentation of current line
-- k = current column
-- (ie. (k >= n) && (k -... | 1,652 | false | true | 0 | 13 | 737 | 598 | 311 | 287 | null | null |
FranklinChen/IHaskell | src/IHaskell/IPython.hs | mit | defaultConfFile :: IO (Maybe String)
defaultConfFile = fmap (fmap fp) . SH.shelly $ do
filename <- (SH.</> "rc.hs") <$> ihaskellDir
exists <- SH.test_f filename
return $ if exists
then Just filename
else Nothing | 243 | defaultConfFile :: IO (Maybe String)
defaultConfFile = fmap (fmap fp) . SH.shelly $ do
filename <- (SH.</> "rc.hs") <$> ihaskellDir
exists <- SH.test_f filename
return $ if exists
then Just filename
else Nothing | 243 | defaultConfFile = fmap (fmap fp) . SH.shelly $ do
filename <- (SH.</> "rc.hs") <$> ihaskellDir
exists <- SH.test_f filename
return $ if exists
then Just filename
else Nothing | 206 | false | true | 0 | 10 | 64 | 86 | 42 | 44 | null | null |
corngood/cabal | cabal-install/Main.hs | bsd-3-clause | -- | Entry point
--
main :: IO ()
main = do
-- Enable line buffering so that we can get fast feedback even when piped.
-- This is especially important for CI and build systems.
hSetBuffering stdout LineBuffering
-- The default locale encoding for Windows CLI is not UTF-8 and printing
-- Unicode characters to ... | 533 | main :: IO ()
main = do
-- Enable line buffering so that we can get fast feedback even when piped.
-- This is especially important for CI and build systems.
hSetBuffering stdout LineBuffering
-- The default locale encoding for Windows CLI is not UTF-8 and printing
-- Unicode characters to it will fail unless ... | 513 | main = do
-- Enable line buffering so that we can get fast feedback even when piped.
-- This is especially important for CI and build systems.
hSetBuffering stdout LineBuffering
-- The default locale encoding for Windows CLI is not UTF-8 and printing
-- Unicode characters to it will fail unless we relax the h... | 499 | true | true | 0 | 7 | 101 | 52 | 27 | 25 | null | null |
a143753/AOJ | ALDS1_3_A.hs | apache-2.0 | ans :: [String] -> Int
ans x =
if length x == 1
then read $ head x
else ans $ exec x | 90 | ans :: [String] -> Int
ans x =
if length x == 1
then read $ head x
else ans $ exec x | 90 | ans x =
if length x == 1
then read $ head x
else ans $ exec x | 67 | false | true | 0 | 7 | 28 | 55 | 26 | 29 | null | null |
apyrgio/snf-ganeti | test/hs/Test/Ganeti/Query/Query.hs | bsd-2-clause | checkResultType _ (ResultEntry _ Nothing) = passTest | 52 | checkResultType _ (ResultEntry _ Nothing) = passTest | 52 | checkResultType _ (ResultEntry _ Nothing) = passTest | 52 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
Oblosys/webviews | src/exec/WebForms/Main.hs | mit | -- Create a table row containing a question that has n numbered answer buttons.
mkScaleQuestion :: Int -> String -> String -> TableRow
mkScaleQuestion n tag question = [ htmlElt question, buttonAnswerElt tag $ map show [1..n] ] | 227 | mkScaleQuestion :: Int -> String -> String -> TableRow
mkScaleQuestion n tag question = [ htmlElt question, buttonAnswerElt tag $ map show [1..n] ] | 147 | mkScaleQuestion n tag question = [ htmlElt question, buttonAnswerElt tag $ map show [1..n] ] | 92 | true | true | 0 | 8 | 37 | 57 | 29 | 28 | null | null |
uuhan/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | trunc from ITNative val = intToInt from ITNative val | 52 | trunc from ITNative val = intToInt from ITNative val | 52 | trunc from ITNative val = intToInt from ITNative val | 52 | false | false | 0 | 5 | 8 | 20 | 9 | 11 | null | null |
tlaitinen/yesod-datatables | tests/main.hs | bsd-2-clause | testRequest :: Request
testRequest = Request {
reqDisplayStart = 0,
reqDisplayLength = 10,
reqSearch = "foo",
reqSearchRegex = False,
reqColumns = [
Column {
colSearchable = True,
colSearch = "bar.*baz",
colSearchRegex ... | 730 | testRequest :: Request
testRequest = Request {
reqDisplayStart = 0,
reqDisplayLength = 10,
reqSearch = "foo",
reqSearchRegex = False,
reqColumns = [
Column {
colSearchable = True,
colSearch = "bar.*baz",
colSearchRegex ... | 730 | testRequest = Request {
reqDisplayStart = 0,
reqDisplayLength = 10,
reqSearch = "foo",
reqSearchRegex = False,
reqColumns = [
Column {
colSearchable = True,
colSearch = "bar.*baz",
colSearchRegex = True,
... | 707 | false | true | 0 | 10 | 352 | 150 | 94 | 56 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | checkGlobsAsOptions _ (T_SimpleCommand _ _ args) =
mapM_ check $ takeWhile (not . isEndOfArgs) args
where
check v@(T_NormalWord _ (T_Glob id s:_)) | s == "*" || s == "?" =
info id 2035 $
"Use ./" ++ concat (deadSimple v)
++ " so names with dashes won't become options."
... | 499 | checkGlobsAsOptions _ (T_SimpleCommand _ _ args) =
mapM_ check $ takeWhile (not . isEndOfArgs) args
where
check v@(T_NormalWord _ (T_Glob id s:_)) | s == "*" || s == "?" =
info id 2035 $
"Use ./" ++ concat (deadSimple v)
++ " so names with dashes won't become options."
... | 499 | checkGlobsAsOptions _ (T_SimpleCommand _ _ args) =
mapM_ check $ takeWhile (not . isEndOfArgs) args
where
check v@(T_NormalWord _ (T_Glob id s:_)) | s == "*" || s == "?" =
info id 2035 $
"Use ./" ++ concat (deadSimple v)
++ " so names with dashes won't become options."
... | 499 | false | false | 2 | 11 | 186 | 174 | 83 | 91 | null | null |
balez/ag-zipper | Repmin.hs | gpl-2.0 | label t = case tree t of
Leaf _ -> leaf $ icount t
Node l r -> node (label l) (label r)
-- ** Abstracting over the chain pattern
-- we must give the base case for leaves and top. | 183 | label t = case tree t of
Leaf _ -> leaf $ icount t
Node l r -> node (label l) (label r)
-- ** Abstracting over the chain pattern
-- we must give the base case for leaves and top. | 183 | label t = case tree t of
Leaf _ -> leaf $ icount t
Node l r -> node (label l) (label r)
-- ** Abstracting over the chain pattern
-- we must give the base case for leaves and top. | 183 | false | false | 4 | 6 | 45 | 39 | 22 | 17 | null | null |
rot26/gitit | src/Network/Gitit/State.hs | gpl-2.0 | debugMessage :: String -> GititServerPart ()
debugMessage msg = liftIO $ logM "gitit" DEBUG msg | 95 | debugMessage :: String -> GititServerPart ()
debugMessage msg = liftIO $ logM "gitit" DEBUG msg | 95 | debugMessage msg = liftIO $ logM "gitit" DEBUG msg | 50 | false | true | 0 | 8 | 14 | 38 | 17 | 21 | null | null |
jyp/lp-diagrams | Graphics/Diagrams/Core.hs | agpl-3.0 | binop :: String -> SExpr -> SExpr -> SExpr
binop s x y = sexp [S s,x,y] | 71 | binop :: String -> SExpr -> SExpr -> SExpr
binop s x y = sexp [S s,x,y] | 71 | binop s x y = sexp [S s,x,y] | 28 | false | true | 0 | 7 | 16 | 49 | 24 | 25 | null | null |
poxu/pandoc | src/Text/Pandoc/Writers/RST.hs | gpl-2.0 | -- | Return RST representation of document.
pandocToRST :: Pandoc -> State WriterState String
pandocToRST (Pandoc meta blocks) = do
opts <- liftM stOptions get
let colwidth = if writerWrapText opts
then Just $ writerColumns opts
else Nothing
let subtit = case lookupMeta "su... | 2,157 | pandocToRST :: Pandoc -> State WriterState String
pandocToRST (Pandoc meta blocks) = do
opts <- liftM stOptions get
let colwidth = if writerWrapText opts
then Just $ writerColumns opts
else Nothing
let subtit = case lookupMeta "subtitle" meta of
Just (Me... | 2,113 | pandocToRST (Pandoc meta blocks) = do
opts <- liftM stOptions get
let colwidth = if writerWrapText opts
then Just $ writerColumns opts
else Nothing
let subtit = case lookupMeta "subtitle" meta of
Just (MetaBlocks [Plain xs]) -> xs
_ -... | 2,063 | true | true | 2 | 20 | 670 | 656 | 314 | 342 | null | null |
janschulz/pandoc | src/Text/Pandoc/Parsing.hs | gpl-2.0 | gridTableRawLine :: Stream s m Char => [Int] -> ParserT s ParserState m [String]
gridTableRawLine indices = do
char '|'
line <- many1Till anyChar newline
return (gridTableSplitLine indices line)
-- | Parse row of grid table. | 231 | gridTableRawLine :: Stream s m Char => [Int] -> ParserT s ParserState m [String]
gridTableRawLine indices = do
char '|'
line <- many1Till anyChar newline
return (gridTableSplitLine indices line)
-- | Parse row of grid table. | 231 | gridTableRawLine indices = do
char '|'
line <- many1Till anyChar newline
return (gridTableSplitLine indices line)
-- | Parse row of grid table. | 150 | false | true | 0 | 10 | 42 | 81 | 37 | 44 | null | null |
tpsinnem/Idris-dev | src/IRTS/Simplified.hs | bsd-3-clause | sAlt tl (DConstCase c e) = do e' <- simplify tl e
return (SConstCase c e') | 104 | sAlt tl (DConstCase c e) = do e' <- simplify tl e
return (SConstCase c e') | 104 | sAlt tl (DConstCase c e) = do e' <- simplify tl e
return (SConstCase c e') | 104 | false | false | 0 | 9 | 45 | 47 | 20 | 27 | null | null |
todays-mitsui/lambda2ski | src/PPrint.hs | mit | byteStringShow Dot = "." | 36 | byteStringShow Dot = "." | 36 | byteStringShow Dot = "." | 36 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
Soostone/aws | Aws/DynamoDb/Core.hs | bsd-3-clause | -- | Type witness for 'Text'. See 'attrAs'.
text :: Proxy T.Text
text = Proxy | 77 | text :: Proxy T.Text
text = Proxy | 33 | text = Proxy | 12 | true | true | 0 | 6 | 14 | 17 | 9 | 8 | null | null |
icyfork/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkFindExec3 = verify checkFindExec "find / -execdir cat {} | grep lol +" | 80 | prop_checkFindExec3 = verify checkFindExec "find / -execdir cat {} | grep lol +" | 80 | prop_checkFindExec3 = verify checkFindExec "find / -execdir cat {} | grep lol +" | 80 | false | false | 1 | 5 | 12 | 15 | 5 | 10 | null | null |
frantisekfarka/ghc-dsi | compiler/typecheck/TcTypeNats.hs | bsd-3-clause | mkTypeNatFunTyCon2 :: Name -> BuiltInSynFamily -> TyCon
mkTypeNatFunTyCon2 op tcb =
mkSynTyCon op
(mkArrowKinds [ typeNatKind, typeNatKind ] typeNatKind)
(take 2 $ tyVarList typeNatKind)
[Nominal,Nominal]
(BuiltInSynFamTyCon tcb)
NoParentTyCon | 265 | mkTypeNatFunTyCon2 :: Name -> BuiltInSynFamily -> TyCon
mkTypeNatFunTyCon2 op tcb =
mkSynTyCon op
(mkArrowKinds [ typeNatKind, typeNatKind ] typeNatKind)
(take 2 $ tyVarList typeNatKind)
[Nominal,Nominal]
(BuiltInSynFamTyCon tcb)
NoParentTyCon | 265 | mkTypeNatFunTyCon2 op tcb =
mkSynTyCon op
(mkArrowKinds [ typeNatKind, typeNatKind ] typeNatKind)
(take 2 $ tyVarList typeNatKind)
[Nominal,Nominal]
(BuiltInSynFamTyCon tcb)
NoParentTyCon | 209 | false | true | 0 | 8 | 49 | 87 | 40 | 47 | null | null |
aaronc/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | safeForget :: TT Name -> Maybe Raw
safeForget tm = safeForgetEnv [] tm | 70 | safeForget :: TT Name -> Maybe Raw
safeForget tm = safeForgetEnv [] tm | 70 | safeForget tm = safeForgetEnv [] tm | 35 | false | true | 0 | 7 | 12 | 37 | 15 | 22 | null | null |
michaelbeaumont/pandoc | src/Text/Pandoc/Writers/OpenDocument.hs | gpl-2.0 | when :: Bool -> Doc -> Doc
when p a = if p then a else empty | 60 | when :: Bool -> Doc -> Doc
when p a = if p then a else empty | 60 | when p a = if p then a else empty | 33 | false | true | 0 | 6 | 16 | 32 | 17 | 15 | null | null |
Oblosys/webviews | src/exec/Piglet/Main.hs | mit | modifyViewedVisit fn (VisitsView a v b c d e f g h i j k l m n) =
VisitsView a (fn v) b c d e f g h i j k l m n | 114 | modifyViewedVisit fn (VisitsView a v b c d e f g h i j k l m n) =
VisitsView a (fn v) b c d e f g h i j k l m n | 114 | modifyViewedVisit fn (VisitsView a v b c d e f g h i j k l m n) =
VisitsView a (fn v) b c d e f g h i j k l m n | 114 | false | false | 0 | 7 | 38 | 82 | 40 | 42 | null | null |
timjb/halma | halma-telegram-bot/src/Game/Halma/TelegramBot/Controller.hs | mit | handleTextMsg
:: T.Text
-> TG.Message
-> BotM ()
handleTextMsg text fullMsg = do
matchState <- gets hcMatchState
locale <- getLocale
case (matchState, text) of
(_, parseCmdCall -> Just cmdCall) ->
handleCommand cmdCall
(MatchRunning match@Match { matchCurrentGame = Just game }, parseMoveCmd ->... | 2,104 | handleTextMsg
:: T.Text
-> TG.Message
-> BotM ()
handleTextMsg text fullMsg = do
matchState <- gets hcMatchState
locale <- getLocale
case (matchState, text) of
(_, parseCmdCall -> Just cmdCall) ->
handleCommand cmdCall
(MatchRunning match@Match { matchCurrentGame = Just game }, parseMoveCmd ->... | 2,104 | handleTextMsg text fullMsg = do
matchState <- gets hcMatchState
locale <- getLocale
case (matchState, text) of
(_, parseCmdCall -> Just cmdCall) ->
handleCommand cmdCall
(MatchRunning match@Match { matchCurrentGame = Just game }, parseMoveCmd -> Right moveCmd) ->
handleMoveCmd match game moveC... | 2,049 | false | true | 18 | 16 | 579 | 609 | 298 | 311 | null | null |
eamsden/time-flies | src/FRP/TimeFlies/Types.hs | bsd-3-clause | inputToOccurrence (SVERight inp) = SVOccRight (inputToOccurrence inp) | 69 | inputToOccurrence (SVERight inp) = SVOccRight (inputToOccurrence inp) | 69 | inputToOccurrence (SVERight inp) = SVOccRight (inputToOccurrence inp) | 69 | false | false | 0 | 7 | 6 | 24 | 11 | 13 | null | null |
haslab/SecreC | src/Language/SecreC/Transformation/Dafny.hs | gpl-3.0 | annLinesProcC :: AnnsDoc -> DDoc
annLinesProcC anns = d
where
(reads,anns') = List.partition ((==ReadsK) . fst5) anns
(modifies,anns'') = List.partition ((==ReadsK) . fst5) anns'
anns''' = List.nub anns''
reads' = Set.fromList $ map fou5 reads
readk = case Set.toList reads' of
[]... | 662 | annLinesProcC :: AnnsDoc -> DDoc
annLinesProcC anns = d
where
(reads,anns') = List.partition ((==ReadsK) . fst5) anns
(modifies,anns'') = List.partition ((==ReadsK) . fst5) anns'
anns''' = List.nub anns''
reads' = Set.fromList $ map fou5 reads
readk = case Set.toList reads' of
[]... | 662 | annLinesProcC anns = d
where
(reads,anns') = List.partition ((==ReadsK) . fst5) anns
(modifies,anns'') = List.partition ((==ReadsK) . fst5) anns'
anns''' = List.nub anns''
reads' = Set.fromList $ map fou5 reads
readk = case Set.toList reads' of
[] -> []
xs -> [(Re... | 629 | false | true | 9 | 8 | 180 | 293 | 144 | 149 | null | null |
jm4games/lightstreamer | src/Lightstreamer/Error.hs | mit | errorCodeParser :: Parser LsError
errorCodeParser = do
_ <- string "ERROR"
endOfLine
errCode <- decimal
endOfLine
msg <- takeTill isEndOfLine
endOfLine
return $ LsError errCode msg | 208 | errorCodeParser :: Parser LsError
errorCodeParser = do
_ <- string "ERROR"
endOfLine
errCode <- decimal
endOfLine
msg <- takeTill isEndOfLine
endOfLine
return $ LsError errCode msg | 208 | errorCodeParser = do
_ <- string "ERROR"
endOfLine
errCode <- decimal
endOfLine
msg <- takeTill isEndOfLine
endOfLine
return $ LsError errCode msg | 174 | false | true | 1 | 9 | 53 | 66 | 26 | 40 | null | null |
valderman/mcctl | src/MCCtl/Frontend.hs | bsd-3-clause | getServerBacklog :: String -> Int32 -> IO ()
getServerBacklog name n = runAndPrint "backlog" [toVariant name, toVariant n] | 122 | getServerBacklog :: String -> Int32 -> IO ()
getServerBacklog name n = runAndPrint "backlog" [toVariant name, toVariant n] | 122 | getServerBacklog name n = runAndPrint "backlog" [toVariant name, toVariant n] | 77 | false | true | 0 | 8 | 17 | 46 | 22 | 24 | null | null |
kazu-yamamoto/wai | warp-tls/graceful-pong.hs | mit | envSocketName = "GRACEFUL_PONG_SOCKET" | 38 | envSocketName = "GRACEFUL_PONG_SOCKET" | 38 | envSocketName = "GRACEFUL_PONG_SOCKET" | 38 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
swift-nav/plover | relics/Reduce.hs | mit | compileStep' ctxt (x :/ y) = do
tx <- local $ typeCheck x
ty <- local $ typeCheck y
case (tx, ty) of
-- pointwise div
(VecType (len : _) _, NumType) -> do
i <- freshName
return $ Vec i len ((x :! (Ref i)) :/ y)
(n1, n2) | numerics n1 n2, compoundVal x -> do
a <- freshName
retur... | 730 | compileStep' ctxt (x :/ y) = do
tx <- local $ typeCheck x
ty <- local $ typeCheck y
case (tx, ty) of
-- pointwise div
(VecType (len : _) _, NumType) -> do
i <- freshName
return $ Vec i len ((x :! (Ref i)) :/ y)
(n1, n2) | numerics n1 n2, compoundVal x -> do
a <- freshName
retur... | 730 | compileStep' ctxt (x :/ y) = do
tx <- local $ typeCheck x
ty <- local $ typeCheck y
case (tx, ty) of
-- pointwise div
(VecType (len : _) _, NumType) -> do
i <- freshName
return $ Vec i len ((x :! (Ref i)) :/ y)
(n1, n2) | numerics n1 n2, compoundVal x -> do
a <- freshName
retur... | 730 | false | false | 0 | 19 | 239 | 358 | 171 | 187 | null | null |
urbit/urbit | pkg/hs/proto/lib/Untyped/Core.hs | mit | cell ef ff = NC ef ff | 21 | cell ef ff = NC ef ff | 21 | cell ef ff = NC ef ff | 21 | false | false | 0 | 5 | 6 | 16 | 7 | 9 | null | null |
sphynx/turnir | src/Types.hs | bsd-3-clause | result2score Cancelled = NoPoints | 33 | result2score Cancelled = NoPoints | 33 | result2score Cancelled = NoPoints | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
nevrenato/Hets_Fork | OWL2/XMLConversion.hs | gpl-2.0 | -- | converts the signature to declarations
signToDec :: Sign -> [Element]
signToDec s = concatMap (uncurry $ mkElemeDecl s)
[ (classK, concepts)
, (objectPropertyK, objectProperties)
, (dataPropertyK, dataProperties)
, (annotationPropertyK, annotationRoles)
, (datatypeK, datatypes)
, (namedIndi... | 342 | signToDec :: Sign -> [Element]
signToDec s = concatMap (uncurry $ mkElemeDecl s)
[ (classK, concepts)
, (objectPropertyK, objectProperties)
, (dataPropertyK, dataProperties)
, (annotationPropertyK, annotationRoles)
, (datatypeK, datatypes)
, (namedIndividualK, individuals)] | 298 | signToDec s = concatMap (uncurry $ mkElemeDecl s)
[ (classK, concepts)
, (objectPropertyK, objectProperties)
, (dataPropertyK, dataProperties)
, (annotationPropertyK, annotationRoles)
, (datatypeK, datatypes)
, (namedIndividualK, individuals)] | 267 | true | true | 0 | 8 | 61 | 92 | 55 | 37 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.