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
olsner/ghc
compiler/vectorise/Vectorise/Builtins/Base.hs
bsd-3-clause
packByTagPD_PrimVar :: TyCon -> Builtins -> Var packByTagPD_PrimVar tc bi = lookupEnvBuiltin "packByTagPD_PrimVar" (packByTagPD_PrimVars bi) (tyConName tc)
157
packByTagPD_PrimVar :: TyCon -> Builtins -> Var packByTagPD_PrimVar tc bi = lookupEnvBuiltin "packByTagPD_PrimVar" (packByTagPD_PrimVars bi) (tyConName tc)
157
packByTagPD_PrimVar tc bi = lookupEnvBuiltin "packByTagPD_PrimVar" (packByTagPD_PrimVars bi) (tyConName tc)
109
false
true
0
7
18
43
21
22
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/RDSDBInstance.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbparametergroupname rdsdbiDBParameterGroupName :: Lens' RDSDBInstance (Maybe (Val Text)) rdsdbiDBParameterGroupName = lens _rDSDBInstanceDBParameterGroupName (\s a -> s { _rDSDBInstanceDBParameterGroupName = a })
341
rdsdbiDBParameterGroupName :: Lens' RDSDBInstance (Maybe (Val Text)) rdsdbiDBParameterGroupName = lens _rDSDBInstanceDBParameterGroupName (\s a -> s { _rDSDBInstanceDBParameterGroupName = a })
192
rdsdbiDBParameterGroupName = lens _rDSDBInstanceDBParameterGroupName (\s a -> s { _rDSDBInstanceDBParameterGroupName = a })
123
true
true
0
9
22
52
28
24
null
null
ndmitchell/tagsoup
src/Text/HTML/TagSoup/Type.hs
bsd-3-clause
-- | Extract all text content from tags (similar to Verbatim found in HaXml) innerText :: StringLike str => [Tag str] -> str innerText = strConcat . mapMaybe maybeTagText
170
innerText :: StringLike str => [Tag str] -> str innerText = strConcat . mapMaybe maybeTagText
93
innerText = strConcat . mapMaybe maybeTagText
45
true
true
0
8
28
36
18
18
null
null
oden-lang/oden
src/Oden/Pretty.hs
mit
isFunctionType :: Poly.Type -> Bool isFunctionType = \case Poly.TFn{} -> True Poly.TNoArgFn{} -> True Poly.TForeignFn{} -> True _ -> False
171
isFunctionType :: Poly.Type -> Bool isFunctionType = \case Poly.TFn{} -> True Poly.TNoArgFn{} -> True Poly.TForeignFn{} -> True _ -> False
171
isFunctionType = \case Poly.TFn{} -> True Poly.TNoArgFn{} -> True Poly.TForeignFn{} -> True _ -> False
135
false
true
2
6
52
40
26
14
null
null
larioj/nemo
src/Config.hs
mit
configDir :: String configDir = "NemoLib"
41
configDir :: String configDir = "NemoLib"
41
configDir = "NemoLib"
21
false
true
0
4
5
11
6
5
null
null
patrikja/SyntheticPopulations
src/Example1.hs
bsd-3-clause
smallPopProblem1 = take 3 (drop 9 fullPop)
42
smallPopProblem1 = take 3 (drop 9 fullPop)
42
smallPopProblem1 = take 3 (drop 9 fullPop)
42
false
false
1
7
6
24
9
15
null
null
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/Concepts/Physics.hs
bsd-2-clause
pressure = dccWDS "pressure" (cn' "pressure") (S "a" +:+ phrase force +:+ S "exerted over an area")
101
pressure = dccWDS "pressure" (cn' "pressure") (S "a" +:+ phrase force +:+ S "exerted over an area")
101
pressure = dccWDS "pressure" (cn' "pressure") (S "a" +:+ phrase force +:+ S "exerted over an area")
101
false
false
1
9
18
45
18
27
null
null
green-haskell/ghc
libraries/base/Data/OldList.hs
bsd-3-clause
inits :: [a] -> [[a]] inits = map toListSB . scanl' snocSB emptySB
102
inits :: [a] -> [[a]] inits = map toListSB . scanl' snocSB emptySB
102
inits = map toListSB . scanl' snocSB emptySB
62
false
true
0
7
48
36
19
17
null
null
tjakway/ghcjvm
compiler/main/DynFlags.hs
bsd-3-clause
add_dep_message (OptIntSuffix f) message = OptIntSuffix $ \oi -> f oi >> deprecate message
121
add_dep_message (OptIntSuffix f) message = OptIntSuffix $ \oi -> f oi >> deprecate message
121
add_dep_message (OptIntSuffix f) message = OptIntSuffix $ \oi -> f oi >> deprecate message
121
false
false
1
8
44
40
17
23
null
null
romanb/amazonka
amazonka-kinesis/gen/Network/AWS/Kinesis/Types.hs
mpl-2.0
-- | 'HashKeyRange' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'hkrEndingHashKey' @::@ 'Text' -- -- * 'hkrStartingHashKey' @::@ 'Text' -- hashKeyRange :: Text -- ^ 'hkrStartingHashKey' -> Text -- ^ 'hkrEndingHashKey' -> HashKeyRange hashKeyRange p1 p2 = HashKeyRange { _hkrStartingHashKey = p1 , _hkrEndingHashKey = p2 }
400
hashKeyRange :: Text -- ^ 'hkrStartingHashKey' -> Text -- ^ 'hkrEndingHashKey' -> HashKeyRange hashKeyRange p1 p2 = HashKeyRange { _hkrStartingHashKey = p1 , _hkrEndingHashKey = p2 }
222
hashKeyRange p1 p2 = HashKeyRange { _hkrStartingHashKey = p1 , _hkrEndingHashKey = p2 }
101
true
true
0
7
92
52
32
20
null
null
nominolo/haddock2
src/Haddock/Convert.hs
bsd-2-clause
synifyIdSig :: SynifyTypeState -> Id -> Sig Name synifyIdSig s i = TypeSig (synifyName i) (synifyType s (varType i))
116
synifyIdSig :: SynifyTypeState -> Id -> Sig Name synifyIdSig s i = TypeSig (synifyName i) (synifyType s (varType i))
116
synifyIdSig s i = TypeSig (synifyName i) (synifyType s (varType i))
67
false
true
0
9
18
52
25
27
null
null
markflorisson/packages
Pkgs/Parser.hs
bsd-3-clause
parseExpr :: Parser Expr parseExpr = do expr1 <- parseLam <|> parseVarOrProj <|> parseIntVal <|> parseUnit <|> parens parseExpr appExpr <- optionMaybe parseExpr addExpr <- optionMaybe (charWS '+' *> parseExpr) return $ case (appExpr, addExpr) of (Just expr2, Nothing) -> App expr1 expr2 (Nothing, Just expr2) -> Plus expr1 expr2 (Nothing, Nothing) -> expr1
447
parseExpr :: Parser Expr parseExpr = do expr1 <- parseLam <|> parseVarOrProj <|> parseIntVal <|> parseUnit <|> parens parseExpr appExpr <- optionMaybe parseExpr addExpr <- optionMaybe (charWS '+' *> parseExpr) return $ case (appExpr, addExpr) of (Just expr2, Nothing) -> App expr1 expr2 (Nothing, Just expr2) -> Plus expr1 expr2 (Nothing, Nothing) -> expr1
447
parseExpr = do expr1 <- parseLam <|> parseVarOrProj <|> parseIntVal <|> parseUnit <|> parens parseExpr appExpr <- optionMaybe parseExpr addExpr <- optionMaybe (charWS '+' *> parseExpr) return $ case (appExpr, addExpr) of (Just expr2, Nothing) -> App expr1 expr2 (Nothing, Just expr2) -> Plus expr1 expr2 (Nothing, Nothing) -> expr1
422
false
true
0
13
144
146
69
77
null
null
Mokosha/Lambency
lib/Lambency/Transform.hs
mit
scale (Translate _ xf) = scale xf
33
scale (Translate _ xf) = scale xf
33
scale (Translate _ xf) = scale xf
33
false
false
0
7
6
20
9
11
null
null
brendanhay/czar
czar/Czar/Socket.hs
mpl-2.0
logPeerTX :: MonadIO m => String -> Context m () logPeerTX msg = do peer <- peerName name <- sockName logTX name peer msg
133
logPeerTX :: MonadIO m => String -> Context m () logPeerTX msg = do peer <- peerName name <- sockName logTX name peer msg
133
logPeerTX msg = do peer <- peerName name <- sockName logTX name peer msg
84
false
true
0
8
35
56
25
31
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/rangeSize_3.hs
mit
primCmpNat Zero (Succ y) = LT
29
primCmpNat Zero (Succ y) = LT
29
primCmpNat Zero (Succ y) = LT
29
false
false
0
7
5
17
8
9
null
null
fpco/rest-client
Setup.hs
bsd-3-clause
copyDirectory :: FilePath -> FilePath -> IO () copyDirectory src dst = do content <- getDirectoryContents src forM_ (filter (`notElem` [".", ".."]) content) $ \name -> do let srcPath = src ++ "/" ++ name dstPath = dst ++ "/" ++ name isDirectory <- doesDirectoryExist srcPath if isDirectory then do targetExists <- doesDirectoryExist dstPath unless targetExists $ createDirectory dstPath copyDirectory srcPath dstPath else copyFile srcPath dstPath -- Setup.hs ends her
533
copyDirectory :: FilePath -> FilePath -> IO () copyDirectory src dst = do content <- getDirectoryContents src forM_ (filter (`notElem` [".", ".."]) content) $ \name -> do let srcPath = src ++ "/" ++ name dstPath = dst ++ "/" ++ name isDirectory <- doesDirectoryExist srcPath if isDirectory then do targetExists <- doesDirectoryExist dstPath unless targetExists $ createDirectory dstPath copyDirectory srcPath dstPath else copyFile srcPath dstPath -- Setup.hs ends her
533
copyDirectory src dst = do content <- getDirectoryContents src forM_ (filter (`notElem` [".", ".."]) content) $ \name -> do let srcPath = src ++ "/" ++ name dstPath = dst ++ "/" ++ name isDirectory <- doesDirectoryExist srcPath if isDirectory then do targetExists <- doesDirectoryExist dstPath unless targetExists $ createDirectory dstPath copyDirectory srcPath dstPath else copyFile srcPath dstPath -- Setup.hs ends her
485
false
true
0
15
135
162
78
84
null
null
isomorphism/hackage2
Distribution/Server/Features/PackageList.hs
bsd-3-clause
updateDownload :: Int -> PackageItem -> PackageItem updateDownload count item = item { itemDownloads = count }
126
updateDownload :: Int -> PackageItem -> PackageItem updateDownload count item = item { itemDownloads = count }
126
updateDownload count item = item { itemDownloads = count }
74
false
true
0
6
32
32
17
15
null
null
jutaro/rdf4h
testsuite/tests/Data/RDF/GraphTestUtils.hs
bsd-3-clause
p_select_match_po :: RDF rdf => (rdf -> Triples) -> rdf -> Property p_select_match_po = p_select_match_fn same mkPattern where same t1 t2 = predicateOf t1 == predicateOf t2 && objectOf t1 == objectOf t2 mkPattern t = (Nothing, Just (\n -> n == predicateOf t), Just (\n -> n == objectOf t))
301
p_select_match_po :: RDF rdf => (rdf -> Triples) -> rdf -> Property p_select_match_po = p_select_match_fn same mkPattern where same t1 t2 = predicateOf t1 == predicateOf t2 && objectOf t1 == objectOf t2 mkPattern t = (Nothing, Just (\n -> n == predicateOf t), Just (\n -> n == objectOf t))
301
p_select_match_po = p_select_match_fn same mkPattern where same t1 t2 = predicateOf t1 == predicateOf t2 && objectOf t1 == objectOf t2 mkPattern t = (Nothing, Just (\n -> n == predicateOf t), Just (\n -> n == objectOf t))
233
false
true
2
11
62
143
64
79
null
null
LambdaMx/haskelldojo
session_1/StringCalculator.hs
unlicense
mkAdd3 delimiter = foldl1 (+) . map toInt . (split delimiter)
61
mkAdd3 delimiter = foldl1 (+) . map toInt . (split delimiter)
61
mkAdd3 delimiter = foldl1 (+) . map toInt . (split delimiter)
61
false
false
0
7
10
31
15
16
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\xF9E3' = "\x6CE5"
33
decomposeChar '\xF9E3' = "\x6CE5"
33
decomposeChar '\xF9E3' = "\x6CE5"
33
false
false
1
5
3
13
4
9
null
null
CompSciCabal/SMRTYPRTY
paip/pete/ch6/Search.hs
unlicense
binaryTree :: Integer -> [Integer] binaryTree n = [2*n, 2*n+1]
62
binaryTree :: Integer -> [Integer] binaryTree n = [2*n, 2*n+1]
62
binaryTree n = [2*n, 2*n+1]
27
false
true
0
8
9
45
22
23
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/ReturnpolicyOnline/Get.hs
mpl-2.0
-- | Creates a value of 'ReturnpolicyOnlineGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rogXgafv' -- -- * 'rogReturnPolicyId' -- -- * 'rogMerchantId' -- -- * 'rogUploadProtocol' -- -- * 'rogAccessToken' -- -- * 'rogUploadType' -- -- * 'rogCallback' returnpolicyOnlineGet :: Text -- ^ 'rogReturnPolicyId' -> Int64 -- ^ 'rogMerchantId' -> ReturnpolicyOnlineGet returnpolicyOnlineGet pRogReturnPolicyId_ pRogMerchantId_ = ReturnpolicyOnlineGet' { _rogXgafv = Nothing , _rogReturnPolicyId = pRogReturnPolicyId_ , _rogMerchantId = _Coerce # pRogMerchantId_ , _rogUploadProtocol = Nothing , _rogAccessToken = Nothing , _rogUploadType = Nothing , _rogCallback = Nothing }
804
returnpolicyOnlineGet :: Text -- ^ 'rogReturnPolicyId' -> Int64 -- ^ 'rogMerchantId' -> ReturnpolicyOnlineGet returnpolicyOnlineGet pRogReturnPolicyId_ pRogMerchantId_ = ReturnpolicyOnlineGet' { _rogXgafv = Nothing , _rogReturnPolicyId = pRogReturnPolicyId_ , _rogMerchantId = _Coerce # pRogMerchantId_ , _rogUploadProtocol = Nothing , _rogAccessToken = Nothing , _rogUploadType = Nothing , _rogCallback = Nothing }
461
returnpolicyOnlineGet pRogReturnPolicyId_ pRogMerchantId_ = ReturnpolicyOnlineGet' { _rogXgafv = Nothing , _rogReturnPolicyId = pRogReturnPolicyId_ , _rogMerchantId = _Coerce # pRogMerchantId_ , _rogUploadProtocol = Nothing , _rogAccessToken = Nothing , _rogUploadType = Nothing , _rogCallback = Nothing }
339
true
true
0
8
152
100
64
36
null
null
flipstone/orville
orville-postgresql-libpq/test/Test/SelectOptions.hs
mit
prop_fieldGreaterThanOperator :: Property.NamedProperty prop_fieldGreaterThanOperator = Property.singletonNamedProperty ".> generates expected sql" $ assertWhereClauseEquals (Just "WHERE \"foo\" > $1") (SO.where_ $ fooField .> 0)
247
prop_fieldGreaterThanOperator :: Property.NamedProperty prop_fieldGreaterThanOperator = Property.singletonNamedProperty ".> generates expected sql" $ assertWhereClauseEquals (Just "WHERE \"foo\" > $1") (SO.where_ $ fooField .> 0)
247
prop_fieldGreaterThanOperator = Property.singletonNamedProperty ".> generates expected sql" $ assertWhereClauseEquals (Just "WHERE \"foo\" > $1") (SO.where_ $ fooField .> 0)
191
false
true
0
10
39
46
23
23
null
null
ml9951/ghc
compiler/rename/RnBinds.hs
bsd-3-clause
mkSigTvFn :: [LSig Name] -> (Name -> [Name]) -- Return a lookup function that maps an Id Name to the names -- of the type variables that should scope over its body.. mkSigTvFn sigs = \n -> lookupNameEnv env n `orElse` [] where extractScopedTyVars :: LHsType Name -> [Name] extractScopedTyVars (L _ (HsForAllTy Explicit _ ltvs _ _)) = hsLKiTyVarNames ltvs extractScopedTyVars _ = [] env :: NameEnv [Name] env = mkNameEnv [ (name, nwcs ++ extractScopedTyVars ty) -- Kind variables and type variables -- nwcs: see Note [Scoping of named wildcards] | L _ (TypeSig names ty nwcs) <- sigs , L _ name <- names] -- Note the pattern-match on "Explicit"; we only bind -- type variables from signatures with an explicit top-level for-all {- Note [Scoping of named wildcards] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider f :: _a -> _a f x = let g :: _a -> _a g = ... in ... Currently, for better or worse, the "_a" variables are all the same. So although there is no explicit forall, the "_a" scopes over the definition. I don't know if this is a good idea, but there it is. -} -- Process the fixity declarations, making a FastString -> (Located Fixity) map -- (We keep the location around for reporting duplicate fixity declarations.) -- -- Checks for duplicates, but not that only locally defined things are fixed. -- Note: for local fixity declarations, duplicates would also be checked in -- check_sigs below. But we also use this function at the top level.
1,589
mkSigTvFn :: [LSig Name] -> (Name -> [Name]) mkSigTvFn sigs = \n -> lookupNameEnv env n `orElse` [] where extractScopedTyVars :: LHsType Name -> [Name] extractScopedTyVars (L _ (HsForAllTy Explicit _ ltvs _ _)) = hsLKiTyVarNames ltvs extractScopedTyVars _ = [] env :: NameEnv [Name] env = mkNameEnv [ (name, nwcs ++ extractScopedTyVars ty) -- Kind variables and type variables -- nwcs: see Note [Scoping of named wildcards] | L _ (TypeSig names ty nwcs) <- sigs , L _ name <- names] -- Note the pattern-match on "Explicit"; we only bind -- type variables from signatures with an explicit top-level for-all {- Note [Scoping of named wildcards] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider f :: _a -> _a f x = let g :: _a -> _a g = ... in ... Currently, for better or worse, the "_a" variables are all the same. So although there is no explicit forall, the "_a" scopes over the definition. I don't know if this is a good idea, but there it is. -} -- Process the fixity declarations, making a FastString -> (Located Fixity) map -- (We keep the location around for reporting duplicate fixity declarations.) -- -- Checks for duplicates, but not that only locally defined things are fixed. -- Note: for local fixity declarations, duplicates would also be checked in -- check_sigs below. But we also use this function at the top level.
1,468
mkSigTvFn sigs = \n -> lookupNameEnv env n `orElse` [] where extractScopedTyVars :: LHsType Name -> [Name] extractScopedTyVars (L _ (HsForAllTy Explicit _ ltvs _ _)) = hsLKiTyVarNames ltvs extractScopedTyVars _ = [] env :: NameEnv [Name] env = mkNameEnv [ (name, nwcs ++ extractScopedTyVars ty) -- Kind variables and type variables -- nwcs: see Note [Scoping of named wildcards] | L _ (TypeSig names ty nwcs) <- sigs , L _ name <- names] -- Note the pattern-match on "Explicit"; we only bind -- type variables from signatures with an explicit top-level for-all {- Note [Scoping of named wildcards] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider f :: _a -> _a f x = let g :: _a -> _a g = ... in ... Currently, for better or worse, the "_a" variables are all the same. So although there is no explicit forall, the "_a" scopes over the definition. I don't know if this is a good idea, but there it is. -} -- Process the fixity declarations, making a FastString -> (Located Fixity) map -- (We keep the location around for reporting duplicate fixity declarations.) -- -- Checks for duplicates, but not that only locally defined things are fixed. -- Note: for local fixity declarations, duplicates would also be checked in -- check_sigs below. But we also use this function at the top level.
1,423
true
true
0
11
392
197
107
90
null
null
haskell-streaming/streaming
benchmarks/old/Stream/ByteString.hs
bsd-3-clause
splitAt :: (Monad m) => Int -> Stream (Of ByteString) m r -> Stream (Of ByteString) m (Stream (Of ByteString) m r) splitAt n = buildStream . fmap buildStream . FB.splitAt n . foldStream
223
splitAt :: (Monad m) => Int -> Stream (Of ByteString) m r -> Stream (Of ByteString) m (Stream (Of ByteString) m r) splitAt n = buildStream . fmap buildStream . FB.splitAt n . foldStream
223
splitAt n = buildStream . fmap buildStream . FB.splitAt n . foldStream
78
false
true
3
12
71
97
45
52
null
null
iand675/hs-kafka
src/Network/Kafka/Internal/Connection.hs
bsd-3-clause
createKafkaConnection' :: HostName -> ServiceName -> Transport -> IO KafkaConnection createKafkaConnection' h p t = do leftoverRef <- newIORef BS.empty cidRef <- newIORef 0 pendingRef <- newIORef I.empty ms <- newMVar t return $ KafkaConnection (h, p) ms leftoverRef pendingRef cidRef
294
createKafkaConnection' :: HostName -> ServiceName -> Transport -> IO KafkaConnection createKafkaConnection' h p t = do leftoverRef <- newIORef BS.empty cidRef <- newIORef 0 pendingRef <- newIORef I.empty ms <- newMVar t return $ KafkaConnection (h, p) ms leftoverRef pendingRef cidRef
294
createKafkaConnection' h p t = do leftoverRef <- newIORef BS.empty cidRef <- newIORef 0 pendingRef <- newIORef I.empty ms <- newMVar t return $ KafkaConnection (h, p) ms leftoverRef pendingRef cidRef
209
false
true
0
9
50
101
46
55
null
null
mstksg/neural
src/Data/Neural/HMatrix/FeedForward/Dropout.hs
mit
trainStep :: forall i hs o. (KnownNat i, KnownNat o) => NeuralActs (Forward Double) -> Double -- ^ learning rate -> R i -- ^ input vector -> R o -- ^ target vector -> Network i hs o -- ^ network to train -> Network i hs o trainStep (NA f g) rate x0 target = fst . go x0 where NA f_ g_ = NA (fst . diff' f) (fst . diff' g) go :: forall j js. KnownNat j => R j -- ^ input vector -> Network j js o -- ^ network to train -> (Network j js o, R j) go !x = \case NetOL w@(FLayer _ wN) -> let y = runFLayer w x o = dvmap g_ y dEdy = dvmap (diff g) y * (o - target) wB' = konst rate * dEdy wN' = konst rate * (dEdy `outer` x) w' = FLayer wB' wN' dWs = tr wN #> dEdy in (NetOL w', dWs) NetIL w@(FLayer _ wN) n -> let y = runFLayer w x o = dvmap f_ y (n', dWs') = go o n dEdy = dvmap (diff f) y * dWs' wB' = konst rate * dEdy wN' = konst rate * (dEdy `outer` x) w' = FLayer wB' wN' dWs = tr wN #> dEdy in (NetIL w' n', dWs)
1,299
trainStep :: forall i hs o. (KnownNat i, KnownNat o) => NeuralActs (Forward Double) -> Double -- ^ learning rate -> R i -- ^ input vector -> R o -- ^ target vector -> Network i hs o -- ^ network to train -> Network i hs o trainStep (NA f g) rate x0 target = fst . go x0 where NA f_ g_ = NA (fst . diff' f) (fst . diff' g) go :: forall j js. KnownNat j => R j -- ^ input vector -> Network j js o -- ^ network to train -> (Network j js o, R j) go !x = \case NetOL w@(FLayer _ wN) -> let y = runFLayer w x o = dvmap g_ y dEdy = dvmap (diff g) y * (o - target) wB' = konst rate * dEdy wN' = konst rate * (dEdy `outer` x) w' = FLayer wB' wN' dWs = tr wN #> dEdy in (NetOL w', dWs) NetIL w@(FLayer _ wN) n -> let y = runFLayer w x o = dvmap f_ y (n', dWs') = go o n dEdy = dvmap (diff f) y * dWs' wB' = konst rate * dEdy wN' = konst rate * (dEdy `outer` x) w' = FLayer wB' wN' dWs = tr wN #> dEdy in (NetIL w' n', dWs)
1,299
trainStep (NA f g) rate x0 target = fst . go x0 where NA f_ g_ = NA (fst . diff' f) (fst . diff' g) go :: forall j js. KnownNat j => R j -- ^ input vector -> Network j js o -- ^ network to train -> (Network j js o, R j) go !x = \case NetOL w@(FLayer _ wN) -> let y = runFLayer w x o = dvmap g_ y dEdy = dvmap (diff g) y * (o - target) wB' = konst rate * dEdy wN' = konst rate * (dEdy `outer` x) w' = FLayer wB' wN' dWs = tr wN #> dEdy in (NetOL w', dWs) NetIL w@(FLayer _ wN) n -> let y = runFLayer w x o = dvmap f_ y (n', dWs') = go o n dEdy = dvmap (diff f) y * dWs' wB' = konst rate * dEdy wN' = konst rate * (dEdy `outer` x) w' = FLayer wB' wN' dWs = tr wN #> dEdy in (NetIL w' n', dWs)
1,011
false
true
0
15
612
506
255
251
null
null
devtype-blogspot-com/Haskell-Examples
DelAllUpper/Demo.hs
gpl-3.0
delAllUpper :: String -> String delAllUpper [] = []
51
delAllUpper :: String -> String delAllUpper [] = []
51
delAllUpper [] = []
19
false
true
0
8
8
28
12
16
null
null
cgag/cis-194-solutions
src/HW7/Editor.hs
bsd-3-clause
doCommand Prev = modCurLine (subtract 1) >> doCommand View
58
doCommand Prev = modCurLine (subtract 1) >> doCommand View
58
doCommand Prev = modCurLine (subtract 1) >> doCommand View
58
false
false
0
8
8
25
11
14
null
null
fpco/store
src/Data/Store/Version.hs
mit
tcFun :: TyCon tcFun = tyConOf (Proxy :: Proxy (Int -> Int))
60
tcFun :: TyCon tcFun = tyConOf (Proxy :: Proxy (Int -> Int))
60
tcFun = tyConOf (Proxy :: Proxy (Int -> Int))
45
false
true
0
8
11
36
17
19
null
null
keera-studios/pang-a-lambda
src/Game/Levels.hs
gpl-3.0
objBlocks _ = [ staticBlock "block1" (200, 200) (100, 57) ]
64
objBlocks _ = [ staticBlock "block1" (200, 200) (100, 57) ]
64
objBlocks _ = [ staticBlock "block1" (200, 200) (100, 57) ]
64
false
false
0
7
15
32
17
15
null
null
mudphone/HaskellBook
src/Sixteen.hs
mit
c = (*2) . (\x -> x - 2)
24
c = (*2) . (\x -> x - 2)
24
c = (*2) . (\x -> x - 2)
24
false
false
1
9
8
30
15
15
null
null
binesiyu/ifl
examples/ch08/GlobRegexEither.hs
mit
charClass acc [] = Left "unterminated character class"
54
charClass acc [] = Left "unterminated character class"
54
charClass acc [] = Left "unterminated character class"
54
false
false
0
6
7
16
7
9
null
null
beni55/cryptol
src/Cryptol/TypeCheck/Solver/Numeric/Interval.hs
bsd-3-clause
iMax :: Interval -> Interval -> Interval iMax i j = Interval { iLower = nMax (iLower i) (iLower j) , iUpper = case (iUpper i, iUpper j) of (Nothing, Nothing) -> Nothing (Just x, Just y) -> Just (nMax x y) (Nothing, Just Inf) -> Just Inf (Nothing, Just _) -> Nothing (Just Inf, Nothing) -> Just Inf (Just _, Nothing) -> Nothing }
580
iMax :: Interval -> Interval -> Interval iMax i j = Interval { iLower = nMax (iLower i) (iLower j) , iUpper = case (iUpper i, iUpper j) of (Nothing, Nothing) -> Nothing (Just x, Just y) -> Just (nMax x y) (Nothing, Just Inf) -> Just Inf (Nothing, Just _) -> Nothing (Just Inf, Nothing) -> Just Inf (Just _, Nothing) -> Nothing }
580
iMax i j = Interval { iLower = nMax (iLower i) (iLower j) , iUpper = case (iUpper i, iUpper j) of (Nothing, Nothing) -> Nothing (Just x, Just y) -> Just (nMax x y) (Nothing, Just Inf) -> Just Inf (Nothing, Just _) -> Nothing (Just Inf, Nothing) -> Just Inf (Just _, Nothing) -> Nothing }
539
false
true
0
13
316
184
93
91
null
null
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/Struct.hs
lgpl-2.1
genZeroStruct :: Name -> Struct -> CodeGen () genZeroStruct n s = when (allocCalloc (structAllocationInfo s) /= AllocationOp "none" && structSize s /= 0) $ genZeroSU n (structSize s) (structIsBoxed s)
218
genZeroStruct :: Name -> Struct -> CodeGen () genZeroStruct n s = when (allocCalloc (structAllocationInfo s) /= AllocationOp "none" && structSize s /= 0) $ genZeroSU n (structSize s) (structIsBoxed s)
218
genZeroStruct n s = when (allocCalloc (structAllocationInfo s) /= AllocationOp "none" && structSize s /= 0) $ genZeroSU n (structSize s) (structIsBoxed s)
172
false
true
0
13
48
85
40
45
null
null
mightymoose/liquidhaskell
tests/pos/GhcSort2.hs
bsd-3-clause
merge :: (Ord a) => [a] -> [a] -> Int -> [a] merge [] ys _ = ys
63
merge :: (Ord a) => [a] -> [a] -> Int -> [a] merge [] ys _ = ys
63
merge [] ys _ = ys
18
false
true
0
11
17
56
28
28
null
null
mydaum/cabal
cabal-install/Distribution/Solver/Modular/Tree.hs
bsd-3-clause
zeroOrOneChoices (SChoice _ _ _ _ ts) = W.isZeroOrOne (W.filter active ts)
81
zeroOrOneChoices (SChoice _ _ _ _ ts) = W.isZeroOrOne (W.filter active ts)
81
zeroOrOneChoices (SChoice _ _ _ _ ts) = W.isZeroOrOne (W.filter active ts)
81
false
false
0
8
18
38
18
20
null
null
aztek/voogie
src/Voogie/Parse/Boogie.hs
gpl-3.0
main :: Parser Main main = do sequence_ [reserved kwdProcedure, reserved kwdMain, parens $ return ()] rs <- optionMaybe returns ms <- optionMaybe modifies pre <- many (try precondition) post <- many (try postcondition) (ds, ss) <- braces $ do ds <- many (try declaration) ss <- many topLevel return (ds, ss) return (Main (maybe [] toList ms) pre rs ds ss post)
387
main :: Parser Main main = do sequence_ [reserved kwdProcedure, reserved kwdMain, parens $ return ()] rs <- optionMaybe returns ms <- optionMaybe modifies pre <- many (try precondition) post <- many (try postcondition) (ds, ss) <- braces $ do ds <- many (try declaration) ss <- many topLevel return (ds, ss) return (Main (maybe [] toList ms) pre rs ds ss post)
387
main = do sequence_ [reserved kwdProcedure, reserved kwdMain, parens $ return ()] rs <- optionMaybe returns ms <- optionMaybe modifies pre <- many (try precondition) post <- many (try postcondition) (ds, ss) <- braces $ do ds <- many (try declaration) ss <- many topLevel return (ds, ss) return (Main (maybe [] toList ms) pre rs ds ss post)
367
false
true
0
14
89
185
85
100
null
null
mcschroeder/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
rightName = mkNameG DataName "base" "Data.Either" "Right"
57
rightName = mkNameG DataName "base" "Data.Either" "Right"
57
rightName = mkNameG DataName "base" "Data.Either" "Right"
57
false
false
0
5
6
15
7
8
null
null
haslab/SecreC
src/Language/SecreC/Transformation/Dafny.hs
gpl-3.0
expressionToDafny isLVal isQExpr annK (QualExpr l e _) = do expressionToDafny isLVal isQExpr annK e
103
expressionToDafny isLVal isQExpr annK (QualExpr l e _) = do expressionToDafny isLVal isQExpr annK e
103
expressionToDafny isLVal isQExpr annK (QualExpr l e _) = do expressionToDafny isLVal isQExpr annK e
103
false
false
0
7
18
37
17
20
null
null
Mic92/eidolon
Handler/Signup.hs
agpl-3.0
validateLen :: Text -> Bool validateLen a = (T.length a) > 2
62
validateLen :: Text -> Bool validateLen a = (T.length a) > 2
62
validateLen a = (T.length a) > 2
34
false
true
0
8
13
30
15
15
null
null
xmonad/xmonad-contrib
XMonad/Hooks/StatusBar/PP.hs
bsd-3-clause
-- | Predicate for the current workspace. Caution: assumes default -- precedence is respected. isCurrent' :: WS -> Bool isCurrent' WS{..} = S.tag wsWS == S.currentTag wsWindowSet
178
isCurrent' :: WS -> Bool isCurrent' WS{..} = S.tag wsWS == S.currentTag wsWindowSet
83
isCurrent' WS{..} = S.tag wsWS == S.currentTag wsWindowSet
58
true
true
0
7
26
40
20
20
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/DE/Lib.hs
bsd-3-clause
stated14 ns i = MoC.stated14 ns (unit4 i)
41
stated14 ns i = MoC.stated14 ns (unit4 i)
41
stated14 ns i = MoC.stated14 ns (unit4 i)
41
false
false
1
7
7
28
11
17
null
null
jfischoff/oxymoron
src/Oxymoron/Regions/Program.hs
bsd-3-clause
glAttachShader :: (AncestorRegion pr cr, MonadIO cr, ProgramResource programResource, ShaderResource shaderResource) => programResource pr -> shaderResource pr -> cr () glAttachShader progHandle shaderHandle = liftIO $ GL.glAttachShader (_resourceId . unprogramResource $ progHandle) (_resourceId . unshaderResource $ shaderHandle)
413
glAttachShader :: (AncestorRegion pr cr, MonadIO cr, ProgramResource programResource, ShaderResource shaderResource) => programResource pr -> shaderResource pr -> cr () glAttachShader progHandle shaderHandle = liftIO $ GL.glAttachShader (_resourceId . unprogramResource $ progHandle) (_resourceId . unshaderResource $ shaderHandle)
413
glAttachShader progHandle shaderHandle = liftIO $ GL.glAttachShader (_resourceId . unprogramResource $ progHandle) (_resourceId . unshaderResource $ shaderHandle)
191
false
true
0
9
118
97
48
49
null
null
thielema/wxhaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
withRefFont :: (Ptr (TFont a) -> IO ()) -> IO (Font a) withRefFont f = withManagedFontResult $ assignRefPtr wxFont_Create f
126
withRefFont :: (Ptr (TFont a) -> IO ()) -> IO (Font a) withRefFont f = withManagedFontResult $ assignRefPtr wxFont_Create f
126
withRefFont f = withManagedFontResult $ assignRefPtr wxFont_Create f
71
false
true
0
10
22
57
27
30
null
null
t4sk/upenn-cis194
hw-10/AParser.hs
mit
maybeMap :: Maybe ((a -> b), c) -> (c -> Maybe (a, c)) -> Maybe (b, c) maybeMap Nothing _ = Nothing
99
maybeMap :: Maybe ((a -> b), c) -> (c -> Maybe (a, c)) -> Maybe (b, c) maybeMap Nothing _ = Nothing
99
maybeMap Nothing _ = Nothing
28
false
true
0
10
21
65
35
30
null
null
cservenka/ROOPLPPC
src/MacroExpander.hs
mit
meMacro FreeListsSize = asks freeListsSize
42
meMacro FreeListsSize = asks freeListsSize
42
meMacro FreeListsSize = asks freeListsSize
42
false
false
0
5
4
12
5
7
null
null
tonymorris/java-character
src/Language/Java/Character/IsUpperCase.hs
bsd-3-clause
isUpperCaseSet :: (Num a, Enum a, Ord a) => Diet a isUpperCaseSet = let r = [ [65..90] , [192..214] , [216..222] , [256] , [258] , [260] , [262] , [264] , [266] , [268] , [270] , [272] , [274] , [276] , [278] , [280] , [282] , [284] , [286] , [288] , [290] , [292] , [294] , [296] , [298] , [300] , [302] , [304] , [306] , [308] , [310] , [313] , [315] , [317] , [319] , [321] , [323] , [325] , [327] , [330] , [332] , [334] , [336] , [338] , [340] , [342] , [344] , [346] , [348] , [350] , [352] , [354] , [356] , [358] , [360] , [362] , [364] , [366] , [368] , [370] , [372] , [374] , [376..377] , [379] , [381] , [385..386] , [388] , [390..391] , [393..395] , [398..401] , [403..404] , [406..408] , [412..413] , [415..416] , [418] , [420] , [422..423] , [425] , [428] , [430..431] , [433..435] , [437] , [439..440] , [444] , [452] , [455] , [458] , [461] , [463] , [465] , [467] , [469] , [471] , [473] , [475] , [478] , [480] , [482] , [484] , [486] , [488] , [490] , [492] , [494] , [497] , [500] , [502..504] , [506] , [508] , [510] , [512] , [514] , [516] , [518] , [520] , [522] , [524] , [526] , [528] , [530] , [532] , [534] , [536] , [538] , [540] , [542] , [544] , [546] , [548] , [550] , [552] , [554] , [556] , [558] , [560] , [562] , [902] , [904..906] , [908] , [910..911] , [913..929] , [931..939] , [978..980] , [984] , [986] , [988] , [990] , [992] , [994] , [996] , [998] , [1000] , [1002] , [1004] , [1006] , [1012] , [1015] , [1017..1018] , [1024..1071] , [1120] , [1122] , [1124] , [1126] , [1128] , [1130] , [1132] , [1134] , [1136] , [1138] , [1140] , [1142] , [1144] , [1146] , [1148] , [1150] , [1152] , [1162] , [1164] , [1166] , [1168] , [1170] , [1172] , [1174] , [1176] , [1178] , [1180] , [1182] , [1184] , [1186] , [1188] , [1190] , [1192] , [1194] , [1196] , [1198] , [1200] , [1202] , [1204] , [1206] , [1208] , [1210] , [1212] , [1214] , [1216..1217] , [1219] , [1221] , [1223] , [1225] , [1227] , [1229] , [1232] , [1234] , [1236] , [1238] , [1240] , [1242] , [1244] , [1246] , [1248] , [1250] , [1252] , [1254] , [1256] , [1258] , [1260] , [1262] , [1264] , [1266] , [1268] , [1272] , [1280] , [1282] , [1284] , [1286] , [1288] , [1290] , [1292] , [1294] , [1329..1366] , [4256..4293] , [7680] , [7682] , [7684] , [7686] , [7688] , [7690] , [7692] , [7694] , [7696] , [7698] , [7700] , [7702] , [7704] , [7706] , [7708] , [7710] , [7712] , [7714] , [7716] , [7718] , [7720] , [7722] , [7724] , [7726] , [7728] , [7730] , [7732] , [7734] , [7736] , [7738] , [7740] , [7742] , [7744] , [7746] , [7748] , [7750] , [7752] , [7754] , [7756] , [7758] , [7760] , [7762] , [7764] , [7766] , [7768] , [7770] , [7772] , [7774] , [7776] , [7778] , [7780] , [7782] , [7784] , [7786] , [7788] , [7790] , [7792] , [7794] , [7796] , [7798] , [7800] , [7802] , [7804] , [7806] , [7808] , [7810] , [7812] , [7814] , [7816] , [7818] , [7820] , [7822] , [7824] , [7826] , [7828] , [7840] , [7842] , [7844] , [7846] , [7848] , [7850] , [7852] , [7854] , [7856] , [7858] , [7860] , [7862] , [7864] , [7866] , [7868] , [7870] , [7872] , [7874] , [7876] , [7878] , [7880] , [7882] , [7884] , [7886] , [7888] , [7890] , [7892] , [7894] , [7896] , [7898] , [7900] , [7902] , [7904] , [7906] , [7908] , [7910] , [7912] , [7914] , [7916] , [7918] , [7920] , [7922] , [7924] , [7926] , [7928] , [7944..7951] , [7960..7965] , [7976..7983] , [7992..7999] , [8008..8013] , [8025] , [8027] , [8029] , [8031] , [8040..8047] , [8120..8123] , [8136..8139] , [8152..8155] , [8168..8172] , [8184..8187] , [8450] , [8455] , [8459..8461] , [8464..8466] , [8469] , [8473..8477] , [8484] , [8486] , [8488] , [8490..8493] , [8496..8497] , [8499] , [8510..8511] , [8517] , [65313..65338] , [66560..66599] , [119808..119833] , [119860..119885] , [119912..119937] , [119964] , [119966..119967] , [119970] , [119973..119974] , [119977..119980] , [119982..119989] , [120016..120041] , [120068..120069] , [120071..120074] , [120077..120084] , [120086..120092] , [120120..120121] , [120123..120126] , [120128..120132] , [120134] , [120138..120144] , [120172..120197] , [120224..120249] , [120276..120301] , [120328..120353] , [120380..120405] , [120432..120457] , [120488..120512] , [120546..120570] , [120604..120628] , [120662..120686] , [120720..120744] ] in S.fromList . concat $ r
8,504
isUpperCaseSet :: (Num a, Enum a, Ord a) => Diet a isUpperCaseSet = let r = [ [65..90] , [192..214] , [216..222] , [256] , [258] , [260] , [262] , [264] , [266] , [268] , [270] , [272] , [274] , [276] , [278] , [280] , [282] , [284] , [286] , [288] , [290] , [292] , [294] , [296] , [298] , [300] , [302] , [304] , [306] , [308] , [310] , [313] , [315] , [317] , [319] , [321] , [323] , [325] , [327] , [330] , [332] , [334] , [336] , [338] , [340] , [342] , [344] , [346] , [348] , [350] , [352] , [354] , [356] , [358] , [360] , [362] , [364] , [366] , [368] , [370] , [372] , [374] , [376..377] , [379] , [381] , [385..386] , [388] , [390..391] , [393..395] , [398..401] , [403..404] , [406..408] , [412..413] , [415..416] , [418] , [420] , [422..423] , [425] , [428] , [430..431] , [433..435] , [437] , [439..440] , [444] , [452] , [455] , [458] , [461] , [463] , [465] , [467] , [469] , [471] , [473] , [475] , [478] , [480] , [482] , [484] , [486] , [488] , [490] , [492] , [494] , [497] , [500] , [502..504] , [506] , [508] , [510] , [512] , [514] , [516] , [518] , [520] , [522] , [524] , [526] , [528] , [530] , [532] , [534] , [536] , [538] , [540] , [542] , [544] , [546] , [548] , [550] , [552] , [554] , [556] , [558] , [560] , [562] , [902] , [904..906] , [908] , [910..911] , [913..929] , [931..939] , [978..980] , [984] , [986] , [988] , [990] , [992] , [994] , [996] , [998] , [1000] , [1002] , [1004] , [1006] , [1012] , [1015] , [1017..1018] , [1024..1071] , [1120] , [1122] , [1124] , [1126] , [1128] , [1130] , [1132] , [1134] , [1136] , [1138] , [1140] , [1142] , [1144] , [1146] , [1148] , [1150] , [1152] , [1162] , [1164] , [1166] , [1168] , [1170] , [1172] , [1174] , [1176] , [1178] , [1180] , [1182] , [1184] , [1186] , [1188] , [1190] , [1192] , [1194] , [1196] , [1198] , [1200] , [1202] , [1204] , [1206] , [1208] , [1210] , [1212] , [1214] , [1216..1217] , [1219] , [1221] , [1223] , [1225] , [1227] , [1229] , [1232] , [1234] , [1236] , [1238] , [1240] , [1242] , [1244] , [1246] , [1248] , [1250] , [1252] , [1254] , [1256] , [1258] , [1260] , [1262] , [1264] , [1266] , [1268] , [1272] , [1280] , [1282] , [1284] , [1286] , [1288] , [1290] , [1292] , [1294] , [1329..1366] , [4256..4293] , [7680] , [7682] , [7684] , [7686] , [7688] , [7690] , [7692] , [7694] , [7696] , [7698] , [7700] , [7702] , [7704] , [7706] , [7708] , [7710] , [7712] , [7714] , [7716] , [7718] , [7720] , [7722] , [7724] , [7726] , [7728] , [7730] , [7732] , [7734] , [7736] , [7738] , [7740] , [7742] , [7744] , [7746] , [7748] , [7750] , [7752] , [7754] , [7756] , [7758] , [7760] , [7762] , [7764] , [7766] , [7768] , [7770] , [7772] , [7774] , [7776] , [7778] , [7780] , [7782] , [7784] , [7786] , [7788] , [7790] , [7792] , [7794] , [7796] , [7798] , [7800] , [7802] , [7804] , [7806] , [7808] , [7810] , [7812] , [7814] , [7816] , [7818] , [7820] , [7822] , [7824] , [7826] , [7828] , [7840] , [7842] , [7844] , [7846] , [7848] , [7850] , [7852] , [7854] , [7856] , [7858] , [7860] , [7862] , [7864] , [7866] , [7868] , [7870] , [7872] , [7874] , [7876] , [7878] , [7880] , [7882] , [7884] , [7886] , [7888] , [7890] , [7892] , [7894] , [7896] , [7898] , [7900] , [7902] , [7904] , [7906] , [7908] , [7910] , [7912] , [7914] , [7916] , [7918] , [7920] , [7922] , [7924] , [7926] , [7928] , [7944..7951] , [7960..7965] , [7976..7983] , [7992..7999] , [8008..8013] , [8025] , [8027] , [8029] , [8031] , [8040..8047] , [8120..8123] , [8136..8139] , [8152..8155] , [8168..8172] , [8184..8187] , [8450] , [8455] , [8459..8461] , [8464..8466] , [8469] , [8473..8477] , [8484] , [8486] , [8488] , [8490..8493] , [8496..8497] , [8499] , [8510..8511] , [8517] , [65313..65338] , [66560..66599] , [119808..119833] , [119860..119885] , [119912..119937] , [119964] , [119966..119967] , [119970] , [119973..119974] , [119977..119980] , [119982..119989] , [120016..120041] , [120068..120069] , [120071..120074] , [120077..120084] , [120086..120092] , [120120..120121] , [120123..120126] , [120128..120132] , [120134] , [120138..120144] , [120172..120197] , [120224..120249] , [120276..120301] , [120328..120353] , [120380..120405] , [120432..120457] , [120488..120512] , [120546..120570] , [120604..120628] , [120662..120686] , [120720..120744] ] in S.fromList . concat $ r
8,504
isUpperCaseSet = let r = [ [65..90] , [192..214] , [216..222] , [256] , [258] , [260] , [262] , [264] , [266] , [268] , [270] , [272] , [274] , [276] , [278] , [280] , [282] , [284] , [286] , [288] , [290] , [292] , [294] , [296] , [298] , [300] , [302] , [304] , [306] , [308] , [310] , [313] , [315] , [317] , [319] , [321] , [323] , [325] , [327] , [330] , [332] , [334] , [336] , [338] , [340] , [342] , [344] , [346] , [348] , [350] , [352] , [354] , [356] , [358] , [360] , [362] , [364] , [366] , [368] , [370] , [372] , [374] , [376..377] , [379] , [381] , [385..386] , [388] , [390..391] , [393..395] , [398..401] , [403..404] , [406..408] , [412..413] , [415..416] , [418] , [420] , [422..423] , [425] , [428] , [430..431] , [433..435] , [437] , [439..440] , [444] , [452] , [455] , [458] , [461] , [463] , [465] , [467] , [469] , [471] , [473] , [475] , [478] , [480] , [482] , [484] , [486] , [488] , [490] , [492] , [494] , [497] , [500] , [502..504] , [506] , [508] , [510] , [512] , [514] , [516] , [518] , [520] , [522] , [524] , [526] , [528] , [530] , [532] , [534] , [536] , [538] , [540] , [542] , [544] , [546] , [548] , [550] , [552] , [554] , [556] , [558] , [560] , [562] , [902] , [904..906] , [908] , [910..911] , [913..929] , [931..939] , [978..980] , [984] , [986] , [988] , [990] , [992] , [994] , [996] , [998] , [1000] , [1002] , [1004] , [1006] , [1012] , [1015] , [1017..1018] , [1024..1071] , [1120] , [1122] , [1124] , [1126] , [1128] , [1130] , [1132] , [1134] , [1136] , [1138] , [1140] , [1142] , [1144] , [1146] , [1148] , [1150] , [1152] , [1162] , [1164] , [1166] , [1168] , [1170] , [1172] , [1174] , [1176] , [1178] , [1180] , [1182] , [1184] , [1186] , [1188] , [1190] , [1192] , [1194] , [1196] , [1198] , [1200] , [1202] , [1204] , [1206] , [1208] , [1210] , [1212] , [1214] , [1216..1217] , [1219] , [1221] , [1223] , [1225] , [1227] , [1229] , [1232] , [1234] , [1236] , [1238] , [1240] , [1242] , [1244] , [1246] , [1248] , [1250] , [1252] , [1254] , [1256] , [1258] , [1260] , [1262] , [1264] , [1266] , [1268] , [1272] , [1280] , [1282] , [1284] , [1286] , [1288] , [1290] , [1292] , [1294] , [1329..1366] , [4256..4293] , [7680] , [7682] , [7684] , [7686] , [7688] , [7690] , [7692] , [7694] , [7696] , [7698] , [7700] , [7702] , [7704] , [7706] , [7708] , [7710] , [7712] , [7714] , [7716] , [7718] , [7720] , [7722] , [7724] , [7726] , [7728] , [7730] , [7732] , [7734] , [7736] , [7738] , [7740] , [7742] , [7744] , [7746] , [7748] , [7750] , [7752] , [7754] , [7756] , [7758] , [7760] , [7762] , [7764] , [7766] , [7768] , [7770] , [7772] , [7774] , [7776] , [7778] , [7780] , [7782] , [7784] , [7786] , [7788] , [7790] , [7792] , [7794] , [7796] , [7798] , [7800] , [7802] , [7804] , [7806] , [7808] , [7810] , [7812] , [7814] , [7816] , [7818] , [7820] , [7822] , [7824] , [7826] , [7828] , [7840] , [7842] , [7844] , [7846] , [7848] , [7850] , [7852] , [7854] , [7856] , [7858] , [7860] , [7862] , [7864] , [7866] , [7868] , [7870] , [7872] , [7874] , [7876] , [7878] , [7880] , [7882] , [7884] , [7886] , [7888] , [7890] , [7892] , [7894] , [7896] , [7898] , [7900] , [7902] , [7904] , [7906] , [7908] , [7910] , [7912] , [7914] , [7916] , [7918] , [7920] , [7922] , [7924] , [7926] , [7928] , [7944..7951] , [7960..7965] , [7976..7983] , [7992..7999] , [8008..8013] , [8025] , [8027] , [8029] , [8031] , [8040..8047] , [8120..8123] , [8136..8139] , [8152..8155] , [8168..8172] , [8184..8187] , [8450] , [8455] , [8459..8461] , [8464..8466] , [8469] , [8473..8477] , [8484] , [8486] , [8488] , [8490..8493] , [8496..8497] , [8499] , [8510..8511] , [8517] , [65313..65338] , [66560..66599] , [119808..119833] , [119860..119885] , [119912..119937] , [119964] , [119966..119967] , [119970] , [119973..119974] , [119977..119980] , [119982..119989] , [120016..120041] , [120068..120069] , [120071..120074] , [120077..120084] , [120086..120092] , [120120..120121] , [120123..120126] , [120128..120132] , [120134] , [120138..120144] , [120172..120197] , [120224..120249] , [120276..120301] , [120328..120353] , [120380..120405] , [120432..120457] , [120488..120512] , [120546..120570] , [120604..120628] , [120662..120686] , [120720..120744] ] in S.fromList . concat $ r
8,449
false
true
0
10
5,094
2,728
1,785
943
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/ConsentArtifacts/Create.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pldscscacUploadProtocol :: Lens' ProjectsLocationsDataSetsConsentStoresConsentArtifactsCreate (Maybe Text) pldscscacUploadProtocol = lens _pldscscacUploadProtocol (\ s a -> s{_pldscscacUploadProtocol = a})
275
pldscscacUploadProtocol :: Lens' ProjectsLocationsDataSetsConsentStoresConsentArtifactsCreate (Maybe Text) pldscscacUploadProtocol = lens _pldscscacUploadProtocol (\ s a -> s{_pldscscacUploadProtocol = a})
213
pldscscacUploadProtocol = lens _pldscscacUploadProtocol (\ s a -> s{_pldscscacUploadProtocol = a})
106
true
true
0
9
33
48
25
23
null
null
robstewart57/stack
src/Stack/FileWatch.hs
bsd-3-clause
-- | Run an action, watching for file changes -- -- The action provided takes a callback that is used to set the files to be -- watched. When any of those files are changed, we rerun the action again. fileWatchConf :: WatchConfig -> IO (Path Abs Dir) -> ((Set (Path Abs File) -> IO ()) -> IO ()) -> IO () fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do allFiles <- newTVarIO Set.empty dirtyVar <- newTVarIO True watchVar <- newTVarIO Map.empty projRoot <- getProjectRoot mChecker <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] projRoot >>= buildChecker (FileIgnoredChecker isFileIgnored) <- case mChecker of Left err -> do putStrLn $ "Failed to parse VCS's ignore file: " ++ err return $ FileIgnoredChecker (const False) Right chk -> return chk let onChange event = atomically $ do files <- readTVar allFiles when (eventPath event `Set.member` files) (writeTVar dirtyVar True) setWatched :: Set (Path Abs File) -> IO () setWatched files = do atomically $ writeTVar allFiles $ Set.map toFilePath files watch0 <- readTVarIO watchVar let actions = Map.mergeWithKey keepListening stopListening startListening watch0 newDirs watch1 <- forM (Map.toList actions) $ \(k, mmv) -> do mv <- mmv return $ case mv of Nothing -> Map.empty Just v -> Map.singleton k v atomically $ writeTVar watchVar $ Map.unions watch1 where newDirs = Map.fromList $ map (, ()) $ Set.toList $ Set.map parent files keepListening _dir listen () = Just $ return $ Just listen stopListening = Map.map $ \f -> do () <- f return Nothing startListening = Map.mapWithKey $ \dir () -> do let dir' = fromString $ toFilePath dir listen <- watchDir manager dir' (not . isFileIgnored . eventPath) onChange return $ Just listen let watchInput = do line <- getLine unless (line == "quit") $ do case line of "help" -> do putStrLn "" putStrLn "help: display this help" putStrLn "quit: exit" putStrLn "build: force a rebuild" putStrLn "watched: display watched directories" "build" -> atomically $ writeTVar dirtyVar True "watched" -> do watch <- readTVarIO watchVar mapM_ (putStrLn . toFilePath) (Map.keys watch) _ -> putStrLn $ concat [ "Unknown command: " , show line , ". Try 'help'" ] watchInput race_ watchInput $ forever $ do atomically $ do dirty <- readTVar dirtyVar check dirty eres <- tryAny $ inner setWatched -- Clear dirtiness flag after the build to avoid an infinite -- loop caused by the build itself triggering dirtiness. This -- could be viewed as a bug, since files changed during the -- build will not trigger an extra rebuild, but overall seems -- like better behavior. See -- https://github.com/commercialhaskell/stack/issues/822 atomically $ writeTVar dirtyVar False case eres of Left e -> printExceptionStderr e Right () -> putStrLn "Success! Waiting for next file change." putStrLn "Type help for available commands"
3,989
fileWatchConf :: WatchConfig -> IO (Path Abs Dir) -> ((Set (Path Abs File) -> IO ()) -> IO ()) -> IO () fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do allFiles <- newTVarIO Set.empty dirtyVar <- newTVarIO True watchVar <- newTVarIO Map.empty projRoot <- getProjectRoot mChecker <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] projRoot >>= buildChecker (FileIgnoredChecker isFileIgnored) <- case mChecker of Left err -> do putStrLn $ "Failed to parse VCS's ignore file: " ++ err return $ FileIgnoredChecker (const False) Right chk -> return chk let onChange event = atomically $ do files <- readTVar allFiles when (eventPath event `Set.member` files) (writeTVar dirtyVar True) setWatched :: Set (Path Abs File) -> IO () setWatched files = do atomically $ writeTVar allFiles $ Set.map toFilePath files watch0 <- readTVarIO watchVar let actions = Map.mergeWithKey keepListening stopListening startListening watch0 newDirs watch1 <- forM (Map.toList actions) $ \(k, mmv) -> do mv <- mmv return $ case mv of Nothing -> Map.empty Just v -> Map.singleton k v atomically $ writeTVar watchVar $ Map.unions watch1 where newDirs = Map.fromList $ map (, ()) $ Set.toList $ Set.map parent files keepListening _dir listen () = Just $ return $ Just listen stopListening = Map.map $ \f -> do () <- f return Nothing startListening = Map.mapWithKey $ \dir () -> do let dir' = fromString $ toFilePath dir listen <- watchDir manager dir' (not . isFileIgnored . eventPath) onChange return $ Just listen let watchInput = do line <- getLine unless (line == "quit") $ do case line of "help" -> do putStrLn "" putStrLn "help: display this help" putStrLn "quit: exit" putStrLn "build: force a rebuild" putStrLn "watched: display watched directories" "build" -> atomically $ writeTVar dirtyVar True "watched" -> do watch <- readTVarIO watchVar mapM_ (putStrLn . toFilePath) (Map.keys watch) _ -> putStrLn $ concat [ "Unknown command: " , show line , ". Try 'help'" ] watchInput race_ watchInput $ forever $ do atomically $ do dirty <- readTVar dirtyVar check dirty eres <- tryAny $ inner setWatched -- Clear dirtiness flag after the build to avoid an infinite -- loop caused by the build itself triggering dirtiness. This -- could be viewed as a bug, since files changed during the -- build will not trigger an extra rebuild, but overall seems -- like better behavior. See -- https://github.com/commercialhaskell/stack/issues/822 atomically $ writeTVar dirtyVar False case eres of Left e -> printExceptionStderr e Right () -> putStrLn "Success! Waiting for next file change." putStrLn "Type help for available commands"
3,788
fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do allFiles <- newTVarIO Set.empty dirtyVar <- newTVarIO True watchVar <- newTVarIO Map.empty projRoot <- getProjectRoot mChecker <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] projRoot >>= buildChecker (FileIgnoredChecker isFileIgnored) <- case mChecker of Left err -> do putStrLn $ "Failed to parse VCS's ignore file: " ++ err return $ FileIgnoredChecker (const False) Right chk -> return chk let onChange event = atomically $ do files <- readTVar allFiles when (eventPath event `Set.member` files) (writeTVar dirtyVar True) setWatched :: Set (Path Abs File) -> IO () setWatched files = do atomically $ writeTVar allFiles $ Set.map toFilePath files watch0 <- readTVarIO watchVar let actions = Map.mergeWithKey keepListening stopListening startListening watch0 newDirs watch1 <- forM (Map.toList actions) $ \(k, mmv) -> do mv <- mmv return $ case mv of Nothing -> Map.empty Just v -> Map.singleton k v atomically $ writeTVar watchVar $ Map.unions watch1 where newDirs = Map.fromList $ map (, ()) $ Set.toList $ Set.map parent files keepListening _dir listen () = Just $ return $ Just listen stopListening = Map.map $ \f -> do () <- f return Nothing startListening = Map.mapWithKey $ \dir () -> do let dir' = fromString $ toFilePath dir listen <- watchDir manager dir' (not . isFileIgnored . eventPath) onChange return $ Just listen let watchInput = do line <- getLine unless (line == "quit") $ do case line of "help" -> do putStrLn "" putStrLn "help: display this help" putStrLn "quit: exit" putStrLn "build: force a rebuild" putStrLn "watched: display watched directories" "build" -> atomically $ writeTVar dirtyVar True "watched" -> do watch <- readTVarIO watchVar mapM_ (putStrLn . toFilePath) (Map.keys watch) _ -> putStrLn $ concat [ "Unknown command: " , show line , ". Try 'help'" ] watchInput race_ watchInput $ forever $ do atomically $ do dirty <- readTVar dirtyVar check dirty eres <- tryAny $ inner setWatched -- Clear dirtiness flag after the build to avoid an infinite -- loop caused by the build itself triggering dirtiness. This -- could be viewed as a bug, since files changed during the -- build will not trigger an extra rebuild, but overall seems -- like better behavior. See -- https://github.com/commercialhaskell/stack/issues/822 atomically $ writeTVar dirtyVar False case eres of Left e -> printExceptionStderr e Right () -> putStrLn "Success! Waiting for next file change." putStrLn "Type help for available commands"
3,642
true
true
0
25
1,620
903
418
485
null
null
shockone/coreutils
src/cat/decorators.hs
mit
decorate content ShowEnds = replace "\n" "$\n" content
61
decorate content ShowEnds = replace "\n" "$\n" content
61
decorate content ShowEnds = replace "\n" "$\n" content
61
false
false
0
5
14
18
8
10
null
null
chpatrick/hmidi
examples/SMF.hs
bsd-3-clause
rack = do mtrk len <- liftM fromIntegral int32 dat <- replicateM len anyChar withInput dat eventlist
109
track = do mtrk len <- liftM fromIntegral int32 dat <- replicateM len anyChar withInput dat eventlist
109
track = do mtrk len <- liftM fromIntegral int32 dat <- replicateM len anyChar withInput dat eventlist
109
false
false
1
8
25
44
17
27
null
null
brendanhay/gogol
gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs
mpl-2.0
-- | The Android Device Policy app version as displayed to the user. siAndroidDevicePolicyVersionName :: Lens' SoftwareInfo (Maybe Text) siAndroidDevicePolicyVersionName = lens _siAndroidDevicePolicyVersionName (\ s a -> s{_siAndroidDevicePolicyVersionName = a})
270
siAndroidDevicePolicyVersionName :: Lens' SoftwareInfo (Maybe Text) siAndroidDevicePolicyVersionName = lens _siAndroidDevicePolicyVersionName (\ s a -> s{_siAndroidDevicePolicyVersionName = a})
201
siAndroidDevicePolicyVersionName = lens _siAndroidDevicePolicyVersionName (\ s a -> s{_siAndroidDevicePolicyVersionName = a})
133
true
true
0
8
37
49
25
24
null
null
owainlewis/seven
src/Language/Ava/Internal/Stack.hs
bsd-3-clause
modify :: ([a] -> [a]) -> Stack a -> Stack a modify f (Stack s p v) = Stack (f s) p v
85
modify :: ([a] -> [a]) -> Stack a -> Stack a modify f (Stack s p v) = Stack (f s) p v
85
modify f (Stack s p v) = Stack (f s) p v
40
false
true
0
10
22
73
34
39
null
null
sseefried/shady-graphics
src/Shady/CompileEffect.hs
agpl-3.0
shadyGeometry :: ShadyGeometry Color shadyGeometry = ShadyGeometry { shadyImage = const $ clear, shadySurface = xyPlane }
139
shadyGeometry :: ShadyGeometry Color shadyGeometry = ShadyGeometry { shadyImage = const $ clear, shadySurface = xyPlane }
139
shadyGeometry = ShadyGeometry { shadyImage = const $ clear, shadySurface = xyPlane }
102
false
true
1
8
34
36
18
18
null
null
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs
mpl-2.0
-- | The last update time-stamp for the authorization code. eAuthorizationTimestamp :: Lens' Environment (Maybe UTCTime) eAuthorizationTimestamp = lens _eAuthorizationTimestamp (\ s a -> s{_eAuthorizationTimestamp = a}) . mapping _DateTime
253
eAuthorizationTimestamp :: Lens' Environment (Maybe UTCTime) eAuthorizationTimestamp = lens _eAuthorizationTimestamp (\ s a -> s{_eAuthorizationTimestamp = a}) . mapping _DateTime
193
eAuthorizationTimestamp = lens _eAuthorizationTimestamp (\ s a -> s{_eAuthorizationTimestamp = a}) . mapping _DateTime
132
true
true
1
8
43
57
28
29
null
null
ekmett/generic-deriving
examples/Examples.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Main tests -------------------------------------------------------------------------------- main :: IO () main = do let p = putStrLn . ((++) "- ") . show putStrLn "[] and Maybe tests:" mapM_ p testsStandard putStrLn "Tests for Tree:" mapM_ p testsTree putStrLn "\nTests for List:" mapM_ p testsList putStrLn "\nTests for Rose:" mapM_ p testsRose putStrLn "\nTests for GRose:" mapM_ p testsGRose putStrLn "\nTests for Either:" mapM_ p testsEither putStrLn "\nTests for Nested:" mapM_ p testsNested putStrLn "\nTests for Bush:" mapM_ p testsBush
786
main :: IO () main = do let p = putStrLn . ((++) "- ") . show putStrLn "[] and Maybe tests:" mapM_ p testsStandard putStrLn "Tests for Tree:" mapM_ p testsTree putStrLn "\nTests for List:" mapM_ p testsList putStrLn "\nTests for Rose:" mapM_ p testsRose putStrLn "\nTests for GRose:" mapM_ p testsGRose putStrLn "\nTests for Either:" mapM_ p testsEither putStrLn "\nTests for Nested:" mapM_ p testsNested putStrLn "\nTests for Bush:" mapM_ p testsBush
604
main = do let p = putStrLn . ((++) "- ") . show putStrLn "[] and Maybe tests:" mapM_ p testsStandard putStrLn "Tests for Tree:" mapM_ p testsTree putStrLn "\nTests for List:" mapM_ p testsList putStrLn "\nTests for Rose:" mapM_ p testsRose putStrLn "\nTests for GRose:" mapM_ p testsGRose putStrLn "\nTests for Either:" mapM_ p testsEither putStrLn "\nTests for Nested:" mapM_ p testsNested putStrLn "\nTests for Bush:" mapM_ p testsBush
590
true
true
1
14
237
160
64
96
null
null
lkitching/PScheme
test/EvalTests.hs
bsd-3-clause
evalTests :: TestTree evalTests = testGroup "Eval tests" [unitTests]
69
evalTests :: TestTree evalTests = testGroup "Eval tests" [unitTests]
68
evalTests = testGroup "Eval tests" [unitTests]
46
false
true
0
6
9
19
10
9
null
null
hvr/lens
src/Control/Lens/Lens.hs
bsd-3-clause
-- | A version of ('Control.Lens.Setter.<.~') that works on 'ALens'. -- -- >>> ("hello","there") & _2 <#~ "world" -- ("world",("hello","world")) (<#~) :: ALens s t a b -> b -> s -> (b, t) l <#~ b = \s -> (b, storing l b s)
222
(<#~) :: ALens s t a b -> b -> s -> (b, t) l <#~ b = \s -> (b, storing l b s)
77
l <#~ b = \s -> (b, storing l b s)
34
true
true
0
11
44
73
39
34
null
null
mettekou/ghc
compiler/main/HscTypes.hs
bsd-3-clause
emptyModBreaks :: ModBreaks emptyModBreaks = ModBreaksUndefined
63
emptyModBreaks :: ModBreaks emptyModBreaks = ModBreaksUndefined
63
emptyModBreaks = ModBreaksUndefined
35
false
true
0
6
5
18
7
11
null
null
portnov/yaledger
YaLedger/Exceptions.hs
bsd-3-clause
throwP e = do pos <- gets lsPosition throw (e pos)
54
throwP e = do pos <- gets lsPosition throw (e pos)
54
throwP e = do pos <- gets lsPosition throw (e pos)
54
false
false
0
9
14
31
13
18
null
null
scslab/iterIO
Examples/HttpServer.hs
bsd-3-clause
myListen :: Net.PortNumber -> IO Net.Socket myListen pn = do sock <- Net.socket Net.AF_INET Net.Stream Net.defaultProtocol Net.setSocketOption sock Net.ReuseAddr 1 Net.bindSocket sock (Net.SockAddrInet pn Net.iNADDR_ANY) Net.listen sock Net.maxListenQueue return sock
277
myListen :: Net.PortNumber -> IO Net.Socket myListen pn = do sock <- Net.socket Net.AF_INET Net.Stream Net.defaultProtocol Net.setSocketOption sock Net.ReuseAddr 1 Net.bindSocket sock (Net.SockAddrInet pn Net.iNADDR_ANY) Net.listen sock Net.maxListenQueue return sock
277
myListen pn = do sock <- Net.socket Net.AF_INET Net.Stream Net.defaultProtocol Net.setSocketOption sock Net.ReuseAddr 1 Net.bindSocket sock (Net.SockAddrInet pn Net.iNADDR_ANY) Net.listen sock Net.maxListenQueue return sock
233
false
true
0
10
39
101
45
56
null
null
deontologician/orbRPG
Game/OrbRPG/Combinations.hs
gpl-3.0
P Green @>> E Erbium = P Green
30
P Green @>> E Erbium = P Green
30
P Green @>> E Erbium = P Green
30
false
false
0
6
7
21
8
13
null
null
mbakke/ganeti
src/Ganeti/Hs2Py/OpDoc.hs
bsd-2-clause
opExtStorageDiagnose :: String opExtStorageDiagnose = "Compute the list of external storage providers."
105
opExtStorageDiagnose :: String opExtStorageDiagnose = "Compute the list of external storage providers."
105
opExtStorageDiagnose = "Compute the list of external storage providers."
74
false
true
0
4
13
11
6
5
null
null
urbanslug/ghc
testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs
bsd-3-clause
(<=) :: _ => _ (<=) = (P.<=)
28
(<=) :: _ => _ (<=) = (P.<=)
28
(<=) = (P.<=)
13
false
true
0
7
7
31
16
15
null
null
conal/hermit
src/HERMIT/Dictionary/Undefined.hs
bsd-2-clause
findUndefinedIdT :: (BoundVars c, MonadCatch m, HasHermitMEnv m, LiftCoreM m, MonadIO m, MonadThings m) => Transform c m a Id findUndefinedIdT = findIdT undefinedLocation
170
findUndefinedIdT :: (BoundVars c, MonadCatch m, HasHermitMEnv m, LiftCoreM m, MonadIO m, MonadThings m) => Transform c m a Id findUndefinedIdT = findIdT undefinedLocation
170
findUndefinedIdT = findIdT undefinedLocation
44
false
true
0
6
23
62
31
31
null
null
jeremyjh/free-agent
core/src/FreeAgent/Core/Protocol/Peer.hs
bsd-3-clause
-- | Advertise a Server on the peer registerServer :: (MonadAgent agent) => AgentServer -> ProcessId -> agent (Either CallFail ()) registerServer (AgentServer sname _) pid = castServ $ RegisterServer sname pid
228
registerServer :: (MonadAgent agent) => AgentServer -> ProcessId -> agent (Either CallFail ()) registerServer (AgentServer sname _) pid = castServ $ RegisterServer sname pid
192
registerServer (AgentServer sname _) pid = castServ $ RegisterServer sname pid
82
true
true
2
12
50
69
33
36
null
null
Numberartificial/workflow
haskell-first-principles/src/RW/CH10/PGM.hs
mit
w2c :: Word8 -> Char w2c = chr . fromIntegral
45
w2c :: Word8 -> Char w2c = chr . fromIntegral
45
w2c = chr . fromIntegral
24
false
true
0
5
9
19
10
9
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
4000 = 3999
11
4000 = 3999
11
4000 = 3999
11
false
false
1
5
2
10
3
7
null
null
creichert/wai
wai-extra/test/Network/Wai/ParseSpec.hs
mit
toRequest'' :: S8.ByteString -> S8.ByteString -> IO SRequest toRequest'' ctype content = mkRB content >>= \b -> return $ SRequest defaultRequest { requestHeaders = [("Content-Type", ctype)], requestBody = b } (L.fromChunks $ map S.singleton $ S.unpack content)
268
toRequest'' :: S8.ByteString -> S8.ByteString -> IO SRequest toRequest'' ctype content = mkRB content >>= \b -> return $ SRequest defaultRequest { requestHeaders = [("Content-Type", ctype)], requestBody = b } (L.fromChunks $ map S.singleton $ S.unpack content)
268
toRequest'' ctype content = mkRB content >>= \b -> return $ SRequest defaultRequest { requestHeaders = [("Content-Type", ctype)], requestBody = b } (L.fromChunks $ map S.singleton $ S.unpack content)
207
false
true
0
10
44
102
52
50
null
null
fryguybob/LaTeXGrapher
src/LaTeXGrapher/Parser.hs
bsd-3-clause
conditional :: Parser (Maybe Expr) conditional = do char '|' many spaceOrTab option Nothing (liftM Just exprEol)
146
conditional :: Parser (Maybe Expr) conditional = do char '|' many spaceOrTab option Nothing (liftM Just exprEol)
146
conditional = do char '|' many spaceOrTab option Nothing (liftM Just exprEol)
111
false
true
2
10
50
55
21
34
null
null
bos/wreq
Network/Wreq/Lens.hs
bsd-3-clause
-- | A lens onto all matching named headers in an HTTP response. -- -- To access exactly one header (the result will be the empty string if -- there is no match), use the ('Control.Lens.^.') operator. -- -- @ --r <- 'Network.Wreq.get' \"http:\/\/httpbin.org\/get\" --print (r 'Control.Lens.^.' 'responseHeader' \"Content-Type\") -- @ -- -- To access at most one header (the result will be 'Nothing' if there -- is no match), use the ('Control.Lens.^?') operator. -- -- @ --r <- 'Network.Wreq.get' \"http:\/\/httpbin.org\/get\" --print (r 'Control.Lens.^?' 'responseHeader' \"Content-Transfer-Encoding\") -- @ -- -- To access all (zero or more) matching headers, use the -- ('Control.Lens.^..') operator. -- -- @ --r <- 'Network.Wreq.get' \"http:\/\/httpbin.org\/get\" --print (r 'Control.Lens.^..' 'responseHeader' \"Set-Cookie\") -- @ responseHeader :: HeaderName -- ^ Header name to match. -> Traversal' (Response body) ByteString responseHeader = TH.responseHeader
997
responseHeader :: HeaderName -- ^ Header name to match. -> Traversal' (Response body) ByteString responseHeader = TH.responseHeader
161
responseHeader = TH.responseHeader
34
true
true
0
8
163
54
40
14
null
null
kowey/hakyll-convert
test/spec/Spec/Wordpress.hs
bsd-3-clause
extractsPostTitle :: TestTree extractsPostTitle = testGroup "extracts post's title" [ testCase (T.unpack title) (dpTitle (distill False (RSS.nullItem title)) @?= Just title) | title <- [ "First post", "You won't believe what happened to me today", "Trying out <i>things</i>&hellip;" ] ]
350
extractsPostTitle :: TestTree extractsPostTitle = testGroup "extracts post's title" [ testCase (T.unpack title) (dpTitle (distill False (RSS.nullItem title)) @?= Just title) | title <- [ "First post", "You won't believe what happened to me today", "Trying out <i>things</i>&hellip;" ] ]
350
extractsPostTitle = testGroup "extracts post's title" [ testCase (T.unpack title) (dpTitle (distill False (RSS.nullItem title)) @?= Just title) | title <- [ "First post", "You won't believe what happened to me today", "Trying out <i>things</i>&hellip;" ] ]
320
false
true
0
14
103
79
40
39
null
null
uwap/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTTBinderApp reif f [t, k] | f == reflm "Pi" = liftM2 (Pi Nothing) (reif t) (reif k)
110
reifyTTBinderApp reif f [t, k] | f == reflm "Pi" = liftM2 (Pi Nothing) (reif t) (reif k)
110
reifyTTBinderApp reif f [t, k] | f == reflm "Pi" = liftM2 (Pi Nothing) (reif t) (reif k)
110
false
false
0
9
39
57
27
30
null
null
gwright83/Wheeler
src/Math/Symbolic/Wheeler/Replacer.hs
bsd-3-clause
deleteMatches :: [ MatchInfo ] -> Expr -> Expr deleteMatches minfos ex = foldr (\m e -> deleteExprs (matchPaths m) e) ex minfos
127
deleteMatches :: [ MatchInfo ] -> Expr -> Expr deleteMatches minfos ex = foldr (\m e -> deleteExprs (matchPaths m) e) ex minfos
127
deleteMatches minfos ex = foldr (\m e -> deleteExprs (matchPaths m) e) ex minfos
80
false
true
0
10
22
55
28
27
null
null
yuga/ghc-mod
Language/Haskell/GhcMod/GHCApi.hs
bsd-3-clause
-- | Initialize the 'DynFlags' relating to the compilation of a single -- file or GHC session according to the 'Cradle' and 'Options' -- provided. initializeFlagsWithCradle :: GhcMonad m => Options -> Cradle -> [GHCOption] -> Bool -> m (LogReader, Maybe PackageDescription) initializeFlagsWithCradle opt cradle ghcopts logging | cabal = withCabal |||> withSandbox | otherwise = withSandbox where mCradleFile = cradleCabalFile cradle cabal = isJust mCradleFile withCabal = do pkgDesc <- liftIO $ parseCabalFile $ fromJust mCradleFile compOpts <- liftIO $ getCompilerOptions ghcopts cradle pkgDesc logger <- initSession CabalPkg opt compOpts logging return (logger, Just pkgDesc) withSandbox = do logger <- initSession SingleFile opt compOpts logging return (logger, Nothing) where pkgDb = userPackageDbOptsForGhc $ cradlePackageDb cradle compOpts | null pkgDb = CompilerOptions ghcopts importDirs [] | otherwise = CompilerOptions (ghcopts ++ pkgDb) [wdir,rdir] [] wdir = cradleCurrentDir cradle rdir = cradleRootDir cradle ----------------------------------------------------------------
1,224
initializeFlagsWithCradle :: GhcMonad m => Options -> Cradle -> [GHCOption] -> Bool -> m (LogReader, Maybe PackageDescription) initializeFlagsWithCradle opt cradle ghcopts logging | cabal = withCabal |||> withSandbox | otherwise = withSandbox where mCradleFile = cradleCabalFile cradle cabal = isJust mCradleFile withCabal = do pkgDesc <- liftIO $ parseCabalFile $ fromJust mCradleFile compOpts <- liftIO $ getCompilerOptions ghcopts cradle pkgDesc logger <- initSession CabalPkg opt compOpts logging return (logger, Just pkgDesc) withSandbox = do logger <- initSession SingleFile opt compOpts logging return (logger, Nothing) where pkgDb = userPackageDbOptsForGhc $ cradlePackageDb cradle compOpts | null pkgDb = CompilerOptions ghcopts importDirs [] | otherwise = CompilerOptions (ghcopts ++ pkgDb) [wdir,rdir] [] wdir = cradleCurrentDir cradle rdir = cradleRootDir cradle ----------------------------------------------------------------
1,077
initializeFlagsWithCradle opt cradle ghcopts logging | cabal = withCabal |||> withSandbox | otherwise = withSandbox where mCradleFile = cradleCabalFile cradle cabal = isJust mCradleFile withCabal = do pkgDesc <- liftIO $ parseCabalFile $ fromJust mCradleFile compOpts <- liftIO $ getCompilerOptions ghcopts cradle pkgDesc logger <- initSession CabalPkg opt compOpts logging return (logger, Just pkgDesc) withSandbox = do logger <- initSession SingleFile opt compOpts logging return (logger, Nothing) where pkgDb = userPackageDbOptsForGhc $ cradlePackageDb cradle compOpts | null pkgDb = CompilerOptions ghcopts importDirs [] | otherwise = CompilerOptions (ghcopts ++ pkgDb) [wdir,rdir] [] wdir = cradleCurrentDir cradle rdir = cradleRootDir cradle ----------------------------------------------------------------
949
true
true
4
12
280
289
140
149
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110704set1.hs
gpl-3.0
sets :: [Int] sets = [1..10]
28
sets :: [Int] sets = [1..10]
28
sets = [1..10]
14
false
true
0
7
5
26
12
14
null
null
strager/b
test/Spec/B/Build.hs
bsd-3-clause
needAQuestion_ :: AQuestion m -> B.BuildRule m () needAQuestion_ (AQuestion q) = need_ q
88
needAQuestion_ :: AQuestion m -> B.BuildRule m () needAQuestion_ (AQuestion q) = need_ q
88
needAQuestion_ (AQuestion q) = need_ q
38
false
true
0
7
13
39
18
21
null
null
beni55/haste-compiler
libraries/ghc-7.10/base/GHC/Arr.hs
bsd-3-clause
unsafeReadSTArray :: Ix i => STArray s i e -> Int -> ST s e unsafeReadSTArray (STArray _ _ _ marr#) (I# i#) = ST $ \s1# -> readArray# marr# i# s1#
150
unsafeReadSTArray :: Ix i => STArray s i e -> Int -> ST s e unsafeReadSTArray (STArray _ _ _ marr#) (I# i#) = ST $ \s1# -> readArray# marr# i# s1#
150
unsafeReadSTArray (STArray _ _ _ marr#) (I# i#) = ST $ \s1# -> readArray# marr# i# s1#
90
false
true
2
11
35
83
38
45
null
null
benkolera/phb
hs/Site/Customer.hs
mit
createCustomerSplices :: PhbSplice createCustomerSplices = customerFormSplices (pure Nothing)
93
createCustomerSplices :: PhbSplice createCustomerSplices = customerFormSplices (pure Nothing)
93
createCustomerSplices = customerFormSplices (pure Nothing)
58
false
true
0
7
7
20
10
10
null
null
pgj/bead
src/Bead/View/Content/Home/Page.hs
bsd-3-clause
navigation :: [Pages.Page a b c d e] -> IHtml navigation links = do msg <- getI18N return $ H.div ! A.id "menu" $ H.ul $ mapM_ (i18n msg . linkToPage) links
160
navigation :: [Pages.Page a b c d e] -> IHtml navigation links = do msg <- getI18N return $ H.div ! A.id "menu" $ H.ul $ mapM_ (i18n msg . linkToPage) links
160
navigation links = do msg <- getI18N return $ H.div ! A.id "menu" $ H.ul $ mapM_ (i18n msg . linkToPage) links
114
false
true
0
11
35
84
40
44
null
null
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | An entry ID, unique within the batch request. ocbreBatchId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word32) ocbreBatchId = lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a}) . mapping _Coerce
209
ocbreBatchId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word32) ocbreBatchId = lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a}) . mapping _Coerce
158
ocbreBatchId = lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a}) . mapping _Coerce
91
true
true
1
9
37
56
28
28
null
null
seereason/ghcjs
src/Gen2/Prim.hs
mit
genPrim _ _ IndexByteArrayOp_Word32 [r] [a,i] = PrimInline [j| `r` = `a`.i3[`i`]; |]
84
genPrim _ _ IndexByteArrayOp_Word32 [r] [a,i] = PrimInline [j| `r` = `a`.i3[`i`]; |]
84
genPrim _ _ IndexByteArrayOp_Word32 [r] [a,i] = PrimInline [j| `r` = `a`.i3[`i`]; |]
84
false
false
0
6
12
33
19
14
null
null
parsonsmatt/wyas
app/Main.hs
bsd-3-clause
main :: IO () main = do args <- getArgs unless (null args) $ do loaded <- readFile (head args) print loaded print $ parseAndEval loaded putStrLn "~~~" putStrLn "Write Yourself a Scheme!" putStrLn "~~~" putStrLn "I guess this is a REPL, huh?" forever repl
280
main :: IO () main = do args <- getArgs unless (null args) $ do loaded <- readFile (head args) print loaded print $ parseAndEval loaded putStrLn "~~~" putStrLn "Write Yourself a Scheme!" putStrLn "~~~" putStrLn "I guess this is a REPL, huh?" forever repl
280
main = do args <- getArgs unless (null args) $ do loaded <- readFile (head args) print loaded print $ parseAndEval loaded putStrLn "~~~" putStrLn "Write Yourself a Scheme!" putStrLn "~~~" putStrLn "I guess this is a REPL, huh?" forever repl
266
false
true
0
14
70
107
42
65
null
null
danoctavian/c10k-bench
bencher/src/Lib.hs
mit
readLen = BS.length msg
23
readLen = BS.length msg
23
readLen = BS.length msg
23
false
false
0
6
3
11
5
6
null
null
Gabriel439/Haskell-Dhall-Library
dhall/src/Dhall/Parser/Token.hs
bsd-3-clause
quotedPathCharacter :: Char -> Bool quotedPathCharacter c = ('\x20' <= c && c <= '\x21') || ('\x23' <= c && c <= '\x2E') || ('\x30' <= c && c <= '\x10FFFF')
174
quotedPathCharacter :: Char -> Bool quotedPathCharacter c = ('\x20' <= c && c <= '\x21') || ('\x23' <= c && c <= '\x2E') || ('\x30' <= c && c <= '\x10FFFF')
174
quotedPathCharacter c = ('\x20' <= c && c <= '\x21') || ('\x23' <= c && c <= '\x2E') || ('\x30' <= c && c <= '\x10FFFF')
138
false
true
3
11
48
83
40
43
null
null
eligottlieb/Calumbda
src/UntypedLambda.hs
mit
imLog :: Integer->Integer->Integer imLog b x = if x < b then 0 else let l = 2 * imLog (b*b) x doDiv x l = if x < b then l else doDiv (x`div`b) (l+1) in doDiv (x`div`(b^l)) l
207
imLog :: Integer->Integer->Integer imLog b x = if x < b then 0 else let l = 2 * imLog (b*b) x doDiv x l = if x < b then l else doDiv (x`div`b) (l+1) in doDiv (x`div`(b^l)) l
207
imLog b x = if x < b then 0 else let l = 2 * imLog (b*b) x doDiv x l = if x < b then l else doDiv (x`div`b) (l+1) in doDiv (x`div`(b^l)) l
172
false
true
0
13
73
127
68
59
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_BASQUE :: Int wxLANGUAGE_BASQUE = 32
47
wxLANGUAGE_BASQUE :: Int wxLANGUAGE_BASQUE = 32
47
wxLANGUAGE_BASQUE = 32
22
false
true
0
4
5
11
6
5
null
null
alldne/scheme
src/Language/Scheme/Reader.hs
bsd-3-clause
symbol' :: String -> Parser String symbol' = L.symbol' sc
57
symbol' :: String -> Parser String symbol' = L.symbol' sc
57
symbol' = L.symbol' sc
22
false
true
0
7
9
28
12
16
null
null
themoritz/cabal
Cabal/Distribution/Simple/LocalBuildInfo.hs
bsd-3-clause
componentBuildDir :: LocalBuildInfo -> ComponentLocalBuildInfo -> FilePath -- For now, we assume that libraries/executables/test-suites/benchmarks -- are only ever built once. With Backpack, we need a special case for -- libraries so that we can handle building them multiple times. componentBuildDir lbi clbi = buildDir lbi </> case componentLocalName clbi of CLibName -> if display (componentUnitId clbi) == display (componentComponentId clbi) then "" else display (componentUnitId clbi) CSubLibName s -> if display (componentUnitId clbi) == display (componentComponentId clbi) then unUnqualComponentName s else display (componentUnitId clbi) CFLibName s -> unUnqualComponentName s CExeName s -> unUnqualComponentName s CTestName s -> unUnqualComponentName s CBenchName s -> unUnqualComponentName s
1,008
componentBuildDir :: LocalBuildInfo -> ComponentLocalBuildInfo -> FilePath componentBuildDir lbi clbi = buildDir lbi </> case componentLocalName clbi of CLibName -> if display (componentUnitId clbi) == display (componentComponentId clbi) then "" else display (componentUnitId clbi) CSubLibName s -> if display (componentUnitId clbi) == display (componentComponentId clbi) then unUnqualComponentName s else display (componentUnitId clbi) CFLibName s -> unUnqualComponentName s CExeName s -> unUnqualComponentName s CTestName s -> unUnqualComponentName s CBenchName s -> unUnqualComponentName s
799
componentBuildDir lbi clbi = buildDir lbi </> case componentLocalName clbi of CLibName -> if display (componentUnitId clbi) == display (componentComponentId clbi) then "" else display (componentUnitId clbi) CSubLibName s -> if display (componentUnitId clbi) == display (componentComponentId clbi) then unUnqualComponentName s else display (componentUnitId clbi) CFLibName s -> unUnqualComponentName s CExeName s -> unUnqualComponentName s CTestName s -> unUnqualComponentName s CBenchName s -> unUnqualComponentName s
724
true
true
2
12
311
191
88
103
null
null
rethab/tagger
src/Tagger/TagWriter.hs
bsd-3-clause
writeTags :: [Artist] -> IO () writeTags = mapM_ (mapM_ writeAlb . artAlbs)
75
writeTags :: [Artist] -> IO () writeTags = mapM_ (mapM_ writeAlb . artAlbs)
75
writeTags = mapM_ (mapM_ writeAlb . artAlbs)
44
false
true
0
8
12
36
18
18
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/SageMakerNotebookInstance.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-notebookinstance.html#cfn-sagemaker-notebookinstance-volumesizeingb smniVolumeSizeInGB :: Lens' SageMakerNotebookInstance (Maybe (Val Integer)) smniVolumeSizeInGB = lens _sageMakerNotebookInstanceVolumeSizeInGB (\s a -> s { _sageMakerNotebookInstanceVolumeSizeInGB = a })
361
smniVolumeSizeInGB :: Lens' SageMakerNotebookInstance (Maybe (Val Integer)) smniVolumeSizeInGB = lens _sageMakerNotebookInstanceVolumeSizeInGB (\s a -> s { _sageMakerNotebookInstanceVolumeSizeInGB = a })
203
smniVolumeSizeInGB = lens _sageMakerNotebookInstanceVolumeSizeInGB (\s a -> s { _sageMakerNotebookInstanceVolumeSizeInGB = a })
127
true
true
0
9
22
52
28
24
null
null
fpco/fay
src/Fay.hs
bsd-3-clause
-- | Compile the given file and write the output to the given path, or -- if nothing given, stdout. compileFromTo :: Config -> FilePath -> Maybe FilePath -> IO () compileFromTo cfg filein fileout = if configTypecheckOnly cfg then do cfg' <- resolvePackages cfg res <- typecheck cfg' filein either (error . showCompileError) (ioWarn cfg') res else do result <- maybe (compileFile cfg filein) (compileFromToAndGenerateHtml cfg filein) fileout case result of Right out -> maybe (putStrLn out) (`writeFile` out) fileout Left err -> error $ showCompileError err -- | Compile the given file and write to the output, also generates HTML and sourcemap files if configured.
747
compileFromTo :: Config -> FilePath -> Maybe FilePath -> IO () compileFromTo cfg filein fileout = if configTypecheckOnly cfg then do cfg' <- resolvePackages cfg res <- typecheck cfg' filein either (error . showCompileError) (ioWarn cfg') res else do result <- maybe (compileFile cfg filein) (compileFromToAndGenerateHtml cfg filein) fileout case result of Right out -> maybe (putStrLn out) (`writeFile` out) fileout Left err -> error $ showCompileError err -- | Compile the given file and write to the output, also generates HTML and sourcemap files if configured.
647
compileFromTo cfg filein fileout = if configTypecheckOnly cfg then do cfg' <- resolvePackages cfg res <- typecheck cfg' filein either (error . showCompileError) (ioWarn cfg') res else do result <- maybe (compileFile cfg filein) (compileFromToAndGenerateHtml cfg filein) fileout case result of Right out -> maybe (putStrLn out) (`writeFile` out) fileout Left err -> error $ showCompileError err -- | Compile the given file and write to the output, also generates HTML and sourcemap files if configured.
584
true
true
0
14
189
184
87
97
null
null
wmhilton/lambda-calculator
LambdaParser.hs
mit
------------------------------------------------------------------------- -- E X A M P L E S ------------------------------------------------------------------------- lid = Abstraction "x" (Var "x")
202
lid = Abstraction "x" (Var "x")
34
lid = Abstraction "x" (Var "x")
34
true
false
0
7
20
20
11
9
null
null
runjak/projectEuler
src/Problem2.hs
mit
fibonacci 1 = 1
15
fibonacci 1 = 1
15
fibonacci 1 = 1
15
false
false
0
5
3
9
4
5
null
null
jean-edouard/manager
xenmgr/Vm/Queries.hs
gpl-2.0
getVmByDomid :: DomainID -> Rpc (Maybe Uuid) getVmByDomid domid = do vms <- getVms domids <- mapM getDomainID vms case filter matches (zip vms domids) of ((uuid,_) : _) -> return $ Just uuid _ -> return Nothing where matches (uuid,Just domid') = domid == domid' matches _ = False
344
getVmByDomid :: DomainID -> Rpc (Maybe Uuid) getVmByDomid domid = do vms <- getVms domids <- mapM getDomainID vms case filter matches (zip vms domids) of ((uuid,_) : _) -> return $ Just uuid _ -> return Nothing where matches (uuid,Just domid') = domid == domid' matches _ = False
344
getVmByDomid domid = do vms <- getVms domids <- mapM getDomainID vms case filter matches (zip vms domids) of ((uuid,_) : _) -> return $ Just uuid _ -> return Nothing where matches (uuid,Just domid') = domid == domid' matches _ = False
299
false
true
0
12
114
133
64
69
null
null
ur-crypto/sec-lib
library/Ops.hs
mit
bXor :: SecureGate bXor = xorGate
33
bXor :: SecureGate bXor = xorGate
33
bXor = xorGate
14
false
true
0
6
5
18
7
11
null
null
frantisekfarka/ghc-dsi
libraries/base/Data/Typeable/Internal.hs
bsd-3-clause
-- Keeping backwards-compatibility typeOf :: forall a. Typeable a => a -> TypeRep typeOf _ = typeRep (Proxy :: Proxy a)
119
typeOf :: forall a. Typeable a => a -> TypeRep typeOf _ = typeRep (Proxy :: Proxy a)
84
typeOf _ = typeRep (Proxy :: Proxy a)
37
true
true
0
7
20
43
22
21
null
null
ideas-edu/ideas
src/Ideas/Common/Rewriting/RewriteRule.hs
apache-2.0
metaInRewriteRule :: RewriteRule a -> [Int] metaInRewriteRule r = metaVars a ++ metaVars b where a :~> b = ruleSpecTerm r
124
metaInRewriteRule :: RewriteRule a -> [Int] metaInRewriteRule r = metaVars a ++ metaVars b where a :~> b = ruleSpecTerm r
123
metaInRewriteRule r = metaVars a ++ metaVars b where a :~> b = ruleSpecTerm r
79
false
true
0
6
23
50
23
27
null
null
fpco/schoolofhaskell
soh-scheduler/src/SchoolOfHaskell/Scheduler/AWS.hs
mit
discoverEnv :: forall (m :: * -> *). (Applicative m,Functor m,MonadIO m) => Text -> m Env discoverEnv region' = do parsedRegion <- hoistFromText region' Env <$> liftIO (getEnv parsedRegion Discover)
239
discoverEnv :: forall (m :: * -> *). (Applicative m,Functor m,MonadIO m) => Text -> m Env discoverEnv region' = do parsedRegion <- hoistFromText region' Env <$> liftIO (getEnv parsedRegion Discover)
239
discoverEnv region' = do parsedRegion <- hoistFromText region' Env <$> liftIO (getEnv parsedRegion Discover)
122
false
true
0
11
71
89
43
46
null
null