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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dmjio/bloodhound | tests/tests.hs | bsd-3-clause | es13 :: ServerVersion
es13 = ServerVersion 1 3 0 | 48 | es13 :: ServerVersion
es13 = ServerVersion 1 3 0 | 48 | es13 = ServerVersion 1 3 0 | 26 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
acowley/ghc | compiler/types/Type.hs | bsd-3-clause | isEmptyTvSubst :: TvSubst -> Bool
-- See Note [Extending the TvSubstEnv] in TypeRep
isEmptyTvSubst (TvSubst _ tenv) = isEmptyVarEnv tenv | 145 | isEmptyTvSubst :: TvSubst -> Bool
isEmptyTvSubst (TvSubst _ tenv) = isEmptyVarEnv tenv | 86 | isEmptyTvSubst (TvSubst _ tenv) = isEmptyVarEnv tenv | 52 | true | true | 0 | 6 | 28 | 34 | 16 | 18 | null | null |
jbearer/hspl | benchmarks/derive/lib/Derive.hs | mit | trueD (Quotient n d) x = Quotient (Difference (Product (trueD n x) d) (Product n (trueD d x))) (Power d 2) | 106 | trueD (Quotient n d) x = Quotient (Difference (Product (trueD n x) d) (Product n (trueD d x))) (Power d 2) | 106 | trueD (Quotient n d) x = Quotient (Difference (Product (trueD n x) d) (Product n (trueD d x))) (Power d 2) | 106 | false | false | 1 | 11 | 20 | 77 | 35 | 42 | null | null |
jm4games/lightstreamer | src/Lightstreamer/Http.hs | mit | readStreamedResponse :: Connection
-> Maybe ThreadId
-> (B.ByteString -> IO ())
-> Consumer [B.ByteString] IO ()
-> IO (Either B.ByteString HttpResponse)
readStreamedResponse conn tId errHandle streamSink = do
(rSrc, res) <- con... | 1,172 | readStreamedResponse :: Connection
-> Maybe ThreadId
-> (B.ByteString -> IO ())
-> Consumer [B.ByteString] IO ()
-> IO (Either B.ByteString HttpResponse)
readStreamedResponse conn tId errHandle streamSink = do
(rSrc, res) <- con... | 1,172 | readStreamedResponse conn tId errHandle streamSink = do
(rSrc, res) <- connectionProducer conn $$+ readHttpHeader
case find contentHeader $ resHeaders res of
Just (HttpHeader "Content-Length" val) -> do
body <- rSrc $$+- (CB.take . maybe 0 fst $ readInt val)
return $ Right res { resBody =... | 931 | false | true | 2 | 21 | 371 | 357 | 171 | 186 | null | null |
rueshyna/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'SSLCertsInsertResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scirServerCaCert'
--
-- * 'scirOperation'
--
-- * 'scirKind'
--
-- * 'scirClientCert'
sslCertsInsertResponse
:: SSLCertsInsertRespons... | 516 | sslCertsInsertResponse
:: SSLCertsInsertResponse
sslCertsInsertResponse =
SSLCertsInsertResponse'
{ _scirServerCaCert = Nothing
, _scirOperation = Nothing
, _scirKind = "sql#sslCertsInsert"
, _scirClientCert = Nothing
} | 247 | sslCertsInsertResponse =
SSLCertsInsertResponse'
{ _scirServerCaCert = Nothing
, _scirOperation = Nothing
, _scirKind = "sql#sslCertsInsert"
, _scirClientCert = Nothing
} | 194 | true | true | 1 | 7 | 96 | 55 | 35 | 20 | null | null |
romanb/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types.hs | mpl-2.0 | -- | 'TagFilter' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'tfTag' @::@ 'Text'
--
tagFilter :: Text -- ^ 'tfTag'
-> TagFilter
tagFilter p1 = TagFilter
{ _tfTag = p1
} | 225 | tagFilter :: Text -- ^ 'tfTag'
-> TagFilter
tagFilter p1 = TagFilter
{ _tfTag = p1
} | 102 | tagFilter p1 = TagFilter
{ _tfTag = p1
} | 48 | true | true | 0 | 7 | 54 | 37 | 22 | 15 | null | null |
mwahab1/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | citeArguments :: [Inline] -> [Inline] -> String -> State WriterState Doc
citeArguments p s k = do
let s' = case s of
(Str (x:[]) : r) | isPunctuation x -> dropWhile (== Space) r
(Str (x:xs) : r) | isPunctuation x -> Str xs : r
_ -> s
pdoc <- inlineListToLaTeX... | 609 | citeArguments :: [Inline] -> [Inline] -> String -> State WriterState Doc
citeArguments p s k = do
let s' = case s of
(Str (x:[]) : r) | isPunctuation x -> dropWhile (== Space) r
(Str (x:xs) : r) | isPunctuation x -> Str xs : r
_ -> s
pdoc <- inlineListToLaTeX... | 609 | citeArguments p s k = do
let s' = case s of
(Str (x:[]) : r) | isPunctuation x -> dropWhile (== Space) r
(Str (x:xs) : r) | isPunctuation x -> Str xs : r
_ -> s
pdoc <- inlineListToLaTeX p
sdoc <- inlineListToLaTeX s'
let optargs = case (isEmpty pdoc, isE... | 536 | false | true | 2 | 18 | 228 | 253 | 124 | 129 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Common/Time.hs | bsd-3-clause | absoluteTimeAdd (Time t1) (Time t2) = Time (t1 + t2) | 52 | absoluteTimeAdd (Time t1) (Time t2) = Time (t1 + t2) | 52 | absoluteTimeAdd (Time t1) (Time t2) = Time (t1 + t2) | 52 | false | false | 0 | 7 | 9 | 33 | 16 | 17 | null | null |
theNerd247/ariaRacer | arweb/app/Parser.hs | bsd-3-clause | space = word8 32 | 16 | space = word8 32 | 16 | space = word8 32 | 16 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
plumlife/cabal | cabal-install/Distribution/Client/Install.hs | bsd-3-clause | -- | Make an install context given install arguments.
makeInstallContext :: Verbosity -> InstallArgs -> Maybe [UserTarget]
-> IO InstallContext
makeInstallContext verbosity
(packageDBs, repos, comp, _, conf,_,_,
globalFlags, _, _, _, _) mUserTargets = do
installedPkgIndex <- getInstalled... | 1,423 | makeInstallContext :: Verbosity -> InstallArgs -> Maybe [UserTarget]
-> IO InstallContext
makeInstallContext verbosity
(packageDBs, repos, comp, _, conf,_,_,
globalFlags, _, _, _, _) mUserTargets = do
installedPkgIndex <- getInstalledPackages verbosity comp packageDBs conf
sourcePkgD... | 1,369 | makeInstallContext verbosity
(packageDBs, repos, comp, _, conf,_,_,
globalFlags, _, _, _, _) mUserTargets = do
installedPkgIndex <- getInstalledPackages verbosity comp packageDBs conf
sourcePkgDb <- getSourcePackages verbosity repos
(userTargets, pkgSpecifiers) <- case mUserTargets of
... | 1,257 | true | true | 0 | 19 | 419 | 250 | 130 | 120 | null | null |
guillaume-nargeot/codecov-haskell | src/Trace/Hpc/Codecov.hs | bsd-3-clause | getExprSource :: [String] -> MixEntry -> [String]
getExprSource source (hpcPos, _) = subSubSeq startCol endCol subLines
where subLines = subSeq startLine endLine source
startLine = startLine' - 1
startCol = startCol' - 1
(startLine', startCol', endLine, endCol) = fromHpcPos hpcPos | 315 | getExprSource :: [String] -> MixEntry -> [String]
getExprSource source (hpcPos, _) = subSubSeq startCol endCol subLines
where subLines = subSeq startLine endLine source
startLine = startLine' - 1
startCol = startCol' - 1
(startLine', startCol', endLine, endCol) = fromHpcPos hpcPos | 315 | getExprSource source (hpcPos, _) = subSubSeq startCol endCol subLines
where subLines = subSeq startLine endLine source
startLine = startLine' - 1
startCol = startCol' - 1
(startLine', startCol', endLine, endCol) = fromHpcPos hpcPos | 265 | false | true | 3 | 7 | 73 | 100 | 52 | 48 | null | null |
capital-match/hdo | src/Network/DO/IP/Net.hs | mit | doAction :: (ComonadEnv ToolConfiguration w, Monad m) => w a -> IP -> IPAction -> (RESTT m (Result (ActionResult IPActionType)), w a)
doAction w ip action = maybe (return $ error "no authentication token defined", w)
(\ t -> let r = postJSONWith (authorisation t) (toURI $ floatingIpsEndpoint </> ... | 517 | doAction :: (ComonadEnv ToolConfiguration w, Monad m) => w a -> IP -> IPAction -> (RESTT m (Result (ActionResult IPActionType)), w a)
doAction w ip action = maybe (return $ error "no authentication token defined", w)
(\ t -> let r = postJSONWith (authorisation t) (toURI $ floatingIpsEndpoint </> ... | 517 | doAction w ip action = maybe (return $ error "no authentication token defined", w)
(\ t -> let r = postJSONWith (authorisation t) (toURI $ floatingIpsEndpoint </> show ip </> "actions") (toJSON action)
>>= return . fromResponse "action"
... | 383 | false | true | 0 | 18 | 181 | 186 | 92 | 94 | null | null |
oldmanmike/sdl2 | src/SDL/Raw/Video.hs | bsd-3-clause | setWindowGammaRamp :: MonadIO m => Window -> Ptr Word16 -> Ptr Word16 -> Ptr Word16 -> m CInt
setWindowGammaRamp v1 v2 v3 v4 = liftIO $ setWindowGammaRampFFI v1 v2 v3 v4 | 169 | setWindowGammaRamp :: MonadIO m => Window -> Ptr Word16 -> Ptr Word16 -> Ptr Word16 -> m CInt
setWindowGammaRamp v1 v2 v3 v4 = liftIO $ setWindowGammaRampFFI v1 v2 v3 v4 | 169 | setWindowGammaRamp v1 v2 v3 v4 = liftIO $ setWindowGammaRampFFI v1 v2 v3 v4 | 75 | false | true | 0 | 10 | 30 | 68 | 31 | 37 | null | null |
msullivan/advent-of-code | 2018/A9a.hs | mit | --------
players = 470 | 23 | players = 470 | 13 | players = 470 | 13 | true | false | 1 | 5 | 4 | 11 | 4 | 7 | null | null |
meditans/hint | unit-tests/run-unit-tests.hs | bsd-3-clause | test_only_one_instance :: TestCase
test_only_one_instance = TestCase "only_one_instance" [] $ liftIO $ do
r <- newEmptyMVar
let concurrent = runInterpreter (liftIO $ putMVar r False)
`catch` \MultipleInstancesNotAllowed ->
do liftIO $ putMVar... | 494 | test_only_one_instance :: TestCase
test_only_one_instance = TestCase "only_one_instance" [] $ liftIO $ do
r <- newEmptyMVar
let concurrent = runInterpreter (liftIO $ putMVar r False)
`catch` \MultipleInstancesNotAllowed ->
do liftIO $ putMVar... | 494 | test_only_one_instance = TestCase "only_one_instance" [] $ liftIO $ do
r <- newEmptyMVar
let concurrent = runInterpreter (liftIO $ putMVar r False)
`catch` \MultipleInstancesNotAllowed ->
do liftIO $ putMVar r True
... | 459 | false | true | 0 | 17 | 184 | 119 | 56 | 63 | null | null |
SEEK-Org/evaporate | src/StackDependency.hs | mit | getParameterDependencies :: (MonadThrow m, MonadReader StackNodeMap m)
=> AWSAccountID
-> StackNode
-> m (Set StackDependency)
getParameterDependencies accountID source@(_, StackDescription{..}) = do
params <- HashMap.elems <$> getParameters _... | 423 | getParameterDependencies :: (MonadThrow m, MonadReader StackNodeMap m)
=> AWSAccountID
-> StackNode
-> m (Set StackDependency)
getParameterDependencies accountID source@(_, StackDescription{..}) = do
params <- HashMap.elems <$> getParameters _... | 423 | getParameterDependencies accountID source@(_, StackDescription{..}) = do
params <- HashMap.elems <$> getParameters _parameters accountID
Set.fromList . catMaybes <$> traverse (parameterValueToDependency source) params | 221 | false | true | 8 | 7 | 114 | 92 | 51 | 41 | null | null |
ryantm/ghc | testsuite/tests/programs/galois_raytrace/Primitives.hs | bsd-3-clause | asinD :: Double -> Double
asinD x = asin x * 180 / pi | 53 | asinD :: Double -> Double
asinD x = asin x * 180 / pi | 53 | asinD x = asin x * 180 / pi | 27 | false | true | 3 | 7 | 13 | 37 | 15 | 22 | null | null |
kmate/HaRe | test/testdata/Renaming/B2.hs | bsd-3-clause | sumSquares (x:xs)= x^2 + sumSquares xs | 38 | sumSquares (x:xs)= x^2 + sumSquares xs | 38 | sumSquares (x:xs)= x^2 + sumSquares xs | 38 | false | false | 0 | 7 | 5 | 27 | 13 | 14 | null | null |
d0kt0r0/estuary | client/src/Estuary/Resources.hs | gpl-3.0 | -- audio image video
emptyResourceMaps :: ResourceMaps
emptyResourceMaps = (LocMap.empty,LocMap.empty,LocMap.empty) | 116 | emptyResourceMaps :: ResourceMaps
emptyResourceMaps = (LocMap.empty,LocMap.empty,LocMap.empty) | 94 | emptyResourceMaps = (LocMap.empty,LocMap.empty,LocMap.empty) | 60 | true | true | 0 | 7 | 10 | 34 | 17 | 17 | null | null |
matonix/pfds | src/PFDS/Sec9/Ex13.hs | bsd-3-clause | fixup :: RList a -> RList a
fixup (Zero : ds) = let (Node _ t1 t2, ds') = unconsTree ds in Two (t1, t2) : ds' | 109 | fixup :: RList a -> RList a
fixup (Zero : ds) = let (Node _ t1 t2, ds') = unconsTree ds in Two (t1, t2) : ds' | 109 | fixup (Zero : ds) = let (Node _ t1 t2, ds') = unconsTree ds in Two (t1, t2) : ds' | 81 | false | true | 0 | 10 | 26 | 77 | 36 | 41 | null | null |
mbg/system-f-with-kind-polymorphism | Inline.hs | mit | inlineTypes env (AppTy tf ta) = do
tf' <- inlineTypes env tf
ta' <- inlineTypes env ta
return $ AppTy tf' ta' | 122 | inlineTypes env (AppTy tf ta) = do
tf' <- inlineTypes env tf
ta' <- inlineTypes env ta
return $ AppTy tf' ta' | 122 | inlineTypes env (AppTy tf ta) = do
tf' <- inlineTypes env tf
ta' <- inlineTypes env ta
return $ AppTy tf' ta' | 122 | false | false | 0 | 8 | 34 | 57 | 24 | 33 | null | null |
sixears/getopt | src/Console/Getopt.hs | mit | maybeGetArg _ Nothing largs _ = (Nothing, largs, Nothing) | 78 | maybeGetArg _ Nothing largs _ = (Nothing, largs, Nothing) | 78 | maybeGetArg _ Nothing largs _ = (Nothing, largs, Nothing) | 78 | false | false | 0 | 5 | 29 | 24 | 13 | 11 | null | null |
sgillespie/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | mkReturnInfoLabel uniq = CaseLabel uniq CaseReturnInfo | 63 | mkReturnInfoLabel uniq = CaseLabel uniq CaseReturnInfo | 63 | mkReturnInfoLabel uniq = CaseLabel uniq CaseReturnInfo | 63 | false | false | 0 | 5 | 14 | 14 | 6 | 8 | null | null |
robstewart57/stack | src/main/Main.hs | bsd-3-clause | targetsCmd :: Text -> GlobalOpts -> IO ()
targetsCmd target go@GlobalOpts{..} =
withBuildConfig go $
do (_realTargets,_,pkgs) <- ghciSetup Nothing [target]
pwd <- getWorkingDir
targets <-
fmap
(concat . snd . unzip)
(mapM (getPackageOptsAndTargetFiles pwd) ... | 403 | targetsCmd :: Text -> GlobalOpts -> IO ()
targetsCmd target go@GlobalOpts{..} =
withBuildConfig go $
do (_realTargets,_,pkgs) <- ghciSetup Nothing [target]
pwd <- getWorkingDir
targets <-
fmap
(concat . snd . unzip)
(mapM (getPackageOptsAndTargetFiles pwd) ... | 403 | targetsCmd target go@GlobalOpts{..} =
withBuildConfig go $
do (_realTargets,_,pkgs) <- ghciSetup Nothing [target]
pwd <- getWorkingDir
targets <-
fmap
(concat . snd . unzip)
(mapM (getPackageOptsAndTargetFiles pwd) pkgs)
forM_ targets (liftIO . putSt... | 361 | false | true | 0 | 13 | 118 | 129 | 64 | 65 | null | null |
melted/llvm-pretty | src/Text/LLVM/AST.hs | bsd-3-clause | ppFCmpOp Foeq = text "oeq" | 28 | ppFCmpOp Foeq = text "oeq" | 28 | ppFCmpOp Foeq = text "oeq" | 28 | false | false | 1 | 5 | 6 | 15 | 5 | 10 | null | null |
binarybana/grn-pathways | GRN/EM.hs | bsd-2-clause | posteriorProb :: EMData -> Theta -> U.Vector Double
posteriorProb EMData{..} new = G.convert $ G.map (*(1/normSum)) (V.generate (length emAttractors) eachAttractor)
where normSum = sum $ map (\(w,issam)-> w * msLookup issam emMeasurements ) newAgivenTheta
newAgivenTheta = generateNewAttractors emArgs emUnfil... | 5,838 | posteriorProb :: EMData -> Theta -> U.Vector Double
posteriorProb EMData{..} new = G.convert $ G.map (*(1/normSum)) (V.generate (length emAttractors) eachAttractor)
where normSum = sum $ map (\(w,issam)-> w * msLookup issam emMeasurements ) newAgivenTheta
newAgivenTheta = generateNewAttractors emArgs emUnfil... | 5,838 | posteriorProb EMData{..} new = G.convert $ G.map (*(1/normSum)) (V.generate (length emAttractors) eachAttractor)
where normSum = sum $ map (\(w,issam)-> w * msLookup issam emMeasurements ) newAgivenTheta
newAgivenTheta = generateNewAttractors emArgs emUnfilledKMS emCompNodes emUncertainLocs new
eachA... | 5,786 | false | true | 0 | 10 | 1,201 | 279 | 198 | 81 | null | null |
zinfra/khan | amazonka-limited/src/Network/AWS/Internal/Types.hs | mpl-2.0 | secretAccessKey :: Auth -> ByteString
secretAccessKey = Text.encodeUtf8 . authSecretAccessKey | 93 | secretAccessKey :: Auth -> ByteString
secretAccessKey = Text.encodeUtf8 . authSecretAccessKey | 93 | secretAccessKey = Text.encodeUtf8 . authSecretAccessKey | 55 | false | true | 0 | 7 | 9 | 28 | 12 | 16 | null | null |
tolysz/prepare-ghcjs | spec-lts8/aeson/tests/Encoders.hs | bsd-3-clause | thSomeTypeToJSONObjectWithSingleField :: SomeType Int -> Value
thSomeTypeToJSONObjectWithSingleField = $(mkToJSON optsObjectWithSingleField ''SomeType) | 151 | thSomeTypeToJSONObjectWithSingleField :: SomeType Int -> Value
thSomeTypeToJSONObjectWithSingleField = $(mkToJSON optsObjectWithSingleField ''SomeType) | 151 | thSomeTypeToJSONObjectWithSingleField = $(mkToJSON optsObjectWithSingleField ''SomeType) | 88 | false | true | 0 | 8 | 10 | 29 | 14 | 15 | null | null |
vTurbine/ghc | compiler/main/Packages.hs | bsd-3-clause | -- | Find all the link options in these and the preload packages,
-- returning (package hs lib options, extra library options, other flags)
getPackageLinkOpts :: DynFlags -> [UnitId] -> IO ([String], [String], [String])
getPackageLinkOpts dflags pkgs =
collectLinkOpts dflags `fmap` getPreloadPackagesAnd dflags pkgs | 318 | getPackageLinkOpts :: DynFlags -> [UnitId] -> IO ([String], [String], [String])
getPackageLinkOpts dflags pkgs =
collectLinkOpts dflags `fmap` getPreloadPackagesAnd dflags pkgs | 178 | getPackageLinkOpts dflags pkgs =
collectLinkOpts dflags `fmap` getPreloadPackagesAnd dflags pkgs | 98 | true | true | 0 | 9 | 45 | 64 | 36 | 28 | null | null |
CarmineM74/haskell_craft3e | ExChap7.hs | mit | -- Guard order is relevant since a subsequence has stricter requirements
-- than a sublist. A subsequence is also a sublist but not vice versa.
sublistOrSubsequence :: String -> String -> Subkind
sublistOrSubsequence s1 s2
| subsequence s1 s2 = Subsequence
| sublist s1 s2 = Sublist
| otherwise = Neit... | 323 | sublistOrSubsequence :: String -> String -> Subkind
sublistOrSubsequence s1 s2
| subsequence s1 s2 = Subsequence
| sublist s1 s2 = Sublist
| otherwise = Neither | 179 | sublistOrSubsequence s1 s2
| subsequence s1 s2 = Subsequence
| sublist s1 s2 = Sublist
| otherwise = Neither | 126 | true | true | 2 | 8 | 69 | 57 | 28 | 29 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Storable.Mutable.hs | bsd-3-clause | unsafeToForeignPtr0 (MVector n fp) = (fp, n) | 44 | unsafeToForeignPtr0 (MVector n fp) = (fp, n) | 44 | unsafeToForeignPtr0 (MVector n fp) = (fp, n) | 44 | false | false | 0 | 6 | 6 | 24 | 12 | 12 | null | null |
NICTA/validation | examples/src/PolymorphicEmail.hs | bsd-3-clause | -- Failure [MustContainPeriod]
failureAll :: (Applicative (f [VError]), Validate f) => f [VError] Email
failureAll = email "" | 126 | failureAll :: (Applicative (f [VError]), Validate f) => f [VError] Email
failureAll = email "" | 94 | failureAll = email "" | 21 | true | true | 0 | 9 | 18 | 47 | 25 | 22 | null | null |
haskell/haddock | haddock-library/src/Documentation/Haddock/Parser.hs | bsd-2-clause | innerList :: Text -> Parser [DocH mod Identifier]
-> Parser [DocH mod Identifier]
innerList indent item = do
c <- takeLine
(cs, items) <- more indent item
let contents = docParagraph . parseText . dropNLs . T.unlines $ c : cs
return $ case items of
Left p -> [contents `docAppend` p]
Right i ->... | 364 | innerList :: Text -> Parser [DocH mod Identifier]
-> Parser [DocH mod Identifier]
innerList indent item = do
c <- takeLine
(cs, items) <- more indent item
let contents = docParagraph . parseText . dropNLs . T.unlines $ c : cs
return $ case items of
Left p -> [contents `docAppend` p]
Right i ->... | 364 | innerList indent item = do
c <- takeLine
(cs, items) <- more indent item
let contents = docParagraph . parseText . dropNLs . T.unlines $ c : cs
return $ case items of
Left p -> [contents `docAppend` p]
Right i -> contents : i
-- | Parses definition lists. | 272 | false | true | 0 | 14 | 89 | 145 | 71 | 74 | null | null |
twittner/cql | test/Tests.hs | mpl-2.0 | toCqlFromCqlIdentity :: Value -> Property
toCqlFromCqlIdentity x@(CqlBoolean _) = (toCql <$> (fromCql x :: Either String Bool)) === Right x | 145 | toCqlFromCqlIdentity :: Value -> Property
toCqlFromCqlIdentity x@(CqlBoolean _) = (toCql <$> (fromCql x :: Either String Bool)) === Right x | 145 | toCqlFromCqlIdentity x@(CqlBoolean _) = (toCql <$> (fromCql x :: Either String Bool)) === Right x | 103 | false | true | 0 | 9 | 25 | 55 | 28 | 27 | null | null |
pgj/bead | src/Bead/Persistence/NoSQLDir.hs | bsd-3-clause | isCommentDir :: FilePath -> Persist Bool
isCommentDir = isCorrectDirStructure commentDirStructure | 97 | isCommentDir :: FilePath -> Persist Bool
isCommentDir = isCorrectDirStructure commentDirStructure | 97 | isCommentDir = isCorrectDirStructure commentDirStructure | 56 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
atomb/dalvik | Dalvik/Printer.hs | bsd-3-clause | constString _ (ConstWideHigh16 i) =
"#long " +++ A.int64Dec i +++
intComm16 (fromIntegral (i `shiftR` 48) :: Word16) | 120 | constString _ (ConstWideHigh16 i) =
"#long " +++ A.int64Dec i +++
intComm16 (fromIntegral (i `shiftR` 48) :: Word16) | 120 | constString _ (ConstWideHigh16 i) =
"#long " +++ A.int64Dec i +++
intComm16 (fromIntegral (i `shiftR` 48) :: Word16) | 120 | false | false | 5 | 9 | 21 | 56 | 26 | 30 | null | null |
peterokagey/haskellOEIS | src/Helpers/Table.hs | apache-2.0 | -- 0 <= k <= n
-- triangleByRows 0 = (0, 0)
-- [(0,0),(1,0),(1,1),(2,0),(2,1),(2,2),(3,0),(3,1),(3,2),(3,3),(4,0)]
-- Triangle by rows
triangleByRows :: Integral a => a -> (a, a)
triangleByRows i = (n + k, k) where
(n, k) = tableByAntidiagonals i
-- (0,0),(1,0),(0,1),(2,0),(1,1),(0,2),(3,0),(2,1),(1,2),(0,3)
-------... | 447 | triangleByRows :: Integral a => a -> (a, a)
triangleByRows i = (n + k, k) where
(n, k) = tableByAntidiagonals i
-- (0,0),(1,0),(0,1),(2,0),(1,1),(0,2),(3,0),(2,1),(1,2),(0,3)
--------------------------------------------------------------
-- (0,0),(0,1),(0,2),(0,3)
-- (1,0),(1,1),(1,2)
-- (2,0),(2,1)
-- (3,0) | 312 | triangleByRows i = (n + k, k) where
(n, k) = tableByAntidiagonals i
-- (0,0),(1,0),(0,1),(2,0),(1,1),(0,2),(3,0),(2,1),(1,2),(0,3)
--------------------------------------------------------------
-- (0,0),(0,1),(0,2),(0,3)
-- (1,0),(1,1),(1,2)
-- (2,0),(2,1)
-- (3,0) | 268 | true | true | 0 | 9 | 53 | 73 | 42 | 31 | null | null |
5outh/graphql-hs | src/GraphQL/Language/Parser.hs | mit | condense (CV_EscapedChar c:xs) = '\\':c:condense xs | 51 | condense (CV_EscapedChar c:xs) = '\\':c:condense xs | 51 | condense (CV_EscapedChar c:xs) = '\\':c:condense xs | 51 | false | false | 0 | 7 | 5 | 31 | 14 | 17 | null | null |
green-haskell/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- other GHC.Float functions
rationalToFloatName, rationalToDoubleName :: Name
rationalToFloatName = varQual gHC_FLOAT (fsLit "rationalToFloat") rationalToFloatIdKey | 166 | rationalToFloatName, rationalToDoubleName :: Name
rationalToFloatName = varQual gHC_FLOAT (fsLit "rationalToFloat") rationalToFloatIdKey | 137 | rationalToFloatName = varQual gHC_FLOAT (fsLit "rationalToFloat") rationalToFloatIdKey | 87 | true | true | 0 | 7 | 15 | 27 | 15 | 12 | null | null |
zarazek/concurrency-simulator | Concurrency/Simulator.hs | bsd-3-clause | newFullWMVar :: IORef Int -> a -> IO (WMVar a)
newFullWMVar next val = WMVar <$> newMVar val <*> getNextIdx next | 112 | newFullWMVar :: IORef Int -> a -> IO (WMVar a)
newFullWMVar next val = WMVar <$> newMVar val <*> getNextIdx next | 112 | newFullWMVar next val = WMVar <$> newMVar val <*> getNextIdx next | 65 | false | true | 0 | 9 | 20 | 50 | 23 | 27 | null | null |
siddhanathan/ghc | compiler/utils/Encoding.hs | bsd-3-clause | unPtr :: Ptr a -> Addr#
unPtr (Ptr a) = a | 41 | unPtr :: Ptr a -> Addr#
unPtr (Ptr a) = a | 41 | unPtr (Ptr a) = a | 17 | false | true | 0 | 9 | 10 | 33 | 14 | 19 | null | null |
rvion/lamdu | bottlelib/Graphics/UI/Bottle/Widgets/Layout.hs | gpl-3.0 | internalToAlignedWidget :: LayoutInternal f -> AlignedWidget f
internalToAlignedWidget (LayoutSingleton widget) = widget | 120 | internalToAlignedWidget :: LayoutInternal f -> AlignedWidget f
internalToAlignedWidget (LayoutSingleton widget) = widget | 120 | internalToAlignedWidget (LayoutSingleton widget) = widget | 57 | false | true | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
DaMSL/K3 | src/Language/K3/Transform/Simplification.hs | apache-2.0 | inferAccumulation :: Identifier -> K3 Expression -> Bool
inferAccumulation i expr = fst $ mapAccumulation annotationAccumE id i expr
where annotationAccumE e = e @+ (inferredEProp "Accumulation" Nothing) | 205 | inferAccumulation :: Identifier -> K3 Expression -> Bool
inferAccumulation i expr = fst $ mapAccumulation annotationAccumE id i expr
where annotationAccumE e = e @+ (inferredEProp "Accumulation" Nothing) | 205 | inferAccumulation i expr = fst $ mapAccumulation annotationAccumE id i expr
where annotationAccumE e = e @+ (inferredEProp "Accumulation" Nothing) | 148 | false | true | 0 | 7 | 29 | 62 | 30 | 32 | null | null |
jaspervdj/what-morphism | src/WhatMorphism/Build.hs | bsd-3-clause | --------------------------------------------------------------------------------
emptyBuildState :: BuildState
emptyBuildState = BuildState Nothing | 147 | emptyBuildState :: BuildState
emptyBuildState = BuildState Nothing | 66 | emptyBuildState = BuildState Nothing | 36 | true | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
DimaSamoz/mezzo | examples/src/Other/Bach.hs | mit | concV3 = c__ wn :|: c__ wn | 26 | concV3 = c__ wn :|: c__ wn | 26 | concV3 = c__ wn :|: c__ wn | 26 | false | false | 4 | 5 | 6 | 23 | 9 | 14 | null | null |
Zoetermeer/latro | src/Latro/Ast.hs | mit | fieldAccessorFunId :: RawId -> RawId -> RawId
fieldAccessorFunId tyId accId = "@" ++ tyId ++ "_" ++ accId | 105 | fieldAccessorFunId :: RawId -> RawId -> RawId
fieldAccessorFunId tyId accId = "@" ++ tyId ++ "_" ++ accId | 105 | fieldAccessorFunId tyId accId = "@" ++ tyId ++ "_" ++ accId | 59 | false | true | 0 | 7 | 17 | 36 | 18 | 18 | null | null |
jraygauthier/jrg-gitit-plugins | src/Network/Gitit/Plugins/ImgTex.hs | gpl-2.0 | templateFooter =
"\n"
++ "\\]\n"
++ "\\end{document}\n" | 73 | templateFooter =
"\n"
++ "\\]\n"
++ "\\end{document}\n" | 73 | templateFooter =
"\n"
++ "\\]\n"
++ "\\end{document}\n" | 73 | false | false | 0 | 6 | 24 | 14 | 7 | 7 | null | null |
torrlane/haskell_learning | test/Hl/Csv/ModelSpec.hs | bsd-3-clause | shareHoldingTests :: Test
shareHoldingTests = testGroup "ShareHoldingTests" [
testCase "testParseShareHoldingRecord" testParseShareHoldingRecord
, testCase "parseShareHolding2" testParseShareHolding2
, testCase "test_getShareName_from_csvLine" test_getShareName_from_csvLine
, testCase "testParseSh... | 361 | shareHoldingTests :: Test
shareHoldingTests = testGroup "ShareHoldingTests" [
testCase "testParseShareHoldingRecord" testParseShareHoldingRecord
, testCase "parseShareHolding2" testParseShareHolding2
, testCase "test_getShareName_from_csvLine" test_getShareName_from_csvLine
, testCase "testParseSh... | 361 | shareHoldingTests = testGroup "ShareHoldingTests" [
testCase "testParseShareHoldingRecord" testParseShareHoldingRecord
, testCase "parseShareHolding2" testParseShareHolding2
, testCase "test_getShareName_from_csvLine" test_getShareName_from_csvLine
, testCase "testParseShareHolding3" testParseShar... | 335 | false | true | 0 | 7 | 49 | 54 | 25 | 29 | null | null |
Ginto8/Pong-Haskell | src/Game/Pong/Core.hs | bsd-3-clause | randBallVel :: (Random a,Floating a) =>
Vec2 a -> StdGen -> (Vec2 a,StdGen)
randBallVel v r = (v .*. (x,y),r3)
where
x = if flip then negate x' else x'
(x',y) = polarVec mag theta
(flip,r3) = random r2
(theta,r2) = randomR (-pi/4,pi/4) r1
(mag,r1) = randomR (0... | 344 | randBallVel :: (Random a,Floating a) =>
Vec2 a -> StdGen -> (Vec2 a,StdGen)
randBallVel v r = (v .*. (x,y),r3)
where
x = if flip then negate x' else x'
(x',y) = polarVec mag theta
(flip,r3) = random r2
(theta,r2) = randomR (-pi/4,pi/4) r1
(mag,r1) = randomR (0... | 344 | randBallVel v r = (v .*. (x,y),r3)
where
x = if flip then negate x' else x'
(x',y) = polarVec mag theta
(flip,r3) = random r2
(theta,r2) = randomR (-pi/4,pi/4) r1
(mag,r1) = randomR (0.2,0.4) r -- (0.2,0.4) r | 253 | false | true | 1 | 11 | 111 | 183 | 96 | 87 | null | null |
jdreaver/quantities | library/Data/Quantities/ExprParser.hs | bsd-3-clause | prefixParser' :: Definitions -> Parser String
prefixParser' d = do
pr <- choice $ map (try . string) (prefixes d)
_ <- choice $ map (try . string) (unitsList d)
return pr
-- | Converts string to a Quantity using an expression grammar parser. This
-- parser does not parser addition or subtraction, and is used fo... | 342 | prefixParser' :: Definitions -> Parser String
prefixParser' d = do
pr <- choice $ map (try . string) (prefixes d)
_ <- choice $ map (try . string) (unitsList d)
return pr
-- | Converts string to a Quantity using an expression grammar parser. This
-- parser does not parser addition or subtraction, and is used fo... | 342 | prefixParser' d = do
pr <- choice $ map (try . string) (prefixes d)
_ <- choice $ map (try . string) (unitsList d)
return pr
-- | Converts string to a Quantity using an expression grammar parser. This
-- parser does not parser addition or subtraction, and is used for unit
-- definitions. | 296 | false | true | 0 | 12 | 67 | 93 | 44 | 49 | null | null |
uduki/hsQt | Qtc/Enums/Gui/QAbstractItemView.hs | bsd-2-clause | fEditKeyPressed :: EditTriggers
fEditKeyPressed
= ifEditTriggers $ 8 | 70 | fEditKeyPressed :: EditTriggers
fEditKeyPressed
= ifEditTriggers $ 8 | 70 | fEditKeyPressed
= ifEditTriggers $ 8 | 38 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
innovimax/bond | compiler/Bond/Template/Cs/Util.hs | mit | defaultValue :: MappingContext -> Field -> Maybe Text
defaultValue cs Field {fieldDefault = Nothing, ..} = implicitDefault fieldType
where
newInstance t = Just [lt|new #{getInstanceTypeName cs t}()|]
implicitDefault BT_String = Just "string.Empty"
implicitDefault BT_WString = Just "string.Em... | 1,122 | defaultValue :: MappingContext -> Field -> Maybe Text
defaultValue cs Field {fieldDefault = Nothing, ..} = implicitDefault fieldType
where
newInstance t = Just [lt|new #{getInstanceTypeName cs t}()|]
implicitDefault BT_String = Just "string.Empty"
implicitDefault BT_WString = Just "string.Em... | 1,122 | defaultValue cs Field {fieldDefault = Nothing, ..} = implicitDefault fieldType
where
newInstance t = Just [lt|new #{getInstanceTypeName cs t}()|]
implicitDefault BT_String = Just "string.Empty"
implicitDefault BT_WString = Just "string.Empty"
implicitDefault (BT_Bonded t) = Just [lt|... | 1,068 | false | true | 0 | 13 | 269 | 316 | 161 | 155 | null | null |
dpwright/z80 | src/Z80/Operands/LowerCase.hs | mit | nz = NZ | 8 | nz = NZ | 8 | nz = NZ | 8 | false | false | 1 | 5 | 3 | 10 | 3 | 7 | null | null |
goldfirere/singletons | singletons-base/src/Data/Bool/Singletons.hs | bsd-3-clause | sIf :: Sing a -> Sing b -> Sing c -> Sing (If a b c)
sIf STrue b _ = b | 70 | sIf :: Sing a -> Sing b -> Sing c -> Sing (If a b c)
sIf STrue b _ = b | 70 | sIf STrue b _ = b | 17 | false | true | 0 | 11 | 21 | 57 | 25 | 32 | null | null |
mrakgr/futhark | src/Futhark/Internalise.hs | bsd-3-clause | internaliseExp desc (E.LetWith name src idxs ve body loc) = do
idxs' <- mapM (internaliseExp1 "idx") idxs
srcs <- internaliseExpToVars "src" $ E.Var src
ves <- internaliseExp "lw_val" ve
idxcs' <- boundsChecks loc srcs idxs'
let comb sname ve' = do
rowtype <- I.stripArray (length idxs) <$> lookupType ... | 774 | internaliseExp desc (E.LetWith name src idxs ve body loc) = do
idxs' <- mapM (internaliseExp1 "idx") idxs
srcs <- internaliseExpToVars "src" $ E.Var src
ves <- internaliseExp "lw_val" ve
idxcs' <- boundsChecks loc srcs idxs'
let comb sname ve' = do
rowtype <- I.stripArray (length idxs) <$> lookupType ... | 774 | internaliseExp desc (E.LetWith name src idxs ve body loc) = do
idxs' <- mapM (internaliseExp1 "idx") idxs
srcs <- internaliseExpToVars "src" $ E.Var src
ves <- internaliseExp "lw_val" ve
idxcs' <- boundsChecks loc srcs idxs'
let comb sname ve' = do
rowtype <- I.stripArray (length idxs) <$> lookupType ... | 774 | false | false | 0 | 19 | 173 | 309 | 141 | 168 | null | null |
dorchard/camfort | src/Camfort/Output.hs | apache-2.0 | refactorBlocks v inp (F.BlStatement _ _ _ [email protected]{}) =
refactorStatements v inp s | 95 | refactorBlocks v inp (F.BlStatement _ _ _ [email protected]{}) =
refactorStatements v inp s | 95 | refactorBlocks v inp (F.BlStatement _ _ _ [email protected]{}) =
refactorStatements v inp s | 95 | false | false | 0 | 10 | 16 | 43 | 21 | 22 | null | null |
michaeljklein/CPlug | test/Scratch.hs | bsd-3-clause | t1 :: Int -> Wrapped (Int -> Int) Int
t1 x = defWrap $ u x | 58 | t1 :: Int -> Wrapped (Int -> Int) Int
t1 x = defWrap $ u x | 58 | t1 x = defWrap $ u x | 20 | false | true | 0 | 8 | 15 | 37 | 18 | 19 | null | null |
GaloisInc/saw-script | rme/src/Data/RME/Base.hs | bsd-3-clause | allsat (Node n a b) =
map ((n, False) :) (allsat a) ++ map ((n, True) :) (allsat (xor a b)) | 93 | allsat (Node n a b) =
map ((n, False) :) (allsat a) ++ map ((n, True) :) (allsat (xor a b)) | 93 | allsat (Node n a b) =
map ((n, False) :) (allsat a) ++ map ((n, True) :) (allsat (xor a b)) | 93 | false | false | 2 | 9 | 22 | 76 | 39 | 37 | null | null |
emaphis/Haskell-Practice | basebull/src/Basebull.hs | bsd-3-clause | fourth :: (a, b, c, d) -> d
fourth (_, _, _, d) = d | 51 | fourth :: (a, b, c, d) -> d
fourth (_, _, _, d) = d | 51 | fourth (_, _, _, d) = d | 23 | false | true | 0 | 6 | 14 | 46 | 26 | 20 | null | null |
izgzhen/RuScript | rusc/src/MultiplateDerive.hs | mit | lowerHead :: String -> String
lowerHead "" = "" | 47 | lowerHead :: String -> String
lowerHead "" = "" | 47 | lowerHead "" = "" | 17 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
plaimi/tempuhs-server | src/Tempuhs/Server/Requests/Permissionset.hs | agpl-3.0 | patchPermissionset :: ConnectionPool -> ActionE ()
-- | 'patchPermissionset' modifies a 'Permissionset'.
patchPermissionset p = do
ps <- paramE "permissionset"
o <- maybeParam "own"
r <- maybeParam "read"
w <- maybeParam "write"
runDatabase p $ let k = mkKey ps in liftAE . jsonKey =<< do
update k (... | 483 | patchPermissionset :: ConnectionPool -> ActionE ()
patchPermissionset p = do
ps <- paramE "permissionset"
o <- maybeParam "own"
r <- maybeParam "read"
w <- maybeParam "write"
runDatabase p $ let k = mkKey ps in liftAE . jsonKey =<< do
update k (concat [PermissionsetOwn =.. o
... | 429 | patchPermissionset p = do
ps <- paramE "permissionset"
o <- maybeParam "own"
r <- maybeParam "read"
w <- maybeParam "write"
runDatabase p $ let k = mkKey ps in liftAE . jsonKey =<< do
update k (concat [PermissionsetOwn =.. o
,PermissionsetRead =.. r
,Per... | 378 | true | true | 0 | 17 | 151 | 137 | 62 | 75 | null | null |
chengzh2008/hpffp | src/ch08-Recursion/recursionAndComposition.hs | bsd-3-clause | -- control the number of recursions explicitly
incTimes :: (Eq a, Num a) => a -> a -> a
incTimes 0 n = n | 104 | incTimes :: (Eq a, Num a) => a -> a -> a
incTimes 0 n = n | 57 | incTimes 0 n = n | 16 | true | true | 0 | 7 | 23 | 40 | 21 | 19 | null | null |
kojiromike/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | process fn (SetConsoleWidth w) = setWidth w | 43 | process fn (SetConsoleWidth w) = setWidth w | 43 | process fn (SetConsoleWidth w) = setWidth w | 43 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
eugenkiss/loopgotowhile | src/Language/LoopGotoWhile/Shared/Extended.hs | bsd-3-clause | reservedOp :: forall st. String -> CharParser st ()
reservedOp = P.reservedOp lexer | 83 | reservedOp :: forall st. String -> CharParser st ()
reservedOp = P.reservedOp lexer | 83 | reservedOp = P.reservedOp lexer | 31 | false | true | 0 | 9 | 12 | 37 | 17 | 20 | null | null |
tjakway/ghcjvm | ghc/Main.hs | bsd-3-clause | isShowVersionMode _ = False | 27 | isShowVersionMode _ = False | 27 | isShowVersionMode _ = False | 27 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
KommuSoft/dep-software | Test.Dep.Ui.Schematics.hs | gpl-3.0 | prop_ticks_even :: Bool
prop_ticks_even = even schematicsTick | 61 | prop_ticks_even :: Bool
prop_ticks_even = even schematicsTick | 61 | prop_ticks_even = even schematicsTick | 37 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
dysinger/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | Specifies the pending port for the DB instance.
pmvPort :: Lens' PendingModifiedValues (Maybe Int)
pmvPort = lens _pmvPort (\s a -> s { _pmvPort = a }) | 156 | pmvPort :: Lens' PendingModifiedValues (Maybe Int)
pmvPort = lens _pmvPort (\s a -> s { _pmvPort = a }) | 103 | pmvPort = lens _pmvPort (\s a -> s { _pmvPort = a }) | 52 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
haslab/SecreC | src/Language/SecreC/TypeChecker/Expression.hs | gpl-3.0 | tcMultisetLiteral :: (ProverK loc m) => loc -> Maybe Type -> [Expression Identifier loc] -> TcM m (Expression GIdentifier (Typed loc))
tcMultisetLiteral l ret es = do
ct@(ComplexT bt) <- newTyVar False False Nothing
let t = BaseT (MSet bt)
unifiesRet l ret t
es' <- mapM (tcExpr $ Just ct) es
le... | 462 | tcMultisetLiteral :: (ProverK loc m) => loc -> Maybe Type -> [Expression Identifier loc] -> TcM m (Expression GIdentifier (Typed loc))
tcMultisetLiteral l ret es = do
ct@(ComplexT bt) <- newTyVar False False Nothing
let t = BaseT (MSet bt)
unifiesRet l ret t
es' <- mapM (tcExpr $ Just ct) es
le... | 462 | tcMultisetLiteral l ret es = do
ct@(ComplexT bt) <- newTyVar False False Nothing
let t = BaseT (MSet bt)
unifiesRet l ret t
es' <- mapM (tcExpr $ Just ct) es
let es'' = fmap (fmap typed) es'
xs <- tcCoercesN l True es'' ct
return $ MultisetConstructorPExpr (Typed l t) $ map (fmap (Typed... | 327 | false | true | 0 | 13 | 110 | 225 | 103 | 122 | null | null |
phischu/fragnix | tests/packages/scotty/System.Directory.hs | bsd-3-clause | findFile :: [FilePath] -> String -> IO (Maybe FilePath)
findFile = findFileWith (\_ -> return True) | 99 | findFile :: [FilePath] -> String -> IO (Maybe FilePath)
findFile = findFileWith (\_ -> return True) | 99 | findFile = findFileWith (\_ -> return True) | 43 | false | true | 0 | 9 | 15 | 45 | 23 | 22 | null | null |
rueshyna/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Delete.hs | mpl-2.0 | -- | Creates a value of 'ProjectsTriggersDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ptdXgafv'
--
-- * 'ptdUploadProtocol'
--
-- * 'ptdTriggerId'
--
-- * 'ptdPp'
--
-- * 'ptdAccessToken'
--
-- * 'ptdUploadType'
--
-- * 'pt... | 863 | projectsTriggersDelete
:: Text -- ^ 'ptdTriggerId'
-> Text -- ^ 'ptdProjectId'
-> ProjectsTriggersDelete
projectsTriggersDelete pPtdTriggerId_ pPtdProjectId_ =
ProjectsTriggersDelete'
{ _ptdXgafv = Nothing
, _ptdUploadProtocol = Nothing
, _ptdTriggerId = pPtdTriggerId_
, _ptdPp = True
... | 484 | projectsTriggersDelete pPtdTriggerId_ pPtdProjectId_ =
ProjectsTriggersDelete'
{ _ptdXgafv = Nothing
, _ptdUploadProtocol = Nothing
, _ptdTriggerId = pPtdTriggerId_
, _ptdPp = True
, _ptdAccessToken = Nothing
, _ptdUploadType = Nothing
, _ptdBearerToken = Nothing
, _ptdProjectId = pP... | 367 | true | true | 0 | 8 | 176 | 112 | 74 | 38 | null | null |
sdiehl/ghc | compiler/main/HscTypes.hs | bsd-3-clause | mkCompleteMatchMap :: [CompleteMatch] -> CompleteMatchMap
mkCompleteMatchMap = extendCompleteMatchMap emptyUFM | 110 | mkCompleteMatchMap :: [CompleteMatch] -> CompleteMatchMap
mkCompleteMatchMap = extendCompleteMatchMap emptyUFM | 110 | mkCompleteMatchMap = extendCompleteMatchMap emptyUFM | 52 | false | true | 0 | 7 | 8 | 27 | 12 | 15 | null | null |
haskellbr/missingh | missingh-all/src/Data/MIME/Types.hs | mit | setStrict mtd False func = mtd{commonTypesMap = func (commonTypesMap mtd)} | 74 | setStrict mtd False func = mtd{commonTypesMap = func (commonTypesMap mtd)} | 74 | setStrict mtd False func = mtd{commonTypesMap = func (commonTypesMap mtd)} | 74 | false | false | 0 | 9 | 9 | 30 | 15 | 15 | null | null |
j5b/ps-pc | ModelChecker_test.hs | gpl-3.0 | test315 = testequality "Failed to show forall R top is true" result target $ printModel gammaModel
where result = snd $ checkInputModel gammaModel [forall_r_top] []
target = True | 189 | test315 = testequality "Failed to show forall R top is true" result target $ printModel gammaModel
where result = snd $ checkInputModel gammaModel [forall_r_top] []
target = True | 189 | test315 = testequality "Failed to show forall R top is true" result target $ printModel gammaModel
where result = snd $ checkInputModel gammaModel [forall_r_top] []
target = True | 189 | false | false | 4 | 6 | 38 | 57 | 24 | 33 | null | null |
adinapoli/memento | main/Memento/CLI.hs | mit | cli :: Parser CLI
cli = foldr1 (<|>) [mem, hangout, interactive] | 64 | cli :: Parser CLI
cli = foldr1 (<|>) [mem, hangout, interactive] | 64 | cli = foldr1 (<|>) [mem, hangout, interactive] | 46 | false | true | 0 | 6 | 10 | 30 | 17 | 13 | null | null |
mjansen/log-parser | LogParser.hs | mit | -- We assume that there was no timezone change for the log duration.
-- If there was we will get an error. As we would like to stream the
-- data, we will not know until the end.
convertLog :: Integer -> FilePath -> FilePath -> IO ()
convertLog year fileName fixedName = do
tzs <- getTimeZoneSeriesFromOlsonFile "/e... | 1,015 | convertLog :: Integer -> FilePath -> FilePath -> IO ()
convertLog year fileName fixedName = do
tzs <- getTimeZoneSeriesFromOlsonFile "/etc/localtime"
hIn <- openFile fileName ReadMode
hOut <- openFile fixedName WriteMode
let p = parseLocalTimeStamp tzs year
loop = do
ok <- not <$> hIsEOF hIn
... | 834 | convertLog year fileName fixedName = do
tzs <- getTimeZoneSeriesFromOlsonFile "/etc/localtime"
hIn <- openFile fileName ReadMode
hOut <- openFile fixedName WriteMode
let p = parseLocalTimeStamp tzs year
loop = do
ok <- not <$> hIsEOF hIn
when ok $ do
l <- BC.hGetLine hIn
... | 779 | true | true | 0 | 27 | 308 | 308 | 145 | 163 | null | null |
bkoropoff/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | unifyGoal :: Raw -> Elab' aux ()
unifyGoal t = processTactic' (UnifyGoal t) | 75 | unifyGoal :: Raw -> Elab' aux ()
unifyGoal t = processTactic' (UnifyGoal t) | 75 | unifyGoal t = processTactic' (UnifyGoal t) | 42 | false | true | 0 | 8 | 12 | 38 | 17 | 21 | null | null |
dec9ue/jhc_copygc | src/Grin/Show.hs | gpl-2.0 | prettyExp vl (e1 :>>= v :-> e2) = align (prettyExp (pVar v) e1 <$> prettyExp vl e2) | 83 | prettyExp vl (e1 :>>= v :-> e2) = align (prettyExp (pVar v) e1 <$> prettyExp vl e2) | 83 | prettyExp vl (e1 :>>= v :-> e2) = align (prettyExp (pVar v) e1 <$> prettyExp vl e2) | 83 | false | false | 0 | 10 | 16 | 50 | 23 | 27 | null | null |
isomorphism/webgl | src/Graphics/Rendering/WebGL/Constants.hs | mit | gl_PIXEL_UNPACK_BUFFER :: GLenum
gl_PIXEL_UNPACK_BUFFER = 0x88EC | 64 | gl_PIXEL_UNPACK_BUFFER :: GLenum
gl_PIXEL_UNPACK_BUFFER = 0x88EC | 64 | gl_PIXEL_UNPACK_BUFFER = 0x88EC | 31 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
raimohanska/reactive-bacon | src/Reactive/Bacon/EventStream/Timed.hs | bsd-3-clause | sequentiallyE :: TimeDiff -> [a] -> IO (EventStream a)
sequentiallyE delay xs = timedE (map (delay,) xs) >>= return . fst | 121 | sequentiallyE :: TimeDiff -> [a] -> IO (EventStream a)
sequentiallyE delay xs = timedE (map (delay,) xs) >>= return . fst | 121 | sequentiallyE delay xs = timedE (map (delay,) xs) >>= return . fst | 66 | false | true | 0 | 10 | 20 | 59 | 30 | 29 | null | null |
mzini/TcT | source/Tct/Method/Matrix/ArcticMI.hs | gpl-3.0 | orientDirect :: P.SolverM m => Prob.Strategy -> Prob.StartTerms -> Trs.Trs -> F.Signature -> S.TheProcessor ArcticMI -> m (S.ProofOf ArcticMI)
orientDirect strat st trs sig mp = orientMatrix relativeConstraints ua st trs Trs.empty sig mp
where ua = usableArgsWhereApplicable True sig st (isUargsOn mp) strat trs | 313 | orientDirect :: P.SolverM m => Prob.Strategy -> Prob.StartTerms -> Trs.Trs -> F.Signature -> S.TheProcessor ArcticMI -> m (S.ProofOf ArcticMI)
orientDirect strat st trs sig mp = orientMatrix relativeConstraints ua st trs Trs.empty sig mp
where ua = usableArgsWhereApplicable True sig st (isUargsOn mp) strat trs | 313 | orientDirect strat st trs sig mp = orientMatrix relativeConstraints ua st trs Trs.empty sig mp
where ua = usableArgsWhereApplicable True sig st (isUargsOn mp) strat trs | 170 | false | true | 1 | 14 | 46 | 126 | 58 | 68 | null | null |
urbanslug/ghc | compiler/main/HscMain.hs | bsd-3-clause | hscParseStmt :: String -> Hsc (Maybe (GhciLStmt RdrName))
hscParseStmt = hscParseThing parseStmt | 96 | hscParseStmt :: String -> Hsc (Maybe (GhciLStmt RdrName))
hscParseStmt = hscParseThing parseStmt | 96 | hscParseStmt = hscParseThing parseStmt | 38 | false | true | 0 | 11 | 11 | 38 | 17 | 21 | null | null |
yu-i9/thih | src/Thih/TI/Pat.hs | bsd-3-clause | tiPat (PCon (i:>:sc) pats) = do (ps,as,ts) <- tiPats pats
t' <- newTVar Star
(qs :=> t) <- freshInst sc
unify t (foldr fn t' ts)
return (ps++qs, as, t') | 288 | tiPat (PCon (i:>:sc) pats) = do (ps,as,ts) <- tiPats pats
t' <- newTVar Star
(qs :=> t) <- freshInst sc
unify t (foldr fn t' ts)
return (ps++qs, as, t') | 288 | tiPat (PCon (i:>:sc) pats) = do (ps,as,ts) <- tiPats pats
t' <- newTVar Star
(qs :=> t) <- freshInst sc
unify t (foldr fn t' ts)
return (ps++qs, as, t') | 288 | false | false | 0 | 9 | 165 | 108 | 52 | 56 | null | null |
fmapfmapfmap/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/CreateVault.hs | mpl-2.0 | -- | Creates a value of 'CreateVaultResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cvrsLocation'
--
-- * 'cvrsResponseStatus'
createVaultResponse
:: Int -- ^ 'cvrsResponseStatus'
-> CreateVaultResponse
createVaultRe... | 451 | createVaultResponse
:: Int -- ^ 'cvrsResponseStatus'
-> CreateVaultResponse
createVaultResponse pResponseStatus_ =
CreateVaultResponse'
{ _cvrsLocation = Nothing
, _cvrsResponseStatus = pResponseStatus_
} | 228 | createVaultResponse pResponseStatus_ =
CreateVaultResponse'
{ _cvrsLocation = Nothing
, _cvrsResponseStatus = pResponseStatus_
} | 144 | true | true | 0 | 7 | 82 | 49 | 28 | 21 | null | null |
byorgey/stackage | Stackage/ServerFiles.hs | mit | createHackageFile :: Bool -- ^ inclusive?
-> InstallInfo
-> String -- ^ GHC version
-> String -- ^ date
-> Handle -- ^ hackage
-> Handle -- ^ tarballs
-> IO ()
createHackageFile isInc ii ghcVer date hackageH tarb... | 2,232 | createHackageFile :: Bool -- ^ inclusive?
-> InstallInfo
-> String -- ^ GHC version
-> String -- ^ date
-> Handle -- ^ hackage
-> Handle -- ^ tarballs
-> IO ()
createHackageFile isInc ii ghcVer date hackageH tarb... | 2,232 | createHackageFile isInc ii ghcVer date hackageH tarballH = do
let stackageFP = concat
[ "../ghc-"
, ghcVer
, "-"
, date
, if isInc then "-inclusive" else "-exclusive"
, ".stackage"
]
hPutStr tarballH $ concat
[ "#!/bin/b... | 1,964 | false | true | 0 | 14 | 909 | 595 | 295 | 300 | null | null |
eamsden/time-flies | src/FRP/TimeFlies/Types.hs | bsd-3-clause | sampleDelta SVSampleEvent = SVDeltaNothing | 42 | sampleDelta SVSampleEvent = SVDeltaNothing | 42 | sampleDelta SVSampleEvent = SVDeltaNothing | 42 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Zoetermeer/latro | src/Latro/Typecheck.hs | mit | addBindingsForPat (ILPatChar _ _) _ = return () | 47 | addBindingsForPat (ILPatChar _ _) _ = return () | 47 | addBindingsForPat (ILPatChar _ _) _ = return () | 47 | false | false | 1 | 6 | 7 | 24 | 11 | 13 | null | null |
GU-CLASP/TypedFlow | TypedFlow/Learn.hs | lgpl-3.0 | genPlaceholders (ph :* names) = PHT (T (ExternalVar (Ref (placeholderName ph) typeSShape typeSTyp))) :* genPlaceholders names | 125 | genPlaceholders (ph :* names) = PHT (T (ExternalVar (Ref (placeholderName ph) typeSShape typeSTyp))) :* genPlaceholders names | 125 | genPlaceholders (ph :* names) = PHT (T (ExternalVar (Ref (placeholderName ph) typeSShape typeSTyp))) :* genPlaceholders names | 125 | false | false | 0 | 14 | 15 | 54 | 26 | 28 | null | null |
tmcdonell/hfx | src/haskell/Util/Time.hs | bsd-3-clause | microsecond n = n `div` 1000000 | 31 | microsecond n = n `div` 1000000 | 31 | microsecond n = n `div` 1000000 | 31 | false | false | 0 | 5 | 5 | 15 | 8 | 7 | null | null |
sdiehl/ghc | compiler/ghci/ByteCodeAsm.hs | bsd-3-clause | assembleI :: DynFlags
-> BCInstr
-> Assembler ()
assembleI dflags i = case i of
STKCHECK n -> emit bci_STKCHECK [Op n]
PUSH_L o1 -> emit bci_PUSH_L [SmallOp o1]
PUSH_LL o1 o2 -> emit bci_PUSH_LL [SmallOp o1, SmallOp o2]
PUSH_LLL o1 o2 o3 -> emit... | 6,808 | assembleI :: DynFlags
-> BCInstr
-> Assembler ()
assembleI dflags i = case i of
STKCHECK n -> emit bci_STKCHECK [Op n]
PUSH_L o1 -> emit bci_PUSH_L [SmallOp o1]
PUSH_LL o1 o2 -> emit bci_PUSH_LL [SmallOp o1, SmallOp o2]
PUSH_LLL o1 o2 o3 -> emit... | 6,808 | assembleI dflags i = case i of
STKCHECK n -> emit bci_STKCHECK [Op n]
PUSH_L o1 -> emit bci_PUSH_L [SmallOp o1]
PUSH_LL o1 o2 -> emit bci_PUSH_LL [SmallOp o1, SmallOp o2]
PUSH_LLL o1 o2 o3 -> emit bci_PUSH_LLL [SmallOp o1, SmallOp o2, SmallOp o3]
PUSH8 o1 ... | 6,739 | false | true | 8 | 15 | 2,764 | 2,014 | 931 | 1,083 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 4405999 = 2866 | 34 | getValueFromProduct 4405999 = 2866 | 34 | getValueFromProduct 4405999 = 2866 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
lordi/haskell-terminal | tests/terminal/Main.hs | gpl-2.0 | -- |Apply a list of `TerminalAction`s to the default terminal
applyDef actions = handleActions actions defaultTerm | 114 | applyDef actions = handleActions actions defaultTerm | 52 | applyDef actions = handleActions actions defaultTerm | 52 | true | false | 0 | 5 | 15 | 15 | 7 | 8 | null | null |
spechub/Hets | Common/MathLink.hs | gpl-2.0 | -- * C to Haskell utilities
withStringArray :: MonadIO m => [String] -> (Ptr CString -> IO b) -> m b
withStringArray l f = liftIO $ mapM newCString l >>= flip withArray f | 171 | withStringArray :: MonadIO m => [String] -> (Ptr CString -> IO b) -> m b
withStringArray l f = liftIO $ mapM newCString l >>= flip withArray f | 142 | withStringArray l f = liftIO $ mapM newCString l >>= flip withArray f | 69 | true | true | 0 | 10 | 34 | 69 | 33 | 36 | null | null |
cbaatz/hamu8080 | src/Hamu8080/Compute.hs | mit | -- MOV C, D
doOp 0x4B = setReg C =<< getReg E | 45 | doOp 0x4B = setReg C =<< getReg E | 33 | doOp 0x4B = setReg C =<< getReg E | 33 | true | false | 0 | 6 | 11 | 20 | 9 | 11 | null | null |
dylex/range-set | tests/List.hs | mit | elementsProp :: SetAction Int -> Property
elementsProp seta = Set.elems (toSet seta) === RSet.elems (toRSet seta) | 113 | elementsProp :: SetAction Int -> Property
elementsProp seta = Set.elems (toSet seta) === RSet.elems (toRSet seta) | 113 | elementsProp seta = Set.elems (toSet seta) === RSet.elems (toRSet seta) | 71 | false | true | 0 | 8 | 15 | 52 | 23 | 29 | null | null |
ulricha/dsh | src/Database/DSH/Translate/SL2Algebra.hs | bsd-3-clause | translateTerOp :: SegmentAlgebra a
=> SL.TerOp
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> B.Build a... | 592 | translateTerOp :: SegmentAlgebra a
=> SL.TerOp
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> B.Build a... | 592 | translateTerOp t c1 c2 c3 =
case t of
SL.Combine -> do
(d, r1, r2) <- vecCombine (toDVec c1) (toDVec c2) (toDVec c3)
return $ RTriple (fromDVec d) (fromKVec r1) (fromKVec r2) | 210 | false | true | 0 | 14 | 198 | 304 | 149 | 155 | null | null |
kawu/skladnica-with-walenty | src/NLP/Skladnica/Walenty/Search.hs | bsd-2-clause | --------------------------------------------------------------------------------
-- Conversion to Query
--------------------------------------------------------------------------------
-- | Convert the given verbal entry from Walenty to a query.
--
-- TODO: The following are ignored for the moment:
--
-- * Negativi... | 475 | querify :: W.Verb -> Expr SklTree
querify verb = andQ
[ trunk . hasBase . W.base $ verb
, frameQ (W.frame verb) ] | 117 | querify verb = andQ
[ trunk . hasBase . W.base $ verb
, frameQ (W.frame verb) ] | 83 | true | true | 0 | 9 | 73 | 68 | 39 | 29 | null | null |
AlexanderPankiv/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | coerceFP2Int :: Width -> Width -> CmmExpr -> NatM Register
coerceFP2Int from to x = if_sse2 coerceFP2Int_sse2 coerceFP2Int_x87
where
coerceFP2Int_x87 = do
(x_reg, x_code) <- getSomeReg x
let
opc = case from of W32 -> GFTOI; W64 -> GDTOI
n -> panic $ "coerceFP2Int... | 1,096 | coerceFP2Int :: Width -> Width -> CmmExpr -> NatM Register
coerceFP2Int from to x = if_sse2 coerceFP2Int_sse2 coerceFP2Int_x87
where
coerceFP2Int_x87 = do
(x_reg, x_code) <- getSomeReg x
let
opc = case from of W32 -> GFTOI; W64 -> GDTOI
n -> panic $ "coerceFP2Int... | 1,096 | coerceFP2Int from to x = if_sse2 coerceFP2Int_sse2 coerceFP2Int_x87
where
coerceFP2Int_x87 = do
(x_reg, x_code) <- getSomeReg x
let
opc = case from of W32 -> GFTOI; W64 -> GDTOI
n -> panic $ "coerceFP2Int.x87: unhandled width ("
... | 1,037 | false | true | 2 | 16 | 387 | 279 | 135 | 144 | null | null |
xaverdh/hfish-parser | HFish/QuickCheck/Arbitrary.hs | mit | genVarIdent = mkNText . T.pack
<$> ( listOf1
( arbitrary `suchThat` f)
`suchThat` ( C.isLetter . head ) )
where
f c = C.isAlphaNum c || (=='_') c | 169 | genVarIdent = mkNText . T.pack
<$> ( listOf1
( arbitrary `suchThat` f)
`suchThat` ( C.isLetter . head ) )
where
f c = C.isAlphaNum c || (=='_') c | 169 | genVarIdent = mkNText . T.pack
<$> ( listOf1
( arbitrary `suchThat` f)
`suchThat` ( C.isLetter . head ) )
where
f c = C.isAlphaNum c || (=='_') c | 169 | false | false | 2 | 9 | 51 | 74 | 39 | 35 | null | null |
seckcoder/vector | Data/Vector/Fusion/Bundle/Monadic.hs | bsd-3-clause | flatten mk istep sz Bundle{sElems = s} = fromStream (S.flatten mk istep s) sz | 77 | flatten mk istep sz Bundle{sElems = s} = fromStream (S.flatten mk istep s) sz | 77 | flatten mk istep sz Bundle{sElems = s} = fromStream (S.flatten mk istep s) sz | 77 | false | false | 1 | 8 | 13 | 50 | 21 | 29 | null | null |
GRACeFUL-project/GRACe | RestAPI/Main.hs | bsd-3-clause | -- tells the static path where to look (location of the editor (index.html and java scripts))
hdr :: Handler a -> Handler (Resp a)
hdr h = h >>= return . addHeader "*" | 168 | hdr :: Handler a -> Handler (Resp a)
hdr h = h >>= return . addHeader "*" | 73 | hdr h = h >>= return . addHeader "*" | 36 | true | true | 0 | 8 | 33 | 42 | 20 | 22 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.