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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ekmett/wxHaskell
|
wxdirect/src/CompileClasses.hs
|
lgpl-2.1
|
haskellToCArgs :: Decl -> [Arg] -> String
haskellToCArgs decl args
= concatMap (\arg -> haskellToCArg decl arg ++ " ") args
| 126
|
haskellToCArgs :: Decl -> [Arg] -> String
haskellToCArgs decl args
= concatMap (\arg -> haskellToCArg decl arg ++ " ") args
| 126
|
haskellToCArgs decl args
= concatMap (\arg -> haskellToCArg decl arg ++ " ") args
| 84
| false
| true
| 0
| 9
| 23
| 55
| 26
| 29
| null | null |
rueshyna/gogol
|
gogol-people/gen/Network/Google/People/Types/Product.hs
|
mpl-2.0
|
-- | Metadata about the photo.
pMetadata :: Lens' Photo (Maybe FieldMetadata)
pMetadata
= lens _pMetadata (\ s a -> s{_pMetadata = a})
| 136
|
pMetadata :: Lens' Photo (Maybe FieldMetadata)
pMetadata
= lens _pMetadata (\ s a -> s{_pMetadata = a})
| 105
|
pMetadata
= lens _pMetadata (\ s a -> s{_pMetadata = a})
| 58
| true
| true
| 0
| 9
| 24
| 48
| 25
| 23
| null | null |
bitemyapp/ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
luxiReqQueryExports :: String
luxiReqQueryExports = "QueryExports"
| 66
|
luxiReqQueryExports :: String
luxiReqQueryExports = "QueryExports"
| 66
|
luxiReqQueryExports = "QueryExports"
| 36
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
jgm/blaze-html
|
Util/BlazeFromHtml.hs
|
bsd-3-clause
|
makeTree :: HtmlVariant -- ^ HTML variant used
-> Bool -- ^ Should ignore errors
-> [String] -- ^ Stack of open tags
-> [Tag String] -- ^ Tags to parse
-> (Html, [Tag String]) -- ^ (Result, unparsed part)
makeTree _ ignore stack []
| null stack || ignore = (Block [], [])
| otherwise = error $ "Error: tags left open at the end: " ++ show stack
| 438
|
makeTree :: HtmlVariant -- ^ HTML variant used
-> Bool -- ^ Should ignore errors
-> [String] -- ^ Stack of open tags
-> [Tag String] -- ^ Tags to parse
-> (Html, [Tag String])
makeTree _ ignore stack []
| null stack || ignore = (Block [], [])
| otherwise = error $ "Error: tags left open at the end: " ++ show stack
| 408
|
makeTree _ ignore stack []
| null stack || ignore = (Block [], [])
| otherwise = error $ "Error: tags left open at the end: " ++ show stack
| 147
| true
| true
| 1
| 11
| 163
| 108
| 57
| 51
| null | null |
ion1/swtor-ui
|
src/SWTOR/UIProfile/Layout.hs
|
mit
|
layoutPrimParentAlignment Box{..} =
asum (map layoutPrimParentAlignment (lyInside ++ lyChildren))
| 99
|
layoutPrimParentAlignment Box{..} =
asum (map layoutPrimParentAlignment (lyInside ++ lyChildren))
| 99
|
layoutPrimParentAlignment Box{..} =
asum (map layoutPrimParentAlignment (lyInside ++ lyChildren))
| 99
| false
| false
| 0
| 9
| 10
| 33
| 16
| 17
| null | null |
alexander-at-github/eta
|
compiler/ETA/Prelude/PrelNames.hs
|
bsd-3-clause
|
plus_RDR = varQual_RDR gHC_NUM (fsLit "+")
| 57
|
plus_RDR = varQual_RDR gHC_NUM (fsLit "+")
| 57
|
plus_RDR = varQual_RDR gHC_NUM (fsLit "+")
| 57
| false
| false
| 1
| 7
| 20
| 20
| 8
| 12
| null | null |
PhDP/Manticore
|
Akarui/Parser/FOL.hs
|
apache-2.0
|
parsePred = do
args <- Term.parseFunForm
return $ Atom $ uncurry Predicate args
| 83
|
parsePred = do
args <- Term.parseFunForm
return $ Atom $ uncurry Predicate args
| 83
|
parsePred = do
args <- Term.parseFunForm
return $ Atom $ uncurry Predicate args
| 83
| false
| false
| 0
| 8
| 16
| 31
| 14
| 17
| null | null |
rueshyna/gogol
|
gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs
|
mpl-2.0
|
-- | Description of scope.
rdaoasaDescription :: Lens' RestDescriptionAuthOAuth2ScopesAdditional (Maybe Text)
rdaoasaDescription
= lens _rdaoasaDescription
(\ s a -> s{_rdaoasaDescription = a})
| 201
|
rdaoasaDescription :: Lens' RestDescriptionAuthOAuth2ScopesAdditional (Maybe Text)
rdaoasaDescription
= lens _rdaoasaDescription
(\ s a -> s{_rdaoasaDescription = a})
| 174
|
rdaoasaDescription
= lens _rdaoasaDescription
(\ s a -> s{_rdaoasaDescription = a})
| 91
| true
| true
| 0
| 9
| 29
| 48
| 25
| 23
| null | null |
ShigekiKarita/haskellSDL2Examples
|
src/lesson12.hs
|
gpl-2.0
|
updateSource :: (Monad m, Functor f, Foldable f) => m (f Event) -> m UpdateApplication
updateSource events = flip stepApplication <$> collectIntents events
| 155
|
updateSource :: (Monad m, Functor f, Foldable f) => m (f Event) -> m UpdateApplication
updateSource events = flip stepApplication <$> collectIntents events
| 155
|
updateSource events = flip stepApplication <$> collectIntents events
| 68
| false
| true
| 0
| 9
| 22
| 61
| 29
| 32
| null | null |
d-dorazio/lc
|
test/Lc/Arbitrary.hs
|
bsd-3-clause
|
arbitraryLc :: Set.Set String -> Int -> Gen Lc
arbitraryLc vars 0 = LcVar <$> elements (Set.toList vars)
| 107
|
arbitraryLc :: Set.Set String -> Int -> Gen Lc
arbitraryLc vars 0 = LcVar <$> elements (Set.toList vars)
| 107
|
arbitraryLc vars 0 = LcVar <$> elements (Set.toList vars)
| 60
| false
| true
| 0
| 9
| 20
| 47
| 22
| 25
| null | null |
shlevy/ghc
|
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
|
bsd-3-clause
|
pprTyApp (EqualityT, [arg1, arg2]) =
sep [pprFunArgType arg1 <+> text "~", ppr arg2]
| 88
|
pprTyApp (EqualityT, [arg1, arg2]) =
sep [pprFunArgType arg1 <+> text "~", ppr arg2]
| 88
|
pprTyApp (EqualityT, [arg1, arg2]) =
sep [pprFunArgType arg1 <+> text "~", ppr arg2]
| 88
| false
| false
| 0
| 8
| 16
| 43
| 22
| 21
| null | null |
ItsLastDay/academic_university_2016-2018
|
subjects/Haskell/coursework_tests.hs
|
gpl-3.0
|
fac''' = cTheta :@ fac''step
| 28
|
fac''' = cTheta :@ fac''step
| 28
|
fac''' = cTheta :@ fac''step
| 28
| false
| false
| 1
| 5
| 4
| 13
| 5
| 8
| null | null |
Feeniks/Agon
|
app/Agon/Server.hs
|
bsd-3-clause
|
authServer :: ServerT AuthAPI AppM
authServer = authenticate
| 60
|
authServer :: ServerT AuthAPI AppM
authServer = authenticate
| 60
|
authServer = authenticate
| 25
| false
| true
| 0
| 5
| 7
| 16
| 8
| 8
| null | null |
kojiromike/Idris-dev
|
src/Idris/Reflection.hs
|
bsd-3-clause
|
reifyTTNameApp :: Name -> [Term] -> ElabD Name
reifyTTNameApp t [Constant (Str n)]
| t == reflm "UN" = return $ sUN n
| 132
|
reifyTTNameApp :: Name -> [Term] -> ElabD Name
reifyTTNameApp t [Constant (Str n)]
| t == reflm "UN" = return $ sUN n
| 132
|
reifyTTNameApp t [Constant (Str n)]
| t == reflm "UN" = return $ sUN n
| 85
| false
| true
| 0
| 9
| 37
| 62
| 29
| 33
| null | null |
sdiehl/ghc
|
testsuite/tests/pmcheck/should_compile/T11195.hs
|
bsd-3-clause
|
optForAllCoBndr :: LiftingContext -> Bool
-> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion)
optForAllCoBndr = undefined
| 143
|
optForAllCoBndr :: LiftingContext -> Bool
-> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion)
optForAllCoBndr = undefined
| 143
|
optForAllCoBndr = undefined
| 27
| false
| true
| 0
| 9
| 31
| 36
| 20
| 16
| null | null |
sos22/ppres
|
ppres/driver/UIValue.hs
|
gpl-2.0
|
coerceError :: String -> UIValue -> Either String a
coerceError wanted got = Left $ "Type error: wanted " ++ wanted ++ ", got " ++ (show got)
| 141
|
coerceError :: String -> UIValue -> Either String a
coerceError wanted got = Left $ "Type error: wanted " ++ wanted ++ ", got " ++ (show got)
| 141
|
coerceError wanted got = Left $ "Type error: wanted " ++ wanted ++ ", got " ++ (show got)
| 89
| false
| true
| 0
| 8
| 27
| 51
| 25
| 26
| null | null |
hanshoglund/imitator
|
src/Main.hs
|
gpl-3.0
|
transport2 :: (Ord t, Fractional t) => Event (TransportControl t) -> Event a -> Reactive t -> Reactive t
transport2 ctrl trig speed = position'
where
-- action :: Reactive (TransportControl t)
action = Pause `stepper` ctrl
-- direction :: Num a => Reactive a
direction = (flip fmap) action $ \a -> case a of
Play -> 1
Reverse -> (-1)
Pause -> 0
Stop -> 0
-- position :: Num a => Reactive a
position = integral2 trig (speed * direction)
startPosition = sampleAndHold2 0 position (filter' (pure isStop) ctrl)
position' = position - startPosition
| 720
|
transport2 :: (Ord t, Fractional t) => Event (TransportControl t) -> Event a -> Reactive t -> Reactive t
transport2 ctrl trig speed = position'
where
-- action :: Reactive (TransportControl t)
action = Pause `stepper` ctrl
-- direction :: Num a => Reactive a
direction = (flip fmap) action $ \a -> case a of
Play -> 1
Reverse -> (-1)
Pause -> 0
Stop -> 0
-- position :: Num a => Reactive a
position = integral2 trig (speed * direction)
startPosition = sampleAndHold2 0 position (filter' (pure isStop) ctrl)
position' = position - startPosition
| 720
|
transport2 ctrl trig speed = position'
where
-- action :: Reactive (TransportControl t)
action = Pause `stepper` ctrl
-- direction :: Num a => Reactive a
direction = (flip fmap) action $ \a -> case a of
Play -> 1
Reverse -> (-1)
Pause -> 0
Stop -> 0
-- position :: Num a => Reactive a
position = integral2 trig (speed * direction)
startPosition = sampleAndHold2 0 position (filter' (pure isStop) ctrl)
position' = position - startPosition
| 615
| false
| true
| 5
| 11
| 273
| 208
| 98
| 110
| null | null |
brendanhay/gogol
|
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/Images/Upload.hs
|
mpl-2.0
|
-- | JSONP
eiuCallback :: Lens' EditsImagesUpload (Maybe Text)
eiuCallback
= lens _eiuCallback (\ s a -> s{_eiuCallback = a})
| 127
|
eiuCallback :: Lens' EditsImagesUpload (Maybe Text)
eiuCallback
= lens _eiuCallback (\ s a -> s{_eiuCallback = a})
| 116
|
eiuCallback
= lens _eiuCallback (\ s a -> s{_eiuCallback = a})
| 64
| true
| true
| 0
| 9
| 21
| 48
| 25
| 23
| null | null |
mparusinski/Haskell-number-theory-library
|
Factoring/Lenstra.hs
|
gpl-3.0
|
lenstraECMParallelSmartBound number
= lenstraECMParallel number (smartBound number)
| 87
|
lenstraECMParallelSmartBound number
= lenstraECMParallel number (smartBound number)
| 87
|
lenstraECMParallelSmartBound number
= lenstraECMParallel number (smartBound number)
| 87
| false
| false
| 0
| 7
| 10
| 20
| 9
| 11
| null | null |
wouwouwou/2017_module_8
|
src/haskell/PP-project-2016/CodeGen.hs
|
apache-2.0
|
insertACallPointers (x@(Debug ('*':'*':'r':cName)):(Debug ""):xs) (progP, callP)
= [ Load (ImmValue (v)) regE
, Push regE
] ++ (insertACallPointers xs (progP, newCallP))
where
(v,newCallP) = takeItem callP cName
takeItem :: [CallPointer] -> String -> (Int, [CallPointer])
takeItem [] _ = (999999,[])
takeItem (x@(cNameStr,number):xs) str
| cNameStr == str = (number,xs)
| otherwise = (nr,x:nxs)
where (nr,nxs) = takeItem xs str
-- fall-through
| 551
|
insertACallPointers (x@(Debug ('*':'*':'r':cName)):(Debug ""):xs) (progP, callP)
= [ Load (ImmValue (v)) regE
, Push regE
] ++ (insertACallPointers xs (progP, newCallP))
where
(v,newCallP) = takeItem callP cName
takeItem :: [CallPointer] -> String -> (Int, [CallPointer])
takeItem [] _ = (999999,[])
takeItem (x@(cNameStr,number):xs) str
| cNameStr == str = (number,xs)
| otherwise = (nr,x:nxs)
where (nr,nxs) = takeItem xs str
-- fall-through
| 551
|
insertACallPointers (x@(Debug ('*':'*':'r':cName)):(Debug ""):xs) (progP, callP)
= [ Load (ImmValue (v)) regE
, Push regE
] ++ (insertACallPointers xs (progP, newCallP))
where
(v,newCallP) = takeItem callP cName
takeItem :: [CallPointer] -> String -> (Int, [CallPointer])
takeItem [] _ = (999999,[])
takeItem (x@(cNameStr,number):xs) str
| cNameStr == str = (number,xs)
| otherwise = (nr,x:nxs)
where (nr,nxs) = takeItem xs str
-- fall-through
| 551
| false
| false
| 1
| 14
| 168
| 247
| 133
| 114
| null | null |
futtetennista/IntroductionToFunctionalProgramming
|
src/MonadTransformersPlayground.hs
|
mit
|
eval2 :: Env -> Exp -> Eval2 Value
eval2 _ (Lit i) =
return (IntVal i)
| 72
|
eval2 :: Env -> Exp -> Eval2 Value
eval2 _ (Lit i) =
return (IntVal i)
| 72
|
eval2 _ (Lit i) =
return (IntVal i)
| 37
| false
| true
| 0
| 10
| 17
| 46
| 21
| 25
| null | null |
mnicoletti/pdep-utn-frba
|
funcional/clases/20160413-clase-repaso.hs
|
mit
|
calorias Helado _ ba | ba == "chocolate" = 370
| otherwise = 220
| 70
|
calorias Helado _ ba | ba == "chocolate" = 370
| otherwise = 220
| 70
|
calorias Helado _ ba | ba == "chocolate" = 370
| otherwise = 220
| 70
| false
| false
| 0
| 8
| 19
| 32
| 14
| 18
| null | null |
rueshyna/gogol
|
gogol-people/gen/Network/Google/People/Types/Product.hs
|
mpl-2.0
|
-- | The region of the address; for example, the state or province.
aRegion :: Lens' Address (Maybe Text)
aRegion = lens _aRegion (\ s a -> s{_aRegion = a})
| 156
|
aRegion :: Lens' Address (Maybe Text)
aRegion = lens _aRegion (\ s a -> s{_aRegion = a})
| 88
|
aRegion = lens _aRegion (\ s a -> s{_aRegion = a})
| 50
| true
| true
| 0
| 9
| 29
| 46
| 25
| 21
| null | null |
OS2World/DEV-UTIL-HUGS
|
oldlib/UnbalancedSet.hs
|
bsd-3-clause
|
filterLE y (T a x b) =
case compare x y of
LT -> T a x (filterLE y b)
EQ -> T a x E
GT -> filterLE y a
| 116
|
filterLE y (T a x b) =
case compare x y of
LT -> T a x (filterLE y b)
EQ -> T a x E
GT -> filterLE y a
| 116
|
filterLE y (T a x b) =
case compare x y of
LT -> T a x (filterLE y b)
EQ -> T a x E
GT -> filterLE y a
| 116
| false
| false
| 0
| 10
| 44
| 75
| 35
| 40
| null | null |
nfjinjing/bench-euler
|
src/Math/CharactersSn.hs
|
bsd-3-clause
|
h m [d] | m > 1 = sum [x_ m ^ i * h (m-1) [d-i] | i <- [0..d]]
| 62
|
h m [d] | m > 1 = sum [x_ m ^ i * h (m-1) [d-i] | i <- [0..d]]
| 62
|
h m [d] | m > 1 = sum [x_ m ^ i * h (m-1) [d-i] | i <- [0..d]]
| 62
| false
| false
| 0
| 9
| 20
| 75
| 36
| 39
| null | null |
pgavin/secdh
|
lib/SECDH/Eval.hs
|
bsd-3-clause
|
applyPrim IOReturnP [a] = IOActionA (ReturnIO a)
| 91
|
applyPrim IOReturnP [a] = IOActionA (ReturnIO a)
| 91
|
applyPrim IOReturnP [a] = IOActionA (ReturnIO a)
| 91
| false
| false
| 0
| 7
| 49
| 25
| 11
| 14
| null | null |
kawamuray/ganeti
|
src/Ganeti/Constants.hs
|
gpl-2.0
|
nicModeOvs :: String
nicModeOvs = Types.nICModeToRaw NMOvs
| 58
|
nicModeOvs :: String
nicModeOvs = Types.nICModeToRaw NMOvs
| 58
|
nicModeOvs = Types.nICModeToRaw NMOvs
| 37
| false
| true
| 0
| 6
| 6
| 16
| 8
| 8
| null | null |
howell/cassava
|
benchmarks/Benchmarks.hs
|
bsd-3-clause
|
main :: IO ()
main = do
!csvData <- fromStrict `fmap` B.readFile "benchmarks/presidents.csv"
!csvDataN <- fromStrict `fmap` B.readFile
"benchmarks/presidents_with_header.csv"
let (Right !presidents) = V.toList <$> decodePresidents csvData
(Right (!hdr, !presidentsNV)) = decodePresidentsN csvDataN
!presidentsN = V.toList presidentsNV
evaluate (rnf [presidents, presidentsN])
defaultMain [
bgroup "positional"
[ bgroup "decode"
[ bench "presidents/without conversion" $ whnf idDecode csvData
, bench "presidents/with conversion" $ whnf decodePresidents csvData
, bgroup "streaming"
[ bench "presidents/without conversion" $ nf idDecodeS csvData
, bench "presidents/with conversion" $ nf decodePresidentsS csvData
]
]
, bgroup "encode"
[ bench "presidents/with conversion" $ whnf encode presidents
]
]
, bgroup "named"
[ bgroup "decode"
[ bench "presidents/without conversion" $ whnf idDecodeN csvDataN
, bench "presidents/with conversion" $ whnf decodePresidentsN csvDataN
]
, bgroup "encode"
[ bench "presidents/with conversion" $ whnf (encodeByName hdr) presidentsN
]
]
, bgroup "comparison"
[ bench "lazy-csv" $ nf LazyCsv.parseCSV csvData
]
]
where
decodePresidents :: BL.ByteString -> Either String (Vector President)
decodePresidents = decode NoHeader
decodePresidentsN :: BL.ByteString -> Either String (Header, Vector President)
decodePresidentsN = decodeByName
decodePresidentsS :: BL.ByteString -> Streaming.Records President
decodePresidentsS = Streaming.decode NoHeader
idDecode :: BL.ByteString -> Either String (Vector (Vector B.ByteString))
idDecode = decode NoHeader
idDecodeN :: BL.ByteString -> Either String (Header, Vector (BSHashMap B.ByteString))
idDecodeN = decodeByName
idDecodeS :: BL.ByteString -> Streaming.Records (Vector B.ByteString)
idDecodeS = Streaming.decode NoHeader
| 2,197
|
main :: IO ()
main = do
!csvData <- fromStrict `fmap` B.readFile "benchmarks/presidents.csv"
!csvDataN <- fromStrict `fmap` B.readFile
"benchmarks/presidents_with_header.csv"
let (Right !presidents) = V.toList <$> decodePresidents csvData
(Right (!hdr, !presidentsNV)) = decodePresidentsN csvDataN
!presidentsN = V.toList presidentsNV
evaluate (rnf [presidents, presidentsN])
defaultMain [
bgroup "positional"
[ bgroup "decode"
[ bench "presidents/without conversion" $ whnf idDecode csvData
, bench "presidents/with conversion" $ whnf decodePresidents csvData
, bgroup "streaming"
[ bench "presidents/without conversion" $ nf idDecodeS csvData
, bench "presidents/with conversion" $ nf decodePresidentsS csvData
]
]
, bgroup "encode"
[ bench "presidents/with conversion" $ whnf encode presidents
]
]
, bgroup "named"
[ bgroup "decode"
[ bench "presidents/without conversion" $ whnf idDecodeN csvDataN
, bench "presidents/with conversion" $ whnf decodePresidentsN csvDataN
]
, bgroup "encode"
[ bench "presidents/with conversion" $ whnf (encodeByName hdr) presidentsN
]
]
, bgroup "comparison"
[ bench "lazy-csv" $ nf LazyCsv.parseCSV csvData
]
]
where
decodePresidents :: BL.ByteString -> Either String (Vector President)
decodePresidents = decode NoHeader
decodePresidentsN :: BL.ByteString -> Either String (Header, Vector President)
decodePresidentsN = decodeByName
decodePresidentsS :: BL.ByteString -> Streaming.Records President
decodePresidentsS = Streaming.decode NoHeader
idDecode :: BL.ByteString -> Either String (Vector (Vector B.ByteString))
idDecode = decode NoHeader
idDecodeN :: BL.ByteString -> Either String (Header, Vector (BSHashMap B.ByteString))
idDecodeN = decodeByName
idDecodeS :: BL.ByteString -> Streaming.Records (Vector B.ByteString)
idDecodeS = Streaming.decode NoHeader
| 2,197
|
main = do
!csvData <- fromStrict `fmap` B.readFile "benchmarks/presidents.csv"
!csvDataN <- fromStrict `fmap` B.readFile
"benchmarks/presidents_with_header.csv"
let (Right !presidents) = V.toList <$> decodePresidents csvData
(Right (!hdr, !presidentsNV)) = decodePresidentsN csvDataN
!presidentsN = V.toList presidentsNV
evaluate (rnf [presidents, presidentsN])
defaultMain [
bgroup "positional"
[ bgroup "decode"
[ bench "presidents/without conversion" $ whnf idDecode csvData
, bench "presidents/with conversion" $ whnf decodePresidents csvData
, bgroup "streaming"
[ bench "presidents/without conversion" $ nf idDecodeS csvData
, bench "presidents/with conversion" $ nf decodePresidentsS csvData
]
]
, bgroup "encode"
[ bench "presidents/with conversion" $ whnf encode presidents
]
]
, bgroup "named"
[ bgroup "decode"
[ bench "presidents/without conversion" $ whnf idDecodeN csvDataN
, bench "presidents/with conversion" $ whnf decodePresidentsN csvDataN
]
, bgroup "encode"
[ bench "presidents/with conversion" $ whnf (encodeByName hdr) presidentsN
]
]
, bgroup "comparison"
[ bench "lazy-csv" $ nf LazyCsv.parseCSV csvData
]
]
where
decodePresidents :: BL.ByteString -> Either String (Vector President)
decodePresidents = decode NoHeader
decodePresidentsN :: BL.ByteString -> Either String (Header, Vector President)
decodePresidentsN = decodeByName
decodePresidentsS :: BL.ByteString -> Streaming.Records President
decodePresidentsS = Streaming.decode NoHeader
idDecode :: BL.ByteString -> Either String (Vector (Vector B.ByteString))
idDecode = decode NoHeader
idDecodeN :: BL.ByteString -> Either String (Header, Vector (BSHashMap B.ByteString))
idDecodeN = decodeByName
idDecodeS :: BL.ByteString -> Streaming.Records (Vector B.ByteString)
idDecodeS = Streaming.decode NoHeader
| 2,183
| false
| true
| 0
| 16
| 614
| 580
| 271
| 309
| null | null |
raimohanska/rump
|
test/FunctionalSpec.hs
|
gpl-3.0
|
saddam = "{\"userId\":\"saddam\",\"displayName\":\"Saddam\",\"location\":{\"latitude\":51,\"longitude\":101}}"
| 110
|
saddam = "{\"userId\":\"saddam\",\"displayName\":\"Saddam\",\"location\":{\"latitude\":51,\"longitude\":101}}"
| 110
|
saddam = "{\"userId\":\"saddam\",\"displayName\":\"Saddam\",\"location\":{\"latitude\":51,\"longitude\":101}}"
| 110
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
wavewave/madgraph-auto
|
src/HEP/Automation/MadGraph/Card.hs
|
gpl-3.0
|
pgsCardMachine (Parton _ CMS) = "pgs_card_CMS.dat.st"
| 53
|
pgsCardMachine (Parton _ CMS) = "pgs_card_CMS.dat.st"
| 53
|
pgsCardMachine (Parton _ CMS) = "pgs_card_CMS.dat.st"
| 53
| false
| false
| 0
| 6
| 5
| 18
| 8
| 10
| null | null |
brendanhay/gogol
|
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
|
mpl-2.0
|
-- | Width of the item for shipping.
prorShippingWidth :: Lens' Product (Maybe ProductShippingDimension)
prorShippingWidth
= lens _prorShippingWidth
(\ s a -> s{_prorShippingWidth = a})
| 193
|
prorShippingWidth :: Lens' Product (Maybe ProductShippingDimension)
prorShippingWidth
= lens _prorShippingWidth
(\ s a -> s{_prorShippingWidth = a})
| 156
|
prorShippingWidth
= lens _prorShippingWidth
(\ s a -> s{_prorShippingWidth = a})
| 88
| true
| true
| 0
| 9
| 32
| 48
| 25
| 23
| null | null |
Dronte/Operads
|
Math/Operad/OperadGB.hs
|
bsd-3-clause
|
-- | Finds rooted small common multiples of two trees.
findRootedSCM :: (Ord a, Show a) =>
DecoratedTree a -> DecoratedTree a -> Maybe (DecoratedTree a)
findRootedSCM s (DTLeaf _) = Just s
| 206
|
findRootedSCM :: (Ord a, Show a) =>
DecoratedTree a -> DecoratedTree a -> Maybe (DecoratedTree a)
findRootedSCM s (DTLeaf _) = Just s
| 151
|
findRootedSCM s (DTLeaf _) = Just s
| 35
| true
| true
| 0
| 10
| 50
| 64
| 31
| 33
| null | null |
skliew/hs-tinycdb
|
test/Spec.hs
|
bsd-3-clause
|
insertNothingToCdb :: WriteCdb IO ()
insertNothingToCdb = WriteCdb (\cdb -> return $ Right ())
| 94
|
insertNothingToCdb :: WriteCdb IO ()
insertNothingToCdb = WriteCdb (\cdb -> return $ Right ())
| 94
|
insertNothingToCdb = WriteCdb (\cdb -> return $ Right ())
| 57
| false
| true
| 0
| 10
| 13
| 38
| 19
| 19
| null | null |
hth313/hthforth
|
src/Translator/Assembler/Target/ARM.hs
|
bsd-2-clause
|
ldrb = LDRB AL Any
| 20
|
ldrb = LDRB AL Any
| 20
|
ldrb = LDRB AL Any
| 20
| false
| false
| 0
| 5
| 6
| 11
| 5
| 6
| null | null |
xymostech/tex-parser
|
src/TeX/Parser/Conditional.hs
|
mit
|
ignoreUntil :: TeXParser Token -> TeXParser ()
ignoreUntil stop =
ignoreUntilRec 0
where
stopLevel :: Integer -> TeXParser ()
stopLevel 0 = return ()
stopLevel _ = fail "not at level 0"
ignoreUntilRec :: Integer -> TeXParser ()
ignoreUntilRec level =
(stopLevel level >> (lookAhead stop) >> return ()) <|>
(ifToken >> ignoreUntilRec (level + 1)) <|>
(fiToken >> ignoreUntilRec (level - 1)) <|>
(anyToken >> ignoreUntilRec level)
| 477
|
ignoreUntil :: TeXParser Token -> TeXParser ()
ignoreUntil stop =
ignoreUntilRec 0
where
stopLevel :: Integer -> TeXParser ()
stopLevel 0 = return ()
stopLevel _ = fail "not at level 0"
ignoreUntilRec :: Integer -> TeXParser ()
ignoreUntilRec level =
(stopLevel level >> (lookAhead stop) >> return ()) <|>
(ifToken >> ignoreUntilRec (level + 1)) <|>
(fiToken >> ignoreUntilRec (level - 1)) <|>
(anyToken >> ignoreUntilRec level)
| 477
|
ignoreUntil stop =
ignoreUntilRec 0
where
stopLevel :: Integer -> TeXParser ()
stopLevel 0 = return ()
stopLevel _ = fail "not at level 0"
ignoreUntilRec :: Integer -> TeXParser ()
ignoreUntilRec level =
(stopLevel level >> (lookAhead stop) >> return ()) <|>
(ifToken >> ignoreUntilRec (level + 1)) <|>
(fiToken >> ignoreUntilRec (level - 1)) <|>
(anyToken >> ignoreUntilRec level)
| 430
| false
| true
| 14
| 9
| 116
| 177
| 90
| 87
| null | null |
vrom911/hs-init
|
summoner-cli/src/Summoner/Golden.hs
|
mit
|
generateStackScript :: IO ()
generateStackScript = do
let path = "summoner-cli/examples/stackScript.hs"
infoMessage $ "Writing Stack script to: " <> toText path
writeFileText path $ scriptFile defaultGHC Stack
| 221
|
generateStackScript :: IO ()
generateStackScript = do
let path = "summoner-cli/examples/stackScript.hs"
infoMessage $ "Writing Stack script to: " <> toText path
writeFileText path $ scriptFile defaultGHC Stack
| 221
|
generateStackScript = do
let path = "summoner-cli/examples/stackScript.hs"
infoMessage $ "Writing Stack script to: " <> toText path
writeFileText path $ scriptFile defaultGHC Stack
| 192
| false
| true
| 0
| 9
| 38
| 54
| 24
| 30
| null | null |
MichielDerhaeg/stack
|
src/Stack/Build/Cache.hs
|
bsd-3-clause
|
tryGetBuildCache :: (MonadUnliftIO m, MonadReader env m, MonadThrow m, MonadLogger m, HasEnvConfig env)
=> Path Abs Dir -> m (Maybe (Map FilePath FileCacheInfo))
tryGetBuildCache dir = liftM (fmap buildCacheTimes) . $(versionedDecodeFile buildCacheVC) =<< buildCacheFile dir
| 291
|
tryGetBuildCache :: (MonadUnliftIO m, MonadReader env m, MonadThrow m, MonadLogger m, HasEnvConfig env)
=> Path Abs Dir -> m (Maybe (Map FilePath FileCacheInfo))
tryGetBuildCache dir = liftM (fmap buildCacheTimes) . $(versionedDecodeFile buildCacheVC) =<< buildCacheFile dir
| 291
|
tryGetBuildCache dir = liftM (fmap buildCacheTimes) . $(versionedDecodeFile buildCacheVC) =<< buildCacheFile dir
| 112
| false
| true
| 0
| 11
| 51
| 105
| 50
| 55
| null | null |
tonymorris/system-command
|
src/System/Command.hs
|
bsd-3-clause
|
-- | Returns true if the given process result was constructed with the value @0@, otherwise false.
isSuccess ::
ExitCode
-> Bool
isSuccess (ExitCode n) =
n == 0
| 166
|
isSuccess ::
ExitCode
-> Bool
isSuccess (ExitCode n) =
n == 0
| 67
|
isSuccess (ExitCode n) =
n == 0
| 33
| true
| true
| 0
| 9
| 34
| 31
| 15
| 16
| null | null |
fpco/ekg
|
System/Remote/Wai.hs
|
bsd-3-clause
|
jsonHeaders :: ResponseHeaders
jsonHeaders = [("Content-Type", "application/json")]
| 83
|
jsonHeaders :: ResponseHeaders
jsonHeaders = [("Content-Type", "application/json")]
| 83
|
jsonHeaders = [("Content-Type", "application/json")]
| 52
| false
| true
| 0
| 6
| 6
| 20
| 12
| 8
| null | null |
ambiata/mismi
|
mismi-core/src/Mismi/Control.hs
|
bsd-3-clause
|
runAWSTWithRegion :: Region -> (Error -> e) -> EitherT e AWS a -> EitherT e IO a
runAWSTWithRegion r err action =
runAWSTWith (runAWSWithRegion r) err action
| 159
|
runAWSTWithRegion :: Region -> (Error -> e) -> EitherT e AWS a -> EitherT e IO a
runAWSTWithRegion r err action =
runAWSTWith (runAWSWithRegion r) err action
| 159
|
runAWSTWithRegion r err action =
runAWSTWith (runAWSWithRegion r) err action
| 78
| false
| true
| 0
| 8
| 28
| 64
| 31
| 33
| null | null |
christiaanb/DepCore
|
Test.hs
|
bsd-2-clause
|
test1 :: Term String String
test1 = let_ vec' "tail"
| 52
|
test1 :: Term String String
test1 = let_ vec' "tail"
| 52
|
test1 = let_ vec' "tail"
| 24
| false
| true
| 1
| 5
| 9
| 24
| 10
| 14
| null | null |
ancientlanguage/haskell-analysis
|
prepare/src/Prepare/Decompose.hs
|
mit
|
decomposeChar '\x0624' = "\x0648\x0654"
| 39
|
decomposeChar '\x0624' = "\x0648\x0654"
| 39
|
decomposeChar '\x0624' = "\x0648\x0654"
| 39
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
JohnLato/scryptic
|
src/Scryptic/Language/LayoutScrypt.hs
|
gpl-3.0
|
layoutClose = "}"
| 17
|
layoutClose = "}"
| 17
|
layoutClose = "}"
| 17
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
dimara/ganeti
|
src/Ganeti/Utils/Monad.hs
|
bsd-2-clause
|
-- | Short-circuit 'or' for values of type Monad m => m Bool
orM :: (Monad m) => [m Bool] -> m Bool
orM = anyM id
| 113
|
orM :: (Monad m) => [m Bool] -> m Bool
orM = anyM id
| 52
|
orM = anyM id
| 13
| true
| true
| 0
| 9
| 26
| 42
| 20
| 22
| null | null |
nomeata/codeworld
|
funblocks-client/src/Blocks/Types.hs
|
apache-2.0
|
standardFunction cwName funcName ico types inputNames color tooltip =
DesignBlock cwName (Function funcName types)
(header : (argInputs ++ [Dummy [Text ")"]]))
inlineDef
color
(Tooltip tooltip)
where
header = case ico of
Just i -> Value (head inputNames) [Text "(", TextE funcName, icon i]
Nothing -> Value (head inputNames) [Text "(", TextE funcName]
argInputs = map (\name -> Value name [Text ","]) (tail inputNames)
-- PICTURE ----------------------------------------------
| 547
|
standardFunction cwName funcName ico types inputNames color tooltip =
DesignBlock cwName (Function funcName types)
(header : (argInputs ++ [Dummy [Text ")"]]))
inlineDef
color
(Tooltip tooltip)
where
header = case ico of
Just i -> Value (head inputNames) [Text "(", TextE funcName, icon i]
Nothing -> Value (head inputNames) [Text "(", TextE funcName]
argInputs = map (\name -> Value name [Text ","]) (tail inputNames)
-- PICTURE ----------------------------------------------
| 547
|
standardFunction cwName funcName ico types inputNames color tooltip =
DesignBlock cwName (Function funcName types)
(header : (argInputs ++ [Dummy [Text ")"]]))
inlineDef
color
(Tooltip tooltip)
where
header = case ico of
Just i -> Value (head inputNames) [Text "(", TextE funcName, icon i]
Nothing -> Value (head inputNames) [Text "(", TextE funcName]
argInputs = map (\name -> Value name [Text ","]) (tail inputNames)
-- PICTURE ----------------------------------------------
| 547
| false
| false
| 0
| 13
| 136
| 189
| 94
| 95
| null | null |
OliverFlecke/Funci
|
src/Parser.hs
|
bsd-3-clause
|
parse1Expr (Operator Tail : rest) = applyUnaryOp rest Tail
| 62
|
parse1Expr (Operator Tail : rest) = applyUnaryOp rest Tail
| 62
|
parse1Expr (Operator Tail : rest) = applyUnaryOp rest Tail
| 62
| false
| false
| 0
| 7
| 12
| 25
| 11
| 14
| null | null |
rysard/cursos
|
haskell/forGreatGood/cap6.hs
|
gpl-3.0
|
--Aplicados al quicksort
qt :: (Ord a) => [a] -> [a]
qt [] = []
| 64
|
qt :: (Ord a) => [a] -> [a]
qt [] = []
| 38
|
qt [] = []
| 10
| true
| true
| 0
| 7
| 15
| 42
| 22
| 20
| null | null |
sopvop/snap
|
src/Snap/Snaplet/Heist.hs
|
bsd-3-clause
|
------------------------------------------------------------------------------
-- | Renders a template with a given set of splices. This is syntax sugar for
-- a common combination of heistLocal, bindSplices, and render.
renderWithSplices :: HasHeist b
=> ByteString
-- ^ Template name
-> Splices (Unclassed.SnapletISplice b)
-- ^ Splices to bind
-> Handler b v ()
renderWithSplices = Unclassed.renderWithSplices' heistLens
| 522
|
renderWithSplices :: HasHeist b
=> ByteString
-- ^ Template name
-> Splices (Unclassed.SnapletISplice b)
-- ^ Splices to bind
-> Handler b v ()
renderWithSplices = Unclassed.renderWithSplices' heistLens
| 300
|
renderWithSplices = Unclassed.renderWithSplices' heistLens
| 58
| true
| true
| 0
| 11
| 152
| 56
| 29
| 27
| null | null |
joeyinbox/space-invaders-haskell
|
src/Spaceship.hs
|
gpl-2.0
|
-- Hard Reset Spaceship informations
resetSpaceship :: (Bool, Position, Int, Int)
resetSpaceship = (False, (-44, 100), 1, 150)
| 126
|
resetSpaceship :: (Bool, Position, Int, Int)
resetSpaceship = (False, (-44, 100), 1, 150)
| 89
|
resetSpaceship = (False, (-44, 100), 1, 150)
| 44
| true
| true
| 0
| 7
| 17
| 44
| 28
| 16
| null | null |
maximilianhuber/softwareProjekt
|
src/GalFld/Core/FiniteFields.hs
|
bsd-3-clause
|
getReprP'' ((i,FFKonst _):ms) = getReprP'' ms
| 47
|
getReprP'' ((i,FFKonst _):ms) = getReprP'' ms
| 47
|
getReprP'' ((i,FFKonst _):ms) = getReprP'' ms
| 47
| false
| false
| 0
| 8
| 7
| 29
| 14
| 15
| null | null |
zachsully/hakaru
|
haskell/Language/Hakaru/Parser/Maple.hs
|
bsd-3-clause
|
maple2AST (InertArgs Func
[InertName "min", InertArgs ExpSeq es]) =
NaryOp Min (map maple2AST es)
| 109
|
maple2AST (InertArgs Func
[InertName "min", InertArgs ExpSeq es]) =
NaryOp Min (map maple2AST es)
| 109
|
maple2AST (InertArgs Func
[InertName "min", InertArgs ExpSeq es]) =
NaryOp Min (map maple2AST es)
| 109
| false
| false
| 0
| 9
| 25
| 44
| 21
| 23
| null | null |
qrilka/xlsx
|
src/Codec/Xlsx/Parser/Internal.hs
|
mit
|
maybeFromElement :: FromCursor a => Name -> Cursor -> [Maybe a]
maybeFromElement name cursor = case cursor $/ element name of
[cursor'] -> Just <$> fromCursor cursor'
_ -> [Nothing]
| 185
|
maybeFromElement :: FromCursor a => Name -> Cursor -> [Maybe a]
maybeFromElement name cursor = case cursor $/ element name of
[cursor'] -> Just <$> fromCursor cursor'
_ -> [Nothing]
| 185
|
maybeFromElement name cursor = case cursor $/ element name of
[cursor'] -> Just <$> fromCursor cursor'
_ -> [Nothing]
| 121
| false
| true
| 0
| 9
| 33
| 73
| 36
| 37
| null | null |
nelk/aztex-compiler
|
src/Text/Aztex/Parser.hs
|
bsd-3-clause
|
parseAztexFile_ :: String -> Map.Map String AztexBindings -> IO (Either ParseError AztexParseResult)
parseAztexFile_ fileName alreadyParsed = do
file <- readFile fileName
hPutStrLn stderr $ "Parsing " ++ fileName ++ "..."
parseAztex_ fileName file alreadyParsed
| 267
|
parseAztexFile_ :: String -> Map.Map String AztexBindings -> IO (Either ParseError AztexParseResult)
parseAztexFile_ fileName alreadyParsed = do
file <- readFile fileName
hPutStrLn stderr $ "Parsing " ++ fileName ++ "..."
parseAztex_ fileName file alreadyParsed
| 267
|
parseAztexFile_ fileName alreadyParsed = do
file <- readFile fileName
hPutStrLn stderr $ "Parsing " ++ fileName ++ "..."
parseAztex_ fileName file alreadyParsed
| 166
| false
| true
| 0
| 10
| 39
| 80
| 36
| 44
| null | null |
JohnLato/impulse
|
src/Reactive/Impulse/Core.hs
|
lgpl-3.0
|
binConcat xs0 = go xs0 -- non-Empty
where
go xs = case pairUp xs of
[x] -> x
xs' -> go xs'
| 109
|
binConcat xs0 = go xs0 -- non-Empty
where
go xs = case pairUp xs of
[x] -> x
xs' -> go xs'
| 109
|
binConcat xs0 = go xs0 -- non-Empty
where
go xs = case pairUp xs of
[x] -> x
xs' -> go xs'
| 109
| false
| false
| 1
| 8
| 40
| 49
| 23
| 26
| null | null |
arnizamani/DLvalidity
|
Astar.hs
|
gpl-2.0
|
children :: MVar ([StateD], [MVar Int])
children = unsafePerformIO (newMVar ([], []))
| 85
|
children :: MVar ([StateD], [MVar Int])
children = unsafePerformIO (newMVar ([], []))
| 85
|
children = unsafePerformIO (newMVar ([], []))
| 45
| false
| true
| 0
| 9
| 11
| 48
| 26
| 22
| null | null |
elitak/frag
|
src/BSP.hs
|
gpl-2.0
|
toInts :: (Integral a)=>[a] -> [Int]
toInts a = map fromIntegral a
| 67
|
toInts :: (Integral a)=>[a] -> [Int]
toInts a = map fromIntegral a
| 66
|
toInts a = map fromIntegral a
| 29
| false
| true
| 0
| 9
| 12
| 44
| 21
| 23
| null | null |
rueshyna/gogol
|
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
|
mpl-2.0
|
-- | [Output Only] If errors are generated during processing of the
-- operation, this field will be populated.
oError :: Lens' Operation (Maybe OperationError)
oError = lens _oError (\ s a -> s{_oError = a})
| 208
|
oError :: Lens' Operation (Maybe OperationError)
oError = lens _oError (\ s a -> s{_oError = a})
| 96
|
oError = lens _oError (\ s a -> s{_oError = a})
| 47
| true
| true
| 2
| 9
| 35
| 56
| 26
| 30
| null | null |
GaloisInc/halvm-ghc
|
compiler/iface/IfaceType.hs
|
bsd-3-clause
|
rnIfOccL :: IfRnEnv2 -> IfLclName -> Maybe BoundVar
rnIfOccL env = lookupUFM (ifenvL env)
| 89
|
rnIfOccL :: IfRnEnv2 -> IfLclName -> Maybe BoundVar
rnIfOccL env = lookupUFM (ifenvL env)
| 89
|
rnIfOccL env = lookupUFM (ifenvL env)
| 37
| false
| true
| 0
| 7
| 13
| 34
| 16
| 18
| null | null |
haroldcarr/learn-haskell-coq-ml-etc
|
haskell/topic/ghc-extensions/src/RankNTypes/OC.hs
|
unlicense
|
foldC' :: (a -> r -> r) -> r -> ListC a -> r
foldC' c n (ListC f) = f c n
| 73
|
foldC' :: (a -> r -> r) -> r -> ListC a -> r
foldC' c n (ListC f) = f c n
| 73
|
foldC' c n (ListC f) = f c n
| 28
| false
| true
| 0
| 11
| 22
| 61
| 28
| 33
| null | null |
mlite/hLLVM
|
src/Llvm/Query/Conversion.hs
|
bsd-3-clause
|
castToStructType x = throwError (QerrWithInfo $ (show x) ++ " is not a struct type")
| 84
|
castToStructType x = throwError (QerrWithInfo $ (show x) ++ " is not a struct type")
| 84
|
castToStructType x = throwError (QerrWithInfo $ (show x) ++ " is not a struct type")
| 84
| false
| false
| 1
| 10
| 14
| 32
| 14
| 18
| null | null |
christiaanb/ghc
|
compiler/codeGen/StgCmmUtils.hs
|
bsd-3-clause
|
mkSimpleLit _ (MachLabel fs ms fod)
= CmmLabel (mkForeignLabel fs ms labelSrc fod)
where
-- TODO: Literal labels might not actually be in the current package...
labelSrc = ForeignLabelInThisPackage
| 250
|
mkSimpleLit _ (MachLabel fs ms fod)
= CmmLabel (mkForeignLabel fs ms labelSrc fod)
where
-- TODO: Literal labels might not actually be in the current package...
labelSrc = ForeignLabelInThisPackage
| 250
|
mkSimpleLit _ (MachLabel fs ms fod)
= CmmLabel (mkForeignLabel fs ms labelSrc fod)
where
-- TODO: Literal labels might not actually be in the current package...
labelSrc = ForeignLabelInThisPackage
| 250
| false
| false
| 0
| 7
| 81
| 44
| 22
| 22
| null | null |
jgoerzen/missingpy
|
testsrc/BZip2test.hs
|
gpl-2.0
|
test_bunzip2 =
[
f "t1.bz2" "Test 1"
,f "t2.bz2" "Test 1Test 2"
,f "empty.bz2" ""
,TestCase $ do bzf <- openBz2 "testsrc/bz2files/zeros.bz2" ReadMode 1
c <- vGetContents bzf
10485760 @=? length c
vClose bzf
,f2 "zeros.bz2" (replicate 10485760 '\0')
]
| 336
|
test_bunzip2 =
[
f "t1.bz2" "Test 1"
,f "t2.bz2" "Test 1Test 2"
,f "empty.bz2" ""
,TestCase $ do bzf <- openBz2 "testsrc/bz2files/zeros.bz2" ReadMode 1
c <- vGetContents bzf
10485760 @=? length c
vClose bzf
,f2 "zeros.bz2" (replicate 10485760 '\0')
]
| 336
|
test_bunzip2 =
[
f "t1.bz2" "Test 1"
,f "t2.bz2" "Test 1Test 2"
,f "empty.bz2" ""
,TestCase $ do bzf <- openBz2 "testsrc/bz2files/zeros.bz2" ReadMode 1
c <- vGetContents bzf
10485760 @=? length c
vClose bzf
,f2 "zeros.bz2" (replicate 10485760 '\0')
]
| 336
| false
| false
| 1
| 11
| 125
| 97
| 43
| 54
| null | null |
ARCCN/hcprobe
|
src/Network/Openflow/Types.hs
|
bsd-3-clause
|
statsRequestToType :: OfpStatsRequestData -> OfpStatsType
statsRequestToType OfpDescriptionStatsRequest = OFPST_DESC
| 122
|
statsRequestToType :: OfpStatsRequestData -> OfpStatsType
statsRequestToType OfpDescriptionStatsRequest = OFPST_DESC
| 122
|
statsRequestToType OfpDescriptionStatsRequest = OFPST_DESC
| 64
| false
| true
| 0
| 5
| 14
| 18
| 9
| 9
| null | null |
keithodulaigh/Hets
|
CoCASL/StatAna.hs
|
gpl-2.0
|
resolveC_FORMULA :: MixResolve C_FORMULA
resolveC_FORMULA ga ids cf = case cf of
BoxOrDiamond b m f ps -> do
nm <- resolveMODALITY ga ids m
nf <- resolveMixFrm mapC_FORMULA resolveC_FORMULA ga ids f
return $ BoxOrDiamond b nm nf ps
_ -> error "resolveC_FORMULA"
| 288
|
resolveC_FORMULA :: MixResolve C_FORMULA
resolveC_FORMULA ga ids cf = case cf of
BoxOrDiamond b m f ps -> do
nm <- resolveMODALITY ga ids m
nf <- resolveMixFrm mapC_FORMULA resolveC_FORMULA ga ids f
return $ BoxOrDiamond b nm nf ps
_ -> error "resolveC_FORMULA"
| 288
|
resolveC_FORMULA ga ids cf = case cf of
BoxOrDiamond b m f ps -> do
nm <- resolveMODALITY ga ids m
nf <- resolveMixFrm mapC_FORMULA resolveC_FORMULA ga ids f
return $ BoxOrDiamond b nm nf ps
_ -> error "resolveC_FORMULA"
| 247
| false
| true
| 1
| 11
| 70
| 102
| 44
| 58
| null | null |
ftrvxmtrx/qvmgen
|
TagParse.hs
|
mit
|
-- |Comment parser. It returns either a tag or a comment not attached to any tag.
tagParser bDef =
(optional m_whiteSpace >> tag bDef) `manyTill` eof
| 151
|
tagParser bDef =
(optional m_whiteSpace >> tag bDef) `manyTill` eof
| 69
|
tagParser bDef =
(optional m_whiteSpace >> tag bDef) `manyTill` eof
| 69
| true
| false
| 0
| 8
| 27
| 29
| 15
| 14
| null | null |
saevarb/Monadbot
|
lib/MonadBot/Types.hs
|
mit
|
runPlugin :: MonadIO m => PluginEnvironment s -> PluginM s a -> m a
runPlugin pEnv h = liftIO $ runReaderT (unIrc h) pEnv
| 122
|
runPlugin :: MonadIO m => PluginEnvironment s -> PluginM s a -> m a
runPlugin pEnv h = liftIO $ runReaderT (unIrc h) pEnv
| 122
|
runPlugin pEnv h = liftIO $ runReaderT (unIrc h) pEnv
| 54
| false
| true
| 0
| 9
| 24
| 61
| 27
| 34
| null | null |
truls/language-vhdl-quote
|
test/vests.hs
|
mpl-2.0
|
recurse :: FilterPredicate -> FilePath -> IO [FilePath]
recurse = find always
| 77
|
recurse :: FilterPredicate -> FilePath -> IO [FilePath]
recurse = find always
| 77
|
recurse = find always
| 21
| false
| true
| 0
| 8
| 11
| 28
| 14
| 14
| null | null |
SKA-ScienceDataProcessor/RC
|
MS3/Sketches/C_Quote_Utils/Utils.hs
|
apache-2.0
|
loopstep1 :: [Stm] -> Id -> LB1 a b c -> [Stm]
loopstep1 code loopndx (LB1 ls lf li) =
[cstms| for (int $id:loopndx = $ls; $id:loopndx < $lf; $id:loopndx += $li) {
$stms:code
}
|]
| 211
|
loopstep1 :: [Stm] -> Id -> LB1 a b c -> [Stm]
loopstep1 code loopndx (LB1 ls lf li) =
[cstms| for (int $id:loopndx = $ls; $id:loopndx < $lf; $id:loopndx += $li) {
$stms:code
}
|]
| 211
|
loopstep1 code loopndx (LB1 ls lf li) =
[cstms| for (int $id:loopndx = $ls; $id:loopndx < $lf; $id:loopndx += $li) {
$stms:code
}
|]
| 164
| false
| true
| 0
| 8
| 67
| 57
| 31
| 26
| null | null |
flowbox-public/accelerate-cuda
|
Data/Array/Accelerate/CUDA/Analysis/Launch.hs
|
bsd-3-clause
|
split :: Int -> Int -> Int
split size cta = (size `between` eltsPerThread) `between` cta
where
between arr n = 1 `max` ((n + arr - 1) `div` n)
eltsPerThread = 1
-- |
-- Analyse the given array expression, returning an estimate of dynamic shared
-- memory usage as a function of thread block size. This can be used by the
-- occupancy calculator to optimise kernel launch shape.
--
| 396
|
split :: Int -> Int -> Int
split size cta = (size `between` eltsPerThread) `between` cta
where
between arr n = 1 `max` ((n + arr - 1) `div` n)
eltsPerThread = 1
-- |
-- Analyse the given array expression, returning an estimate of dynamic shared
-- memory usage as a function of thread block size. This can be used by the
-- occupancy calculator to optimise kernel launch shape.
--
| 396
|
split size cta = (size `between` eltsPerThread) `between` cta
where
between arr n = 1 `max` ((n + arr - 1) `div` n)
eltsPerThread = 1
-- |
-- Analyse the given array expression, returning an estimate of dynamic shared
-- memory usage as a function of thread block size. This can be used by the
-- occupancy calculator to optimise kernel launch shape.
--
| 369
| false
| true
| 0
| 10
| 87
| 93
| 53
| 40
| null | null |
rueshyna/gogol
|
gogol-drive/gen/Network/Google/Drive/Types/Product.hs
|
mpl-2.0
|
-- | A collection of arbitrary key-value pairs which are private to the
-- requesting app. Entries with null values are cleared in update and copy
-- requests.
fAppProperties :: Lens' File (Maybe FileAppProperties)
fAppProperties
= lens _fAppProperties
(\ s a -> s{_fAppProperties = a})
| 294
|
fAppProperties :: Lens' File (Maybe FileAppProperties)
fAppProperties
= lens _fAppProperties
(\ s a -> s{_fAppProperties = a})
| 134
|
fAppProperties
= lens _fAppProperties
(\ s a -> s{_fAppProperties = a})
| 79
| true
| true
| 0
| 8
| 52
| 51
| 27
| 24
| null | null |
ezyang/ghc
|
compiler/nativeGen/SPARC/Ppr.hs
|
bsd-3-clause
|
pprInstr (SMUL b reg1 ri reg2) = pprRegRIReg (sLit "smul") b reg1 ri reg2
| 74
|
pprInstr (SMUL b reg1 ri reg2) = pprRegRIReg (sLit "smul") b reg1 ri reg2
| 74
|
pprInstr (SMUL b reg1 ri reg2) = pprRegRIReg (sLit "smul") b reg1 ri reg2
| 74
| false
| false
| 0
| 7
| 14
| 38
| 18
| 20
| null | null |
fffej/haskellprojects
|
ants/Ants.hs
|
bsd-2-clause
|
homeOff :: Int
homeOff = dim `div` 4
| 36
|
homeOff :: Int
homeOff = dim `div` 4
| 36
|
homeOff = dim `div` 4
| 21
| false
| true
| 0
| 5
| 7
| 17
| 10
| 7
| null | null |
tjakway/ghcjvm
|
compiler/deSugar/DsBinds.hs
|
bsd-3-clause
|
dsHsBind dflags
(AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
, abs_exports = exports, abs_ev_binds = ev_binds
, abs_binds = binds })
-- See Note [Desugaring AbsBinds]
= addDictsDs (toTcTypeBag (listToBag dicts)) $
-- addDictsDs: push type constraints deeper for pattern match check
do { (local_force_vars, bind_prs) <- ds_lhs_binds binds
; let core_bind = Rec [ makeCorePair dflags (add_inline lcl_id) False 0 rhs
| (lcl_id, rhs) <- bind_prs ]
-- Monomorphic recursion possible, hence Rec
new_force_vars = get_new_force_vars local_force_vars
locals = map abe_mono exports
all_locals = locals ++ new_force_vars
tup_expr = mkBigCoreVarTup all_locals
tup_ty = exprType tup_expr
; ds_binds <- dsTcEvBinds_s ev_binds
; let poly_tup_rhs = mkLams tyvars $ mkLams dicts $
mkCoreLets ds_binds $
Let core_bind $
tup_expr
; poly_tup_id <- newSysLocalDs (exprType poly_tup_rhs)
-- Find corresponding global or make up a new one: sometimes
-- we need to make new export to desugar strict binds, see
-- Note [Desugar Strict binds]
; (exported_force_vars, extra_exports) <- get_exports local_force_vars
; let mk_bind (ABE { abe_wrap = wrap
, abe_poly = global
, abe_mono = local, abe_prags = spec_prags })
-- See Note [AbsBinds wrappers] in HsBinds
= do { tup_id <- newSysLocalDs tup_ty
; rhs <- dsHsWrapper wrap $
mkLams tyvars $ mkLams dicts $
mkTupleSelector all_locals local tup_id $
mkVarApps (Var poly_tup_id) (tyvars ++ dicts)
; let rhs_for_spec = Let (NonRec poly_tup_id poly_tup_rhs) rhs
; (spec_binds, rules) <- dsSpecs rhs_for_spec spec_prags
; let global' = (global `setInlinePragma` defaultInlinePragma)
`addIdSpecialisations` rules
-- Kill the INLINE pragma because it applies to
-- the user written (local) function. The global
-- Id is just the selector. Hmm.
; return ((global', rhs) : fromOL spec_binds) }
; export_binds_s <- mapM mk_bind (exports ++ extra_exports)
; return (exported_force_vars
,(poly_tup_id, poly_tup_rhs) :
concat export_binds_s) }
where
inline_env :: IdEnv Id -- Maps a monomorphic local Id to one with
-- the inline pragma from the source
-- The type checker put the inline pragma
-- on the *global* Id, so we need to transfer it
inline_env
= mkVarEnv [ (lcl_id, setInlinePragma lcl_id prag)
| ABE { abe_mono = lcl_id, abe_poly = gbl_id } <- exports
, let prag = idInlinePragma gbl_id ]
add_inline :: Id -> Id -- tran
add_inline lcl_id = lookupVarEnv inline_env lcl_id
`orElse` lcl_id
global_env :: IdEnv Id -- Maps local Id to its global exported Id
global_env =
mkVarEnv [ (local, global)
| ABE { abe_mono = local, abe_poly = global } <- exports
]
-- find variables that are not exported
get_new_force_vars lcls =
foldr (\lcl acc -> case lookupVarEnv global_env lcl of
Just _ -> acc
Nothing -> lcl:acc)
[] lcls
-- find exports or make up new exports for force variables
get_exports :: [Id] -> DsM ([Id], [ABExport Id])
get_exports lcls =
foldM (\(glbls, exports) lcl ->
case lookupVarEnv global_env lcl of
Just glbl -> return (glbl:glbls, exports)
Nothing -> do export <- mk_export lcl
let glbl = abe_poly export
return (glbl:glbls, export:exports))
([],[]) lcls
mk_export local =
do global <- newSysLocalDs
(exprType (mkLams tyvars (mkLams dicts (Var local))))
return (ABE {abe_poly = global
,abe_mono = local
,abe_wrap = WpHole
,abe_prags = SpecPrags []})
-- AbsBindsSig is a combination of AbsBinds and FunBind
| 4,735
|
dsHsBind dflags
(AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
, abs_exports = exports, abs_ev_binds = ev_binds
, abs_binds = binds })
-- See Note [Desugaring AbsBinds]
= addDictsDs (toTcTypeBag (listToBag dicts)) $
-- addDictsDs: push type constraints deeper for pattern match check
do { (local_force_vars, bind_prs) <- ds_lhs_binds binds
; let core_bind = Rec [ makeCorePair dflags (add_inline lcl_id) False 0 rhs
| (lcl_id, rhs) <- bind_prs ]
-- Monomorphic recursion possible, hence Rec
new_force_vars = get_new_force_vars local_force_vars
locals = map abe_mono exports
all_locals = locals ++ new_force_vars
tup_expr = mkBigCoreVarTup all_locals
tup_ty = exprType tup_expr
; ds_binds <- dsTcEvBinds_s ev_binds
; let poly_tup_rhs = mkLams tyvars $ mkLams dicts $
mkCoreLets ds_binds $
Let core_bind $
tup_expr
; poly_tup_id <- newSysLocalDs (exprType poly_tup_rhs)
-- Find corresponding global or make up a new one: sometimes
-- we need to make new export to desugar strict binds, see
-- Note [Desugar Strict binds]
; (exported_force_vars, extra_exports) <- get_exports local_force_vars
; let mk_bind (ABE { abe_wrap = wrap
, abe_poly = global
, abe_mono = local, abe_prags = spec_prags })
-- See Note [AbsBinds wrappers] in HsBinds
= do { tup_id <- newSysLocalDs tup_ty
; rhs <- dsHsWrapper wrap $
mkLams tyvars $ mkLams dicts $
mkTupleSelector all_locals local tup_id $
mkVarApps (Var poly_tup_id) (tyvars ++ dicts)
; let rhs_for_spec = Let (NonRec poly_tup_id poly_tup_rhs) rhs
; (spec_binds, rules) <- dsSpecs rhs_for_spec spec_prags
; let global' = (global `setInlinePragma` defaultInlinePragma)
`addIdSpecialisations` rules
-- Kill the INLINE pragma because it applies to
-- the user written (local) function. The global
-- Id is just the selector. Hmm.
; return ((global', rhs) : fromOL spec_binds) }
; export_binds_s <- mapM mk_bind (exports ++ extra_exports)
; return (exported_force_vars
,(poly_tup_id, poly_tup_rhs) :
concat export_binds_s) }
where
inline_env :: IdEnv Id -- Maps a monomorphic local Id to one with
-- the inline pragma from the source
-- The type checker put the inline pragma
-- on the *global* Id, so we need to transfer it
inline_env
= mkVarEnv [ (lcl_id, setInlinePragma lcl_id prag)
| ABE { abe_mono = lcl_id, abe_poly = gbl_id } <- exports
, let prag = idInlinePragma gbl_id ]
add_inline :: Id -> Id -- tran
add_inline lcl_id = lookupVarEnv inline_env lcl_id
`orElse` lcl_id
global_env :: IdEnv Id -- Maps local Id to its global exported Id
global_env =
mkVarEnv [ (local, global)
| ABE { abe_mono = local, abe_poly = global } <- exports
]
-- find variables that are not exported
get_new_force_vars lcls =
foldr (\lcl acc -> case lookupVarEnv global_env lcl of
Just _ -> acc
Nothing -> lcl:acc)
[] lcls
-- find exports or make up new exports for force variables
get_exports :: [Id] -> DsM ([Id], [ABExport Id])
get_exports lcls =
foldM (\(glbls, exports) lcl ->
case lookupVarEnv global_env lcl of
Just glbl -> return (glbl:glbls, exports)
Nothing -> do export <- mk_export lcl
let glbl = abe_poly export
return (glbl:glbls, export:exports))
([],[]) lcls
mk_export local =
do global <- newSysLocalDs
(exprType (mkLams tyvars (mkLams dicts (Var local))))
return (ABE {abe_poly = global
,abe_mono = local
,abe_wrap = WpHole
,abe_prags = SpecPrags []})
-- AbsBindsSig is a combination of AbsBinds and FunBind
| 4,735
|
dsHsBind dflags
(AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
, abs_exports = exports, abs_ev_binds = ev_binds
, abs_binds = binds })
-- See Note [Desugaring AbsBinds]
= addDictsDs (toTcTypeBag (listToBag dicts)) $
-- addDictsDs: push type constraints deeper for pattern match check
do { (local_force_vars, bind_prs) <- ds_lhs_binds binds
; let core_bind = Rec [ makeCorePair dflags (add_inline lcl_id) False 0 rhs
| (lcl_id, rhs) <- bind_prs ]
-- Monomorphic recursion possible, hence Rec
new_force_vars = get_new_force_vars local_force_vars
locals = map abe_mono exports
all_locals = locals ++ new_force_vars
tup_expr = mkBigCoreVarTup all_locals
tup_ty = exprType tup_expr
; ds_binds <- dsTcEvBinds_s ev_binds
; let poly_tup_rhs = mkLams tyvars $ mkLams dicts $
mkCoreLets ds_binds $
Let core_bind $
tup_expr
; poly_tup_id <- newSysLocalDs (exprType poly_tup_rhs)
-- Find corresponding global or make up a new one: sometimes
-- we need to make new export to desugar strict binds, see
-- Note [Desugar Strict binds]
; (exported_force_vars, extra_exports) <- get_exports local_force_vars
; let mk_bind (ABE { abe_wrap = wrap
, abe_poly = global
, abe_mono = local, abe_prags = spec_prags })
-- See Note [AbsBinds wrappers] in HsBinds
= do { tup_id <- newSysLocalDs tup_ty
; rhs <- dsHsWrapper wrap $
mkLams tyvars $ mkLams dicts $
mkTupleSelector all_locals local tup_id $
mkVarApps (Var poly_tup_id) (tyvars ++ dicts)
; let rhs_for_spec = Let (NonRec poly_tup_id poly_tup_rhs) rhs
; (spec_binds, rules) <- dsSpecs rhs_for_spec spec_prags
; let global' = (global `setInlinePragma` defaultInlinePragma)
`addIdSpecialisations` rules
-- Kill the INLINE pragma because it applies to
-- the user written (local) function. The global
-- Id is just the selector. Hmm.
; return ((global', rhs) : fromOL spec_binds) }
; export_binds_s <- mapM mk_bind (exports ++ extra_exports)
; return (exported_force_vars
,(poly_tup_id, poly_tup_rhs) :
concat export_binds_s) }
where
inline_env :: IdEnv Id -- Maps a monomorphic local Id to one with
-- the inline pragma from the source
-- The type checker put the inline pragma
-- on the *global* Id, so we need to transfer it
inline_env
= mkVarEnv [ (lcl_id, setInlinePragma lcl_id prag)
| ABE { abe_mono = lcl_id, abe_poly = gbl_id } <- exports
, let prag = idInlinePragma gbl_id ]
add_inline :: Id -> Id -- tran
add_inline lcl_id = lookupVarEnv inline_env lcl_id
`orElse` lcl_id
global_env :: IdEnv Id -- Maps local Id to its global exported Id
global_env =
mkVarEnv [ (local, global)
| ABE { abe_mono = local, abe_poly = global } <- exports
]
-- find variables that are not exported
get_new_force_vars lcls =
foldr (\lcl acc -> case lookupVarEnv global_env lcl of
Just _ -> acc
Nothing -> lcl:acc)
[] lcls
-- find exports or make up new exports for force variables
get_exports :: [Id] -> DsM ([Id], [ABExport Id])
get_exports lcls =
foldM (\(glbls, exports) lcl ->
case lookupVarEnv global_env lcl of
Just glbl -> return (glbl:glbls, exports)
Nothing -> do export <- mk_export lcl
let glbl = abe_poly export
return (glbl:glbls, export:exports))
([],[]) lcls
mk_export local =
do global <- newSysLocalDs
(exprType (mkLams tyvars (mkLams dicts (Var local))))
return (ABE {abe_poly = global
,abe_mono = local
,abe_wrap = WpHole
,abe_prags = SpecPrags []})
-- AbsBindsSig is a combination of AbsBinds and FunBind
| 4,735
| false
| false
| 32
| 18
| 1,914
| 948
| 503
| 445
| null | null |
tjakway/ghcjvm
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
trueDataConKey = mkPreludeDataConUnique 15
| 67
|
trueDataConKey = mkPreludeDataConUnique 15
| 67
|
trueDataConKey = mkPreludeDataConUnique 15
| 67
| false
| false
| 0
| 5
| 28
| 9
| 4
| 5
| null | null |
mainland/dph
|
dph-lifted-copy/Data/Array/Parallel/PArray.hs
|
bsd-3-clause
|
lice = slicePA_v
| 17
|
slice = slicePA_v
| 17
|
slice = slicePA_v
| 17
| false
| false
| 1
| 4
| 3
| 9
| 3
| 6
| null | null |
corajr/scalar-convert
|
test/Examples.hs
|
bsd-3-clause
|
fullBookRdf :: HashMapS
fullBookRdf =
case fst (runScalarM (readScalarString (getExample "full_book.xml"))) of
Left err -> error (show err)
Right x -> x
| 162
|
fullBookRdf :: HashMapS
fullBookRdf =
case fst (runScalarM (readScalarString (getExample "full_book.xml"))) of
Left err -> error (show err)
Right x -> x
| 162
|
fullBookRdf =
case fst (runScalarM (readScalarString (getExample "full_book.xml"))) of
Left err -> error (show err)
Right x -> x
| 138
| false
| true
| 4
| 12
| 31
| 63
| 30
| 33
| null | null |
olorin/amazonka
|
amazonka-ml/test/Test/AWS/Gen/MachineLearning.hs
|
mpl-2.0
|
testDescribeEvaluations :: DescribeEvaluations -> TestTree
testDescribeEvaluations = req
"DescribeEvaluations"
"fixture/DescribeEvaluations.yaml"
| 153
|
testDescribeEvaluations :: DescribeEvaluations -> TestTree
testDescribeEvaluations = req
"DescribeEvaluations"
"fixture/DescribeEvaluations.yaml"
| 153
|
testDescribeEvaluations = req
"DescribeEvaluations"
"fixture/DescribeEvaluations.yaml"
| 94
| false
| true
| 0
| 7
| 17
| 28
| 11
| 17
| null | null |
a143753/AOJ
|
math.hs
|
apache-2.0
|
-- 線分ACと線分BDが交点を持つか判定する
ans [xa,ya,xb,yb,xc,yc,xd,yd] =
let cross = cp4 [xa,ya,xc,yc,xb,yb,xd,yd]
[xo,xp] = sort [xa,xc]
[xq,xr] = sort [xb,xd]
[yo,yp] = sort [ya,yc]
[yq,yr] = sort [yb,yd]
in
case cross of
Nothing -> "NO"
Just (xx,yx) -> if (xo <= xx ) && (xx <= xp) && (xq <= xx) && (xx <= xr) &&
(yo <= yx ) && (yx <= yp) && (yq <= yx) && (yx <= yr)
then "YES"
else "NO"
-- 組み合わせ
| 502
|
ans [xa,ya,xb,yb,xc,yc,xd,yd] =
let cross = cp4 [xa,ya,xc,yc,xb,yb,xd,yd]
[xo,xp] = sort [xa,xc]
[xq,xr] = sort [xb,xd]
[yo,yp] = sort [ya,yc]
[yq,yr] = sort [yb,yd]
in
case cross of
Nothing -> "NO"
Just (xx,yx) -> if (xo <= xx ) && (xx <= xp) && (xq <= xx) && (xx <= xr) &&
(yo <= yx ) && (yx <= yp) && (yq <= yx) && (yx <= yr)
then "YES"
else "NO"
-- 組み合わせ
| 478
|
ans [xa,ya,xb,yb,xc,yc,xd,yd] =
let cross = cp4 [xa,ya,xc,yc,xb,yb,xd,yd]
[xo,xp] = sort [xa,xc]
[xq,xr] = sort [xb,xd]
[yo,yp] = sort [ya,yc]
[yq,yr] = sort [yb,yd]
in
case cross of
Nothing -> "NO"
Just (xx,yx) -> if (xo <= xx ) && (xx <= xp) && (xq <= xx) && (xx <= xr) &&
(yo <= yx ) && (yx <= yp) && (yq <= yx) && (yx <= yr)
then "YES"
else "NO"
-- 組み合わせ
| 478
| true
| false
| 0
| 19
| 195
| 275
| 156
| 119
| null | null |
silky/csound-expression
|
src/Csound/Air/Live.hs
|
bsd-3-clause
|
uiBox :: String -> Source FxFun -> Bool -> Source FxFun
uiBox name fx onOff = mapGuiSource (setBorder UpBoxBorder) $ vlift2' uiOnOffSize uiBoxSize go off fx
where
off = mapGuiSource (setFontSize 25) $ toggleSig name onOff
go off fx arg = mul off $ fx arg
| 277
|
uiBox :: String -> Source FxFun -> Bool -> Source FxFun
uiBox name fx onOff = mapGuiSource (setBorder UpBoxBorder) $ vlift2' uiOnOffSize uiBoxSize go off fx
where
off = mapGuiSource (setFontSize 25) $ toggleSig name onOff
go off fx arg = mul off $ fx arg
| 276
|
uiBox name fx onOff = mapGuiSource (setBorder UpBoxBorder) $ vlift2' uiOnOffSize uiBoxSize go off fx
where
off = mapGuiSource (setFontSize 25) $ toggleSig name onOff
go off fx arg = mul off $ fx arg
| 220
| false
| true
| 1
| 8
| 68
| 118
| 51
| 67
| null | null |
mapinguari/SC_HS_Proxy
|
src/Proxy/Query/Unit.hs
|
mit
|
isSpellCaster ProtossReaver = False
| 35
|
isSpellCaster ProtossReaver = False
| 35
|
isSpellCaster ProtossReaver = False
| 35
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
Submitty/AnalysisTools
|
src/Lichen/Count/Counters.hs
|
bsd-3-clause
|
counterChoice _ (Just "depth") = counterDepth
| 45
|
counterChoice _ (Just "depth") = counterDepth
| 45
|
counterChoice _ (Just "depth") = counterDepth
| 45
| false
| false
| 0
| 7
| 5
| 17
| 8
| 9
| null | null |
rolph-recto/liquid-fixpoint
|
src/Language/Fixpoint/SortCheck.hs
|
bsd-3-clause
|
checkSortedReft :: SEnv SortedReft -> [Symbol] -> SortedReft -> Maybe Doc
checkSortedReft env xs sr = applyNonNull Nothing oops unknowns
where
oops = Just . (text "Unknown symbols:" <+>) . toFix
unknowns = [ x | x <- syms sr, x `notElem` v : xs, not (x `memberSEnv` env)]
Reft (v,_) = sr_reft sr
| 350
|
checkSortedReft :: SEnv SortedReft -> [Symbol] -> SortedReft -> Maybe Doc
checkSortedReft env xs sr = applyNonNull Nothing oops unknowns
where
oops = Just . (text "Unknown symbols:" <+>) . toFix
unknowns = [ x | x <- syms sr, x `notElem` v : xs, not (x `memberSEnv` env)]
Reft (v,_) = sr_reft sr
| 350
|
checkSortedReft env xs sr = applyNonNull Nothing oops unknowns
where
oops = Just . (text "Unknown symbols:" <+>) . toFix
unknowns = [ x | x <- syms sr, x `notElem` v : xs, not (x `memberSEnv` env)]
Reft (v,_) = sr_reft sr
| 276
| false
| true
| 2
| 11
| 108
| 136
| 70
| 66
| null | null |
kim/amazonka
|
amazonka-lambda/gen/Network/AWS/Lambda/AddEventSource.hs
|
mpl-2.0
|
-- | The UTC time string indicating the last time the event mapping was updated.
aesrLastModified :: Lens' AddEventSourceResponse (Maybe Text)
aesrLastModified = lens _aesrLastModified (\s a -> s { _aesrLastModified = a })
| 222
|
aesrLastModified :: Lens' AddEventSourceResponse (Maybe Text)
aesrLastModified = lens _aesrLastModified (\s a -> s { _aesrLastModified = a })
| 141
|
aesrLastModified = lens _aesrLastModified (\s a -> s { _aesrLastModified = a })
| 79
| true
| true
| 1
| 9
| 33
| 52
| 25
| 27
| null | null |
olsner/ghc
|
compiler/main/DriverPipeline.hs
|
bsd-3-clause
|
link :: GhcLink -- interactive or batch
-> DynFlags -- dynamic flags
-> Bool -- attempt linking in batch mode?
-> HomePackageTable -- what to link
-> IO SuccessFlag
-- For the moment, in the batch linker, we don't bother to tell doLink
-- which packages to link -- it just tries all that are available.
-- batch_attempt_linking should only be *looked at* in batch mode. It
-- should only be True if the upsweep was successful and someone
-- exports main, i.e., we have good reason to believe that linking
-- will succeed.
link ghcLink dflags
= lookupHook linkHook l dflags ghcLink dflags
where
l LinkInMemory _ _ _
= if cGhcWithInterpreter == "YES"
then -- Not Linking...(demand linker will do the job)
return Succeeded
else panicBadLink LinkInMemory
l NoLink _ _ _
= return Succeeded
l LinkBinary dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkStaticLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkDynLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
| 1,215
|
link :: GhcLink -- interactive or batch
-> DynFlags -- dynamic flags
-> Bool -- attempt linking in batch mode?
-> HomePackageTable -- what to link
-> IO SuccessFlag
link ghcLink dflags
= lookupHook linkHook l dflags ghcLink dflags
where
l LinkInMemory _ _ _
= if cGhcWithInterpreter == "YES"
then -- Not Linking...(demand linker will do the job)
return Succeeded
else panicBadLink LinkInMemory
l NoLink _ _ _
= return Succeeded
l LinkBinary dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkStaticLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkDynLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
| 855
|
link ghcLink dflags
= lookupHook linkHook l dflags ghcLink dflags
where
l LinkInMemory _ _ _
= if cGhcWithInterpreter == "YES"
then -- Not Linking...(demand linker will do the job)
return Succeeded
else panicBadLink LinkInMemory
l NoLink _ _ _
= return Succeeded
l LinkBinary dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkStaticLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkDynLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
| 613
| true
| true
| 1
| 10
| 333
| 190
| 88
| 102
| null | null |
dawedawe/kripkeweb
|
src/DB.hs
|
bsd-3-clause
|
-- |Accumulations of Lambda formulas with fraction of formula total.
lambdaAccum :: Connection -> LambdaType -> IO [(T.Text, Int, Double)]
lambdaAccum c lamType =
let
q = "SELECT t1.formula, t1.fc, CAST(t1.fc AS REAL) / t2.total \
\FROM \
\(SELECT formula, sum(frmcount) AS fc FROM ? \
\GROUP BY formula) AS t1, \
\(SELECT sum(frmcount) AS total FROM ?) AS t2 \
\ORDER BY t1.fc DESC"
t = chooseLambdaTable lamType
in
query c q (t, t)
| 515
|
lambdaAccum :: Connection -> LambdaType -> IO [(T.Text, Int, Double)]
lambdaAccum c lamType =
let
q = "SELECT t1.formula, t1.fc, CAST(t1.fc AS REAL) / t2.total \
\FROM \
\(SELECT formula, sum(frmcount) AS fc FROM ? \
\GROUP BY formula) AS t1, \
\(SELECT sum(frmcount) AS total FROM ?) AS t2 \
\ORDER BY t1.fc DESC"
t = chooseLambdaTable lamType
in
query c q (t, t)
| 446
|
lambdaAccum c lamType =
let
q = "SELECT t1.formula, t1.fc, CAST(t1.fc AS REAL) / t2.total \
\FROM \
\(SELECT formula, sum(frmcount) AS fc FROM ? \
\GROUP BY formula) AS t1, \
\(SELECT sum(frmcount) AS total FROM ?) AS t2 \
\ORDER BY t1.fc DESC"
t = chooseLambdaTable lamType
in
query c q (t, t)
| 376
| true
| true
| 0
| 10
| 156
| 74
| 39
| 35
| null | null |
L31R0FF/Perso
|
haskell/Mask.hs
|
gpl-2.0
|
ask prompt = do
hSetBuffering stdout NoBuffering
hSetBuffering stdin NoBuffering
putStr prompt
texte <- getLine
return texte
| 144
|
ask prompt = do
hSetBuffering stdout NoBuffering
hSetBuffering stdin NoBuffering
putStr prompt
texte <- getLine
return texte
| 144
|
ask prompt = do
hSetBuffering stdout NoBuffering
hSetBuffering stdin NoBuffering
putStr prompt
texte <- getLine
return texte
| 144
| false
| false
| 0
| 7
| 36
| 44
| 17
| 27
| null | null |
sopvop/cabal
|
Cabal/Distribution/Simple/Utils.hs
|
bsd-3-clause
|
notice :: Verbosity -> String -> IO ()
notice verbosity msg = withFrozenCallStack $ do
when (verbosity >= normal) $ do
hPutCallStackPrefix stdout verbosity
putStr (wrapText msg)
| 187
|
notice :: Verbosity -> String -> IO ()
notice verbosity msg = withFrozenCallStack $ do
when (verbosity >= normal) $ do
hPutCallStackPrefix stdout verbosity
putStr (wrapText msg)
| 187
|
notice verbosity msg = withFrozenCallStack $ do
when (verbosity >= normal) $ do
hPutCallStackPrefix stdout verbosity
putStr (wrapText msg)
| 148
| false
| true
| 0
| 13
| 36
| 70
| 32
| 38
| null | null |
dbp/thistle
|
src/Lexer.hs
|
isc
|
renderToken TokenComma = ","
| 28
|
renderToken TokenComma = ","
| 28
|
renderToken TokenComma = ","
| 28
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
yihuang/cabal-install
|
Distribution/Client/PackageIndex.hs
|
bsd-3-clause
|
--
-- * Case insensitive name lookups
--
-- | Does a case-insensitive search by package name.
--
-- If there is only one package that compares case-insentiviely to this name
-- then the search is unambiguous and we get back all versions of that package.
-- If several match case-insentiviely but one matches exactly then it is also
-- unambiguous.
--
-- If however several match case-insentiviely and none match exactly then we
-- have an ambiguous result, and we get back all the versions of all the
-- packages. The list of ambiguous results is split by exact package name. So
-- it is a non-empty list of non-empty lists.
--
searchByName :: Package pkg => PackageIndex pkg
-> String -> [(PackageName, [pkg])]
searchByName (PackageIndex m) name =
[ pkgs
| pkgs@(PackageName name',_) <- Map.toList m
, lowercase name' == lname ]
where
lname = lowercase name
| 890
|
searchByName :: Package pkg => PackageIndex pkg
-> String -> [(PackageName, [pkg])]
searchByName (PackageIndex m) name =
[ pkgs
| pkgs@(PackageName name',_) <- Map.toList m
, lowercase name' == lname ]
where
lname = lowercase name
| 261
|
searchByName (PackageIndex m) name =
[ pkgs
| pkgs@(PackageName name',_) <- Map.toList m
, lowercase name' == lname ]
where
lname = lowercase name
| 164
| true
| true
| 1
| 12
| 180
| 125
| 68
| 57
| null | null |
urbanslug/cs194
|
Src/Week3/HW04.hs
|
gpl-3.0
|
-- f refuses to be partially applied.
ex6 :: (a -> a) -> a
ex6 f = let x = f x in x
| 83
|
ex6 :: (a -> a) -> a
ex6 f = let x = f x in x
| 45
|
ex6 f = let x = f x in x
| 24
| true
| true
| 0
| 9
| 23
| 46
| 21
| 25
| null | null |
spechub/Hets
|
CSL/Interpreter.hs
|
gpl-2.0
|
bmapIntToString :: BMap -> Int -> String
bmapIntToString _ i = constPrefix ++ show i
| 84
|
bmapIntToString :: BMap -> Int -> String
bmapIntToString _ i = constPrefix ++ show i
| 84
|
bmapIntToString _ i = constPrefix ++ show i
| 43
| false
| true
| 2
| 8
| 14
| 37
| 16
| 21
| null | null |
eklavya/Idris-dev
|
src/Idris/IBC.hs
|
bsd-3-clause
|
ibc :: IState -> IBCWrite -> IBCFile -> Idris IBCFile
ibc i (IBCFix d) f = return f { ibc_fixes = d : ibc_fixes f }
| 115
|
ibc :: IState -> IBCWrite -> IBCFile -> Idris IBCFile
ibc i (IBCFix d) f = return f { ibc_fixes = d : ibc_fixes f }
| 115
|
ibc i (IBCFix d) f = return f { ibc_fixes = d : ibc_fixes f }
| 61
| false
| true
| 0
| 11
| 25
| 62
| 29
| 33
| null | null |
ComputationWithBoundedResources/ara-inference
|
doc/tpdb_trs/Haskell/basic_haskell/ceiling_1.hs
|
mit
|
primModNatS (Succ x) (Succ (Succ y)) = primModNatS0 x y (primGEqNatS x (Succ y))
| 80
|
primModNatS (Succ x) (Succ (Succ y)) = primModNatS0 x y (primGEqNatS x (Succ y))
| 80
|
primModNatS (Succ x) (Succ (Succ y)) = primModNatS0 x y (primGEqNatS x (Succ y))
| 80
| false
| false
| 0
| 9
| 13
| 50
| 24
| 26
| null | null |
brendanhay/semver
|
src/Data/SemVer.hs
|
mpl-2.0
|
-- | Increment the patch component of a 'Version' by 1.
--
-- * Patch version Z (x.y.Z | x > 0) MUST be incremented if only backwards
-- compatible bug fixes are introduced.
--
-- * A bug fix is defined as an internal change that fixes incorrect behavior.
incrementPatch :: Version -> Version
incrementPatch v = v
{ _versionPatch = _versionPatch v + 1
}
| 361
|
incrementPatch :: Version -> Version
incrementPatch v = v
{ _versionPatch = _versionPatch v + 1
}
| 105
|
incrementPatch v = v
{ _versionPatch = _versionPatch v + 1
}
| 68
| true
| true
| 0
| 9
| 74
| 43
| 24
| 19
| null | null |
gbataille/pandoc
|
src/Text/Pandoc/Readers/Txt2Tags.hs
|
gpl-2.0
|
genericListStart :: T2T Char
-> T2T Int
genericListStart listMarker = try $
(2+) <$> (length <$> many spaceChar
<* listMarker <* space <* notFollowedBy space)
| 189
|
genericListStart :: T2T Char
-> T2T Int
genericListStart listMarker = try $
(2+) <$> (length <$> many spaceChar
<* listMarker <* space <* notFollowedBy space)
| 189
|
genericListStart listMarker = try $
(2+) <$> (length <$> many spaceChar
<* listMarker <* space <* notFollowedBy space)
| 132
| false
| true
| 0
| 11
| 55
| 61
| 30
| 31
| null | null |
MaxDaten/yage
|
src/Yage/Formats/AMDCubeMap.hs
|
mit
|
singleCubemapMipFiles :: MonadIO m => CubeMapSelection -> m (MipmapChain (Cubemap FilePath))
singleCubemapMipFiles CubeMapSelection{..} = do
selectedFiles <- io $ filter selectionFiles . map fromString <$> getDirectoryContents (fpToString selectionDirectory)
let mipmaps = groupWith (fst.selectionLevelAndSide) selectedFiles
cubes = map (cubeFromList.sortWith (snd.selectionLevelAndSide)) $ mipmaps
mMipCubes :: Maybe (MipmapChain (Cubemap FilePath))
mMipCubes = mipMapChain $ map (fmap (mappend selectionDirectory)) cubes
case mMipCubes of
Nothing -> io $ throwIO $ LoadCubeMapException $ "at least one complete cube map with base texture for MipMapChain required!"
Just mipCubes -> return $ mipCubes
where
cubeFromList [right,left,top,bottom,front,back] = Cubemap right left top bottom front back
cubeFromList _ = error "singleCubemapMipFiles: invalid pattern"
| 909
|
singleCubemapMipFiles :: MonadIO m => CubeMapSelection -> m (MipmapChain (Cubemap FilePath))
singleCubemapMipFiles CubeMapSelection{..} = do
selectedFiles <- io $ filter selectionFiles . map fromString <$> getDirectoryContents (fpToString selectionDirectory)
let mipmaps = groupWith (fst.selectionLevelAndSide) selectedFiles
cubes = map (cubeFromList.sortWith (snd.selectionLevelAndSide)) $ mipmaps
mMipCubes :: Maybe (MipmapChain (Cubemap FilePath))
mMipCubes = mipMapChain $ map (fmap (mappend selectionDirectory)) cubes
case mMipCubes of
Nothing -> io $ throwIO $ LoadCubeMapException $ "at least one complete cube map with base texture for MipMapChain required!"
Just mipCubes -> return $ mipCubes
where
cubeFromList [right,left,top,bottom,front,back] = Cubemap right left top bottom front back
cubeFromList _ = error "singleCubemapMipFiles: invalid pattern"
| 909
|
singleCubemapMipFiles CubeMapSelection{..} = do
selectedFiles <- io $ filter selectionFiles . map fromString <$> getDirectoryContents (fpToString selectionDirectory)
let mipmaps = groupWith (fst.selectionLevelAndSide) selectedFiles
cubes = map (cubeFromList.sortWith (snd.selectionLevelAndSide)) $ mipmaps
mMipCubes :: Maybe (MipmapChain (Cubemap FilePath))
mMipCubes = mipMapChain $ map (fmap (mappend selectionDirectory)) cubes
case mMipCubes of
Nothing -> io $ throwIO $ LoadCubeMapException $ "at least one complete cube map with base texture for MipMapChain required!"
Just mipCubes -> return $ mipCubes
where
cubeFromList [right,left,top,bottom,front,back] = Cubemap right left top bottom front back
cubeFromList _ = error "singleCubemapMipFiles: invalid pattern"
| 816
| false
| true
| 0
| 15
| 149
| 261
| 128
| 133
| null | null |
UBMLtonGroup/timberc
|
src/Env.hs
|
bsd-3-clause
|
scheme0 ts t = Scheme (mkRho ts t) [] []
| 51
|
scheme0 ts t = Scheme (mkRho ts t) [] []
| 51
|
scheme0 ts t = Scheme (mkRho ts t) [] []
| 51
| false
| false
| 0
| 7
| 20
| 30
| 14
| 16
| null | null |
AugustusHuang/hs-learning
|
elementary.hs
|
mit
|
zip3' _ [] _ = []
| 17
|
zip3' _ [] _ = []
| 17
|
zip3' _ [] _ = []
| 17
| false
| false
| 1
| 6
| 5
| 21
| 8
| 13
| null | null |
unisonweb/platform
|
parser-typechecker/tests/Unison/Test/MCode.hs
|
mit
|
modifyTVarTest :: TVar a -> (a -> a) -> Test ()
modifyTVarTest v f = io . atomically $ modifyTVar v f
| 101
|
modifyTVarTest :: TVar a -> (a -> a) -> Test ()
modifyTVarTest v f = io . atomically $ modifyTVar v f
| 101
|
modifyTVarTest v f = io . atomically $ modifyTVar v f
| 53
| false
| true
| 0
| 8
| 21
| 52
| 25
| 27
| null | null |
scturtle/hstg
|
Backup.hs
|
unlicense
|
tgParams = ["-R", "-W", "--json", "-P", show tgPort, "-k", pubkeyPath]
| 70
|
tgParams = ["-R", "-W", "--json", "-P", show tgPort, "-k", pubkeyPath]
| 70
|
tgParams = ["-R", "-W", "--json", "-P", show tgPort, "-k", pubkeyPath]
| 70
| false
| false
| 1
| 7
| 9
| 34
| 18
| 16
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.