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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gdevanla/scotty-from-ground-up | app/Main3.hs | bsd-3-clause | -- framework functions
addRoute' mf s@AppState {routes = mw} = s {routes = mf:mw} | 81 | addRoute' mf s@AppState {routes = mw} = s {routes = mf:mw} | 58 | addRoute' mf s@AppState {routes = mw} = s {routes = mf:mw} | 58 | true | false | 1 | 8 | 13 | 45 | 21 | 24 | null | null |
voidlizard/ntced-tcp-proxy | contrib/msgpack/src/Data/MessagePack/Put.hs | mit | putExt :: Word8 -> S.ByteString -> Put
putExt typ dat = do
case S.length dat of
1 -> putWord8 0xD4
2 -> putWord8 0xD5
4 -> putWord8 0xD6
8 -> putWord8 0xD7
16 -> putWord8 0xD8
len | len < 0x100 -> putWord8 0xC7 >> putWord8 (fromIntegral len)
| len < 0x10000 -> putWord8 0xC8 >>... | 461 | putExt :: Word8 -> S.ByteString -> Put
putExt typ dat = do
case S.length dat of
1 -> putWord8 0xD4
2 -> putWord8 0xD5
4 -> putWord8 0xD6
8 -> putWord8 0xD7
16 -> putWord8 0xD8
len | len < 0x100 -> putWord8 0xC7 >> putWord8 (fromIntegral len)
| len < 0x10000 -> putWord8 0xC8 >>... | 461 | putExt typ dat = do
case S.length dat of
1 -> putWord8 0xD4
2 -> putWord8 0xD5
4 -> putWord8 0xD6
8 -> putWord8 0xD7
16 -> putWord8 0xD8
len | len < 0x100 -> putWord8 0xC7 >> putWord8 (fromIntegral len)
| len < 0x10000 -> putWord8 0xC8 >> putWord16be (fromIntegral len)
... | 422 | false | true | 0 | 14 | 130 | 181 | 80 | 101 | null | null |
atsukotakahashi/wi | src/library/Yi/UI/Vty/Conversions.hs | gpl-2.0 | fromVtyKey (Vty.KPrtScr ) = Yi.Event.KPrtScr | 46 | fromVtyKey (Vty.KPrtScr ) = Yi.Event.KPrtScr | 46 | fromVtyKey (Vty.KPrtScr ) = Yi.Event.KPrtScr | 46 | false | false | 0 | 6 | 6 | 18 | 9 | 9 | null | null |
dasuxullebt/inflate.hs | inflate.runST.hs | gpl-3.0 | finishByte (n, [] : l) = finishByte (n+1, l) | 44 | finishByte (n, [] : l) = finishByte (n+1, l) | 44 | finishByte (n, [] : l) = finishByte (n+1, l) | 44 | false | false | 0 | 7 | 8 | 35 | 18 | 17 | null | null |
mbakke/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | opPrioDefault :: Int
opPrioDefault = opPrioNormal | 49 | opPrioDefault :: Int
opPrioDefault = opPrioNormal | 49 | opPrioDefault = opPrioNormal | 28 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
moonKimura/vector-0.10.9.1 | Data/Vector/Fusion/Stream.hs | bsd-3-clause | and = unId . M.and | 18 | and = unId . M.and | 18 | and = unId . M.and | 18 | false | false | 0 | 6 | 4 | 12 | 6 | 6 | null | null |
haskell-distributed/distributed-process-client-server | src/Control/Distributed/Process/ManagedProcess/Server/Restricted.hs | bsd-3-clause | -- | Instructs the process to /hibernate/ for the given 'TimeInterval'. Note
-- that no messages will be removed from the mailbox until after hibernation has
-- ceased. This is equivalent to evaluating @liftIO . threadDelay@.
--
hibernate :: forall s. TimeInterval -> RestrictedProcess s RestrictedAction
hibernate d = r... | 349 | hibernate :: forall s. TimeInterval -> RestrictedProcess s RestrictedAction
hibernate d = return $ RestrictedHibernate d | 120 | hibernate d = return $ RestrictedHibernate d | 44 | true | true | 0 | 7 | 52 | 39 | 21 | 18 | null | null |
xu-hao/QueryArrow | QueryArrow-db-cypher/src/QueryArrow/Cypher/Cypher.hs | bsd-3-clause | cypherStringUnescape :: String -> String
cypherStringUnescape ('\\' : 't' : t) = '\t' : cypherStringUnescape t | 110 | cypherStringUnescape :: String -> String
cypherStringUnescape ('\\' : 't' : t) = '\t' : cypherStringUnescape t | 110 | cypherStringUnescape ('\\' : 't' : t) = '\t' : cypherStringUnescape t | 69 | false | true | 0 | 8 | 15 | 36 | 18 | 18 | null | null |
AlexeyRaga/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp IndexOffAddrOp_Double = Just $ addrIndexOp jdouble mempty | 66 | simpleOp IndexOffAddrOp_Double = Just $ addrIndexOp jdouble mempty | 66 | simpleOp IndexOffAddrOp_Double = Just $ addrIndexOp jdouble mempty | 66 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
chreekat/snowdrift | Handler/User/Comment.hs | agpl-3.0 | postWatchUserCommentR :: UserId -> CommentId -> Handler Html
postWatchUserCommentR user_id comment_id = do
(viewer@(Entity viewer_id _), comment) <- checkCommentUrlRequireAuth user_id comment_id
checkUserCommentActionPermission can_watch viewer user_id (Entity comment_id comment)
postWatchComment viewer_id... | 473 | postWatchUserCommentR :: UserId -> CommentId -> Handler Html
postWatchUserCommentR user_id comment_id = do
(viewer@(Entity viewer_id _), comment) <- checkCommentUrlRequireAuth user_id comment_id
checkUserCommentActionPermission can_watch viewer user_id (Entity comment_id comment)
postWatchComment viewer_id... | 473 | postWatchUserCommentR user_id comment_id = do
(viewer@(Entity viewer_id _), comment) <- checkCommentUrlRequireAuth user_id comment_id
checkUserCommentActionPermission can_watch viewer user_id (Entity comment_id comment)
postWatchComment viewer_id comment_id
redirect (UserCommentR user_id comment_id)
... | 412 | false | true | 0 | 11 | 56 | 100 | 48 | 52 | null | null |
peterson/lets-haskell | src/Lets/Data.hs | bsd-3-clause | -- now, define map using |>
mapL'' :: (a -> b) -> List a -> List b
mapL'' f = foldrL (f |> Cons) Nil | 100 | mapL'' :: (a -> b) -> List a -> List b
mapL'' f = foldrL (f |> Cons) Nil | 72 | mapL'' f = foldrL (f |> Cons) Nil | 33 | true | true | 0 | 8 | 24 | 52 | 25 | 27 | null | null |
damianfral/clay | src/Clay/Elements.hs | bsd-3-clause | aside = "aside" | 15 | aside = "aside" | 15 | aside = "aside" | 15 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'EmbeddedObjectBOrder' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'eoboColor'
--
-- * 'eoboWidth'
--
-- * 'eoboDashStyle'
--
-- * 'eoboPropertyState'
embeddedObjectBOrder
:: EmbeddedObjectBOrder
embedde... | 485 | embeddedObjectBOrder
:: EmbeddedObjectBOrder
embeddedObjectBOrder =
EmbeddedObjectBOrder'
{ _eoboColor = Nothing
, _eoboWidth = Nothing
, _eoboDashStyle = Nothing
, _eoboPropertyState = Nothing
} | 221 | embeddedObjectBOrder =
EmbeddedObjectBOrder'
{ _eoboColor = Nothing
, _eoboWidth = Nothing
, _eoboDashStyle = Nothing
, _eoboPropertyState = Nothing
} | 172 | true | true | 0 | 6 | 94 | 48 | 34 | 14 | null | null |
norm2782/JCU | src/Application.hs | bsd-3-clause | deleteStoredRuleH :: AppHandler ()
deleteStoredRuleH = restrict forbiddenH $ do
mrid <- getParam "id"
case mrid of
Nothing -> return ()
Just x -> do
uid <- getUserId
deleteRule uid x | 209 | deleteStoredRuleH :: AppHandler ()
deleteStoredRuleH = restrict forbiddenH $ do
mrid <- getParam "id"
case mrid of
Nothing -> return ()
Just x -> do
uid <- getUserId
deleteRule uid x | 209 | deleteStoredRuleH = restrict forbiddenH $ do
mrid <- getParam "id"
case mrid of
Nothing -> return ()
Just x -> do
uid <- getUserId
deleteRule uid x | 174 | false | true | 1 | 15 | 57 | 80 | 33 | 47 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | btrtoL2Reg :: Lens' BqmlTrainingRunTrainingOptions (Maybe Double)
btrtoL2Reg
= lens _btrtoL2Reg (\ s a -> s{_btrtoL2Reg = a}) .
mapping _Coerce | 151 | btrtoL2Reg :: Lens' BqmlTrainingRunTrainingOptions (Maybe Double)
btrtoL2Reg
= lens _btrtoL2Reg (\ s a -> s{_btrtoL2Reg = a}) .
mapping _Coerce | 151 | btrtoL2Reg
= lens _btrtoL2Reg (\ s a -> s{_btrtoL2Reg = a}) .
mapping _Coerce | 85 | false | true | 0 | 10 | 27 | 54 | 27 | 27 | null | null |
bredelings/BAli-Phy | haskell/Probability/Distribution/Tree.hs | gpl-2.0 | modifiable_cayley_tree modf tree = Tree (listArray' nodes) (listArray' branches) n_nodes where
n_nodes = numNodes tree
n_leaves | n_nodes == 1 = 1
| otherwise = (n_nodes+2) `div` 2
n_branches = n_nodes - 1
degree node | n_leaves == 1 = 0
| node < n_leaves = 1
... | 690 | modifiable_cayley_tree modf tree = Tree (listArray' nodes) (listArray' branches) n_nodes where
n_nodes = numNodes tree
n_leaves | n_nodes == 1 = 1
| otherwise = (n_nodes+2) `div` 2
n_branches = n_nodes - 1
degree node | n_leaves == 1 = 0
| node < n_leaves = 1
... | 690 | modifiable_cayley_tree modf tree = Tree (listArray' nodes) (listArray' branches) n_nodes where
n_nodes = numNodes tree
n_leaves | n_nodes == 1 = 1
| otherwise = (n_nodes+2) `div` 2
n_branches = n_nodes - 1
degree node | n_leaves == 1 = 0
| node < n_leaves = 1
... | 690 | false | false | 0 | 12 | 199 | 266 | 136 | 130 | null | null |
nikita-volkov/postgresql-binary | tasty/Main/PTI.hs | mit | tstzrange = mkPTI 3910 (Just 3911) | 40 | tstzrange = mkPTI 3910 (Just 3911) | 40 | tstzrange = mkPTI 3910 (Just 3911) | 40 | false | false | 0 | 7 | 11 | 17 | 8 | 9 | null | null |
kosmoskatten/linx-gateway | src/Network/Linx/Gateway.hs | mit | receiveWithTimeout :: Gateway -> Timeout -> SignalSelector
-> IO (Maybe (Pid, Signal))
receiveWithTimeout gw tmo sigSel' = do
reply <- expectPayload (handle gw)
=<< talkGateway (handle gw) (mkReceiveRequest tmo sigSel')
return $
case reply of
ReceiveReply Success (Pid 0) (Pid 0) No... | 590 | receiveWithTimeout :: Gateway -> Timeout -> SignalSelector
-> IO (Maybe (Pid, Signal))
receiveWithTimeout gw tmo sigSel' = do
reply <- expectPayload (handle gw)
=<< talkGateway (handle gw) (mkReceiveRequest tmo sigSel')
return $
case reply of
ReceiveReply Success (Pid 0) (Pid 0) No... | 590 | receiveWithTimeout gw tmo sigSel' = do
reply <- expectPayload (handle gw)
=<< talkGateway (handle gw) (mkReceiveRequest tmo sigSel')
return $
case reply of
ReceiveReply Success (Pid 0) (Pid 0) NoSignal -> Nothing
ReceiveReply Success senderPid' _ signal' ->
Just (senderPid', signal... | 484 | false | true | 0 | 14 | 186 | 160 | 77 | 83 | null | null |
vTurbine/ghc | compiler/main/DynFlags.hs | bsd-3-clause | wayDesc WayThreaded = "Threaded" | 32 | wayDesc WayThreaded = "Threaded" | 32 | wayDesc WayThreaded = "Threaded" | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
facundoq/toys | rsa/toyrsa.hs | agpl-3.0 | -- 1) Encode the message s to make it's size a multiple of the bits desired, and transform the result into an array of numbers
-- 2) Encrypt the result with public key
-- 3) Decode the result, transforming it again into a String
encrypt :: PublicKey -> String -> String
encrypt p@(PubK a n bitsDesired) s = decode bitsDe... | 374 | encrypt :: PublicKey -> String -> String
encrypt p@(PubK a n bitsDesired) s = decode bitsDesired $ encryptIntegers p $ encodeAndPad bitsDesired s | 145 | encrypt p@(PubK a n bitsDesired) s = decode bitsDesired $ encryptIntegers p $ encodeAndPad bitsDesired s | 104 | true | true | 1 | 10 | 66 | 66 | 31 | 35 | null | null |
li-zhirui/EoplLangs | src/SimpleModule/Parser.hs | bsd-3-clause | program :: Parser Program
program = do
spaceConsumer
mDefs <- many moduleDef
body <- expression
eof
return $ Prog mDefs body
-- | ModuleDef ::= module Identifier interface Interface body ModuleBody | 208 | program :: Parser Program
program = do
spaceConsumer
mDefs <- many moduleDef
body <- expression
eof
return $ Prog mDefs body
-- | ModuleDef ::= module Identifier interface Interface body ModuleBody | 208 | program = do
spaceConsumer
mDefs <- many moduleDef
body <- expression
eof
return $ Prog mDefs body
-- | ModuleDef ::= module Identifier interface Interface body ModuleBody | 182 | false | true | 0 | 8 | 41 | 50 | 22 | 28 | null | null |
danidiaz/foldl-transduce | tests/soaktests.hs | bsd-3-clause | main :: IO ()
main = do
rs <- runConcurrently (mapM Concurrently concurrenTests)
mapM_ putStrLn rs | 106 | main :: IO ()
main = do
rs <- runConcurrently (mapM Concurrently concurrenTests)
mapM_ putStrLn rs | 106 | main = do
rs <- runConcurrently (mapM Concurrently concurrenTests)
mapM_ putStrLn rs | 92 | false | true | 0 | 10 | 23 | 42 | 19 | 23 | null | null |
ekmett/ghc | compiler/nativeGen/X86/Regs.hs | bsd-3-clause | allFPArgRegs :: Platform -> [Reg]
allFPArgRegs platform
| platformOS platform == OSMinGW32
= panic "X86.Regs.allFPArgRegs: not defined for this platform"
| otherwise = map regSingle [firstxmm .. firstxmm+7] | 212 | allFPArgRegs :: Platform -> [Reg]
allFPArgRegs platform
| platformOS platform == OSMinGW32
= panic "X86.Regs.allFPArgRegs: not defined for this platform"
| otherwise = map regSingle [firstxmm .. firstxmm+7] | 212 | allFPArgRegs platform
| platformOS platform == OSMinGW32
= panic "X86.Regs.allFPArgRegs: not defined for this platform"
| otherwise = map regSingle [firstxmm .. firstxmm+7] | 178 | false | true | 1 | 9 | 33 | 59 | 29 | 30 | null | null |
karknu/rws | src/Udp.hs | bsd-3-clause | parseUdpSrc :: Parser Word16
parseUdpSrc = parseIntAttribute "src" | 66 | parseUdpSrc :: Parser Word16
parseUdpSrc = parseIntAttribute "src" | 66 | parseUdpSrc = parseIntAttribute "src" | 37 | false | true | 0 | 6 | 7 | 22 | 9 | 13 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/Backends/GenericC.hs | isc | collect :: CompilerM op s () -> CompilerM op s [C.BlockItem]
collect m = snd <$> collect' m | 91 | collect :: CompilerM op s () -> CompilerM op s [C.BlockItem]
collect m = snd <$> collect' m | 91 | collect m = snd <$> collect' m | 30 | false | true | 0 | 8 | 17 | 46 | 22 | 24 | null | null |
cdornan/keystore | src/Data/KeyStore/KS/Crypto.hs | bsd-3-clause | decodePublicKeyDERE :: ClearText -> E PublicKey
decodePublicKeyDERE = decodeDERE . _Binary . _ClearText | 103 | decodePublicKeyDERE :: ClearText -> E PublicKey
decodePublicKeyDERE = decodeDERE . _Binary . _ClearText | 103 | decodePublicKeyDERE = decodeDERE . _Binary . _ClearText | 55 | false | true | 0 | 6 | 12 | 26 | 13 | 13 | null | null |
ameingast/brainhuck | src/Brainhuck/Interpreter.hs | bsd-3-clause | seekBack :: Int -> State -> State
seekBack l s@(xs, i, _, _)
| l == 0 = s'
| c == ']' = seekBack (l + 1) s''
| c == '[' = seekBack (l - 1) s''
| otherwise = seekBack l s''
where
c = xs !! i
s' = advance s
s'' = regress s | 250 | seekBack :: Int -> State -> State
seekBack l s@(xs, i, _, _)
| l == 0 = s'
| c == ']' = seekBack (l + 1) s''
| c == '[' = seekBack (l - 1) s''
| otherwise = seekBack l s''
where
c = xs !! i
s' = advance s
s'' = regress s | 250 | seekBack l s@(xs, i, _, _)
| l == 0 = s'
| c == ']' = seekBack (l + 1) s''
| c == '[' = seekBack (l - 1) s''
| otherwise = seekBack l s''
where
c = xs !! i
s' = advance s
s'' = regress s | 216 | false | true | 2 | 8 | 88 | 146 | 72 | 74 | null | null |
ekmett/wxHaskell | wx/src/Graphics/UI/WX/Controls.hs | lgpl-2.1 | button :: Window a -> [Prop (Button ())] -> IO (Button ())
button parent props
= buttonEx parent 0 props | 106 | button :: Window a -> [Prop (Button ())] -> IO (Button ())
button parent props
= buttonEx parent 0 props | 106 | button parent props
= buttonEx parent 0 props | 47 | false | true | 0 | 12 | 21 | 65 | 29 | 36 | null | null |
ulricha/dsh | src/Database/DSH/Translate/SL2Algebra.hs | bsd-3-clause | translateUnOp :: SegmentAlgebra a
=> SL.UnOp TExpr TExpr
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> B.Build a (Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a))
translateUnOp unop c = case unop of
SL.Fold a -> fromDVec <$> vecFold a ... | 1,715 | translateUnOp :: SegmentAlgebra a
=> SL.UnOp TExpr TExpr
-> Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a)
-> B.Build a (Res (SLDVec a) (SLRVec a) (SLKVec a) (SLFVec a) (SLSVec a))
translateUnOp unop c = case unop of
SL.Fold a -> fromDVec <$> vecFold a ... | 1,715 | translateUnOp unop c = case unop of
SL.Fold a -> fromDVec <$> vecFold a (toDVec c)
SL.Unique -> fromDVec <$> vecUnique (toDVec c)
SL.Number -> fromDVec <$> vecNumber (toDVec c)
SL.WinFun (a, w) -> fromDVec <$> vecWinFun a w (toDVec c)
SL.Segment -> fromDVec <$>... | 1,480 | false | true | 24 | 12 | 634 | 556 | 305 | 251 | null | null |
tekul/cryptonite | tests/ECC.hs | bsd-3-clause | cryptoError :: CryptoFailable a -> Maybe CryptoError
cryptoError = onCryptoFailure Just (const Nothing) | 103 | cryptoError :: CryptoFailable a -> Maybe CryptoError
cryptoError = onCryptoFailure Just (const Nothing) | 103 | cryptoError = onCryptoFailure Just (const Nothing) | 50 | false | true | 0 | 7 | 12 | 37 | 16 | 21 | null | null |
zirrostig/haskell-lehmer | System/Random/Lehmer/Base.hs | bsd-3-clause | -- | Returns how many numbers have been generated in the current stream
drawCount :: LehmerState -> Int
drawCount (LehmerState s _ d) = d !! s | 142 | drawCount :: LehmerState -> Int
drawCount (LehmerState s _ d) = d !! s | 70 | drawCount (LehmerState s _ d) = d !! s | 38 | true | true | 0 | 7 | 26 | 33 | 17 | 16 | null | null |
wavewave/lhc-analysis-collection | exe/2013-07-04-SimplifiedSUSY.hs | gpl-3.0 | pdir = ProcDir "Work20130704" "montecarlo/admproject/SimplifiedSUSY/8TeV" "scan" | 80 | pdir = ProcDir "Work20130704" "montecarlo/admproject/SimplifiedSUSY/8TeV" "scan" | 80 | pdir = ProcDir "Work20130704" "montecarlo/admproject/SimplifiedSUSY/8TeV" "scan" | 80 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
conal/hermit-extras | src/HERMIT/Extras.hs | bsd-3-clause | -- Apply a rewriter inside type lambdas.
inAppTys :: Unop ReExpr
inAppTys r = r'
where
r' = readerT $ \ e -> if isAppTy e then appAllR r' idR else r | 152 | inAppTys :: Unop ReExpr
inAppTys r = r'
where
r' = readerT $ \ e -> if isAppTy e then appAllR r' idR else r | 111 | inAppTys r = r'
where
r' = readerT $ \ e -> if isAppTy e then appAllR r' idR else r | 87 | true | true | 3 | 7 | 35 | 60 | 27 | 33 | null | null |
dsaenztagarro/haskellbook | src/chapter4/Exercises.hs | bsd-3-clause | g xs = op w
where w = length xs
-- (\(x:xs) -> x) [3,4,5]
-- h (a, b) = a | 77 | g xs = op w
where w = length xs
-- (\(x:xs) -> x) [3,4,5]
-- h (a, b) = a | 77 | g xs = op w
where w = length xs
-- (\(x:xs) -> x) [3,4,5]
-- h (a, b) = a | 77 | false | false | 1 | 5 | 24 | 28 | 12 | 16 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/Linear/Vector/Type.hs | bsd-3-clause | find :: (a -> Bool) -> Vector a -> Maybe a
find = V.find | 57 | find :: (a -> Bool) -> Vector a -> Maybe a
find = V.find | 56 | find = V.find | 13 | false | true | 0 | 7 | 14 | 34 | 17 | 17 | null | null |
juodaspaulius/bclafer_old | src/Language/Clafer/Intermediate/Analysis.hs | mit | claferWithUid :: MonadAnalysis m => String -> m SClafer
claferWithUid u =
do
c <- clafers
case find ((==) u . uid) c of
Just c' -> return $ c'
Nothing -> error $ "claferWithUid: Unknown uid " ++ u | 218 | claferWithUid :: MonadAnalysis m => String -> m SClafer
claferWithUid u =
do
c <- clafers
case find ((==) u . uid) c of
Just c' -> return $ c'
Nothing -> error $ "claferWithUid: Unknown uid " ++ u | 218 | claferWithUid u =
do
c <- clafers
case find ((==) u . uid) c of
Just c' -> return $ c'
Nothing -> error $ "claferWithUid: Unknown uid " ++ u | 162 | false | true | 0 | 12 | 61 | 92 | 42 | 50 | null | null |
nevrenato/Hets_Fork | DFOL/Comorphism.hs | gpl-2.0 | -- theory translation
theoryTransl :: (Sign, [Named FORMULA]) ->
(CASL_Sign.CASLSign, [Named CASL_AS.CASLFORMULA])
theoryTransl (sig,fs) = (sigCASL, axCASL ++ fsCASL)
where (sigCASL, axCASL) = sigTransl sig
fsCASL = map (namedSenTransl sig) fs
-- mo... | 338 | theoryTransl :: (Sign, [Named FORMULA]) ->
(CASL_Sign.CASLSign, [Named CASL_AS.CASLFORMULA])
theoryTransl (sig,fs) = (sigCASL, axCASL ++ fsCASL)
where (sigCASL, axCASL) = sigTransl sig
fsCASL = map (namedSenTransl sig) fs
-- morphism translation | 316 | theoryTransl (sig,fs) = (sigCASL, axCASL ++ fsCASL)
where (sigCASL, axCASL) = sigTransl sig
fsCASL = map (namedSenTransl sig) fs
-- morphism translation | 207 | true | true | 0 | 9 | 104 | 97 | 54 | 43 | null | null |
dysinger/amazonka | core/src/Network/AWS/Signing/Internal/V4.hs | mpl-2.0 | authorisation :: Meta V4 -> ByteString
authorisation Meta{..} = BS.concat
[ _mAlgorithm
, " Credential="
, _mScope
, ", SignedHeaders="
, _mSigned
, ", Signature="
, _mSignature
] | 211 | authorisation :: Meta V4 -> ByteString
authorisation Meta{..} = BS.concat
[ _mAlgorithm
, " Credential="
, _mScope
, ", SignedHeaders="
, _mSigned
, ", Signature="
, _mSignature
] | 211 | authorisation Meta{..} = BS.concat
[ _mAlgorithm
, " Credential="
, _mScope
, ", SignedHeaders="
, _mSigned
, ", Signature="
, _mSignature
] | 172 | false | true | 0 | 7 | 59 | 53 | 29 | 24 | null | null |
makemeunsee/interpolateme | FlatModel.hs | gpl-3.0 | flatVertexNormals normals (face:faces) =
concatMap pointToArr (newNormal : faceNormals) ++ facesToFlatTriangles normals faces
where faceNormals = map (normals !!) face
newNormal = normalized $ barycenter faceNormals
-- barycentric coords for vertice
-- triangle vertice get (1,0,0) (0,1,0), (0,0,1)
-- even... | 615 | flatVertexNormals normals (face:faces) =
concatMap pointToArr (newNormal : faceNormals) ++ facesToFlatTriangles normals faces
where faceNormals = map (normals !!) face
newNormal = normalized $ barycenter faceNormals
-- barycentric coords for vertice
-- triangle vertice get (1,0,0) (0,1,0), (0,0,1)
-- even... | 615 | flatVertexNormals normals (face:faces) =
concatMap pointToArr (newNormal : faceNormals) ++ facesToFlatTriangles normals faces
where faceNormals = map (normals !!) face
newNormal = normalized $ barycenter faceNormals
-- barycentric coords for vertice
-- triangle vertice get (1,0,0) (0,1,0), (0,0,1)
-- even... | 615 | false | false | 1 | 8 | 96 | 74 | 39 | 35 | null | null |
UU-ComputerScience/uulib | src/UU/PPrint.hs | bsd-3-clause | putDoc :: Doc -> IO ()
putDoc doc = hPutDoc stdout doc | 67 | putDoc :: Doc -> IO ()
putDoc doc = hPutDoc stdout doc | 67 | putDoc doc = hPutDoc stdout doc | 44 | false | true | 0 | 7 | 24 | 28 | 13 | 15 | null | null |
573/leksah | src/IDE/Package.hs | gpl-2.0 | addModToBuildInfoTest _ _ x = x | 31 | addModToBuildInfoTest _ _ x = x | 31 | addModToBuildInfoTest _ _ x = x | 31 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
google-research/dex-lang | src/lib/LLVMExec.hs | bsd-3-clause | withModuleClone :: Context -> Mod.Module -> (Mod.Module -> IO a) -> IO a
withModuleClone ctx m f = do
-- It would be better to go through bitcode, but apparently that doesn't work...
bc <- Mod.moduleLLVMAssembly m
Mod.withModuleFromLLVMAssembly ctx (("<string>" :: String), bc) f
-- === serializing scalars === | 318 | withModuleClone :: Context -> Mod.Module -> (Mod.Module -> IO a) -> IO a
withModuleClone ctx m f = do
-- It would be better to go through bitcode, but apparently that doesn't work...
bc <- Mod.moduleLLVMAssembly m
Mod.withModuleFromLLVMAssembly ctx (("<string>" :: String), bc) f
-- === serializing scalars === | 318 | withModuleClone ctx m f = do
-- It would be better to go through bitcode, but apparently that doesn't work...
bc <- Mod.moduleLLVMAssembly m
Mod.withModuleFromLLVMAssembly ctx (("<string>" :: String), bc) f
-- === serializing scalars === | 245 | false | true | 0 | 11 | 56 | 90 | 44 | 46 | null | null |
mzini/hosa | src/HoSA/SizeType/SOConstraint.hs | mit | vars (MVar mv) = peakMetaVar mv >>= maybe (return []) vars | 58 | vars (MVar mv) = peakMetaVar mv >>= maybe (return []) vars | 58 | vars (MVar mv) = peakMetaVar mv >>= maybe (return []) vars | 58 | false | false | 0 | 9 | 10 | 35 | 16 | 19 | null | null |
ejlilley/AbstractMusic | Music.hs | gpl-3.0 | faInt Maj Seventh = (faInt Maj Sixth) + (faInt Maj Second) | 58 | faInt Maj Seventh = (faInt Maj Sixth) + (faInt Maj Second) | 58 | faInt Maj Seventh = (faInt Maj Sixth) + (faInt Maj Second) | 58 | false | false | 1 | 8 | 10 | 36 | 15 | 21 | null | null |
lrassaby/harmlang | src/HarmLang/InitialBasis.hs | mit | interpretNamedInterval "octave" = Interval 12 | 45 | interpretNamedInterval "octave" = Interval 12 | 45 | interpretNamedInterval "octave" = Interval 12 | 45 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
urbanslug/ghc | testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs | bsd-3-clause | iterate :: _ => _
iterate = P.iterate | 37 | iterate :: _ => _
iterate = P.iterate | 37 | iterate = P.iterate | 19 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
seckcoder/vector | Data/Vector/Storable.hs | bsd-3-clause | init = G.init | 13 | init = G.init | 13 | init = G.init | 13 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
lukexi/ghc-7.8-arm64 | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | widenFp = float2Double | 22 | widenFp = float2Double | 22 | widenFp = float2Double | 22 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
jsavatgy/dit-doo | code/accum-end-01.hs | gpl-2.0 | randLengths rands = map (truncBetween 0 6) r1s
where
r1s = map floorLogBase rands | 87 | randLengths rands = map (truncBetween 0 6) r1s
where
r1s = map floorLogBase rands | 87 | randLengths rands = map (truncBetween 0 6) r1s
where
r1s = map floorLogBase rands | 87 | false | false | 2 | 6 | 19 | 44 | 16 | 28 | null | null |
shlevy/ghc | testsuite/tests/profiling/should_run/T3001-2.hs | bsd-3-clause | etBytes :: Int -> Get S.ByteString
getBytes n = do
S s ss bytes <- getZ
if n <= S.length s
then do let (consume,rest) = S.splitAt n s
putZ $! S rest ss (bytes + fromIntegral n)
return $! consume
else
case L.splitAt (fromIntegral n) (s `joinZ` ss) of
... | 762 | getBytes :: Int -> Get S.ByteString
getBytes n = do
S s ss bytes <- getZ
if n <= S.length s
then do let (consume,rest) = S.splitAt n s
putZ $! S rest ss (bytes + fromIntegral n)
return $! consume
else
case L.splitAt (fromIntegral n) (s `joinZ` ss) of... | 762 | getBytes n = do
S s ss bytes <- getZ
if n <= S.length s
then do let (consume,rest) = S.splitAt n s
putZ $! S rest ss (bytes + fromIntegral n)
return $! consume
else
case L.splitAt (fromIntegral n) (s `joinZ` ss) of
(consuming, rest) -... | 726 | false | true | 0 | 18 | 374 | 223 | 108 | 115 | null | null |
thomie/cabal | cabal-install/Distribution/Client/Utils.hs | bsd-3-clause | -- | Given a canonical absolute path and canonical absolute dir, make the path
-- relative to the directory, including using @../..@ if necessary. Returns
-- the original absolute path if it is not on the same drive as the given dir.
makeRelativeCanonical :: FilePath -> FilePath -> FilePath
makeRelativeCanonical path d... | 707 | makeRelativeCanonical :: FilePath -> FilePath -> FilePath
makeRelativeCanonical path dir
| takeDrive path /= takeDrive dir = path
| otherwise = go (splitPath path) (splitPath dir)
where
go (p:ps) (d:ds) | p == d = go ps ds
go [] [] = "./"
go ps ds ... | 473 | makeRelativeCanonical path dir
| takeDrive path /= takeDrive dir = path
| otherwise = go (splitPath path) (splitPath dir)
where
go (p:ps) (d:ds) | p == d = go ps ds
go [] [] = "./"
go ps ds = joinPath (replicate (length ds) ".." ++ ps)
-- | Conv... | 415 | true | true | 3 | 10 | 188 | 171 | 78 | 93 | null | null |
runebak/wcc | Codec/Image/PNG.hs | bsd-3-clause | sampleWidth Bd16 = 16 | 21 | sampleWidth Bd16 = 16 | 21 | sampleWidth Bd16 = 16 | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
TomMD/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | returnMClassOpKey = mkPreludeMiscIdUnique 174 | 57 | returnMClassOpKey = mkPreludeMiscIdUnique 174 | 57 | returnMClassOpKey = mkPreludeMiscIdUnique 174 | 57 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/S3BucketRule.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-prefix
sbrPrefix :: Lens' S3BucketRule (Maybe (Val Text))
sbrPrefix = lens _s3BucketRulePrefix (\s a -> s { _s3BucketRulePrefix = a }) | 287 | sbrPrefix :: Lens' S3BucketRule (Maybe (Val Text))
sbrPrefix = lens _s3BucketRulePrefix (\s a -> s { _s3BucketRulePrefix = a }) | 127 | sbrPrefix = lens _s3BucketRulePrefix (\s a -> s { _s3BucketRulePrefix = a }) | 76 | true | true | 1 | 9 | 22 | 56 | 28 | 28 | null | null |
nevrenato/HetsAlloy | Common/Keywords.hs | gpl-2.0 | -- | External choice
external_choiceS :: String
external_choiceS = "[]" | 71 | external_choiceS :: String
external_choiceS = "[]" | 50 | external_choiceS = "[]" | 23 | true | true | 0 | 4 | 9 | 12 | 7 | 5 | null | null |
roberth/uu-helium | test/staticwarnings/Guards3.hs | gpl-3.0 | main False = () | 21 | main False = () | 21 | main False = () | 21 | false | false | 0 | 5 | 9 | 11 | 5 | 6 | null | null |
phischu/gtk2hs | cairo/Gtk2HsSetup.hs | lgpl-3.0 | sortTopological :: [ModDep] -> [ModDep]
sortTopological ms = reverse $ fst $ foldl visit ([], S.empty) (map mdOriginal ms)
where
set = M.fromList (map (\m -> (mdOriginal m, m)) ms)
visit (out,visited) m
| m `S.member` visited = (out,visited)
| otherwise = case m `M.lookup` set of
Nothing -> (out, ... | 542 | sortTopological :: [ModDep] -> [ModDep]
sortTopological ms = reverse $ fst $ foldl visit ([], S.empty) (map mdOriginal ms)
where
set = M.fromList (map (\m -> (mdOriginal m, m)) ms)
visit (out,visited) m
| m `S.member` visited = (out,visited)
| otherwise = case m `M.lookup` set of
Nothing -> (out, ... | 542 | sortTopological ms = reverse $ fst $ foldl visit ([], S.empty) (map mdOriginal ms)
where
set = M.fromList (map (\m -> (mdOriginal m, m)) ms)
visit (out,visited) m
| m `S.member` visited = (out,visited)
| otherwise = case m `M.lookup` set of
Nothing -> (out, m `S.insert` visited)
Just md ->... | 502 | false | true | 2 | 12 | 128 | 234 | 127 | 107 | null | null |
travitch/llvm-tools | src/LLVM/VisualizeGraph.hs | bsd-3-clause | -- | Visualize a graph-based analysis with graphviz. It handles many
-- common options including both file and canvas output.
visualizeGraph :: (ToGraphviz a)
=> FilePath -- ^ Input file name
-> Maybe FilePath -- ^ Output file name
-> OutputType -- ^ Type of output... | 2,250 | visualizeGraph :: (ToGraphviz a)
=> FilePath -- ^ Input file name
-> Maybe FilePath -- ^ Output file name
-> OutputType -- ^ Type of output requested
-> [String] -- ^ Module optimization flags
-> (Module -> [(String, a)]) -- ^ A f... | 2,123 | visualizeGraph inFile outFile fmt optOptions fromModule = do
let p = parseLLVMFile defaultParserOptions
m <- buildModule [] optOptions p inFile
let gs = fromModule m
case fmt of
HtmlOutput -> do
when (isNothing outFile) $ ioError $ userError "Output directory not specified"
-- Make a directory... | 1,734 | true | true | 0 | 19 | 696 | 468 | 227 | 241 | null | null |
Soostone/aws | Aws/S3/Commands/CopyObject.hs | bsd-3-clause | copyObject :: Bucket -> T.Text -> ObjectId -> CopyMetadataDirective -> CopyObject
copyObject bucket obj src meta = CopyObject obj bucket src meta Nothing Nothing Nothing Nothing Nothing Nothing Nothing | 201 | copyObject :: Bucket -> T.Text -> ObjectId -> CopyMetadataDirective -> CopyObject
copyObject bucket obj src meta = CopyObject obj bucket src meta Nothing Nothing Nothing Nothing Nothing Nothing Nothing | 201 | copyObject bucket obj src meta = CopyObject obj bucket src meta Nothing Nothing Nothing Nothing Nothing Nothing Nothing | 119 | false | true | 0 | 8 | 28 | 61 | 30 | 31 | null | null |
PipocaQuemada/ermine | src/Ermine/Parser/Resolver.hs | bsd-2-clause | -- | To get Globals for all Types in a Module:
-- * Create Globals from moduleFixities (with given fixity, types for types)
-- * Extract Globals from moduleData.
-- * Union those two maps (biased on first map)
moduleTypeNames :: Module -> HashMap Text Global
moduleTypeNames md = fixityTypeGlobals md `HM.union` data... | 334 | moduleTypeNames :: Module -> HashMap Text Global
moduleTypeNames md = fixityTypeGlobals md `HM.union` dataTypeGlobals md | 120 | moduleTypeNames md = fixityTypeGlobals md `HM.union` dataTypeGlobals md | 71 | true | true | 0 | 7 | 57 | 45 | 23 | 22 | null | null |
phischu/fragnix | tests/packages/scotty/Data.HashMap.Base.hs | bsd-3-clause | member :: (Eq k, Hashable k) => k -> HashMap k a -> Bool
member k m = case lookup k m of
Nothing -> False
Just _ -> True
| 130 | member :: (Eq k, Hashable k) => k -> HashMap k a -> Bool
member k m = case lookup k m of
Nothing -> False
Just _ -> True
| 130 | member k m = case lookup k m of
Nothing -> False
Just _ -> True
| 73 | false | true | 3 | 8 | 39 | 68 | 33 | 35 | null | null |
reinh/Hask8080 | src/Hask8080/ByteQQ.hs | mit | byte :: QuasiQuoter
byte = QuasiQuoter { quoteExp = quoteByteExp
, quotePat = quoteBytePat
, quoteType = error "no byte quasiquoter for types"
, quoteDec = error "no byte quasiquoter for declarations"
} | 278 | byte :: QuasiQuoter
byte = QuasiQuoter { quoteExp = quoteByteExp
, quotePat = quoteBytePat
, quoteType = error "no byte quasiquoter for types"
, quoteDec = error "no byte quasiquoter for declarations"
} | 278 | byte = QuasiQuoter { quoteExp = quoteByteExp
, quotePat = quoteBytePat
, quoteType = error "no byte quasiquoter for types"
, quoteDec = error "no byte quasiquoter for declarations"
} | 258 | false | true | 0 | 7 | 108 | 43 | 25 | 18 | null | null |
shlevy/ghc | compiler/basicTypes/Module.hs | bsd-3-clause | -- | Like 'renameHoleModule', but requires only 'PackageConfigMap'
-- so it can be used by "Packages".
renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module
renameHoleModule' pkg_map env m
| not (isHoleModule m) =
let uid = renameHoleUnitId' pkg_map env (moduleUnitId m)
in mkModule ... | 449 | renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module
renameHoleModule' pkg_map env m
| not (isHoleModule m) =
let uid = renameHoleUnitId' pkg_map env (moduleUnitId m)
in mkModule uid (moduleName m)
| Just m' <- lookupUFM env (moduleName m) = m'
-- NB m = <Blah>, that's what's i... | 346 | renameHoleModule' pkg_map env m
| not (isHoleModule m) =
let uid = renameHoleUnitId' pkg_map env (moduleUnitId m)
in mkModule uid (moduleName m)
| Just m' <- lookupUFM env (moduleName m) = m'
-- NB m = <Blah>, that's what's in scope.
| otherwise = m | 273 | true | true | 1 | 12 | 93 | 120 | 57 | 63 | null | null |
input-output-hk/cardano-sl | wallet/src/Cardano/Wallet/API/V1/Handlers/Wallets.hs | apache-2.0 | -- | All the @Servant@ handlers for wallet-specific operations.
handlers :: PassiveWalletLayer IO -> ServerT Wallets.API Handler
handlers pwl = newWallet pwl
:<|> listWallets pwl
:<|> updatePassword pwl
:<|> deleteWallet pwl
:<|> getWallet pwl
:<|> updateWallet pw... | 359 | handlers :: PassiveWalletLayer IO -> ServerT Wallets.API Handler
handlers pwl = newWallet pwl
:<|> listWallets pwl
:<|> updatePassword pwl
:<|> deleteWallet pwl
:<|> getWallet pwl
:<|> updateWallet pwl
:<|> getUtxoStatistics pwl | 295 | handlers pwl = newWallet pwl
:<|> listWallets pwl
:<|> updatePassword pwl
:<|> deleteWallet pwl
:<|> getWallet pwl
:<|> updateWallet pwl
:<|> getUtxoStatistics pwl | 230 | true | true | 0 | 11 | 106 | 74 | 33 | 41 | null | null |
brendanhay/gogol | gogol-jobs/gen/Network/Google/Resource/Jobs/Projects/Tenants/Jobs/Get.hs | mpl-2.0 | -- | V1 error format.
ptjgXgafv :: Lens' ProjectsTenantsJobsGet (Maybe Xgafv)
ptjgXgafv
= lens _ptjgXgafv (\ s a -> s{_ptjgXgafv = a}) | 136 | ptjgXgafv :: Lens' ProjectsTenantsJobsGet (Maybe Xgafv)
ptjgXgafv
= lens _ptjgXgafv (\ s a -> s{_ptjgXgafv = a}) | 114 | ptjgXgafv
= lens _ptjgXgafv (\ s a -> s{_ptjgXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
dblia/nosql-ganeti | src/Ganeti/HTools/Program/Hbal.hs | gpl-2.0 | -- | Options list and functions.
options :: IO [OptType]
options = do
luxi <- oLuxiSocket
return
[ oPrintNodes
, oPrintInsts
, oPrintCommands
, oDataFile
, oEvacMode
, oRapiMaster
, luxi
, oIAllocSrc
, oExecJobs
, oGroup
, oMaxSolLength
, oVerbose
, oQuiet
, o... | 597 | options :: IO [OptType]
options = do
luxi <- oLuxiSocket
return
[ oPrintNodes
, oPrintInsts
, oPrintCommands
, oDataFile
, oEvacMode
, oRapiMaster
, luxi
, oIAllocSrc
, oExecJobs
, oGroup
, oMaxSolLength
, oVerbose
, oQuiet
, oOfflineNode
, oMinScore
,... | 564 | options = do
luxi <- oLuxiSocket
return
[ oPrintNodes
, oPrintInsts
, oPrintCommands
, oDataFile
, oEvacMode
, oRapiMaster
, luxi
, oIAllocSrc
, oExecJobs
, oGroup
, oMaxSolLength
, oVerbose
, oQuiet
, oOfflineNode
, oMinScore
, oMaxCpu
, oMinDisk
... | 540 | true | true | 0 | 8 | 198 | 113 | 70 | 43 | null | null |
cabrera/hdbc | Database/HDBC/Utils.hs | bsd-3-clause | fetchAllRowsAL :: Statement -> IO [[(String, SqlValue)]]
fetchAllRowsAL sth =
do names <- getColumnNames sth
rows <- fetchAllRows sth
return $ map (zip names) rows
{- | Strict version of 'fetchAllRowsAL' -} | 225 | fetchAllRowsAL :: Statement -> IO [[(String, SqlValue)]]
fetchAllRowsAL sth =
do names <- getColumnNames sth
rows <- fetchAllRows sth
return $ map (zip names) rows
{- | Strict version of 'fetchAllRowsAL' -} | 225 | fetchAllRowsAL sth =
do names <- getColumnNames sth
rows <- fetchAllRows sth
return $ map (zip names) rows
{- | Strict version of 'fetchAllRowsAL' -} | 168 | false | true | 0 | 10 | 50 | 72 | 35 | 37 | null | null |
forked-upstream-packages-for-ghcjs/ghc | utils/genapply/GenApply.hs | bsd-3-clause | argRep P = text "gcptr" | 25 | argRep P = text "gcptr" | 25 | argRep P = text "gcptr" | 25 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
phdenzel/dotfiles | .config/xmonad/xmonad.hs | mit | xmobarSpawn :: ScreenId -> IO StatusBarConfig
xmobarSpawn 0 = pure $ xmobar | 75 | xmobarSpawn :: ScreenId -> IO StatusBarConfig
xmobarSpawn 0 = pure $ xmobar | 75 | xmobarSpawn 0 = pure $ xmobar | 29 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
alexander-at-github/eta | compiler/ETA/TypeCheck/FunDeps.hs | bsd-3-clause | zipAndComputeFDEqs _ _ _ = [] | 29 | zipAndComputeFDEqs _ _ _ = [] | 29 | zipAndComputeFDEqs _ _ _ = [] | 29 | false | false | 0 | 5 | 5 | 15 | 7 | 8 | null | null |
banacorn/socket.io-haskell | test/Test/Protocol.hs | mit | propParsePathID :: Property
propParsePathID = property $ forAll arbitrary check
where check path = path == pathIdentity path
pathIdentity = parsePath . serialize | 179 | propParsePathID :: Property
propParsePathID = property $ forAll arbitrary check
where check path = path == pathIdentity path
pathIdentity = parsePath . serialize | 179 | propParsePathID = property $ forAll arbitrary check
where check path = path == pathIdentity path
pathIdentity = parsePath . serialize | 151 | false | true | 1 | 7 | 40 | 47 | 23 | 24 | null | null |
kylcarte/threepenny-extra | src/Reactive/Threepenny/Extra.hs | bsd-3-clause | listB :: [B (Maybe a)] -> B [a]
listB = fmap catMaybes . sequenceA | 66 | listB :: [B (Maybe a)] -> B [a]
listB = fmap catMaybes . sequenceA | 66 | listB = fmap catMaybes . sequenceA | 34 | false | true | 0 | 9 | 13 | 40 | 20 | 20 | null | null |
spechub/Hets | Comorphisms/CASL2SubCFOL.hs | gpl-2.0 | codeTerm :: Bool -> Set.Set SORT -> TERM () -> TERM ()
codeTerm b bsorts = foldTerm (codeRecord b bsorts $ error "CASL2SubCFol") | 128 | codeTerm :: Bool -> Set.Set SORT -> TERM () -> TERM ()
codeTerm b bsorts = foldTerm (codeRecord b bsorts $ error "CASL2SubCFol") | 128 | codeTerm b bsorts = foldTerm (codeRecord b bsorts $ error "CASL2SubCFol") | 73 | false | true | 0 | 10 | 22 | 66 | 29 | 37 | null | null |
FranklinChen/Idris-dev | src/Idris/Core/Evaluate.hs | bsd-3-clause | toValue :: Context -> Env -> TT Name -> Value
toValue ctxt env t
= evalState (eval False ctxt [] (map finalEntry env) t []) initEval | 134 | toValue :: Context -> Env -> TT Name -> Value
toValue ctxt env t
= evalState (eval False ctxt [] (map finalEntry env) t []) initEval | 134 | toValue ctxt env t
= evalState (eval False ctxt [] (map finalEntry env) t []) initEval | 88 | false | true | 0 | 9 | 27 | 72 | 33 | 39 | null | null |
jhance/gba-hs | src/Game/GBA/RegisterSet.hs | mit | register' FIQMode 13 = register13fiq | 36 | register' FIQMode 13 = register13fiq | 36 | register' FIQMode 13 = register13fiq | 36 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M06/D26/Solution.hs | mit | -- the properties file is at
exDir, propsFile :: FilePath
exDir = "Y2018/M06/D26/" | 83 | exDir, propsFile :: FilePath
exDir = "Y2018/M06/D26/" | 53 | exDir = "Y2018/M06/D26/" | 24 | true | true | 2 | 6 | 13 | 25 | 10 | 15 | null | null |
tjakway/ghcjvm | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprImm :: Imm -> SDoc
pprImm (ImmInt i) = int i | 52 | pprImm :: Imm -> SDoc
pprImm (ImmInt i) = int i | 51 | pprImm (ImmInt i) = int i | 29 | false | true | 0 | 9 | 15 | 32 | 14 | 18 | null | null |
sopvop/cabal | Cabal/Distribution/Simple/LHC.hs | bsd-3-clause | substTopDir :: FilePath -> InstalledPackageInfo -> InstalledPackageInfo
substTopDir topDir ipo
= ipo {
InstalledPackageInfo.importDirs
= map f (InstalledPackageInfo.importDirs ipo),
InstalledPackageInfo.libraryDirs
= map f (InstalledPackageInfo.libraryDirs ipo),
InstalledPack... | 928 | substTopDir :: FilePath -> InstalledPackageInfo -> InstalledPackageInfo
substTopDir topDir ipo
= ipo {
InstalledPackageInfo.importDirs
= map f (InstalledPackageInfo.importDirs ipo),
InstalledPackageInfo.libraryDirs
= map f (InstalledPackageInfo.libraryDirs ipo),
InstalledPack... | 928 | substTopDir topDir ipo
= ipo {
InstalledPackageInfo.importDirs
= map f (InstalledPackageInfo.importDirs ipo),
InstalledPackageInfo.libraryDirs
= map f (InstalledPackageInfo.libraryDirs ipo),
InstalledPackageInfo.includeDirs
= map f (InstalledPackageInfo.includeDirs... | 856 | false | true | 1 | 13 | 200 | 210 | 110 | 100 | null | null |
ghorn/ois-input-manager | src/Key.hs | bsd-3-clause | decodeKey 29 = KC_LCONTROL | 26 | decodeKey 29 = KC_LCONTROL | 26 | decodeKey 29 = KC_LCONTROL | 26 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
edsko/cabal | cabal-install/Distribution/Client/Dependency/TopDown.hs | bsd-3-clause | -- ------------------------------------------------------------
-- * Traverse a search tree
-- ------------------------------------------------------------
explore :: (PackageName -> PackagePreferences)
-> SearchSpace (SelectedPackages, Constraints, SelectionChanges)
SelectablePackage
... | 434 | explore :: (PackageName -> PackagePreferences)
-> SearchSpace (SelectedPackages, Constraints, SelectionChanges)
SelectablePackage
-> Progress Log Failure (SelectedPackages, Constraints)
explore _ (Failure failure) = Fail failure | 276 | explore _ (Failure failure) = Fail failure | 51 | true | true | 0 | 8 | 83 | 70 | 38 | 32 | null | null |
timtylin/scholdoc-citeproc | src/Text/CSL/Eval/Date.hs | bsd-3-clause | ordinal ts v s
| length s == 1 = let a = termPlural (getWith1 s) in
if a == [] then setOrd (term []) else s ++ a
| length s == 2 = let a = termPlural (getWith2 s)
b = getWith1 [last s] in
if a /= []
then s ++ a
... | 1,066 | ordinal ts v s
| length s == 1 = let a = termPlural (getWith1 s) in
if a == [] then setOrd (term []) else s ++ a
| length s == 2 = let a = termPlural (getWith2 s)
b = getWith1 [last s] in
if a /= []
then s ++ a
... | 1,066 | ordinal ts v s
| length s == 1 = let a = termPlural (getWith1 s) in
if a == [] then setOrd (term []) else s ++ a
| length s == 2 = let a = termPlural (getWith2 s)
b = getWith1 [last s] in
if a /= []
then s ++ a
... | 1,066 | false | false | 0 | 15 | 485 | 413 | 202 | 211 | null | null |
jcberentsen/causality | tests/MontyHallTests.hs | bsd-3-clause | monty_hall_test_group = $(testGroupGenerator) | 45 | monty_hall_test_group = $(testGroupGenerator) | 45 | monty_hall_test_group = $(testGroupGenerator) | 45 | false | false | 0 | 7 | 2 | 14 | 6 | 8 | null | null |
fmapfmapfmap/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/Types/Product.hs | mpl-2.0 | -- | The metric.
--
-- - 'GroupMinSize'
--
-- - 'GroupMaxSize'
--
-- - 'GroupDesiredCapacity'
--
-- - 'GroupInServiceInstances'
--
-- - 'GroupPendingInstances'
--
-- - 'GroupStandbyInstances'
--
-- - 'GroupTerminatingInstances'
--
-- - 'GroupTotalInstances'
--
mctMetric :: Lens' MetricCollectionType (Ma... | 386 | mctMetric :: Lens' MetricCollectionType (Maybe Text)
mctMetric = lens _mctMetric (\ s a -> s{_mctMetric = a}) | 109 | mctMetric = lens _mctMetric (\ s a -> s{_mctMetric = a}) | 56 | true | true | 1 | 9 | 69 | 68 | 42 | 26 | null | null |
DavidAlphaFox/darcs | containers-0.5.2.1/Darcs/Data/Map/Base.hs | gpl-2.0 | validsize :: Map a b -> Bool
validsize t
= (realsize t == Just (size t))
where
realsize t'
= case t' of
Tip -> Just 0
Bin sz _ _ l r -> case (realsize l,realsize r) of
(Just n,Just m) | n+m+1 == sz -> Just sz
_ ... | 507 | validsize :: Map a b -> Bool
validsize t
= (realsize t == Just (size t))
where
realsize t'
= case t' of
Tip -> Just 0
Bin sz _ _ l r -> case (realsize l,realsize r) of
(Just n,Just m) | n+m+1 == sz -> Just sz
_ ... | 507 | validsize t
= (realsize t == Just (size t))
where
realsize t'
= case t' of
Tip -> Just 0
Bin sz _ _ l r -> case (realsize l,realsize r) of
(Just n,Just m) | n+m+1 == sz -> Just sz
_ -> No... | 478 | false | true | 1 | 16 | 190 | 154 | 70 | 84 | null | null |
Lysxia/twentyseven | test/Test.hs | mit | testGenerator :: (Eq a, Show a) => Gen a -> (a -> Maybe b) -> Test
testGenerator gen p = testProperty "generator" $ forAll gen (isJust . p) | 139 | testGenerator :: (Eq a, Show a) => Gen a -> (a -> Maybe b) -> Test
testGenerator gen p = testProperty "generator" $ forAll gen (isJust . p) | 139 | testGenerator gen p = testProperty "generator" $ forAll gen (isJust . p) | 72 | false | true | 0 | 10 | 27 | 71 | 35 | 36 | null | null |
acowley/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprInfixExp (ConE v) = pprName' Infix v | 39 | pprInfixExp (ConE v) = pprName' Infix v | 39 | pprInfixExp (ConE v) = pprName' Infix v | 39 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
keithodulaigh/Hets | QBF/ProverState.hs | gpl-2.0 | {- |
Inserts a named SoftFOL term into SoftFOL prover state.
-}
insertSentence :: QBFProverState -- ^ prover state containing the axioms
-> AS_Anno.Named AS.FORMULA -- ^ formula to add
-> QBFProverState
insertSentence pst f = pst { initialAxioms = initialAxioms pst ++ [f] } | 312 | insertSentence :: QBFProverState -- ^ prover state containing the axioms
-> AS_Anno.Named AS.FORMULA -- ^ formula to add
-> QBFProverState
insertSentence pst f = pst { initialAxioms = initialAxioms pst ++ [f] } | 246 | insertSentence pst f = pst { initialAxioms = initialAxioms pst ++ [f] } | 71 | true | true | 0 | 9 | 82 | 61 | 30 | 31 | null | null |
fmapfmapfmap/amazonka | amazonka-rds/gen/Network/AWS/RDS/CreateEventSubscription.hs | mpl-2.0 | -- | A list of event categories for a SourceType that you want to subscribe
-- to. You can see a list of the categories for a given SourceType in the
-- <http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html Events>
-- topic in the Amazon RDS User Guide or by using the
-- __DescribeEventCategories__ ac... | 489 | cesEventCategories :: Lens' CreateEventSubscription [Text]
cesEventCategories = lens _cesEventCategories (\ s a -> s{_cesEventCategories = a}) . _Default . _Coerce | 163 | cesEventCategories = lens _cesEventCategories (\ s a -> s{_cesEventCategories = a}) . _Default . _Coerce | 104 | true | true | 0 | 11 | 68 | 55 | 32 | 23 | null | null |
grwlf/cake3 | src/Development/Cake3/Ext/UrWeb.hs | bsd-3-clause | addPatch :: (Monad m) => File -> UrpGen m ()
addPatch f = modify $ \u -> u { patches = f : (patches u) } | 104 | addPatch :: (Monad m) => File -> UrpGen m ()
addPatch f = modify $ \u -> u { patches = f : (patches u) } | 104 | addPatch f = modify $ \u -> u { patches = f : (patches u) } | 59 | false | true | 2 | 11 | 25 | 67 | 33 | 34 | null | null |
noteed/curved | Curved/Httpd.hs | bsd-3-clause | sinCsv :: Handler App App ()
sinCsv = do
now <- floor . toRational <$> liftIO getPOSIXTime
let dat = concat . map l . zip [now-299..(now::Int)] $
map (sin . (/ 10) . fromIntegral) [now..]
l (a, b) = show a ++ "," ++ show (b::Double) ++ "\n"
writeBS $ "date,close\n" `B.append` B.pack dat | 307 | sinCsv :: Handler App App ()
sinCsv = do
now <- floor . toRational <$> liftIO getPOSIXTime
let dat = concat . map l . zip [now-299..(now::Int)] $
map (sin . (/ 10) . fromIntegral) [now..]
l (a, b) = show a ++ "," ++ show (b::Double) ++ "\n"
writeBS $ "date,close\n" `B.append` B.pack dat | 307 | sinCsv = do
now <- floor . toRational <$> liftIO getPOSIXTime
let dat = concat . map l . zip [now-299..(now::Int)] $
map (sin . (/ 10) . fromIntegral) [now..]
l (a, b) = show a ++ "," ++ show (b::Double) ++ "\n"
writeBS $ "date,close\n" `B.append` B.pack dat | 278 | false | true | 0 | 15 | 74 | 161 | 82 | 79 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | showSecNum :: [Int] -> String
showSecNum = concat . intersperse "." . map show | 78 | showSecNum :: [Int] -> String
showSecNum = concat . intersperse "." . map show | 78 | showSecNum = concat . intersperse "." . map show | 48 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
plaprade/haskoin | haskoin-core/src/Network/Haskoin/Constants.hs | unlicense | -- | Version 4 blocks start here.
bip66Height :: BlockHeight
bip66Height = getBip66Height getNetwork | 100 | bip66Height :: BlockHeight
bip66Height = getBip66Height getNetwork | 66 | bip66Height = getBip66Height getNetwork | 39 | true | true | 0 | 6 | 13 | 21 | 9 | 12 | null | null |
sifisifi/subscribe-jpsubreddits | src/Subscriber/Generate.hs | mit | generate :: [Subreddit] -> BS.ByteString
generate = TE.encodeUtf8 . js . toList | 79 | generate :: [Subreddit] -> BS.ByteString
generate = TE.encodeUtf8 . js . toList | 79 | generate = TE.encodeUtf8 . js . toList | 38 | false | true | 0 | 7 | 11 | 30 | 16 | 14 | null | null |
uws-eresearch/docx2pandoc | src/Text/Pandoc/Readers/DocX/Lists.hs | gpl-2.0 | plainParaInlines _ = [] | 23 | plainParaInlines _ = [] | 23 | plainParaInlines _ = [] | 23 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
probcomp/haxcat | Types.hs | apache-2.0 | cc_insert_col_from_prior ::
forall m stats a. (Show m, Show stats, CompoundModel m stats a) =>
m -> ColID -> ColumnData a -> Crosscat a -> RVar (Crosscat a)
-- This is almost the same as col_step (after unincorporation), except
-- it ignores the likelihoods of the existing views and assigns the
-- column accord... | 1,146 | cc_insert_col_from_prior ::
forall m stats a. (Show m, Show stats, CompoundModel m stats a) =>
m -> ColID -> ColumnData a -> Crosscat a -> RVar (Crosscat a)
cc_insert_col_from_prior hypers col_id d cc@Crosscat{..} = do
-- TODO Can we avoid sampling a candidate view if the column gets
-- added to an existing... | 835 | cc_insert_col_from_prior hypers col_id d cc@Crosscat{..} = do
-- TODO Can we avoid sampling a candidate view if the column gets
-- added to an existing view? Will laziness just do that?
let prior_weights = crp_seq_weights cc_partition
view_id <- flipweights $ map swap prior_weights
candidate_view <- view_emp... | 670 | true | true | 19 | 9 | 223 | 261 | 140 | 121 | null | null |
mpickering/hackage-server | Distribution/Server/Features/UserDetails.hs | bsd-3-clause | replaceUserDetailsTable :: UserDetailsTable -> Update UserDetailsTable ()
replaceUserDetailsTable = put | 103 | replaceUserDetailsTable :: UserDetailsTable -> Update UserDetailsTable ()
replaceUserDetailsTable = put | 103 | replaceUserDetailsTable = put | 29 | false | true | 0 | 7 | 9 | 22 | 11 | 11 | null | null |
guoguo12/haskell-ptable | ptable.hs | apache-2.0 | gnum "Sb" = 15 | 14 | gnum "Sb" = 15 | 14 | gnum "Sb" = 15 | 14 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
dylanaraps/pywal | pywal/templates/colors.hs | mit | color4="{color4}" | 17 | color4="{color4}" | 17 | color4="{color4}" | 17 | false | false | 1 | 5 | 0 | 11 | 3 | 8 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/EspGrid.hs | gpl-3.0 | tidalEspGridLink :: MVar Tempo -> IO ()
tidalEspGridLink _ = putStrLn "Function no longer supported, please use 'espgrid tidal' to connect to ESPgrid instead." | 160 | tidalEspGridLink :: MVar Tempo -> IO ()
tidalEspGridLink _ = putStrLn "Function no longer supported, please use 'espgrid tidal' to connect to ESPgrid instead." | 159 | tidalEspGridLink _ = putStrLn "Function no longer supported, please use 'espgrid tidal' to connect to ESPgrid instead." | 119 | false | true | 0 | 7 | 24 | 29 | 13 | 16 | null | null |
jsl/Euchre | Euchre.hs | mit | -- | Returns the cards currently in the given Player's hand.
playerHand :: Player -> Hand -> V.Vector Card
playerHand player hand = holdings hand V.! playerNumber player | 169 | playerHand :: Player -> Hand -> V.Vector Card
playerHand player hand = holdings hand V.! playerNumber player | 108 | playerHand player hand = holdings hand V.! playerNumber player | 62 | true | true | 0 | 8 | 27 | 42 | 20 | 22 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.