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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
christiaanb/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | gHC_FINGERPRINT_TYPE :: Module
gHC_FINGERPRINT_TYPE = mkBaseModule (fsLit "GHC.Fingerprint.Type") | 97 | gHC_FINGERPRINT_TYPE :: Module
gHC_FINGERPRINT_TYPE = mkBaseModule (fsLit "GHC.Fingerprint.Type") | 97 | gHC_FINGERPRINT_TYPE = mkBaseModule (fsLit "GHC.Fingerprint.Type") | 66 | false | true | 0 | 7 | 7 | 20 | 10 | 10 | null | null |
seagreen/station | test/Test/Hash.hs | mit | test :: SpecWith ()
test = do
describe "the hash of our custom draft 4 schema" $ do
testHash SO.customSchemaHash customSchemaHash SO.customSchemaBytes
describe "the hash of our card schema" $ do
testHash SO.cardSchemaHash cardSchemaHash SO.cardSchemaBytes
describe "the hash of our version schema" $ do
testHash SO.versionSchemaHash versionSchemaHash SO.versionSchemaBytes | 408 | test :: SpecWith ()
test = do
describe "the hash of our custom draft 4 schema" $ do
testHash SO.customSchemaHash customSchemaHash SO.customSchemaBytes
describe "the hash of our card schema" $ do
testHash SO.cardSchemaHash cardSchemaHash SO.cardSchemaBytes
describe "the hash of our version schema" $ do
testHash SO.versionSchemaHash versionSchemaHash SO.versionSchemaBytes | 408 | test = do
describe "the hash of our custom draft 4 schema" $ do
testHash SO.customSchemaHash customSchemaHash SO.customSchemaBytes
describe "the hash of our card schema" $ do
testHash SO.cardSchemaHash cardSchemaHash SO.cardSchemaBytes
describe "the hash of our version schema" $ do
testHash SO.versionSchemaHash versionSchemaHash SO.versionSchemaBytes | 388 | false | true | 0 | 12 | 83 | 94 | 39 | 55 | null | null |
forestbelton/orb | src/Style/Parser.hs | bsd-3-clause | tokens :: [(Text, a)] -> Parser a
tokens = foldr1 (<|>) . map (uncurry token) | 77 | tokens :: [(Text, a)] -> Parser a
tokens = foldr1 (<|>) . map (uncurry token) | 77 | tokens = foldr1 (<|>) . map (uncurry token) | 43 | false | true | 0 | 8 | 14 | 45 | 24 | 21 | null | null |
sgillespie/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | externallyVisibleIdLabel :: IdLabelInfo -> Bool
externallyVisibleIdLabel SRT = False | 96 | externallyVisibleIdLabel :: IdLabelInfo -> Bool
externallyVisibleIdLabel SRT = False | 96 | externallyVisibleIdLabel SRT = False | 48 | false | true | 0 | 5 | 20 | 18 | 9 | 9 | null | null |
NeonGraal/rwh-stack | ch03/MySecond.hs | bsd-3-clause | tidySecond _ = Nothing | 22 | tidySecond _ = Nothing | 22 | tidySecond _ = Nothing | 22 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
onponomarev/ganeti | test/hs/Test/Ganeti/Objects.hs | bsd-2-clause | genValidInstanceName :: ConfigData -> Gen (Maybe String)
genValidInstanceName cfg =
elements . map instName . F.toList . configInstances $ cfg | 144 | genValidInstanceName :: ConfigData -> Gen (Maybe String)
genValidInstanceName cfg =
elements . map instName . F.toList . configInstances $ cfg | 144 | genValidInstanceName cfg =
elements . map instName . F.toList . configInstances $ cfg | 87 | false | true | 0 | 9 | 21 | 48 | 23 | 25 | null | null |
jjwchoy/hotdb | tests/OperationTest.hs | mit | assertNestedOpInvalid :: N.Node -> P.Path -> O.Operation -> Assertion
assertNestedOpInvalid initial path op = assertNothing "Expected Nothing" $ O.applyPath (O.DirectedOperation path op) $ initial | 196 | assertNestedOpInvalid :: N.Node -> P.Path -> O.Operation -> Assertion
assertNestedOpInvalid initial path op = assertNothing "Expected Nothing" $ O.applyPath (O.DirectedOperation path op) $ initial | 196 | assertNestedOpInvalid initial path op = assertNothing "Expected Nothing" $ O.applyPath (O.DirectedOperation path op) $ initial | 126 | false | true | 0 | 10 | 23 | 62 | 30 | 32 | null | null |
nakamuray/htig | HTIG/TwitterAPI.hs | bsd-3-clause | askAuthorizationBy :: MonadIO m => (Token -> String) -> (String -> IO String) -> OAuthMonadT m ()
askAuthorizationBy toURL asker = do
token <- getToken
ans <- liftIO $ asker (toURL token)
putToken $ injectOAuthVerifier ans token | 240 | askAuthorizationBy :: MonadIO m => (Token -> String) -> (String -> IO String) -> OAuthMonadT m ()
askAuthorizationBy toURL asker = do
token <- getToken
ans <- liftIO $ asker (toURL token)
putToken $ injectOAuthVerifier ans token | 240 | askAuthorizationBy toURL asker = do
token <- getToken
ans <- liftIO $ asker (toURL token)
putToken $ injectOAuthVerifier ans token | 142 | false | true | 0 | 12 | 48 | 99 | 45 | 54 | null | null |
frosch03/arrowVHDL | src/System/ArrowVHDL/Circuit/Defaults.hs | cc0-1.0 | (.|.) :: Bool -> Bool -> Bool
False .|. False = False | 53 | (.|.) :: Bool -> Bool -> Bool
False .|. False = False | 53 | False .|. False = False | 23 | false | true | 0 | 6 | 11 | 27 | 14 | 13 | null | null |
ardumont/snake | app/Main.hs | bsd-3-clause | drawCoordinates :: Coord -> Picture -> Picture
drawCoordinates (Coord x y) pix = translate x y (scale 0.25 0.25 pix) | 116 | drawCoordinates :: Coord -> Picture -> Picture
drawCoordinates (Coord x y) pix = translate x y (scale 0.25 0.25 pix) | 116 | drawCoordinates (Coord x y) pix = translate x y (scale 0.25 0.25 pix) | 69 | false | true | 0 | 7 | 19 | 49 | 24 | 25 | null | null |
kavigupta/N-programming-language | src/Main.hs | gpl-3.0 | parseParameters :: [String] -> IO Parameters
parseParameters = pFromS . parseSwitches True | 90 | parseParameters :: [String] -> IO Parameters
parseParameters = pFromS . parseSwitches True | 90 | parseParameters = pFromS . parseSwitches True | 45 | false | true | 1 | 7 | 11 | 34 | 15 | 19 | null | null |
jystic/calamine | src/Main.hs | bsd-3-clause | readCache :: (MonadIO m, MonadError String m) => Url -> m L.ByteString
readCache url = do
path <- cacheLocationOf url
runIO (L.readFile path) | 149 | readCache :: (MonadIO m, MonadError String m) => Url -> m L.ByteString
readCache url = do
path <- cacheLocationOf url
runIO (L.readFile path) | 149 | readCache url = do
path <- cacheLocationOf url
runIO (L.readFile path) | 78 | false | true | 0 | 10 | 30 | 64 | 30 | 34 | null | null |
ulricha/dsh | src/Database/DSH/SL/Construct.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Insert TSL operators and appropriate R1/R2/R3 nodes
vec :: TSL -> VecConst r a -> Build TSL a
vec op mkVec = mkVec $ insert op | 211 | vec :: TSL -> VecConst r a -> Build TSL a
vec op mkVec = mkVec $ insert op | 74 | vec op mkVec = mkVec $ insert op | 32 | true | true | 2 | 8 | 28 | 49 | 22 | 27 | null | null |
jBugman/fun-lang | src/Fun/Desugar.hs | mit | addReturn ex = ex | 65 | addReturn ex = ex | 65 | addReturn ex = ex | 65 | false | false | 0 | 4 | 51 | 9 | 4 | 5 | null | null |
jystic/QuickSpec | qs1/Equations.hs | bsd-3-clause | varDepths d t = varDepths1 d t | 30 | varDepths d t = varDepths1 d t | 30 | varDepths d t = varDepths1 d t | 30 | false | false | 1 | 5 | 6 | 20 | 7 | 13 | null | null |
lukexi/ghc-7.8-arm64 | testsuite/tests/codeGen/should_run/cgrun071.hs | bsd-3-clause | test_popCnt32 = test popcnt32 (slowPopcnt . fromIntegral . (mask 32 .&.)) | 73 | test_popCnt32 = test popcnt32 (slowPopcnt . fromIntegral . (mask 32 .&.)) | 73 | test_popCnt32 = test popcnt32 (slowPopcnt . fromIntegral . (mask 32 .&.)) | 73 | false | false | 0 | 9 | 10 | 29 | 15 | 14 | null | null |
bitemyapp/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | boxedTupleArr, unboxedTupleArr, factTupleArr :: Array Int (TyCon,DataCon)
boxedTupleArr = listArray (0,mAX_TUPLE_SIZE) [mk_tuple BoxedTuple i | i <- [0..mAX_TUPLE_SIZE]] | 171 | boxedTupleArr, unboxedTupleArr, factTupleArr :: Array Int (TyCon,DataCon)
boxedTupleArr = listArray (0,mAX_TUPLE_SIZE) [mk_tuple BoxedTuple i | i <- [0..mAX_TUPLE_SIZE]] | 171 | boxedTupleArr = listArray (0,mAX_TUPLE_SIZE) [mk_tuple BoxedTuple i | i <- [0..mAX_TUPLE_SIZE]] | 97 | false | true | 0 | 9 | 19 | 58 | 33 | 25 | null | null |
nkartashov/haskell | hw10/Interpreter/Main.hs | gpl-2.0 | main = fmap (\_ -> ()) $ runTestTT $ test
[ errorsCount (runEval (evalExpr test1) $ M.fromList [("x",I 3),("y",I 5),("f",I 5)]) ~?= 2
-- 2 ошибки: неизвестная переменная z и несоответствие типов (в том месте, где вычисляется "!x")
, let m = M.fromList [("x",B True),("y",I 5),("z",I 5)] in runEval (evalExpr test1) m ~?= (Just (B False), [], m)
, let m = M.fromList [("x",B True),("y",I 2),("z",I 2)] in runEval (evalExpr test1) m ~?= (Just (B True ), [], m)
, runEval (evalExpr test2) M.empty ~?= (Just (I (-18)), [], M.empty)
, runEval (evalProgram test3) (M.fromList [("n",I 5)]) ~?= (Just (), [], M.fromList [("n",I 0),("r",I 120)])
]
where
errorsCount (_,es,_) = length es | 715 | main = fmap (\_ -> ()) $ runTestTT $ test
[ errorsCount (runEval (evalExpr test1) $ M.fromList [("x",I 3),("y",I 5),("f",I 5)]) ~?= 2
-- 2 ошибки: неизвестная переменная z и несоответствие типов (в том месте, где вычисляется "!x")
, let m = M.fromList [("x",B True),("y",I 5),("z",I 5)] in runEval (evalExpr test1) m ~?= (Just (B False), [], m)
, let m = M.fromList [("x",B True),("y",I 2),("z",I 2)] in runEval (evalExpr test1) m ~?= (Just (B True ), [], m)
, runEval (evalExpr test2) M.empty ~?= (Just (I (-18)), [], M.empty)
, runEval (evalProgram test3) (M.fromList [("n",I 5)]) ~?= (Just (), [], M.fromList [("n",I 0),("r",I 120)])
]
where
errorsCount (_,es,_) = length es | 715 | main = fmap (\_ -> ()) $ runTestTT $ test
[ errorsCount (runEval (evalExpr test1) $ M.fromList [("x",I 3),("y",I 5),("f",I 5)]) ~?= 2
-- 2 ошибки: неизвестная переменная z и несоответствие типов (в том месте, где вычисляется "!x")
, let m = M.fromList [("x",B True),("y",I 5),("z",I 5)] in runEval (evalExpr test1) m ~?= (Just (B False), [], m)
, let m = M.fromList [("x",B True),("y",I 2),("z",I 2)] in runEval (evalExpr test1) m ~?= (Just (B True ), [], m)
, runEval (evalExpr test2) M.empty ~?= (Just (I (-18)), [], M.empty)
, runEval (evalProgram test3) (M.fromList [("n",I 5)]) ~?= (Just (), [], M.fromList [("n",I 0),("r",I 120)])
]
where
errorsCount (_,es,_) = length es | 715 | false | false | 3 | 13 | 149 | 436 | 230 | 206 | null | null |
jtdaugherty/vty | src/Data/Terminfo/Eval.hs | bsd-3-clause | writeCapOp DecOut = do
p <- pop
forM_ (show p) $ tell.writeWord8.toEnum.fromEnum | 88 | writeCapOp DecOut = do
p <- pop
forM_ (show p) $ tell.writeWord8.toEnum.fromEnum | 88 | writeCapOp DecOut = do
p <- pop
forM_ (show p) $ tell.writeWord8.toEnum.fromEnum | 88 | false | false | 1 | 11 | 19 | 42 | 17 | 25 | null | null |
ghcformacosx/ghc-dot-app | Main.hs | bsd-3-clause | fixupBin :: BuildState -> IO ()
fixupBin (BuildState { buildBinDir, buildPrefixDir }) = do
binFiles <- map (buildBinDir </>) . filter ((/='.') . head) <$>
getDirectoryContents buildBinDir
scripts <- filterM isScript binFiles
mapM_ (fixupScript buildPrefixDir) scripts | 289 | fixupBin :: BuildState -> IO ()
fixupBin (BuildState { buildBinDir, buildPrefixDir }) = do
binFiles <- map (buildBinDir </>) . filter ((/='.') . head) <$>
getDirectoryContents buildBinDir
scripts <- filterM isScript binFiles
mapM_ (fixupScript buildPrefixDir) scripts | 289 | fixupBin (BuildState { buildBinDir, buildPrefixDir }) = do
binFiles <- map (buildBinDir </>) . filter ((/='.') . head) <$>
getDirectoryContents buildBinDir
scripts <- filterM isScript binFiles
mapM_ (fixupScript buildPrefixDir) scripts | 257 | false | true | 0 | 13 | 57 | 100 | 49 | 51 | null | null |
ivan-m/monad-levels | Control/Monad/Levels/Writer.hs | mit | -- | Execute the action @m@ and add its output to the value of the
-- computation.
listen :: forall w m a. (CanListen w m a) => m a -> m (a,w)
listen = lowerSat c f m a _listen
where
c :: Proxy (IsWriter w)
c = Proxy
f :: Proxy (ListenFn w)
f = Proxy
m :: Proxy m
m = Proxy
a :: Proxy a
a = Proxy | 335 | listen :: forall w m a. (CanListen w m a) => m a -> m (a,w)
listen = lowerSat c f m a _listen
where
c :: Proxy (IsWriter w)
c = Proxy
f :: Proxy (ListenFn w)
f = Proxy
m :: Proxy m
m = Proxy
a :: Proxy a
a = Proxy | 250 | listen = lowerSat c f m a _listen
where
c :: Proxy (IsWriter w)
c = Proxy
f :: Proxy (ListenFn w)
f = Proxy
m :: Proxy m
m = Proxy
a :: Proxy a
a = Proxy | 190 | true | true | 7 | 9 | 110 | 130 | 68 | 62 | null | null |
alexisVallet/ag44-graph-algorithms | VectorUtils.hs | bsd-3-clause | readL :: (MonadTrans t, PrimMonad m, MonadState st (t m), MVector v a)
=> Getting (v (PrimState m) a) st (v (PrimState m) a)
-> Int -> t m a
readL vectorLens index = do
vector <- use vectorLens
lift $ read vector index | 240 | readL :: (MonadTrans t, PrimMonad m, MonadState st (t m), MVector v a)
=> Getting (v (PrimState m) a) st (v (PrimState m) a)
-> Int -> t m a
readL vectorLens index = do
vector <- use vectorLens
lift $ read vector index | 240 | readL vectorLens index = do
vector <- use vectorLens
lift $ read vector index | 81 | false | true | 0 | 12 | 65 | 128 | 60 | 68 | null | null |
runjak/projectEuler | src/Problem14.hs | mit | vals = [(score x, x)|x<-range] | 30 | vals = [(score x, x)|x<-range] | 30 | vals = [(score x, x)|x<-range] | 30 | false | false | 1 | 8 | 4 | 30 | 14 | 16 | null | null |
kongra/kask-base | app/Main.hs | bsd-3-clause | main :: IO ()
-- main = defaultMain [
-- bgroup "fib" [ bench "100" $ whnf Test012.tescik100 100
-- , bench "100000" $ whnf Test012.tescik100 1000
-- --, bench "79" $ whnf Test012.tescik20 79
-- -- , bench "430" $ whnf Test012.tescik200 430
-- ]]
main =
-- Test012.test1
Test001.test1 | 355 | main :: IO ()
main =
-- Test012.test1
Test001.test1 | 55 | main =
-- Test012.test1
Test001.test1 | 41 | true | true | 0 | 7 | 121 | 31 | 17 | 14 | null | null |
machine-intelligence/Botworld | games/PrisonersDilemma.hs | bsd-3-clause | rightsValues :: Item -> Int
rightsValues item
| item == leftItem = 3
| item == rightItem = 1
| otherwise = 0 | 114 | rightsValues :: Item -> Int
rightsValues item
| item == leftItem = 3
| item == rightItem = 1
| otherwise = 0 | 114 | rightsValues item
| item == leftItem = 3
| item == rightItem = 1
| otherwise = 0 | 86 | false | true | 2 | 8 | 28 | 49 | 23 | 26 | null | null |
DimaSamoz/thodo | src/Printing.hs | mit | showAbsDeadline :: Deadline -> String
showAbsDeadline (Abs (Date d)) = "- " ++ formatTime defaultTimeLocale "%A %e %b %G" d | 123 | showAbsDeadline :: Deadline -> String
showAbsDeadline (Abs (Date d)) = "- " ++ formatTime defaultTimeLocale "%A %e %b %G" d | 123 | showAbsDeadline (Abs (Date d)) = "- " ++ formatTime defaultTimeLocale "%A %e %b %G" d | 85 | false | true | 0 | 9 | 19 | 41 | 20 | 21 | null | null |
brendanhay/gogol | gogol-games/gen/Network/Google/Resource/Games/Leaderboards/List.hs | mpl-2.0 | -- | The preferred language to use for strings returned by this method.
llLanguage :: Lens' LeaderboardsList (Maybe Text)
llLanguage
= lens _llLanguage (\ s a -> s{_llLanguage = a}) | 183 | llLanguage :: Lens' LeaderboardsList (Maybe Text)
llLanguage
= lens _llLanguage (\ s a -> s{_llLanguage = a}) | 111 | llLanguage
= lens _llLanguage (\ s a -> s{_llLanguage = a}) | 61 | true | true | 1 | 9 | 31 | 50 | 25 | 25 | null | null |
dchagniot/threadscopeRestServer | src/Events/SparkTree.hs | bsd-3-clause | -- | Create spark tree from spark durations.
-- Note that the last event may be not a spark event, in which case
-- there is no data about sparks for the last time interval
-- (the subtree for the interval will have SparkTreeEmpty node).
mkSparkTree :: [SparkDuration] -- ^ spark durations calculated from events
-> Timestamp -- ^ end time of last event in the list
-> SparkTree
mkSparkTree es endTime =
SparkTree s e $
-- trace (show tree) $
tree
where
tree = splitSparks es endTime
(s, e) = if null es then (0, 0) else (startT (head es), endTime)
-- | Construct spark tree, by recursively splitting time intervals..
-- We only split at spark transition duration boundaries;
-- we never split a duration into multiple pieces.
-- Therefore, the binary tree is only roughly split by time,
-- the actual split depends on the distribution of sample points below it. | 917 | mkSparkTree :: [SparkDuration] -- ^ spark durations calculated from events
-> Timestamp -- ^ end time of last event in the list
-> SparkTree
mkSparkTree es endTime =
SparkTree s e $
-- trace (show tree) $
tree
where
tree = splitSparks es endTime
(s, e) = if null es then (0, 0) else (startT (head es), endTime)
-- | Construct spark tree, by recursively splitting time intervals..
-- We only split at spark transition duration boundaries;
-- we never split a duration into multiple pieces.
-- Therefore, the binary tree is only roughly split by time,
-- the actual split depends on the distribution of sample points below it. | 679 | mkSparkTree es endTime =
SparkTree s e $
-- trace (show tree) $
tree
where
tree = splitSparks es endTime
(s, e) = if null es then (0, 0) else (startT (head es), endTime)
-- | Construct spark tree, by recursively splitting time intervals..
-- We only split at spark transition duration boundaries;
-- we never split a duration into multiple pieces.
-- Therefore, the binary tree is only roughly split by time,
-- the actual split depends on the distribution of sample points below it. | 506 | true | true | 3 | 10 | 209 | 117 | 62 | 55 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter10.hs | mit | stops :: String
stops = "pbtdkg" | 32 | stops :: String
stops = "pbtdkg" | 32 | stops = "pbtdkg" | 16 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
nathanic/hive-hs | src/Hive/Game/Board.hs | gpl-3.0 | -- YO NATHAN
-- READ THIS
-- the next thing you need to do is write some tests
-- because probably a lot of this shit is wrong
-- though testing would probably be easier if i had a move parser
-- and it'd be fun to get parsec out...
-- https://en.wikipedia.org/wiki/Strongly_connected_component
al = [('a', 'a', ['b'])
,('b', 'b', ['c','e','f'])
,('c', 'c', ['d','g'])
,('d', 'd', ['c','h'])
,('e', 'e', ['a','f'])
,('f', 'f', ['g'])
,('g', 'g', ['f'])
,('h', 'h', ['d','g'])
,('x', 'x', ['y'])
,('y', 'y', [])
] | 565 | al = [('a', 'a', ['b'])
,('b', 'b', ['c','e','f'])
,('c', 'c', ['d','g'])
,('d', 'd', ['c','h'])
,('e', 'e', ['a','f'])
,('f', 'f', ['g'])
,('g', 'g', ['f'])
,('h', 'h', ['d','g'])
,('x', 'x', ['y'])
,('y', 'y', [])
] | 268 | al = [('a', 'a', ['b'])
,('b', 'b', ['c','e','f'])
,('c', 'c', ['d','g'])
,('d', 'd', ['c','h'])
,('e', 'e', ['a','f'])
,('f', 'f', ['g'])
,('g', 'g', ['f'])
,('h', 'h', ['d','g'])
,('x', 'x', ['y'])
,('y', 'y', [])
] | 268 | true | false | 1 | 7 | 137 | 183 | 121 | 62 | null | null |
kawu/named | Data/Named.hs | bsd-2-clause | mapWordCh f (Left (k, w)) = Left (k, f w) | 41 | mapWordCh f (Left (k, w)) = Left (k, f w) | 41 | mapWordCh f (Left (k, w)) = Left (k, f w) | 41 | false | false | 0 | 8 | 9 | 35 | 18 | 17 | null | null |
llytvynenko/write-yourself-a-scheme | app/Main.hs | isc | parseAtom :: Parser LispVal
parseAtom = do
first <- letter <|> symbol
rest <- many (letter <|> digit <|> symbol)
let atom = first:rest
return $ case atom of
"#t" -> Bool True
"#f" -> Bool False
_ -> Atom atom | 229 | parseAtom :: Parser LispVal
parseAtom = do
first <- letter <|> symbol
rest <- many (letter <|> digit <|> symbol)
let atom = first:rest
return $ case atom of
"#t" -> Bool True
"#f" -> Bool False
_ -> Atom atom | 228 | parseAtom = do
first <- letter <|> symbol
rest <- many (letter <|> digit <|> symbol)
let atom = first:rest
return $ case atom of
"#t" -> Bool True
"#f" -> Bool False
_ -> Atom atom | 200 | false | true | 0 | 11 | 61 | 97 | 45 | 52 | null | null |
mgsloan/ghcjs-typescript | ghcjs-typescript-convert/GHCJS/TypeScript/Convert/Collect.hs | mit | classBodyElementToTypeMember (AmbientMemberDeclaration mpublicOrPrivate mstatic name fieldOrFunc) =
case fieldOrFunc of
Left field -> PropertySignature name Nothing field
Right func -> MethodSignature name Nothing func | 228 | classBodyElementToTypeMember (AmbientMemberDeclaration mpublicOrPrivate mstatic name fieldOrFunc) =
case fieldOrFunc of
Left field -> PropertySignature name Nothing field
Right func -> MethodSignature name Nothing func | 228 | classBodyElementToTypeMember (AmbientMemberDeclaration mpublicOrPrivate mstatic name fieldOrFunc) =
case fieldOrFunc of
Left field -> PropertySignature name Nothing field
Right func -> MethodSignature name Nothing func | 228 | false | false | 3 | 7 | 33 | 54 | 26 | 28 | null | null |
gridaphobe/ghc | compiler/codeGen/StgCmmClosure.hs | bsd-3-clause | getCallMethod _ _ _ _ _ _ _ = panic "Unknown call method" | 57 | getCallMethod _ _ _ _ _ _ _ = panic "Unknown call method" | 57 | getCallMethod _ _ _ _ _ _ _ = panic "Unknown call method" | 57 | false | false | 1 | 5 | 12 | 21 | 10 | 11 | null | null |
ekmett/concurrent | src/Concurrent/Struct/Heap.hs | bsd-2-clause | delete :: (MonadPrim s m, Ord k) => Heap k v s -> Node k v s -> m ()
delete h n = modify_ (`deleteNode` n) h | 108 | delete :: (MonadPrim s m, Ord k) => Heap k v s -> Node k v s -> m ()
delete h n = modify_ (`deleteNode` n) h | 108 | delete h n = modify_ (`deleteNode` n) h | 39 | false | true | 0 | 9 | 27 | 71 | 36 | 35 | null | null |
abooij/cubicaltt | Eval.hs | mit | eqFun :: Val -> Val -> Val
eqFun = transNegLine | 47 | eqFun :: Val -> Val -> Val
eqFun = transNegLine | 47 | eqFun = transNegLine | 20 | false | true | 0 | 6 | 9 | 19 | 10 | 9 | null | null |
joeschmo/joebot2 | src/Joebot/Plugins/Mail/Base.hs | mit | mailProc :: Chan Msg -> IO ()
mailProc ch = void $ runStateT (mailbox ch) M.empty | 81 | mailProc :: Chan Msg -> IO ()
mailProc ch = void $ runStateT (mailbox ch) M.empty | 81 | mailProc ch = void $ runStateT (mailbox ch) M.empty | 51 | false | true | 2 | 8 | 15 | 48 | 21 | 27 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | [Output-only] Job resource usage breakdown by reservation.
jReservationUsage :: Lens' JobStatistics2 [JobStatistics2ReservationUsageItem]
jReservationUsage
= lens _jReservationUsage
(\ s a -> s{_jReservationUsage = a})
. _Default
. _Coerce | 264 | jReservationUsage :: Lens' JobStatistics2 [JobStatistics2ReservationUsageItem]
jReservationUsage
= lens _jReservationUsage
(\ s a -> s{_jReservationUsage = a})
. _Default
. _Coerce | 200 | jReservationUsage
= lens _jReservationUsage
(\ s a -> s{_jReservationUsage = a})
. _Default
. _Coerce | 121 | true | true | 0 | 11 | 48 | 53 | 28 | 25 | null | null |
sbidin/sdl2-mixer | src/SDL/Mixer.hs | bsd-3-clause | -- | Returns whether a 'Music' is currently paused or not.
--
-- Note that this returns 'False' if the 'Music' is currently halted.
pausedMusic :: MonadIO m => m Bool
pausedMusic = (> 0) <$> SDL.Raw.Mixer.pausedMusic | 216 | pausedMusic :: MonadIO m => m Bool
pausedMusic = (> 0) <$> SDL.Raw.Mixer.pausedMusic | 84 | pausedMusic = (> 0) <$> SDL.Raw.Mixer.pausedMusic | 49 | true | true | 2 | 7 | 36 | 43 | 22 | 21 | null | null |
ttoe/diffeq-hs | src/CortezWeitz.Continuous.hs | bsd-3-clause | bMin = 0.1 | 10 | bMin = 0.1 | 10 | bMin = 0.1 | 10 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
dblia/nosql-ganeti | src/Ganeti/Daemon.hs | gpl-2.0 | -- | Generic options.
genericOpts :: [OptType]
genericOpts = [ oShowHelp
, oShowVer
, oShowComp
] | 139 | genericOpts :: [OptType]
genericOpts = [ oShowHelp
, oShowVer
, oShowComp
] | 117 | genericOpts = [ oShowHelp
, oShowVer
, oShowComp
] | 92 | true | true | 0 | 7 | 57 | 31 | 16 | 15 | null | null |
ezyang/ghc | compiler/codeGen/StgCmmArgRep.hs | bsd-3-clause | slowCallPattern (V32: _) = (fsLit "stg_ap_v32", 1) | 63 | slowCallPattern (V32: _) = (fsLit "stg_ap_v32", 1) | 63 | slowCallPattern (V32: _) = (fsLit "stg_ap_v32", 1) | 63 | false | false | 0 | 6 | 19 | 26 | 13 | 13 | null | null |
christiaanb/Idris-dev | src/Idris/Prover.hs | bsd-3-clause | lifte :: ElabState [PDecl] -> ElabD a -> Idris a
lifte st e = do (v, _) <- elabStep st e
return v | 113 | lifte :: ElabState [PDecl] -> ElabD a -> Idris a
lifte st e = do (v, _) <- elabStep st e
return v | 113 | lifte st e = do (v, _) <- elabStep st e
return v | 64 | false | true | 0 | 9 | 38 | 65 | 29 | 36 | null | null |
saep/neil | src/Paper/Haskell2/Stage1.hs | bsd-3-clause | spanExpr ('|':xs) = ("", xs) | 28 | spanExpr ('|':xs) = ("", xs) | 28 | spanExpr ('|':xs) = ("", xs) | 28 | false | false | 0 | 7 | 4 | 22 | 12 | 10 | null | null |
m-alvarez/jhc | src/Support/MD5.hs | mit | md5file :: FilePath -> IO Hash
md5file fp = md5lazy `fmap` LBS.readFile fp | 74 | md5file :: FilePath -> IO Hash
md5file fp = md5lazy `fmap` LBS.readFile fp | 74 | md5file fp = md5lazy `fmap` LBS.readFile fp | 43 | false | true | 0 | 7 | 12 | 32 | 16 | 16 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-code/Language/Drasil/CodeSpec.hs | bsd-2-clause | getExpConstants n chs cs = cExp (modularity chs) (constStructure chs)
(inputStructure chs)
where cExp Unmodular (Store Bundled) _ = zipCs $ repeat n
cExp Unmodular WithInputs Bundled = zipCs $ repeat n
cExp _ (Store Bundled) _ = zipCs $ repeat "Constants"
cExp _ WithInputs Bundled = zipCs $ repeat "InputParameters"
cExp _ _ _ = []
zipCs = zip (map codeName cs) | 407 | getExpConstants n chs cs = cExp (modularity chs) (constStructure chs)
(inputStructure chs)
where cExp Unmodular (Store Bundled) _ = zipCs $ repeat n
cExp Unmodular WithInputs Bundled = zipCs $ repeat n
cExp _ (Store Bundled) _ = zipCs $ repeat "Constants"
cExp _ WithInputs Bundled = zipCs $ repeat "InputParameters"
cExp _ _ _ = []
zipCs = zip (map codeName cs) | 407 | getExpConstants n chs cs = cExp (modularity chs) (constStructure chs)
(inputStructure chs)
where cExp Unmodular (Store Bundled) _ = zipCs $ repeat n
cExp Unmodular WithInputs Bundled = zipCs $ repeat n
cExp _ (Store Bundled) _ = zipCs $ repeat "Constants"
cExp _ WithInputs Bundled = zipCs $ repeat "InputParameters"
cExp _ _ _ = []
zipCs = zip (map codeName cs) | 407 | false | false | 5 | 10 | 107 | 159 | 76 | 83 | null | null |
robertjlooby/scotty-story-board | app/controllers/AuthorizationController.hs | mit | getOrCreateUser :: Connection -> GoogleInfo -> IO User
getOrCreateUser conn googleInfo = do
foundUser <- runFindQuery conn $ OAuthLogin.findUserQuery "google" (sub googleInfo)
case foundUser of
Just user ->
return user
Nothing ->
createUser conn googleInfo | 296 | getOrCreateUser :: Connection -> GoogleInfo -> IO User
getOrCreateUser conn googleInfo = do
foundUser <- runFindQuery conn $ OAuthLogin.findUserQuery "google" (sub googleInfo)
case foundUser of
Just user ->
return user
Nothing ->
createUser conn googleInfo | 296 | getOrCreateUser conn googleInfo = do
foundUser <- runFindQuery conn $ OAuthLogin.findUserQuery "google" (sub googleInfo)
case foundUser of
Just user ->
return user
Nothing ->
createUser conn googleInfo | 241 | false | true | 0 | 11 | 74 | 84 | 38 | 46 | 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-monitoringrolearn
rdsdbiMonitoringRoleArn :: Lens' RDSDBInstance (Maybe (Val Text))
rdsdbiMonitoringRoleArn = lens _rDSDBInstanceMonitoringRoleArn (\s a -> s { _rDSDBInstanceMonitoringRoleArn = a }) | 326 | rdsdbiMonitoringRoleArn :: Lens' RDSDBInstance (Maybe (Val Text))
rdsdbiMonitoringRoleArn = lens _rDSDBInstanceMonitoringRoleArn (\s a -> s { _rDSDBInstanceMonitoringRoleArn = a }) | 180 | rdsdbiMonitoringRoleArn = lens _rDSDBInstanceMonitoringRoleArn (\s a -> s { _rDSDBInstanceMonitoringRoleArn = a }) | 114 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT37.hs | gpl-3.0 | union (x:xs) ys | x `elem` ys = union xs ys
| otherwise = x:(union xs ys) | 89 | union (x:xs) ys | x `elem` ys = union xs ys
| otherwise = x:(union xs ys) | 89 | union (x:xs) ys | x `elem` ys = union xs ys
| otherwise = x:(union xs ys) | 89 | false | false | 1 | 8 | 32 | 59 | 28 | 31 | null | null |
C-Elegans/linear | Core/Atomize.hs | mit | atomizeM (App l e) = do
tv <- newTv e
f <- newTv l
return $! Let (NonRec tv e) $ Let (NonRec f l) (App (Var f) (Var tv)) | 133 | atomizeM (App l e) = do
tv <- newTv e
f <- newTv l
return $! Let (NonRec tv e) $ Let (NonRec f l) (App (Var f) (Var tv)) | 133 | atomizeM (App l e) = do
tv <- newTv e
f <- newTv l
return $! Let (NonRec tv e) $ Let (NonRec f l) (App (Var f) (Var tv)) | 133 | false | false | 0 | 12 | 42 | 93 | 42 | 51 | null | null |
mitar/etage-graph | src/Test.hs | lgpl-3.0 | isOutputDot _ = False | 33 | isOutputDot _ = False | 33 | isOutputDot _ = False | 33 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
ian-ross/c2hs-macos-test | c2hs-0.26.1/src/C2HS/Switches.hs | mit | -- | switch states on startup
--
initialSwitchBoard :: SwitchBoard
initialSwitchBoard = SwitchBoard {
cppOptsSB = [],
cppSB = "cpp",
noGnuSB = False,
noBlocksSB = False,
keepSB = False,
librarySB = False,
tracesSB = initialTraces,
outputSB = "",
outDirSB = "",
platformSB = defaultPlatformSpec,
headerSB = "",
chiPathSB = ["."]
} | 663 | initialSwitchBoard :: SwitchBoard
initialSwitchBoard = SwitchBoard {
cppOptsSB = [],
cppSB = "cpp",
noGnuSB = False,
noBlocksSB = False,
keepSB = False,
librarySB = False,
tracesSB = initialTraces,
outputSB = "",
outDirSB = "",
platformSB = defaultPlatformSpec,
headerSB = "",
chiPathSB = ["."]
} | 630 | initialSwitchBoard = SwitchBoard {
cppOptsSB = [],
cppSB = "cpp",
noGnuSB = False,
noBlocksSB = False,
keepSB = False,
librarySB = False,
tracesSB = initialTraces,
outputSB = "",
outDirSB = "",
platformSB = defaultPlatformSpec,
headerSB = "",
chiPathSB = ["."]
} | 596 | true | true | 0 | 7 | 384 | 92 | 60 | 32 | null | null |
evancz/cli | src/Develop/Generate/Index.hs | bsd-3-clause | badJson :: FilePath -> Maybe FilePath -> String
badJson root potentialRoot =
BSU8.toString $ Json.encode $ Json.object $
[ "root" .= root
, "suggestion" .= potentialRoot
] | 185 | badJson :: FilePath -> Maybe FilePath -> String
badJson root potentialRoot =
BSU8.toString $ Json.encode $ Json.object $
[ "root" .= root
, "suggestion" .= potentialRoot
] | 185 | badJson root potentialRoot =
BSU8.toString $ Json.encode $ Json.object $
[ "root" .= root
, "suggestion" .= potentialRoot
] | 137 | false | true | 0 | 8 | 40 | 59 | 30 | 29 | null | null |
h3nnn4n/rubiks-cube-haskell | Rubik.hs | gpl-3.0 | turn_cw (Corner Blue Yellow Orange) = (Corner Yellow Orange Blue ) | 67 | turn_cw (Corner Blue Yellow Orange) = (Corner Yellow Orange Blue ) | 67 | turn_cw (Corner Blue Yellow Orange) = (Corner Yellow Orange Blue ) | 67 | false | false | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
osa1/chsc | Utilities.hs | bsd-3-clause | panic :: String -> Doc -> a
panic s d = error $ "PANIC!\n" ++ s ++ ": " ++ render d | 83 | panic :: String -> Doc -> a
panic s d = error $ "PANIC!\n" ++ s ++ ": " ++ render d | 83 | panic s d = error $ "PANIC!\n" ++ s ++ ": " ++ render d | 55 | false | true | 2 | 8 | 21 | 49 | 22 | 27 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudtrail/gen/Network/AWS/CloudTrail/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'Event' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'eUsername'
--
-- * 'eResources'
--
-- * 'eEventTime'
--
-- * 'eCloudTrailEvent'
--
-- * 'eEventName'
--
-- * 'eEventId'
event
:: Event
event =
Event'
{ _eUsername = Nothing
, _eResources = Nothing
, _eEventTime = Nothing
, _eCloudTrailEvent = Nothing
, _eEventName = Nothing
, _eEventId = Nothing
} | 500 | event
:: Event
event =
Event'
{ _eUsername = Nothing
, _eResources = Nothing
, _eEventTime = Nothing
, _eCloudTrailEvent = Nothing
, _eEventName = Nothing
, _eEventId = Nothing
} | 214 | event =
Event'
{ _eUsername = Nothing
, _eResources = Nothing
, _eEventTime = Nothing
, _eCloudTrailEvent = Nothing
, _eEventName = Nothing
, _eEventId = Nothing
} | 195 | true | true | 0 | 6 | 120 | 64 | 46 | 18 | null | null |
meteogrid/dropdirwatch | src/System/DirWatch/Archiver.hs | bsd-3-clause | isNoBucketError :: SomeException -> Bool
isNoBucketError e
| Just (S3.S3Error{S3.s3ErrorCode = "NoSuchBucket"}) <- fromException e
= True
| otherwise = False | 163 | isNoBucketError :: SomeException -> Bool
isNoBucketError e
| Just (S3.S3Error{S3.s3ErrorCode = "NoSuchBucket"}) <- fromException e
= True
| otherwise = False | 163 | isNoBucketError e
| Just (S3.S3Error{S3.s3ErrorCode = "NoSuchBucket"}) <- fromException e
= True
| otherwise = False | 122 | false | true | 1 | 13 | 26 | 58 | 28 | 30 | null | null |
danplubell/hmp3-phoenix | src/Style.hs | gpl-3.0 | cyan = RGB 0 255 255 | 27 | cyan = RGB 0 255 255 | 27 | cyan = RGB 0 255 255 | 27 | false | false | 0 | 5 | 12 | 13 | 6 | 7 | null | null |
nejla/nejla-common | tests/Helpers.hs | bsd-3-clause | prop_cctu :: [Char] -> [Char] -> UCLetter -> [Char] -> Bool
prop_cctu delim left' (UCLetter r) right' =
let left = toLower <$> left'
right = r : (toLower <$> right')
in or [ left == "" || right == ""
, cctu delim (left ++ right) == (left ++ delim ++ downcase right)
] | 294 | prop_cctu :: [Char] -> [Char] -> UCLetter -> [Char] -> Bool
prop_cctu delim left' (UCLetter r) right' =
let left = toLower <$> left'
right = r : (toLower <$> right')
in or [ left == "" || right == ""
, cctu delim (left ++ right) == (left ++ delim ++ downcase right)
] | 294 | prop_cctu delim left' (UCLetter r) right' =
let left = toLower <$> left'
right = r : (toLower <$> right')
in or [ left == "" || right == ""
, cctu delim (left ++ right) == (left ++ delim ++ downcase right)
] | 234 | false | true | 0 | 12 | 81 | 139 | 70 | 69 | null | null |
frsoares/hsimplesearch | src/Search/Query.hs | gpl-2.0 | preservingIntersect :: (Ord b, Ord a) => [[(a, b)]] -> [[(a, b)]]
preservingIntersect lists = filter (\x -> length x == length lists) $ groupBy eqFst $ sort $ concat lists | 171 | preservingIntersect :: (Ord b, Ord a) => [[(a, b)]] -> [[(a, b)]]
preservingIntersect lists = filter (\x -> length x == length lists) $ groupBy eqFst $ sort $ concat lists | 171 | preservingIntersect lists = filter (\x -> length x == length lists) $ groupBy eqFst $ sort $ concat lists | 105 | false | true | 0 | 12 | 30 | 96 | 51 | 45 | null | null |
sweirich/hs-inferno | test/G.hs | bsd-3-clause | ftyapp :: Tm -> [Type] -> Tm
ftyapp t [] = t | 44 | ftyapp :: Tm -> [Type] -> Tm
ftyapp t [] = t | 44 | ftyapp t [] = t | 15 | false | true | 0 | 7 | 11 | 34 | 16 | 18 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/abs_2.hs | mit | primMulNat (Succ x) (Succ y) = primPlusNat (primMulNat x (Succ y)) (Succ y) | 75 | primMulNat (Succ x) (Succ y) = primPlusNat (primMulNat x (Succ y)) (Succ y) | 75 | primMulNat (Succ x) (Succ y) = primPlusNat (primMulNat x (Succ y)) (Succ y) | 75 | false | false | 0 | 9 | 12 | 50 | 23 | 27 | null | null |
ezyang/ghc | compiler/basicTypes/SrcLoc.hs | bsd-3-clause | advanceSrcLoc (SrcLoc f l c) '\t' = SrcLoc f l (((((c - 1) `shiftR` 3) + 1)
`shiftL` 3) + 1) | 143 | advanceSrcLoc (SrcLoc f l c) '\t' = SrcLoc f l (((((c - 1) `shiftR` 3) + 1)
`shiftL` 3) + 1) | 143 | advanceSrcLoc (SrcLoc f l c) '\t' = SrcLoc f l (((((c - 1) `shiftR` 3) + 1)
`shiftL` 3) + 1) | 143 | false | false | 1 | 15 | 71 | 71 | 37 | 34 | null | null |
kadena-io/pact | src-ghc/Pact/Persist/SQLite.hs | bsd-3-clause | log :: SQLite -> String -> String -> IO ()
log e = logLog (logger e) | 68 | log :: SQLite -> String -> String -> IO ()
log e = logLog (logger e) | 68 | log e = logLog (logger e) | 25 | false | true | 0 | 10 | 15 | 44 | 20 | 24 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x2F9BD' = "\x876B" | 34 | decomposeChar '\x2F9BD' = "\x876B" | 34 | decomposeChar '\x2F9BD' = "\x876B" | 34 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
D4r1/project-euler | Euler/E37.hs | mit | isTruncatablePrime :: Int -> Bool
isTruncatablePrime n = and $ map (isPrime . listToInt) $ ns
where
ns = delete [] $ nub $ inits n' ++ tails n'
n' = intToList n | 165 | isTruncatablePrime :: Int -> Bool
isTruncatablePrime n = and $ map (isPrime . listToInt) $ ns
where
ns = delete [] $ nub $ inits n' ++ tails n'
n' = intToList n | 165 | isTruncatablePrime n = and $ map (isPrime . listToInt) $ ns
where
ns = delete [] $ nub $ inits n' ++ tails n'
n' = intToList n | 131 | false | true | 2 | 9 | 37 | 83 | 36 | 47 | null | null |
jchitel/ProjectEuler.hs | Problems/Problem0017.hs | mit | -- eleven
getNumDigits 12 = 6 | 29 | getNumDigits 12 = 6 | 19 | getNumDigits 12 = 6 | 19 | true | false | 1 | 5 | 5 | 14 | 5 | 9 | null | null |
quchen/shaking-up-ghc | src/Predicates.hs | bsd-3-clause | -- TODO: Actually, we don't register compiler in some circumstances -- fix.
-- | Do we need to run @ghc-pkg update@ on the currently built package?
-- See "Rules.Data".
registerPackage :: Predicate
registerPackage = return True | 227 | registerPackage :: Predicate
registerPackage = return True | 58 | registerPackage = return True | 29 | true | true | 0 | 5 | 35 | 17 | 10 | 7 | null | null |
rjohnsondev/haskellshop | src/Admin/Feedback.hs | bsd-2-clause | danger :: Text -> Handler App App ()
danger = msg "danger" | 58 | danger :: Text -> Handler App App ()
danger = msg "danger" | 58 | danger = msg "danger" | 21 | false | true | 0 | 7 | 11 | 27 | 13 | 14 | null | null |
PipocaQuemada/ermine | src/Ermine/Syntax/Convention.hs | bsd-2-clause | conv N = \ f (Conventional c u d n) -> f n <&> \n' -> Conventional c u d n' | 75 | conv N = \ f (Conventional c u d n) -> f n <&> \n' -> Conventional c u d n' | 75 | conv N = \ f (Conventional c u d n) -> f n <&> \n' -> Conventional c u d n' | 75 | false | false | 1 | 8 | 20 | 52 | 24 | 28 | null | null |
tgdavies/codeworld | funblocks-client/src/Blocks/CodeGen.hs | apache-2.0 | infixP "<>" = 8 | 15 | infixP "<>" = 8 | 15 | infixP "<>" = 8 | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Evan-Zhao/FastCanvas | src/Settings/Monad/Reader.hs | bsd-3-clause | tryGetEnvR :: IO (Maybe EnvR)
tryGetEnvR = do
let filePath = getConfigPath defaultEnvR
maybeEnvRF <- tryGetEnvRFiled filePath
return $ merge <$> maybeEnvRF | 167 | tryGetEnvR :: IO (Maybe EnvR)
tryGetEnvR = do
let filePath = getConfigPath defaultEnvR
maybeEnvRF <- tryGetEnvRFiled filePath
return $ merge <$> maybeEnvRF | 167 | tryGetEnvR = do
let filePath = getConfigPath defaultEnvR
maybeEnvRF <- tryGetEnvRFiled filePath
return $ merge <$> maybeEnvRF | 137 | false | true | 2 | 10 | 33 | 60 | 24 | 36 | null | null |
ben-schulz/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | computeLet :: Name -> Elab' aux ()
computeLet n = processTactic' (ComputeLet n) | 79 | computeLet :: Name -> Elab' aux ()
computeLet n = processTactic' (ComputeLet n) | 79 | computeLet n = processTactic' (ComputeLet n) | 44 | false | true | 0 | 8 | 12 | 38 | 17 | 21 | null | null |
neight-allen/lonelycyberwolf | src/Actor/Escrow.hs | mit | ----
commitAsk :: EscrowPid -> Match -> Process ()
commitAsk EscrowPid{..} m = call unEscrowPid $ CommitAsk m | 110 | commitAsk :: EscrowPid -> Match -> Process ()
commitAsk EscrowPid{..} m = call unEscrowPid $ CommitAsk m | 104 | commitAsk EscrowPid{..} m = call unEscrowPid $ CommitAsk m | 58 | true | true | 5 | 6 | 18 | 44 | 23 | 21 | null | null |
arpunk/jfdb | src/Main.hs | gpl-3.0 | main :: IO ()
main = do
decodificarCsv "periodicos.txt" EntidadPeriodico
decodificarCsv "programas-mano.txt" EntidadProgramaMano
decodificarCsv "afiches.txt" EntidadAfiche
decodificarCsv "fotografias.txt" EntidadFotografia
decodificarCsv "audiovisuales.txt" EntidadAudiovisual
decodificarCsv "bibliografias.txt" EntidadBibliografia
decodificarCsv "premios.txt" EntidadPremio
decodificarCsv "obras-graficas.txt" EntidadObraGrafica
decodificarCsv "actividades-culturales.txt" EntidadActividadCultural
decodificarCsv "programas-academicos.txt" EntidadProgramaAcademico | 674 | main :: IO ()
main = do
decodificarCsv "periodicos.txt" EntidadPeriodico
decodificarCsv "programas-mano.txt" EntidadProgramaMano
decodificarCsv "afiches.txt" EntidadAfiche
decodificarCsv "fotografias.txt" EntidadFotografia
decodificarCsv "audiovisuales.txt" EntidadAudiovisual
decodificarCsv "bibliografias.txt" EntidadBibliografia
decodificarCsv "premios.txt" EntidadPremio
decodificarCsv "obras-graficas.txt" EntidadObraGrafica
decodificarCsv "actividades-culturales.txt" EntidadActividadCultural
decodificarCsv "programas-academicos.txt" EntidadProgramaAcademico | 674 | main = do
decodificarCsv "periodicos.txt" EntidadPeriodico
decodificarCsv "programas-mano.txt" EntidadProgramaMano
decodificarCsv "afiches.txt" EntidadAfiche
decodificarCsv "fotografias.txt" EntidadFotografia
decodificarCsv "audiovisuales.txt" EntidadAudiovisual
decodificarCsv "bibliografias.txt" EntidadBibliografia
decodificarCsv "premios.txt" EntidadPremio
decodificarCsv "obras-graficas.txt" EntidadObraGrafica
decodificarCsv "actividades-culturales.txt" EntidadActividadCultural
decodificarCsv "programas-academicos.txt" EntidadProgramaAcademico | 660 | false | true | 0 | 7 | 145 | 96 | 38 | 58 | null | null |
andorp/bead | src/Bead/Persistence/Persist.hs | bsd-3-clause | -- * Submission
-- Saves the submission for a given assignment, submitted by the given user
saveSubmission :: AssignmentKey -> Username -> Submission -> Persist SubmissionKey
saveSubmission = PersistImpl.saveSubmission | 219 | saveSubmission :: AssignmentKey -> Username -> Submission -> Persist SubmissionKey
saveSubmission = PersistImpl.saveSubmission | 126 | saveSubmission = PersistImpl.saveSubmission | 43 | true | true | 0 | 8 | 29 | 30 | 16 | 14 | null | null |
deontologician/orbRPG | Game/OrbRPG/Combinations.hs | gpl-3.0 | -- Black + Tech
Black @>> T Piston = D Asmodeus | 47 | Black @>> T Piston = D Asmodeus | 31 | Black @>> T Piston = D Asmodeus | 31 | true | false | 3 | 6 | 10 | 21 | 9 | 12 | null | null |
siddhanathan/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | gtDataConKey = mkPreludeDataConUnique 29 | 67 | gtDataConKey = mkPreludeDataConUnique 29 | 67 | gtDataConKey = mkPreludeDataConUnique 29 | 67 | false | false | 0 | 5 | 30 | 9 | 4 | 5 | null | null |
drhodes/jade2hdl | src/Jade/TopLevel.hs | bsd-3-clause | terminals (SubMemUnit memunit) = "TopLevel.terminals/memunit" <? do
MemUnit.terminals memunit
-- | Get the number of distinct nodes in the schematic | 151 | terminals (SubMemUnit memunit) = "TopLevel.terminals/memunit" <? do
MemUnit.terminals memunit
-- | Get the number of distinct nodes in the schematic | 151 | terminals (SubMemUnit memunit) = "TopLevel.terminals/memunit" <? do
MemUnit.terminals memunit
-- | Get the number of distinct nodes in the schematic | 151 | false | false | 0 | 9 | 22 | 29 | 13 | 16 | null | null |
fmap-archive/wright | test/Assertions/Metric.hs | mit | parseFixtures :: String -> [Fixture]
parseFixtures = map parseFixture . parse | 77 | parseFixtures :: String -> [Fixture]
parseFixtures = map parseFixture . parse | 77 | parseFixtures = map parseFixture . parse | 40 | false | true | 0 | 6 | 10 | 25 | 13 | 12 | null | null |
OCExercise/haskellbook-solutions | chapters/chapter05/exercises/determine_the_type_p2.hs | bsd-2-clause | y = x + 5 | 9 | y = x + 5 | 9 | y = x + 5 | 9 | false | false | 3 | 5 | 4 | 15 | 5 | 10 | null | null |
alexander-b/thug-beginners | lessonA/A2List.hs | gpl-3.0 | append :: List a -> List a -> List a
-- First off we want to be able to concatenate two Lists. This function should
-- add the two lists together, the right one at the end of the left one.
Nil `append` ys = undefined | 226 | append :: List a -> List a -> List a
Nil `append` ys = undefined | 74 | Nil `append` ys = undefined | 37 | true | true | 1 | 8 | 55 | 39 | 18 | 21 | null | null |
gafiatulin/codewars | src/6 kyu/SortableShapes.hs | mit | size (Circle r) = pi*r^2 | 24 | size (Circle r) = pi*r^2 | 24 | size (Circle r) = pi*r^2 | 24 | false | false | 3 | 6 | 4 | 29 | 11 | 18 | null | null |
idris-hackers/idris-java | src/IRTS/CodegenJava.hs | bsd-3-clause | mkExp pp (SOp LNoOp args) =
(Nothing <>@! (last args)) >>= ppExp pp | 69 | mkExp pp (SOp LNoOp args) =
(Nothing <>@! (last args)) >>= ppExp pp | 69 | mkExp pp (SOp LNoOp args) =
(Nothing <>@! (last args)) >>= ppExp pp | 69 | false | false | 0 | 9 | 14 | 40 | 19 | 21 | null | null |
nushio3/formura | attic/lambda-calculus.hs | mit | step :: Exp -> IO [Exp]
step e = case e of
Var e -> return []
Lam x e0 -> fmap (fmap (Lam x)) $ step e0
App e1 e2 -> do
r1 <- case e1 of
Lam x e0 -> fmap (:[]) (subst e2 x e0)
_ -> return []
r2 <- fmap (fmap $ \e1' -> App e1' e2) (step e1)
r3 <- fmap (fmap $ \e2' -> App e1 e2') (step e2)
return $ r1 ++ r2 ++ r3 | 356 | step :: Exp -> IO [Exp]
step e = case e of
Var e -> return []
Lam x e0 -> fmap (fmap (Lam x)) $ step e0
App e1 e2 -> do
r1 <- case e1 of
Lam x e0 -> fmap (:[]) (subst e2 x e0)
_ -> return []
r2 <- fmap (fmap $ \e1' -> App e1' e2) (step e1)
r3 <- fmap (fmap $ \e2' -> App e1 e2') (step e2)
return $ r1 ++ r2 ++ r3 | 354 | step e = case e of
Var e -> return []
Lam x e0 -> fmap (fmap (Lam x)) $ step e0
App e1 e2 -> do
r1 <- case e1 of
Lam x e0 -> fmap (:[]) (subst e2 x e0)
_ -> return []
r2 <- fmap (fmap $ \e1' -> App e1' e2) (step e1)
r3 <- fmap (fmap $ \e2' -> App e1 e2') (step e2)
return $ r1 ++ r2 ++ r3 | 330 | false | true | 9 | 12 | 126 | 167 | 92 | 75 | null | null |
olsner/ghc | compiler/utils/Outputable.hs | bsd-3-clause | pprDeeper :: SDoc -> SDoc
pprDeeper d = SDoc $ \ctx -> case ctx of
SDC{sdocStyle=PprUser _ (PartWay 0) _} -> Pretty.text "..."
SDC{sdocStyle=PprUser q (PartWay n) c} ->
runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1)) c}
_ -> runSDoc d ctx
-- | Truncate a list that is longer than the current depth. | 313 | pprDeeper :: SDoc -> SDoc
pprDeeper d = SDoc $ \ctx -> case ctx of
SDC{sdocStyle=PprUser _ (PartWay 0) _} -> Pretty.text "..."
SDC{sdocStyle=PprUser q (PartWay n) c} ->
runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1)) c}
_ -> runSDoc d ctx
-- | Truncate a list that is longer than the current depth. | 313 | pprDeeper d = SDoc $ \ctx -> case ctx of
SDC{sdocStyle=PprUser _ (PartWay 0) _} -> Pretty.text "..."
SDC{sdocStyle=PprUser q (PartWay n) c} ->
runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1)) c}
_ -> runSDoc d ctx
-- | Truncate a list that is longer than the current depth. | 287 | false | true | 0 | 17 | 65 | 137 | 69 | 68 | null | null |
zeniuseducation/poly-euler | Alfa/ml/one.hs | epl-1.0 | sol73b lim = sum $ [length $ filter (\i -> 1 == gcd x i) s | x <- [5..lim],
let s = takeWhile (< (1+(div x 2))) [(1+(div x 3))..]] | 150 | sol73b lim = sum $ [length $ filter (\i -> 1 == gcd x i) s | x <- [5..lim],
let s = takeWhile (< (1+(div x 2))) [(1+(div x 3))..]] | 150 | sol73b lim = sum $ [length $ filter (\i -> 1 == gcd x i) s | x <- [5..lim],
let s = takeWhile (< (1+(div x 2))) [(1+(div x 3))..]] | 150 | false | false | 3 | 16 | 50 | 112 | 56 | 56 | null | null |
Happy0/snowdrift | Model/Issue.hs | agpl-3.0 | mkSomeIssue :: Issue a => a -> SomeIssue
mkSomeIssue issue = SomeIssue (\k -> k issue) | 86 | mkSomeIssue :: Issue a => a -> SomeIssue
mkSomeIssue issue = SomeIssue (\k -> k issue) | 86 | mkSomeIssue issue = SomeIssue (\k -> k issue) | 45 | false | true | 0 | 8 | 15 | 44 | 20 | 24 | null | null |
frantisekfarka/ghc-dsi | testsuite/tests/profiling/should_run/T3001-2.hs | bsd-3-clause | efaultSize :: Int
defaultSize = 32 * k - overhead
where k = 1024
overhead = 2 * sizeOf (undefined :: Int)
| 120 | defaultSize :: Int
defaultSize = 32 * k - overhead
where k = 1024
overhead = 2 * sizeOf (undefined :: Int) | 120 | defaultSize = 32 * k - overhead
where k = 1024
overhead = 2 * sizeOf (undefined :: Int) | 101 | false | true | 1 | 7 | 36 | 47 | 24 | 23 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_493 x = happyTcHack x happyFail | 38 | action_493 x = happyTcHack x happyFail | 38 | action_493 x = happyTcHack x happyFail | 38 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
sfultong/stand-in-language | test/Spec.hs | apache-2.0 | c2d_test3 = app (lam (app (varN 0) zero)) (lam (pair (varN 0) zero)) | 68 | c2d_test3 = app (lam (app (varN 0) zero)) (lam (pair (varN 0) zero)) | 68 | c2d_test3 = app (lam (app (varN 0) zero)) (lam (pair (varN 0) zero)) | 68 | false | false | 0 | 11 | 12 | 51 | 25 | 26 | null | null |
mwahab1/pandoc | src/Text/Pandoc/Readers/HTML.hs | gpl-2.0 | fixPlains :: Bool -> Blocks -> Blocks
fixPlains inList bs = if any isParaish bs'
then B.fromList $ map plainToPara bs'
else bs
where isParaish (Para _) = True
isParaish (CodeBlock _ _) = True
isParaish (Header _ _ _) = True
isParaish (BlockQuote _) = True
isParaish (BulletList _) = not inList
isParaish (OrderedList _ _) = not inList
isParaish (DefinitionList _) = not inList
isParaish _ = False
plainToPara (Plain xs) = Para xs
plainToPara x = x
bs' = B.toList bs | 604 | fixPlains :: Bool -> Blocks -> Blocks
fixPlains inList bs = if any isParaish bs'
then B.fromList $ map plainToPara bs'
else bs
where isParaish (Para _) = True
isParaish (CodeBlock _ _) = True
isParaish (Header _ _ _) = True
isParaish (BlockQuote _) = True
isParaish (BulletList _) = not inList
isParaish (OrderedList _ _) = not inList
isParaish (DefinitionList _) = not inList
isParaish _ = False
plainToPara (Plain xs) = Para xs
plainToPara x = x
bs' = B.toList bs | 604 | fixPlains inList bs = if any isParaish bs'
then B.fromList $ map plainToPara bs'
else bs
where isParaish (Para _) = True
isParaish (CodeBlock _ _) = True
isParaish (Header _ _ _) = True
isParaish (BlockQuote _) = True
isParaish (BulletList _) = not inList
isParaish (OrderedList _ _) = not inList
isParaish (DefinitionList _) = not inList
isParaish _ = False
plainToPara (Plain xs) = Para xs
plainToPara x = x
bs' = B.toList bs | 566 | false | true | 1 | 8 | 222 | 225 | 103 | 122 | null | null |
ancientlanguage/haskell-analysis | greek-script/src/Grammar/Greek/Script/Rounds/UnicodeSymbol.hs | mit | symbolToChar S_Η = 'Η' | 22 | symbolToChar S_Η = 'Η' | 22 | symbolToChar S_Η = 'Η' | 22 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x0158' = "\x0052\x030C" | 39 | decomposeChar '\x0158' = "\x0052\x030C" | 39 | decomposeChar '\x0158' = "\x0052\x030C" | 39 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
ahodgen/qualys | Qualys/HostListDetection.hs | bsd-3-clause | runHostListDetection :: (Monoid a, MonadIO m, MonadThrow m) =>
[Param] -> (Host -> QualysT m a) -> QualysT m a
runHostListDetection ps f = do
let query = paramsToQuery $ [("action", "list")] <> ps
base <- buildV2ApiUrl "asset/host/vm/detection/"
runHld f (Just $ base <> query)
-- | Get entries from Host List Detection. | 357 | runHostListDetection :: (Monoid a, MonadIO m, MonadThrow m) =>
[Param] -> (Host -> QualysT m a) -> QualysT m a
runHostListDetection ps f = do
let query = paramsToQuery $ [("action", "list")] <> ps
base <- buildV2ApiUrl "asset/host/vm/detection/"
runHld f (Just $ base <> query)
-- | Get entries from Host List Detection. | 357 | runHostListDetection ps f = do
let query = paramsToQuery $ [("action", "list")] <> ps
base <- buildV2ApiUrl "asset/host/vm/detection/"
runHld f (Just $ base <> query)
-- | Get entries from Host List Detection. | 222 | false | true | 0 | 13 | 89 | 121 | 61 | 60 | null | null |
k0001/gtk2hs | tools/apidiff/HiDiff.hs | gpl-3.0 | respace :: [String] -> String
respace x = f (filter (/= ";") x)
where
f [] = ""
f [x] = x
f (x1:x2:xs) = if shouldspace x1 x2
then x1 ++ " " ++ f (x2:xs)
else x1 ++ f (x2:xs) | 255 | respace :: [String] -> String
respace x = f (filter (/= ";") x)
where
f [] = ""
f [x] = x
f (x1:x2:xs) = if shouldspace x1 x2
then x1 ++ " " ++ f (x2:xs)
else x1 ++ f (x2:xs) | 255 | respace x = f (filter (/= ";") x)
where
f [] = ""
f [x] = x
f (x1:x2:xs) = if shouldspace x1 x2
then x1 ++ " " ++ f (x2:xs)
else x1 ++ f (x2:xs) | 225 | false | true | 1 | 9 | 122 | 134 | 65 | 69 | null | null |
fpco/hlint | data/Default.hs | bsd-3-clause | error "Evaluate" = Nothing >>= k ==> Nothing | 44 | error "Evaluate" = Nothing >>= k ==> Nothing | 44 | error "Evaluate" = Nothing >>= k ==> Nothing | 44 | false | false | 0 | 6 | 7 | 17 | 8 | 9 | null | null |
gilith/hol | src/HOL/OpenTheory/Interpret.hs | mit | fromRenames :: Renames -> Maybe Interpret
fromRenames (Renames l) = do
guard (Map.size m == length l)
return (mk m)
where
m = Map.fromList $ map destRename l | 171 | fromRenames :: Renames -> Maybe Interpret
fromRenames (Renames l) = do
guard (Map.size m == length l)
return (mk m)
where
m = Map.fromList $ map destRename l | 171 | fromRenames (Renames l) = do
guard (Map.size m == length l)
return (mk m)
where
m = Map.fromList $ map destRename l | 129 | false | true | 0 | 11 | 41 | 79 | 36 | 43 | null | null |
karamellpelle/grid | designer/source/LevelTools/File.hs | gpl-3.0 | wDotTele dot = do
wField fieldLevelRoomDotTele
let Node n0 n1 n2 = dotteleNode dot
Node n0' n1' n2' = dotteleNode dot
wInt32 $ fI n0
wInt32 $ fI n1
wInt32 $ fI n2
wUInt32 $ dotteleSize dot
wInt32 $ fI n0'
wInt32 $ fI n1'
wInt32 $ fI n2' | 280 | wDotTele dot = do
wField fieldLevelRoomDotTele
let Node n0 n1 n2 = dotteleNode dot
Node n0' n1' n2' = dotteleNode dot
wInt32 $ fI n0
wInt32 $ fI n1
wInt32 $ fI n2
wUInt32 $ dotteleSize dot
wInt32 $ fI n0'
wInt32 $ fI n1'
wInt32 $ fI n2' | 280 | wDotTele dot = do
wField fieldLevelRoomDotTele
let Node n0 n1 n2 = dotteleNode dot
Node n0' n1' n2' = dotteleNode dot
wInt32 $ fI n0
wInt32 $ fI n1
wInt32 $ fI n2
wUInt32 $ dotteleSize dot
wInt32 $ fI n0'
wInt32 $ fI n1'
wInt32 $ fI n2' | 280 | false | false | 0 | 10 | 92 | 121 | 49 | 72 | null | null |
lhuang7/mysql | dist/dist-sandbox-bd9d9ce/build/autogen/Paths_mysql.hs | bsd-3-clause | libdir = "/home/kevin/AACS/onping2.0/root/onping/.cabal-sandbox/lib/x86_64-linux-ghc-7.6.3/mysql-0.1.1.4" | 109 | libdir = "/home/kevin/AACS/onping2.0/root/onping/.cabal-sandbox/lib/x86_64-linux-ghc-7.6.3/mysql-0.1.1.4" | 109 | libdir = "/home/kevin/AACS/onping2.0/root/onping/.cabal-sandbox/lib/x86_64-linux-ghc-7.6.3/mysql-0.1.1.4" | 109 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.