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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ezyang/ghc | compiler/prelude/THNames.hs | bsd-3-clause | instanceWithOverlapDName = libFun (fsLit "instanceWithOverlapD") instanceWithOverlapDIdKey | 106 | instanceWithOverlapDName = libFun (fsLit "instanceWithOverlapD") instanceWithOverlapDIdKey | 106 | instanceWithOverlapDName = libFun (fsLit "instanceWithOverlapD") instanceWithOverlapDIdKey | 106 | false | false | 0 | 7 | 21 | 17 | 8 | 9 | null | null |
thomie/vector | Data/Vector/Primitive.hs | bsd-3-clause | (++) = (G.++) | 13 | (++) = (G.++) | 13 | (++) = (G.++) | 13 | false | false | 0 | 5 | 2 | 12 | 8 | 4 | null | null |
SneakingCat/proper-play-gen | src/ErlangWriter.hs | gpl-3.0 | renderFunctionHead :: String -> Int -> StringWriter
renderFunctionHead f l = tell $ f ++ "(" ++ formalArgs l ++ ") ->\n"
where
formalArgs :: Int -> String
formalArgs 0 = ""
formalArgs 1 = "Arg1"
formalArgs n = foldl appendFormalArg "Arg1" [2..n]
appendFormalArg :: String -> Int -> String
appendFormalArg acc n = acc ++ ",Arg" ++ show n | 367 | renderFunctionHead :: String -> Int -> StringWriter
renderFunctionHead f l = tell $ f ++ "(" ++ formalArgs l ++ ") ->\n"
where
formalArgs :: Int -> String
formalArgs 0 = ""
formalArgs 1 = "Arg1"
formalArgs n = foldl appendFormalArg "Arg1" [2..n]
appendFormalArg :: String -> Int -> String
appendFormalArg acc n = acc ++ ",Arg" ++ show n | 367 | renderFunctionHead f l = tell $ f ++ "(" ++ formalArgs l ++ ") ->\n"
where
formalArgs :: Int -> String
formalArgs 0 = ""
formalArgs 1 = "Arg1"
formalArgs n = foldl appendFormalArg "Arg1" [2..n]
appendFormalArg :: String -> Int -> String
appendFormalArg acc n = acc ++ ",Arg" ++ show n | 315 | false | true | 0 | 8 | 90 | 125 | 62 | 63 | null | null |
haskoin/haskoin | src/Haskoin/Util.hs | unlicense | putInt64be :: MonadPut m => Int64 -> m ()
putInt64be n
| n < 0 = putWord64be (complement (fromIntegral (abs n)) + 1)
| otherwise = putWord64be (fromIntegral (abs n)) | 173 | putInt64be :: MonadPut m => Int64 -> m ()
putInt64be n
| n < 0 = putWord64be (complement (fromIntegral (abs n)) + 1)
| otherwise = putWord64be (fromIntegral (abs n)) | 173 | putInt64be n
| n < 0 = putWord64be (complement (fromIntegral (abs n)) + 1)
| otherwise = putWord64be (fromIntegral (abs n)) | 131 | false | true | 1 | 13 | 37 | 91 | 42 | 49 | null | null |
lamdu/lamdu | src/Lamdu/Eval/JS/Compiler.hs | gpl-3.0 | lam ::
Monad m => Text ->
(JSS.Expression () -> M m [JSS.Statement ()]) ->
M m (JSS.Expression ())
lam prefix code =
do
var <- freshName prefix <&> Text.unpack <&> JS.ident
code (JS.var var) <&> JS.lambda [var] | 242 | lam ::
Monad m => Text ->
(JSS.Expression () -> M m [JSS.Statement ()]) ->
M m (JSS.Expression ())
lam prefix code =
do
var <- freshName prefix <&> Text.unpack <&> JS.ident
code (JS.var var) <&> JS.lambda [var] | 242 | lam prefix code =
do
var <- freshName prefix <&> Text.unpack <&> JS.ident
code (JS.var var) <&> JS.lambda [var] | 131 | false | true | 0 | 13 | 69 | 129 | 59 | 70 | null | null |
Heather/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectBinderQuote q ty unq (Let x y)
= reflCall "Let" [Var ty, q unq x, q unq y] | 84 | reflectBinderQuote q ty unq (Let x y)
= reflCall "Let" [Var ty, q unq x, q unq y] | 84 | reflectBinderQuote q ty unq (Let x y)
= reflCall "Let" [Var ty, q unq x, q unq y] | 84 | false | false | 0 | 7 | 20 | 50 | 24 | 26 | null | null |
oldmanmike/ghc | utils/genapply/Main.hs | bsd-3-clause | regRep ('F':_) = "F_" | 21 | regRep ('F':_) = "F_" | 21 | regRep ('F':_) = "F_" | 21 | false | false | 0 | 7 | 3 | 16 | 8 | 8 | null | null |
tomberek/RETE | src/RETE/Lib5.hs | bsd-3-clause | h a = LHS2 $ Hole (H a []) | 26 | h a = LHS2 $ Hole (H a []) | 26 | h a = LHS2 $ Hole (H a []) | 26 | false | false | 3 | 7 | 8 | 30 | 12 | 18 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4345 = 4344 | 11 | 4345 = 4344 | 11 | 4345 = 4344 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ducis/haAni | hs/common/Graphics/UI/GLUT/Callbacks/Window.hs | gpl-2.0 | -- | Controls the tablet callback for the /current window./ The tablet callback
-- for a window is called when the window has tablet input focus (normally, when
-- the mouse is in the window) and the user generates tablet motion or button
-- presses. The number of available tablet buttons can be determined with
-- 'Graphics.UI.GLUT.State.numTabletButtons'.
--
-- Registering a tablet callback when a tablet device is not available is
-- ineffectual and not an error. In this case, no tablet callbacks will be
-- generated.
tabletCallback :: SettableStateVar (Maybe TabletCallback)
tabletCallback = makeSettableStateVar setTabletCallback | 639 | tabletCallback :: SettableStateVar (Maybe TabletCallback)
tabletCallback = makeSettableStateVar setTabletCallback | 113 | tabletCallback = makeSettableStateVar setTabletCallback | 55 | true | true | 0 | 7 | 96 | 32 | 20 | 12 | null | null |
bitemyapp/chip-8 | src/CPU/Bits.hs | bsd-3-clause | mergeList16 [x] = [merge16 x 0] | 31 | mergeList16 [x] = [merge16 x 0] | 31 | mergeList16 [x] = [merge16 x 0] | 31 | false | false | 0 | 6 | 5 | 20 | 10 | 10 | null | null |
olsner/ghc | compiler/nativeGen/Instruction.hs | bsd-3-clause | -- | Returns the info table associated with the CmmDecl's entry point,
-- if any.
topInfoTable :: GenCmmDecl a (LabelMap i) (ListGraph b) -> Maybe i
topInfoTable (CmmProc infos _ _ (ListGraph (b:_)))
= mapLookup (blockId b) infos | 231 | topInfoTable :: GenCmmDecl a (LabelMap i) (ListGraph b) -> Maybe i
topInfoTable (CmmProc infos _ _ (ListGraph (b:_)))
= mapLookup (blockId b) infos | 149 | topInfoTable (CmmProc infos _ _ (ListGraph (b:_)))
= mapLookup (blockId b) infos | 82 | true | true | 0 | 11 | 39 | 78 | 39 | 39 | null | null |
paulrzcz/takusen-oracle | Database/Oracle/OCIFunctions.hs | bsd-3-clause | fferToDouble :: ForeignPtr CShort -> BufferFPtr -> IO (Maybe Double)
bufferToDouble nullind b = do
cdbl <- bufferToCDouble nullind b
return $ maybe Nothing (Just . realToFrac) cdbl
| 189 | bufferToDouble :: ForeignPtr CShort -> BufferFPtr -> IO (Maybe Double)
bufferToDouble nullind b = do
cdbl <- bufferToCDouble nullind b
return $ maybe Nothing (Just . realToFrac) cdbl | 188 | bufferToDouble nullind b = do
cdbl <- bufferToCDouble nullind b
return $ maybe Nothing (Just . realToFrac) cdbl | 117 | false | true | 0 | 10 | 36 | 73 | 33 | 40 | null | null |
koba-e964/hayashii-mcc | Typing.hs | bsd-3-clause | assign (Cmp op e1 e2) = Cmp op <$> assign e1 <*> assign e2 | 58 | assign (Cmp op e1 e2) = Cmp op <$> assign e1 <*> assign e2 | 58 | assign (Cmp op e1 e2) = Cmp op <$> assign e1 <*> assign e2 | 58 | false | false | 0 | 7 | 13 | 36 | 16 | 20 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects ReadArrayArrayOp_MutableArrayArray = True | 62 | primOpHasSideEffects ReadArrayArrayOp_MutableArrayArray = True | 62 | primOpHasSideEffects ReadArrayArrayOp_MutableArrayArray = True | 62 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
plow-technologies/distributed-simple-cell | src/SimpleStore/Cell/Distributed.hs | mit | withStores :: (SimpleCellConstraint c k src dst tm st, ToJSON st, FromJSON st, Eq st, Show st, UrlList urllist) => [st] ->
(forall (phantom :: *) . (LocalStoreM stack urllist st a -> LocalStoreM (phantom ': stack) urllist st a) -> [(st, LocalStore (phantom ': stack) st)] -> LocalStoreM (phantom ': stack) urllist st a) -> LocalStoreM stack urllist st (Either String a)
withStores states storesAction = LocalStoreM $ do
localCell <- asks localCell
runEitherT $ do
stateStores <- mapM (\state ->
(EitherT $ liftIO $ fmap (maybe (Left "Store not found locally") Right)
$ getStore localCell state)
`mplus` (EitherT $ tryRetrieveStore state
(\storeState -> liftIO $ insertStore localCell storeState
>>= either (return . Left . show) (return . Right)))
`mplus` (EitherT $ liftIO $ fmap (either (Left . show) Right)
$ insertStore localCell state)) states
lift $ unLocalStoreM $ storesAction (LocalStoreM . unLocalStoreM) $ zip states $ map LocalStore stateStores | 1,262 | withStores :: (SimpleCellConstraint c k src dst tm st, ToJSON st, FromJSON st, Eq st, Show st, UrlList urllist) => [st] ->
(forall (phantom :: *) . (LocalStoreM stack urllist st a -> LocalStoreM (phantom ': stack) urllist st a) -> [(st, LocalStore (phantom ': stack) st)] -> LocalStoreM (phantom ': stack) urllist st a) -> LocalStoreM stack urllist st (Either String a)
withStores states storesAction = LocalStoreM $ do
localCell <- asks localCell
runEitherT $ do
stateStores <- mapM (\state ->
(EitherT $ liftIO $ fmap (maybe (Left "Store not found locally") Right)
$ getStore localCell state)
`mplus` (EitherT $ tryRetrieveStore state
(\storeState -> liftIO $ insertStore localCell storeState
>>= either (return . Left . show) (return . Right)))
`mplus` (EitherT $ liftIO $ fmap (either (Left . show) Right)
$ insertStore localCell state)) states
lift $ unLocalStoreM $ storesAction (LocalStoreM . unLocalStoreM) $ zip states $ map LocalStore stateStores | 1,262 | withStores states storesAction = LocalStoreM $ do
localCell <- asks localCell
runEitherT $ do
stateStores <- mapM (\state ->
(EitherT $ liftIO $ fmap (maybe (Left "Store not found locally") Right)
$ getStore localCell state)
`mplus` (EitherT $ tryRetrieveStore state
(\storeState -> liftIO $ insertStore localCell storeState
>>= either (return . Left . show) (return . Right)))
`mplus` (EitherT $ liftIO $ fmap (either (Left . show) Right)
$ insertStore localCell state)) states
lift $ unLocalStoreM $ storesAction (LocalStoreM . unLocalStoreM) $ zip states $ map LocalStore stateStores | 889 | false | true | 0 | 26 | 456 | 411 | 209 | 202 | null | null |
nevrenato/Hets_Fork | CASL/OMDocImport.hs | gpl-2.0 | addMaybeToSortRel :: Env -> Rel.Rel SORT -> TCElement -> Result (Rel.Rel SORT)
addMaybeToSortRel e r (TCSymbol n (OMA [sof, oms1, oms2]) Axiom _) =
case nameDecode n of
Just ("ST", _)
| sof == const_subsortof ->
let s1 = lookupSortOMS "addMaybeToSortRel: s1" e oms1
s2 = lookupSortOMS "addMaybeToSortRel: s2" e oms2
in return $ Rel.insertKeyOrPair s1 s2 r
| otherwise ->
do
warning () ("Use of subsortof in a non ST Statement: " ++ n)
nullRange
return r
_ -> return r | 619 | addMaybeToSortRel :: Env -> Rel.Rel SORT -> TCElement -> Result (Rel.Rel SORT)
addMaybeToSortRel e r (TCSymbol n (OMA [sof, oms1, oms2]) Axiom _) =
case nameDecode n of
Just ("ST", _)
| sof == const_subsortof ->
let s1 = lookupSortOMS "addMaybeToSortRel: s1" e oms1
s2 = lookupSortOMS "addMaybeToSortRel: s2" e oms2
in return $ Rel.insertKeyOrPair s1 s2 r
| otherwise ->
do
warning () ("Use of subsortof in a non ST Statement: " ++ n)
nullRange
return r
_ -> return r | 619 | addMaybeToSortRel e r (TCSymbol n (OMA [sof, oms1, oms2]) Axiom _) =
case nameDecode n of
Just ("ST", _)
| sof == const_subsortof ->
let s1 = lookupSortOMS "addMaybeToSortRel: s1" e oms1
s2 = lookupSortOMS "addMaybeToSortRel: s2" e oms2
in return $ Rel.insertKeyOrPair s1 s2 r
| otherwise ->
do
warning () ("Use of subsortof in a non ST Statement: " ++ n)
nullRange
return r
_ -> return r | 540 | false | true | 4 | 11 | 233 | 187 | 90 | 97 | null | null |
IvanShymanovich/FCM | src/FCM/FCM.hs | mit | randMatrix :: Int -> Int -> IO [[Double]]
randMatrix clusterCount vectorCount = do
row <- randRow $ clusterCount * vectorCount
return $ map (\ row -> map (/ (sum row)) row) (chunksOf clusterCount row) | 208 | randMatrix :: Int -> Int -> IO [[Double]]
randMatrix clusterCount vectorCount = do
row <- randRow $ clusterCount * vectorCount
return $ map (\ row -> map (/ (sum row)) row) (chunksOf clusterCount row) | 208 | randMatrix clusterCount vectorCount = do
row <- randRow $ clusterCount * vectorCount
return $ map (\ row -> map (/ (sum row)) row) (chunksOf clusterCount row) | 166 | false | true | 0 | 15 | 41 | 96 | 47 | 49 | null | null |
polarina/sdl2 | Graphics/UI/SDL/Thread.hs | bsd-3-clause | unlockMutex :: MonadIO m => Ptr Mutex -> m CInt
unlockMutex v1 = liftIO $ unlockMutex' v1 | 89 | unlockMutex :: MonadIO m => Ptr Mutex -> m CInt
unlockMutex v1 = liftIO $ unlockMutex' v1 | 89 | unlockMutex v1 = liftIO $ unlockMutex' v1 | 41 | false | true | 0 | 7 | 16 | 38 | 17 | 21 | null | null |
atsukotakahashi/wi | src/library/Yi/File.hs | gpl-2.0 | backupE :: FilePath -> YiM ()
backupE = error "backupE not implemented" | 71 | backupE :: FilePath -> YiM ()
backupE = error "backupE not implemented" | 71 | backupE = error "backupE not implemented" | 41 | false | true | 0 | 7 | 11 | 23 | 11 | 12 | null | null |
jaspervdj/patat | lib/Patat/Theme.hs | gpl-2.0 | sgrToString _ = Nothing | 23 | sgrToString _ = Nothing | 23 | sgrToString _ = Nothing | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | par1TyConKey = mkPreludeTyConUnique 137 | 40 | par1TyConKey = mkPreludeTyConUnique 137 | 40 | par1TyConKey = mkPreludeTyConUnique 137 | 40 | false | false | 1 | 5 | 4 | 12 | 4 | 8 | null | null |
yamadapc/hzulip | src/Web/HZulip.hs | gpl-2.0 | runZulip :: ZulipM a -> ZulipOptions -> IO a
runZulip = runReaderT | 66 | runZulip :: ZulipM a -> ZulipOptions -> IO a
runZulip = runReaderT | 66 | runZulip = runReaderT | 21 | false | true | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
lfritz/python-type-inference | python-type-inference/src/Language/Python/TypeInference/Analysis/TypeLattice.hs | bsd-3-clause | isSequence _ = False | 20 | isSequence _ = False | 20 | isSequence _ = False | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ezyang/ghc | compiler/cmm/CmmMachOp.hs | bsd-3-clause | machOpResultType :: DynFlags -> MachOp -> [CmmType] -> CmmType
machOpResultType dflags mop tys =
case mop of
MO_Add {} -> ty1 -- Preserve GC-ptr-hood
MO_Sub {} -> ty1 -- of first arg
MO_Mul r -> cmmBits r
MO_S_MulMayOflo r -> cmmBits r
MO_S_Quot r -> cmmBits r
MO_S_Rem r -> cmmBits r
MO_S_Neg r -> cmmBits r
MO_U_MulMayOflo r -> cmmBits r
MO_U_Quot r -> cmmBits r
MO_U_Rem r -> cmmBits r
MO_Eq {} -> comparisonResultRep dflags
MO_Ne {} -> comparisonResultRep dflags
MO_S_Ge {} -> comparisonResultRep dflags
MO_S_Le {} -> comparisonResultRep dflags
MO_S_Gt {} -> comparisonResultRep dflags
MO_S_Lt {} -> comparisonResultRep dflags
MO_U_Ge {} -> comparisonResultRep dflags
MO_U_Le {} -> comparisonResultRep dflags
MO_U_Gt {} -> comparisonResultRep dflags
MO_U_Lt {} -> comparisonResultRep dflags
MO_F_Add r -> cmmFloat r
MO_F_Sub r -> cmmFloat r
MO_F_Mul r -> cmmFloat r
MO_F_Quot r -> cmmFloat r
MO_F_Neg r -> cmmFloat r
MO_F_Eq {} -> comparisonResultRep dflags
MO_F_Ne {} -> comparisonResultRep dflags
MO_F_Ge {} -> comparisonResultRep dflags
MO_F_Le {} -> comparisonResultRep dflags
MO_F_Gt {} -> comparisonResultRep dflags
MO_F_Lt {} -> comparisonResultRep dflags
MO_And {} -> ty1 -- Used for pointer masking
MO_Or {} -> ty1
MO_Xor {} -> ty1
MO_Not r -> cmmBits r
MO_Shl r -> cmmBits r
MO_U_Shr r -> cmmBits r
MO_S_Shr r -> cmmBits r
MO_SS_Conv _ to -> cmmBits to
MO_UU_Conv _ to -> cmmBits to
MO_FS_Conv _ to -> cmmBits to
MO_SF_Conv _ to -> cmmFloat to
MO_FF_Conv _ to -> cmmFloat to
MO_V_Insert l w -> cmmVec l (cmmBits w)
MO_V_Extract _ w -> cmmBits w
MO_V_Add l w -> cmmVec l (cmmBits w)
MO_V_Sub l w -> cmmVec l (cmmBits w)
MO_V_Mul l w -> cmmVec l (cmmBits w)
MO_VS_Quot l w -> cmmVec l (cmmBits w)
MO_VS_Rem l w -> cmmVec l (cmmBits w)
MO_VS_Neg l w -> cmmVec l (cmmBits w)
MO_VU_Quot l w -> cmmVec l (cmmBits w)
MO_VU_Rem l w -> cmmVec l (cmmBits w)
MO_VF_Insert l w -> cmmVec l (cmmFloat w)
MO_VF_Extract _ w -> cmmFloat w
MO_VF_Add l w -> cmmVec l (cmmFloat w)
MO_VF_Sub l w -> cmmVec l (cmmFloat w)
MO_VF_Mul l w -> cmmVec l (cmmFloat w)
MO_VF_Quot l w -> cmmVec l (cmmFloat w)
MO_VF_Neg l w -> cmmVec l (cmmFloat w)
MO_AlignmentCheck _ _ -> ty1
where
(ty1:_) = tys | 2,898 | machOpResultType :: DynFlags -> MachOp -> [CmmType] -> CmmType
machOpResultType dflags mop tys =
case mop of
MO_Add {} -> ty1 -- Preserve GC-ptr-hood
MO_Sub {} -> ty1 -- of first arg
MO_Mul r -> cmmBits r
MO_S_MulMayOflo r -> cmmBits r
MO_S_Quot r -> cmmBits r
MO_S_Rem r -> cmmBits r
MO_S_Neg r -> cmmBits r
MO_U_MulMayOflo r -> cmmBits r
MO_U_Quot r -> cmmBits r
MO_U_Rem r -> cmmBits r
MO_Eq {} -> comparisonResultRep dflags
MO_Ne {} -> comparisonResultRep dflags
MO_S_Ge {} -> comparisonResultRep dflags
MO_S_Le {} -> comparisonResultRep dflags
MO_S_Gt {} -> comparisonResultRep dflags
MO_S_Lt {} -> comparisonResultRep dflags
MO_U_Ge {} -> comparisonResultRep dflags
MO_U_Le {} -> comparisonResultRep dflags
MO_U_Gt {} -> comparisonResultRep dflags
MO_U_Lt {} -> comparisonResultRep dflags
MO_F_Add r -> cmmFloat r
MO_F_Sub r -> cmmFloat r
MO_F_Mul r -> cmmFloat r
MO_F_Quot r -> cmmFloat r
MO_F_Neg r -> cmmFloat r
MO_F_Eq {} -> comparisonResultRep dflags
MO_F_Ne {} -> comparisonResultRep dflags
MO_F_Ge {} -> comparisonResultRep dflags
MO_F_Le {} -> comparisonResultRep dflags
MO_F_Gt {} -> comparisonResultRep dflags
MO_F_Lt {} -> comparisonResultRep dflags
MO_And {} -> ty1 -- Used for pointer masking
MO_Or {} -> ty1
MO_Xor {} -> ty1
MO_Not r -> cmmBits r
MO_Shl r -> cmmBits r
MO_U_Shr r -> cmmBits r
MO_S_Shr r -> cmmBits r
MO_SS_Conv _ to -> cmmBits to
MO_UU_Conv _ to -> cmmBits to
MO_FS_Conv _ to -> cmmBits to
MO_SF_Conv _ to -> cmmFloat to
MO_FF_Conv _ to -> cmmFloat to
MO_V_Insert l w -> cmmVec l (cmmBits w)
MO_V_Extract _ w -> cmmBits w
MO_V_Add l w -> cmmVec l (cmmBits w)
MO_V_Sub l w -> cmmVec l (cmmBits w)
MO_V_Mul l w -> cmmVec l (cmmBits w)
MO_VS_Quot l w -> cmmVec l (cmmBits w)
MO_VS_Rem l w -> cmmVec l (cmmBits w)
MO_VS_Neg l w -> cmmVec l (cmmBits w)
MO_VU_Quot l w -> cmmVec l (cmmBits w)
MO_VU_Rem l w -> cmmVec l (cmmBits w)
MO_VF_Insert l w -> cmmVec l (cmmFloat w)
MO_VF_Extract _ w -> cmmFloat w
MO_VF_Add l w -> cmmVec l (cmmFloat w)
MO_VF_Sub l w -> cmmVec l (cmmFloat w)
MO_VF_Mul l w -> cmmVec l (cmmFloat w)
MO_VF_Quot l w -> cmmVec l (cmmFloat w)
MO_VF_Neg l w -> cmmVec l (cmmFloat w)
MO_AlignmentCheck _ _ -> ty1
where
(ty1:_) = tys | 2,898 | machOpResultType dflags mop tys =
case mop of
MO_Add {} -> ty1 -- Preserve GC-ptr-hood
MO_Sub {} -> ty1 -- of first arg
MO_Mul r -> cmmBits r
MO_S_MulMayOflo r -> cmmBits r
MO_S_Quot r -> cmmBits r
MO_S_Rem r -> cmmBits r
MO_S_Neg r -> cmmBits r
MO_U_MulMayOflo r -> cmmBits r
MO_U_Quot r -> cmmBits r
MO_U_Rem r -> cmmBits r
MO_Eq {} -> comparisonResultRep dflags
MO_Ne {} -> comparisonResultRep dflags
MO_S_Ge {} -> comparisonResultRep dflags
MO_S_Le {} -> comparisonResultRep dflags
MO_S_Gt {} -> comparisonResultRep dflags
MO_S_Lt {} -> comparisonResultRep dflags
MO_U_Ge {} -> comparisonResultRep dflags
MO_U_Le {} -> comparisonResultRep dflags
MO_U_Gt {} -> comparisonResultRep dflags
MO_U_Lt {} -> comparisonResultRep dflags
MO_F_Add r -> cmmFloat r
MO_F_Sub r -> cmmFloat r
MO_F_Mul r -> cmmFloat r
MO_F_Quot r -> cmmFloat r
MO_F_Neg r -> cmmFloat r
MO_F_Eq {} -> comparisonResultRep dflags
MO_F_Ne {} -> comparisonResultRep dflags
MO_F_Ge {} -> comparisonResultRep dflags
MO_F_Le {} -> comparisonResultRep dflags
MO_F_Gt {} -> comparisonResultRep dflags
MO_F_Lt {} -> comparisonResultRep dflags
MO_And {} -> ty1 -- Used for pointer masking
MO_Or {} -> ty1
MO_Xor {} -> ty1
MO_Not r -> cmmBits r
MO_Shl r -> cmmBits r
MO_U_Shr r -> cmmBits r
MO_S_Shr r -> cmmBits r
MO_SS_Conv _ to -> cmmBits to
MO_UU_Conv _ to -> cmmBits to
MO_FS_Conv _ to -> cmmBits to
MO_SF_Conv _ to -> cmmFloat to
MO_FF_Conv _ to -> cmmFloat to
MO_V_Insert l w -> cmmVec l (cmmBits w)
MO_V_Extract _ w -> cmmBits w
MO_V_Add l w -> cmmVec l (cmmBits w)
MO_V_Sub l w -> cmmVec l (cmmBits w)
MO_V_Mul l w -> cmmVec l (cmmBits w)
MO_VS_Quot l w -> cmmVec l (cmmBits w)
MO_VS_Rem l w -> cmmVec l (cmmBits w)
MO_VS_Neg l w -> cmmVec l (cmmBits w)
MO_VU_Quot l w -> cmmVec l (cmmBits w)
MO_VU_Rem l w -> cmmVec l (cmmBits w)
MO_VF_Insert l w -> cmmVec l (cmmFloat w)
MO_VF_Extract _ w -> cmmFloat w
MO_VF_Add l w -> cmmVec l (cmmFloat w)
MO_VF_Sub l w -> cmmVec l (cmmFloat w)
MO_VF_Mul l w -> cmmVec l (cmmFloat w)
MO_VF_Quot l w -> cmmVec l (cmmFloat w)
MO_VF_Neg l w -> cmmVec l (cmmFloat w)
MO_AlignmentCheck _ _ -> ty1
where
(ty1:_) = tys | 2,835 | false | true | 0 | 10 | 1,102 | 962 | 434 | 528 | null | null |
sboosali/haddock | haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs | bsd-2-clause | toHack n nm (x:xs) = HackAppend (UntouchedDoc x) (toHack n nm xs) | 65 | toHack n nm (x:xs) = HackAppend (UntouchedDoc x) (toHack n nm xs) | 65 | toHack n nm (x:xs) = HackAppend (UntouchedDoc x) (toHack n nm xs) | 65 | false | false | 0 | 7 | 11 | 42 | 20 | 22 | null | null |
dylanmc/cryptol | src/Cryptol/Prims/Eval.hs | bsd-3-clause | divWrap x y = x `div` y | 23 | divWrap x y = x `div` y | 23 | divWrap x y = x `div` y | 23 | false | false | 1 | 5 | 6 | 24 | 10 | 14 | null | null |
CulpaBS/wbBach | src/Futhark/Binder.hs | bsd-3-clause | addBinderBinding :: (Annotations lore, Monad m) =>
Binding lore -> BinderT lore m ()
addBinderBinding binding = do
tell $ DL.singleton binding
BinderT $ modify (`HM.union` scopeOf binding) | 212 | addBinderBinding :: (Annotations lore, Monad m) =>
Binding lore -> BinderT lore m ()
addBinderBinding binding = do
tell $ DL.singleton binding
BinderT $ modify (`HM.union` scopeOf binding) | 212 | addBinderBinding binding = do
tell $ DL.singleton binding
BinderT $ modify (`HM.union` scopeOf binding) | 107 | false | true | 0 | 10 | 51 | 78 | 38 | 40 | null | null |
elfeck/elfeckcom | src/Web/GetHandler.hs | mit | handleGets :: [Route] -> String -> String -> BlogApp
handleGets staticRoutes rootDir filesDir = do
handleUploads filesDir
sequence_ $ map handleStaticSite staticRoutes
handleDrivel
handleDrivelEntry
handleLogin
handleLogout
handleEdit
handleUpload
handleWhyiliketrees rootDir
handleWhyiliketreesBare rootDir
handleLD29
handleUnknown
-- TODO: Content Type!!
-- TODO: send 404 error and also in Utils ~ send access HTML error
-- TODO: SUPER UGLY | 468 | handleGets :: [Route] -> String -> String -> BlogApp
handleGets staticRoutes rootDir filesDir = do
handleUploads filesDir
sequence_ $ map handleStaticSite staticRoutes
handleDrivel
handleDrivelEntry
handleLogin
handleLogout
handleEdit
handleUpload
handleWhyiliketrees rootDir
handleWhyiliketreesBare rootDir
handleLD29
handleUnknown
-- TODO: Content Type!!
-- TODO: send 404 error and also in Utils ~ send access HTML error
-- TODO: SUPER UGLY | 468 | handleGets staticRoutes rootDir filesDir = do
handleUploads filesDir
sequence_ $ map handleStaticSite staticRoutes
handleDrivel
handleDrivelEntry
handleLogin
handleLogout
handleEdit
handleUpload
handleWhyiliketrees rootDir
handleWhyiliketreesBare rootDir
handleLD29
handleUnknown
-- TODO: Content Type!!
-- TODO: send 404 error and also in Utils ~ send access HTML error
-- TODO: SUPER UGLY | 415 | false | true | 0 | 8 | 80 | 90 | 39 | 51 | null | null |
RayRacine/hsfca | src/Data/Fca/SetFastLattice.hs | agpl-3.0 | emptyG :: G o
emptyG = Set.empty | 32 | emptyG :: G o
emptyG = Set.empty | 32 | emptyG = Set.empty | 18 | false | true | 0 | 5 | 6 | 16 | 8 | 8 | null | null |
plow-technologies/ghcjs-hspec-json | test/Test/Hspec/Json/GHCJSSpec.hs | bsd-3-clause | spec :: Spec
spec = do
describe "genericToJSValTests" $ do
it "detects faulty ToJSVal instances" $ do
genericToJSValTests faultyProxy `shouldTestAs` Summary 1 1
it "creates passing tests for correct serialization" $ do
genericToJSValTests correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericToJSValTests correctSumProxy `shouldTestAs` Summary 1 0
describe "genericFromJSValTests" $ do
it "detects faulty FromJSVal instances" $ do
genericFromJSValTests faultyProxy `shouldTestAs` Summary 1 1
it "creates passing tests for correct serialization" $ do
genericFromJSValTests correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericFromJSValTests correctSumProxy `shouldTestAs` Summary 1 0
describe "genericAesonToJSVal" $ do
it "detects incompatible json encodings" $ do
genericAesonToJSVal faultyProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericAesonToJSVal correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericAesonToJSVal correctSumProxy `shouldTestAs` Summary 1 0
describe "genericJSValToAeson" $ do
it "detects incompatible json encodings" $ do
genericJSValToAeson faultyProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericJSValToAeson correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericJSValToAeson correctSumProxy `shouldTestAs` Summary 1 0
describe "genericJSValRoundtrip" $ do
it "detects incompatible json encodings" $ do
genericJSValRoundtrip faultyRoundtripProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericJSValRoundtrip correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericJSValRoundtrip correctSumProxy `shouldTestAs` Summary 1 0
describe "genericAesonRoundtrip" $ do
it "detects incompatible json encodings" $ do
genericAesonRoundtrip faultyRoundtripProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericAesonRoundtrip correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericAesonRoundtrip correctSumProxy `shouldTestAs` Summary 1 0 | 2,625 | spec :: Spec
spec = do
describe "genericToJSValTests" $ do
it "detects faulty ToJSVal instances" $ do
genericToJSValTests faultyProxy `shouldTestAs` Summary 1 1
it "creates passing tests for correct serialization" $ do
genericToJSValTests correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericToJSValTests correctSumProxy `shouldTestAs` Summary 1 0
describe "genericFromJSValTests" $ do
it "detects faulty FromJSVal instances" $ do
genericFromJSValTests faultyProxy `shouldTestAs` Summary 1 1
it "creates passing tests for correct serialization" $ do
genericFromJSValTests correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericFromJSValTests correctSumProxy `shouldTestAs` Summary 1 0
describe "genericAesonToJSVal" $ do
it "detects incompatible json encodings" $ do
genericAesonToJSVal faultyProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericAesonToJSVal correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericAesonToJSVal correctSumProxy `shouldTestAs` Summary 1 0
describe "genericJSValToAeson" $ do
it "detects incompatible json encodings" $ do
genericJSValToAeson faultyProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericJSValToAeson correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericJSValToAeson correctSumProxy `shouldTestAs` Summary 1 0
describe "genericJSValRoundtrip" $ do
it "detects incompatible json encodings" $ do
genericJSValRoundtrip faultyRoundtripProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericJSValRoundtrip correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericJSValRoundtrip correctSumProxy `shouldTestAs` Summary 1 0
describe "genericAesonRoundtrip" $ do
it "detects incompatible json encodings" $ do
genericAesonRoundtrip faultyRoundtripProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericAesonRoundtrip correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericAesonRoundtrip correctSumProxy `shouldTestAs` Summary 1 0 | 2,625 | spec = do
describe "genericToJSValTests" $ do
it "detects faulty ToJSVal instances" $ do
genericToJSValTests faultyProxy `shouldTestAs` Summary 1 1
it "creates passing tests for correct serialization" $ do
genericToJSValTests correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericToJSValTests correctSumProxy `shouldTestAs` Summary 1 0
describe "genericFromJSValTests" $ do
it "detects faulty FromJSVal instances" $ do
genericFromJSValTests faultyProxy `shouldTestAs` Summary 1 1
it "creates passing tests for correct serialization" $ do
genericFromJSValTests correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericFromJSValTests correctSumProxy `shouldTestAs` Summary 1 0
describe "genericAesonToJSVal" $ do
it "detects incompatible json encodings" $ do
genericAesonToJSVal faultyProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericAesonToJSVal correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericAesonToJSVal correctSumProxy `shouldTestAs` Summary 1 0
describe "genericJSValToAeson" $ do
it "detects incompatible json encodings" $ do
genericJSValToAeson faultyProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericJSValToAeson correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericJSValToAeson correctSumProxy `shouldTestAs` Summary 1 0
describe "genericJSValRoundtrip" $ do
it "detects incompatible json encodings" $ do
genericJSValRoundtrip faultyRoundtripProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericJSValRoundtrip correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericJSValRoundtrip correctSumProxy `shouldTestAs` Summary 1 0
describe "genericAesonRoundtrip" $ do
it "detects incompatible json encodings" $ do
genericAesonRoundtrip faultyRoundtripProxy `shouldTestAs` Summary 1 1
context "when used with compatible encodings" $ do
it "creates passing tests" $ do
genericAesonRoundtrip correctProxy `shouldTestAs` Summary 1 0
it "creates passing tests for sum types" $ do
genericAesonRoundtrip correctSumProxy `shouldTestAs` Summary 1 0 | 2,612 | false | true | 0 | 17 | 564 | 597 | 262 | 335 | null | null |
kishoredbn/barrelfish | hake/RuleDefs.hs | mit | skateSksFileLoc schema = In SrcTree "src" ("/schemas" </> (schema ++ ".sks")) | 77 | skateSksFileLoc schema = In SrcTree "src" ("/schemas" </> (schema ++ ".sks")) | 77 | skateSksFileLoc schema = In SrcTree "src" ("/schemas" </> (schema ++ ".sks")) | 77 | false | false | 0 | 9 | 10 | 30 | 15 | 15 | null | null |
wdanilo/container | src/Data/Container/Instances/List.hs | apache-2.0 | checkBounds :: Int -> [a] -> (String -> b) -> b -> b
checkBounds ix l fail ok = if ix >= length l || ix < 0
then fail "Index out of bounds"
else ok | 155 | checkBounds :: Int -> [a] -> (String -> b) -> b -> b
checkBounds ix l fail ok = if ix >= length l || ix < 0
then fail "Index out of bounds"
else ok | 155 | checkBounds ix l fail ok = if ix >= length l || ix < 0
then fail "Index out of bounds"
else ok | 102 | false | true | 0 | 9 | 43 | 72 | 37 | 35 | null | null |
m-schmidt/Asm6502 | src/AsmParser.hs | bsd-3-clause | fromBase :: Int -> String -> Int
fromBase b = fst . head . readInt b ((<b) . digitToInt) digitToInt | 99 | fromBase :: Int -> String -> Int
fromBase b = fst . head . readInt b ((<b) . digitToInt) digitToInt | 99 | fromBase b = fst . head . readInt b ((<b) . digitToInt) digitToInt | 66 | false | true | 0 | 9 | 19 | 48 | 25 | 23 | null | null |
cakoose/dropbox-sdk-haskell | Source/Dropbox/Certificates/TH.hs | mit | x509 :: QuasiQuoter
x509 = QuasiQuoter { quoteExp = \s -> [| decodeCert . parsePem $ s |] } | 91 | x509 :: QuasiQuoter
x509 = QuasiQuoter { quoteExp = \s -> [| decodeCert . parsePem $ s |] } | 91 | x509 = QuasiQuoter { quoteExp = \s -> [| decodeCert . parsePem $ s |] } | 71 | false | true | 0 | 8 | 18 | 37 | 19 | 18 | null | null |
neothemachine/monadiccp | src/Control/CP/FD/Expr.hs | bsd-3-clause | -- reordering rules (do not decrease # of variables or # of tree nodes, but normalize an expression in such a way that the same normalization cannot be applied anymore - possibly because that can only occur in a case already matched by a simplification rule above)
--- level 1
simplify (Plus a (Const c)) = (Const c) + a | 320 | simplify (Plus a (Const c)) = (Const c) + a | 43 | simplify (Plus a (Const c)) = (Const c) + a | 43 | true | false | 0 | 8 | 59 | 36 | 18 | 18 | null | null |
edom/ptt | src/Parse/Haskell/Lex/Untoken.hs | apache-2.0 | anyConId = anyQConId M.>=> asUnqualified | 40 | anyConId = anyQConId M.>=> asUnqualified | 40 | anyConId = anyQConId M.>=> asUnqualified | 40 | false | false | 3 | 7 | 4 | 18 | 7 | 11 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Seq/BinaryRandList.hs | mit | null _ = False | 14 | null _ = False | 14 | null _ = False | 14 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
parapluu/encore | src/ir/AST/PrettyPrinter.hs | bsd-3-clause | isSimple MethodCall {target} = isSimple target | 46 | isSimple MethodCall {target} = isSimple target | 46 | isSimple MethodCall {target} = isSimple target | 46 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
jystic/pointfree | Plugin/Pl/Common.hs | mit | sizeExpr (Lambda _ e) = 1 + sizeExpr e | 38 | sizeExpr (Lambda _ e) = 1 + sizeExpr e | 38 | sizeExpr (Lambda _ e) = 1 + sizeExpr e | 38 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
phischu/fragnix | tests/packages/scotty/Data.ByteString.hs | bsd-3-clause | packCStringLen (_, len) =
moduleErrorIO "packCStringLen" ("negative length: " ++ show len) | 94 | packCStringLen (_, len) =
moduleErrorIO "packCStringLen" ("negative length: " ++ show len) | 94 | packCStringLen (_, len) =
moduleErrorIO "packCStringLen" ("negative length: " ++ show len) | 94 | false | false | 0 | 7 | 15 | 32 | 15 | 17 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/AllocateAddress.hs | mpl-2.0 | -- | Creates a value of 'AllocateAddress' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aaDomain'
--
-- * 'aaDryRun'
allocateAddress
:: AllocateAddress
allocateAddress =
AllocateAddress'
{ _aaDomain = Nothing
, _aaDryRun = Nothing
} | 340 | allocateAddress
:: AllocateAddress
allocateAddress =
AllocateAddress'
{ _aaDomain = Nothing
, _aaDryRun = Nothing
} | 135 | allocateAddress =
AllocateAddress'
{ _aaDomain = Nothing
, _aaDryRun = Nothing
} | 96 | true | true | 1 | 7 | 72 | 39 | 23 | 16 | null | null |
nushio3/ghc | compiler/main/DynFlags.hs | bsd-3-clause | supportedExtensions :: [String]
supportedExtensions = concatMap toFlagSpecNamePair xFlags
where
toFlagSpecNamePair flg
#ifndef GHCI
-- make sure that `ghc --supported-extensions` omits
-- "TemplateHaskell" when it's known to be unsupported. See also
-- GHC #11102 for rationale
| flagSpecFlag flg == LangExt.TemplateHaskell = [noName]
#endif
| otherwise = [name, noName]
where
noName = "No" ++ name
name = flagSpecName flg | 481 | supportedExtensions :: [String]
supportedExtensions = concatMap toFlagSpecNamePair xFlags
where
toFlagSpecNamePair flg
#ifndef GHCI
-- make sure that `ghc --supported-extensions` omits
-- "TemplateHaskell" when it's known to be unsupported. See also
-- GHC #11102 for rationale
| flagSpecFlag flg == LangExt.TemplateHaskell = [noName]
#endif
| otherwise = [name, noName]
where
noName = "No" ++ name
name = flagSpecName flg | 481 | supportedExtensions = concatMap toFlagSpecNamePair xFlags
where
toFlagSpecNamePair flg
#ifndef GHCI
-- make sure that `ghc --supported-extensions` omits
-- "TemplateHaskell" when it's known to be unsupported. See also
-- GHC #11102 for rationale
| flagSpecFlag flg == LangExt.TemplateHaskell = [noName]
#endif
| otherwise = [name, noName]
where
noName = "No" ++ name
name = flagSpecName flg | 449 | false | true | 1 | 9 | 116 | 86 | 46 | 40 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Assoc/PatriciaLoMap.hs | mit | -- FIXME can we do better than this?
adjustOrInsert :: (a -> a) -> a -> Int -> FM a -> FM a
adjustOrInsert = adjustOrInsertUsingMember | 134 | adjustOrInsert :: (a -> a) -> a -> Int -> FM a -> FM a
adjustOrInsert = adjustOrInsertUsingMember | 97 | adjustOrInsert = adjustOrInsertUsingMember | 42 | true | true | 0 | 9 | 25 | 41 | 21 | 20 | null | null |
nfjinjing/naga | src/Language/Naga/PrimOp.hs | bsd-3-clause | (+) x y = apply add_ [x,y] | 26 | (+) x y = apply add_ [x,y] | 26 | (+) x y = apply add_ [x,y] | 26 | false | false | 0 | 6 | 6 | 24 | 13 | 11 | null | null |
zachsully/hakaru | haskell/Language/Hakaru/Pretty/Concrete.hs | bsd-3-clause | ppBinder1 :: (ABT Term abt) => abt '[x] a -> (Doc, Doc, Doc)
ppBinder1 e = caseBind e $ \x v ->
(ppVariable x,
prettyType 0 (varType x),
caseVarSyn v ppVariable (pretty . syn)) | 220 | ppBinder1 :: (ABT Term abt) => abt '[x] a -> (Doc, Doc, Doc)
ppBinder1 e = caseBind e $ \x v ->
(ppVariable x,
prettyType 0 (varType x),
caseVarSyn v ppVariable (pretty . syn)) | 220 | ppBinder1 e = caseBind e $ \x v ->
(ppVariable x,
prettyType 0 (varType x),
caseVarSyn v ppVariable (pretty . syn)) | 159 | false | true | 0 | 11 | 77 | 105 | 53 | 52 | null | null |
wildlyinaccurate/lishp | src/Lishp/Interpreter.hs | mit | makeVarArgs :: LispVal -> Env -> [LispVal] -> [LispVal] -> IOThrowsError LispVal
makeVarArgs = makeFunc . Just . show | 117 | makeVarArgs :: LispVal -> Env -> [LispVal] -> [LispVal] -> IOThrowsError LispVal
makeVarArgs = makeFunc . Just . show | 117 | makeVarArgs = makeFunc . Just . show | 36 | false | true | 0 | 10 | 18 | 50 | 24 | 26 | null | null |
dolio/irc-core | src/Client/Options.hs | isc | fullVersionTxt :: String
fullVersionTxt =
versionTxt ++
unlines
(""
:("OS : " ++ os)
:("Architecture: " ++ arch)
:("Compiler : " ++ compilerName ++ "-" ++ showVersion compilerVersion)
:""
:("ghc : " ++ TOOL_VERSION_ghc)
:("ghc-pkg : " ++ TOOL_VERSION_ghc_pkg)
:("alex : " ++ TOOL_VERSION_alex)
:("happy : " ++ TOOL_VERSION_happy)
:("hsc2hs : " ++ TOOL_VERSION_hsc2hs)
:""
:"Transitive dependencies:"
: [ name ++ "-" ++ intercalate "." (map show ver) | (name,ver) <- sort deps ]
) | 553 | fullVersionTxt :: String
fullVersionTxt =
versionTxt ++
unlines
(""
:("OS : " ++ os)
:("Architecture: " ++ arch)
:("Compiler : " ++ compilerName ++ "-" ++ showVersion compilerVersion)
:""
:("ghc : " ++ TOOL_VERSION_ghc)
:("ghc-pkg : " ++ TOOL_VERSION_ghc_pkg)
:("alex : " ++ TOOL_VERSION_alex)
:("happy : " ++ TOOL_VERSION_happy)
:("hsc2hs : " ++ TOOL_VERSION_hsc2hs)
:""
:"Transitive dependencies:"
: [ name ++ "-" ++ intercalate "." (map show ver) | (name,ver) <- sort deps ]
) | 553 | fullVersionTxt =
versionTxt ++
unlines
(""
:("OS : " ++ os)
:("Architecture: " ++ arch)
:("Compiler : " ++ compilerName ++ "-" ++ showVersion compilerVersion)
:""
:("ghc : " ++ TOOL_VERSION_ghc)
:("ghc-pkg : " ++ TOOL_VERSION_ghc_pkg)
:("alex : " ++ TOOL_VERSION_alex)
:("happy : " ++ TOOL_VERSION_happy)
:("hsc2hs : " ++ TOOL_VERSION_hsc2hs)
:""
:"Transitive dependencies:"
: [ name ++ "-" ++ intercalate "." (map show ver) | (name,ver) <- sort deps ]
) | 528 | false | true | 0 | 19 | 148 | 177 | 93 | 84 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/PointTypes.hs | bsd-3-clause | fetchPointType (PTID20 _ ) bs = PTID20 $ decodeToEither $ runGetIncremental pointType20Parser `pushChunks` bs | 110 | fetchPointType (PTID20 _ ) bs = PTID20 $ decodeToEither $ runGetIncremental pointType20Parser `pushChunks` bs | 110 | fetchPointType (PTID20 _ ) bs = PTID20 $ decodeToEither $ runGetIncremental pointType20Parser `pushChunks` bs | 110 | false | false | 1 | 7 | 14 | 35 | 17 | 18 | null | null |
michalkonecny/aern2 | aern2-fun-plot/server/src/AERN2/RealFun/PlotService/API.hs | bsd-3-clause | dyadic2dyadicS :: Dyadic -> DyadicS
dyadic2dyadicS d = DyadicS v e
where
v = int $ numerator r
e = negate $ integerLog2 $ denominator r
r = rational d | 158 | dyadic2dyadicS :: Dyadic -> DyadicS
dyadic2dyadicS d = DyadicS v e
where
v = int $ numerator r
e = negate $ integerLog2 $ denominator r
r = rational d | 158 | dyadic2dyadicS d = DyadicS v e
where
v = int $ numerator r
e = negate $ integerLog2 $ denominator r
r = rational d | 122 | false | true | 0 | 6 | 37 | 62 | 30 | 32 | null | null |
spechub/Hets | Common/Doc.hs | gpl-2.0 | -- | vertical composition with one blank line
($++$) :: Doc -> Doc -> Doc
($++$) = aboveWithNLs 1 | 97 | ($++$) :: Doc -> Doc -> Doc
($++$) = aboveWithNLs 1 | 51 | ($++$) = aboveWithNLs 1 | 23 | true | true | 0 | 8 | 18 | 33 | 17 | 16 | null | null |
dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeStackProvisioningParameters.hs | mpl-2.0 | -- | 'DescribeStackProvisioningParametersResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'dspprAgentInstallerUrl' @::@ 'Maybe' 'Text'
--
-- * 'dspprParameters' @::@ 'HashMap' 'Text' 'Text'
--
describeStackProvisioningParametersResponse :: DescribeStackProvisioningParametersResponse
describeStackProvisioningParametersResponse = DescribeStackProvisioningParametersResponse
{ _dspprAgentInstallerUrl = Nothing
, _dspprParameters = mempty
} | 502 | describeStackProvisioningParametersResponse :: DescribeStackProvisioningParametersResponse
describeStackProvisioningParametersResponse = DescribeStackProvisioningParametersResponse
{ _dspprAgentInstallerUrl = Nothing
, _dspprParameters = mempty
} | 265 | describeStackProvisioningParametersResponse = DescribeStackProvisioningParametersResponse
{ _dspprAgentInstallerUrl = Nothing
, _dspprParameters = mempty
} | 174 | true | true | 0 | 7 | 62 | 37 | 24 | 13 | null | null |
ghcjs/ghcjs | src-bin/Boot.hs | mit | {- |initialize our boot environment by reading the configuration files,
finding all programs -}
initBootEnv :: BootSettings -> IO BootEnv
initBootEnv bs = do
BootConfigFile stgs pgms1 <- readBootConfigFile bs
pgms2 <- configureBootPrograms bs pgms1
locs <- configureBootLocations bs pgms2
-- installWrappers ((locs ^. blGhcjsTopDir) </> "bin") locs pgms2
return (BootEnv bs locs pgms2 stgs)
-- the platform triple that GHCJS reports
-- this is in practice mostly used for the toolchain | 501 | initBootEnv :: BootSettings -> IO BootEnv
initBootEnv bs = do
BootConfigFile stgs pgms1 <- readBootConfigFile bs
pgms2 <- configureBootPrograms bs pgms1
locs <- configureBootLocations bs pgms2
-- installWrappers ((locs ^. blGhcjsTopDir) </> "bin") locs pgms2
return (BootEnv bs locs pgms2 stgs)
-- the platform triple that GHCJS reports
-- this is in practice mostly used for the toolchain | 401 | initBootEnv bs = do
BootConfigFile stgs pgms1 <- readBootConfigFile bs
pgms2 <- configureBootPrograms bs pgms1
locs <- configureBootLocations bs pgms2
-- installWrappers ((locs ^. blGhcjsTopDir) </> "bin") locs pgms2
return (BootEnv bs locs pgms2 stgs)
-- the platform triple that GHCJS reports
-- this is in practice mostly used for the toolchain | 359 | true | true | 0 | 9 | 87 | 82 | 38 | 44 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * Security models
htSmNone :: String
htSmNone = "none" | 58 | htSmNone :: String
htSmNone = "none" | 36 | htSmNone = "none" | 17 | true | true | 0 | 4 | 10 | 12 | 7 | 5 | null | null |
c19/Exercism-Haskell | pythagorean-triplet/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_pythagorean_triplet.hs | mit | dynlibdir = "/Users/c19/Documents/projects/exercism/haskell/haskell/pythagorean-triplet/.stack-work/install/x86_64-osx/lts-9.11/8.0.2/lib/x86_64-osx-ghc-8.0.2" | 160 | dynlibdir = "/Users/c19/Documents/projects/exercism/haskell/haskell/pythagorean-triplet/.stack-work/install/x86_64-osx/lts-9.11/8.0.2/lib/x86_64-osx-ghc-8.0.2" | 160 | dynlibdir = "/Users/c19/Documents/projects/exercism/haskell/haskell/pythagorean-triplet/.stack-work/install/x86_64-osx/lts-9.11/8.0.2/lib/x86_64-osx-ghc-8.0.2" | 160 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
shlevy/ghc | compiler/basicTypes/Literal.hs | bsd-3-clause | float2IntLit l = pprPanic "float2IntLit" (ppr l) | 60 | float2IntLit l = pprPanic "float2IntLit" (ppr l) | 60 | float2IntLit l = pprPanic "float2IntLit" (ppr l) | 60 | false | false | 0 | 7 | 18 | 20 | 9 | 11 | null | null |
dhess/gpio | src/System/GPIO/Linux/Sysfs/Util.hs | bsd-3-clause | -- | Convert a 'PinDirection' value to the corresponding 'ByteString'
-- value expected by a pin's @direction@ attribute in the @sysfs@ GPIO
-- filesystem.
--
-- >>> pinDirectionToBS In
-- "in\n"
-- >>> pinDirectionToBS Out
-- "out\n"
pinDirectionToBS :: PinDirection -> ByteString
pinDirectionToBS In = "in\n" | 310 | pinDirectionToBS :: PinDirection -> ByteString
pinDirectionToBS In = "in\n" | 75 | pinDirectionToBS In = "in\n" | 28 | true | true | 0 | 5 | 45 | 26 | 17 | 9 | null | null |
lukexi/ghc | compiler/nativeGen/X86/Instr.hs | bsd-3-clause | x86_takeRegRegMoveInstr _ = Nothing | 36 | x86_takeRegRegMoveInstr _ = Nothing | 36 | x86_takeRegRegMoveInstr _ = Nothing | 36 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
xmonad/xmonad-contrib | XMonad/Hooks/ScreenCorners.hs | bsd-3-clause | createWindowAt SCLowerRight = withDisplay $ \dpy ->
let w = displayWidth dpy (defaultScreen dpy) - 1
h = displayHeight dpy (defaultScreen dpy) - 1
in createWindowAt' (fi w) (fi h) | 196 | createWindowAt SCLowerRight = withDisplay $ \dpy ->
let w = displayWidth dpy (defaultScreen dpy) - 1
h = displayHeight dpy (defaultScreen dpy) - 1
in createWindowAt' (fi w) (fi h) | 196 | createWindowAt SCLowerRight = withDisplay $ \dpy ->
let w = displayWidth dpy (defaultScreen dpy) - 1
h = displayHeight dpy (defaultScreen dpy) - 1
in createWindowAt' (fi w) (fi h) | 196 | false | false | 0 | 14 | 46 | 81 | 39 | 42 | null | null |
lennart/Tidal | Sound/Tidal/Stream.hs | gpl-3.0 | param :: OscShape -> String -> Param
param shape n = head $ filter (\x -> name x == n) (params shape) | 101 | param :: OscShape -> String -> Param
param shape n = head $ filter (\x -> name x == n) (params shape) | 101 | param shape n = head $ filter (\x -> name x == n) (params shape) | 64 | false | true | 0 | 10 | 21 | 58 | 28 | 30 | null | null |
laser/haste-experiment | demos/ffi/inline/hello.hs | mit | app [compute, a, b, output] = do
onEvent compute OnClick $ \_ _ -> do
a1 <- getProp a "value"
b1 <- getProp b "value"
sum <- add (read a1) (read b1)
setProp output "value" $ show sum | 202 | app [compute, a, b, output] = do
onEvent compute OnClick $ \_ _ -> do
a1 <- getProp a "value"
b1 <- getProp b "value"
sum <- add (read a1) (read b1)
setProp output "value" $ show sum | 202 | app [compute, a, b, output] = do
onEvent compute OnClick $ \_ _ -> do
a1 <- getProp a "value"
b1 <- getProp b "value"
sum <- add (read a1) (read b1)
setProp output "value" $ show sum | 202 | false | false | 0 | 14 | 57 | 104 | 48 | 56 | null | null |
schernichkin/BSPM | bsp/src/BSP/Util/Barrier.hs | bsd-3-clause | newBarrier :: Int -> IO Barrier
newBarrier = fmap Barrier . newTVarIO | 69 | newBarrier :: Int -> IO Barrier
newBarrier = fmap Barrier . newTVarIO | 69 | newBarrier = fmap Barrier . newTVarIO | 37 | false | true | 0 | 7 | 11 | 30 | 13 | 17 | null | null |
Courseography/courseography | app/Response/Calendar.hs | gpl-3.0 | -- | Obtains the fourth item of the tuple, which represents the end times for a
-- course.
fourth :: (a, b, c, d, e) -> d
fourth (_, _, _, end, _) = end | 152 | fourth :: (a, b, c, d, e) -> d
fourth (_, _, _, end, _) = end | 61 | fourth (_, _, _, end, _) = end | 30 | true | true | 0 | 8 | 34 | 56 | 32 | 24 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmEnv.hs | bsd-3-clause | idToReg :: DynFlags -> NonVoid Id -> LocalReg
-- Make a register from an Id, typically a function argument,
-- free variable, or case binder
--
-- We re-use the Unique from the Id to make it easier to see what is going on
--
-- By now the Ids should be uniquely named; else one would worry
-- about accidental collision
idToReg dflags (NonVoid id)
= LocalReg (idUnique id)
(case idPrimRep id of VoidRep -> pprPanic "idToReg" (ppr id)
_ -> primRepCmmType dflags (idPrimRep id)) | 559 | idToReg :: DynFlags -> NonVoid Id -> LocalReg
idToReg dflags (NonVoid id)
= LocalReg (idUnique id)
(case idPrimRep id of VoidRep -> pprPanic "idToReg" (ppr id)
_ -> primRepCmmType dflags (idPrimRep id)) | 285 | idToReg dflags (NonVoid id)
= LocalReg (idUnique id)
(case idPrimRep id of VoidRep -> pprPanic "idToReg" (ppr id)
_ -> primRepCmmType dflags (idPrimRep id)) | 239 | true | true | 0 | 12 | 168 | 100 | 50 | 50 | null | null |
crockeo/tic-taskell | src/Server.hs | mit | handle404 :: ScottyM ()
handle404 =
notFound $ do
status $ notFound404
setHeader "Content-Type" "text/html"
file "views/404.html"
-- | The definition of the server itself. | 186 | handle404 :: ScottyM ()
handle404 =
notFound $ do
status $ notFound404
setHeader "Content-Type" "text/html"
file "views/404.html"
-- | The definition of the server itself. | 186 | handle404 =
notFound $ do
status $ notFound404
setHeader "Content-Type" "text/html"
file "views/404.html"
-- | The definition of the server itself. | 162 | false | true | 0 | 8 | 39 | 42 | 19 | 23 | null | null |
wavewave/madgraph-auto-model | src/HEP/Automation/MadGraph/Model/Singlet.hs | bsd-2-clause | singletTr :: TypeRep
singletTr = mkTyConApp (mkTyCon "HEP.Automation.MadGraph.Model.Singlet.Singlet") [] | 105 | singletTr :: TypeRep
singletTr = mkTyConApp (mkTyCon "HEP.Automation.MadGraph.Model.Singlet.Singlet") [] | 104 | singletTr = mkTyConApp (mkTyCon "HEP.Automation.MadGraph.Model.Singlet.Singlet") [] | 83 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
brendanhay/gogol | gogol-sourcerepo/gen/Network/Google/Resource/SourceRepo/Projects/Repos/Sync.hs | mpl-2.0 | -- | The name of the repo to synchronize. Values are of the form
-- \`projects\/\/repos\/\`.
prsName :: Lens' ProjectsReposSync Text
prsName = lens _prsName (\ s a -> s{_prsName = a}) | 183 | prsName :: Lens' ProjectsReposSync Text
prsName = lens _prsName (\ s a -> s{_prsName = a}) | 90 | prsName = lens _prsName (\ s a -> s{_prsName = a}) | 50 | true | true | 0 | 9 | 31 | 41 | 23 | 18 | null | null |
alexisVallet/deep-banana | src/DeepBanana/Exception.hs | bsd-3-clause | unsafeRunExcept :: (Exception e) => Either e a -> a
unsafeRunExcept (Left err) = throw err | 90 | unsafeRunExcept :: (Exception e) => Either e a -> a
unsafeRunExcept (Left err) = throw err | 90 | unsafeRunExcept (Left err) = throw err | 38 | false | true | 0 | 7 | 15 | 41 | 20 | 21 | null | null |
brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/Accounts/FilterSets/BidResponsesWithoutBids/List.hs | mpl-2.0 | -- | Requested page size. The server may return fewer results than requested.
-- If unspecified, the server will pick an appropriate default.
bafsbrwblPageSize :: Lens' BiddersAccountsFilterSetsBidResponsesWithoutBidsList (Maybe Int32)
bafsbrwblPageSize
= lens _bafsbrwblPageSize
(\ s a -> s{_bafsbrwblPageSize = a})
. mapping _Coerce | 348 | bafsbrwblPageSize :: Lens' BiddersAccountsFilterSetsBidResponsesWithoutBidsList (Maybe Int32)
bafsbrwblPageSize
= lens _bafsbrwblPageSize
(\ s a -> s{_bafsbrwblPageSize = a})
. mapping _Coerce | 206 | bafsbrwblPageSize
= lens _bafsbrwblPageSize
(\ s a -> s{_bafsbrwblPageSize = a})
. mapping _Coerce | 112 | true | true | 0 | 10 | 56 | 56 | 29 | 27 | null | null |
Axiomatic-/Task9 | Graphics/Task9/PictView.hs | mit | pictResizeCurrent subStore viewport dImage
(Pict { pictSubState = subObserver
, pictResizeState = resizeObserver
, pictRotateState = rotateObserver }) = do
index <- Observer.getValue subObserver
rotate <- Observer.getValue rotateObserver
resize <- Observer.getValue resizeObserver
pixbuf <- imageFull =<< subStore `MV.listStoreGetValue` index
pixbuf' <- GPixbuf.pixbufRotateSimple pixbuf rotate
view <- MViewport.viewportGetViewWindow viewport
w <- GDrawWindow.drawWindowGetWidth view
h <- GDrawWindow.drawWindowGetHeight view
dImage `set` [ DImage.imagePixbuf
:=> resizePixbuf pixbuf' resize (w, h) ] | 661 | pictResizeCurrent subStore viewport dImage
(Pict { pictSubState = subObserver
, pictResizeState = resizeObserver
, pictRotateState = rotateObserver }) = do
index <- Observer.getValue subObserver
rotate <- Observer.getValue rotateObserver
resize <- Observer.getValue resizeObserver
pixbuf <- imageFull =<< subStore `MV.listStoreGetValue` index
pixbuf' <- GPixbuf.pixbufRotateSimple pixbuf rotate
view <- MViewport.viewportGetViewWindow viewport
w <- GDrawWindow.drawWindowGetWidth view
h <- GDrawWindow.drawWindowGetHeight view
dImage `set` [ DImage.imagePixbuf
:=> resizePixbuf pixbuf' resize (w, h) ] | 661 | pictResizeCurrent subStore viewport dImage
(Pict { pictSubState = subObserver
, pictResizeState = resizeObserver
, pictRotateState = rotateObserver }) = do
index <- Observer.getValue subObserver
rotate <- Observer.getValue rotateObserver
resize <- Observer.getValue resizeObserver
pixbuf <- imageFull =<< subStore `MV.listStoreGetValue` index
pixbuf' <- GPixbuf.pixbufRotateSimple pixbuf rotate
view <- MViewport.viewportGetViewWindow viewport
w <- GDrawWindow.drawWindowGetWidth view
h <- GDrawWindow.drawWindowGetHeight view
dImage `set` [ DImage.imagePixbuf
:=> resizePixbuf pixbuf' resize (w, h) ] | 661 | false | false | 0 | 11 | 126 | 175 | 85 | 90 | null | null |
gamelost/pcgen-rules | src/JEPFormula.hs | apache-2.0 | parseRolls :: PParser [Roll]
parseRolls = parseRoll `sepBy` char '/' | 68 | parseRolls :: PParser [Roll]
parseRolls = parseRoll `sepBy` char '/' | 68 | parseRolls = parseRoll `sepBy` char '/' | 39 | false | true | 0 | 7 | 9 | 34 | 16 | 18 | null | null |
themattchan/tandoori | input/class-cascade.hs | bsd-3-clause | testInheritCompound = forceFoo [] | 33 | testInheritCompound = forceFoo [] | 33 | testInheritCompound = forceFoo [] | 33 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
uduki/hsQt | Qtc/Core/Attributes.hs | bsd-2-clause | sltCon :: (w -> String -> b -> IO ()) -> SltCon w a b
sltCon conslt
= SltCon conslt | 85 | sltCon :: (w -> String -> b -> IO ()) -> SltCon w a b
sltCon conslt
= SltCon conslt | 85 | sltCon conslt
= SltCon conslt | 31 | false | true | 0 | 11 | 21 | 48 | 23 | 25 | null | null |
christiaanb/clash | examples/HighOrdAluOps.hs | bsd-3-clause | -- Is any bit set?
anyset :: NaturalT n => (e -> e -> e) -> e -> Op n e
anyset f s a b = constant (f a' b') a b
where
a' = vfoldl f s a
b' = vfoldl f s b | 164 | anyset :: NaturalT n => (e -> e -> e) -> e -> Op n e
anyset f s a b = constant (f a' b') a b
where
a' = vfoldl f s a
b' = vfoldl f s b | 145 | anyset f s a b = constant (f a' b') a b
where
a' = vfoldl f s a
b' = vfoldl f s b | 92 | true | true | 0 | 9 | 56 | 94 | 46 | 48 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | A map of thumbnail images associated with the video. For each object in
-- the map, the key is the name of the thumbnail image, and the value is an
-- object that contains other information about the thumbnail.
ssThumbnails :: Lens' SubscriptionSnippet (Maybe ThumbnailDetails)
ssThumbnails
= lens _ssThumbnails (\ s a -> s{_ssThumbnails = a}) | 350 | ssThumbnails :: Lens' SubscriptionSnippet (Maybe ThumbnailDetails)
ssThumbnails
= lens _ssThumbnails (\ s a -> s{_ssThumbnails = a}) | 134 | ssThumbnails
= lens _ssThumbnails (\ s a -> s{_ssThumbnails = a}) | 67 | true | true | 0 | 9 | 59 | 50 | 27 | 23 | null | null |
plow-technologies/persistent | persistent-test/src/MigrationOnlyTest.hs | mit | asIO :: IO a -> IO a
asIO = id | 30 | asIO :: IO a -> IO a
asIO = id | 30 | asIO = id | 9 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
SAdams601/HaRe | old/testing/unfoldAsPatterns/E1_TokOut.hs | bsd-3-clause | insert val (T tval left right)
| val > tval = T tval left (insert val right)
| otherwise = T tval (insert val left) right | 127 | insert val (T tval left right)
| val > tval = T tval left (insert val right)
| otherwise = T tval (insert val left) right | 127 | insert val (T tval left right)
| val > tval = T tval left (insert val right)
| otherwise = T tval (insert val left) right | 127 | false | false | 0 | 8 | 31 | 70 | 32 | 38 | null | null |
msullivan/advent-of-code | 2018/A21a.hs | mit | instrs = [(x, x == Iset && y , y) | x <- enumFrom Iadd, y <- [True, False]] ++
[(Igt, True, False), (Ieq, True, False)] | 128 | instrs = [(x, x == Iset && y , y) | x <- enumFrom Iadd, y <- [True, False]] ++
[(Igt, True, False), (Ieq, True, False)] | 128 | instrs = [(x, x == Iset && y , y) | x <- enumFrom Iadd, y <- [True, False]] ++
[(Igt, True, False), (Ieq, True, False)] | 128 | false | false | 1 | 9 | 34 | 83 | 46 | 37 | null | null |
daleooo/barrelfish | tools/flounder/THCBackend.hs | mit | --
-- Generate a union of all the above
--
intf_union :: String -> [MessageDef] -> C.Unit
intf_union ifn msgs =
C.UnionDecl (binding_arg_union_type ifn)
([ C.Param (C.Struct $ msg_argstruct_name ifn n) n
| m@(Message _ n a _) <- msgs, 0 /= length a ]
++
[ C.Param (C.Union $ rpc_union_name ifn n) n
| m@(RPC n a _) <- msgs, 0 /= length a ]) | 400 | intf_union :: String -> [MessageDef] -> C.Unit
intf_union ifn msgs =
C.UnionDecl (binding_arg_union_type ifn)
([ C.Param (C.Struct $ msg_argstruct_name ifn n) n
| m@(Message _ n a _) <- msgs, 0 /= length a ]
++
[ C.Param (C.Union $ rpc_union_name ifn n) n
| m@(RPC n a _) <- msgs, 0 /= length a ]) | 356 | intf_union ifn msgs =
C.UnionDecl (binding_arg_union_type ifn)
([ C.Param (C.Struct $ msg_argstruct_name ifn n) n
| m@(Message _ n a _) <- msgs, 0 /= length a ]
++
[ C.Param (C.Union $ rpc_union_name ifn n) n
| m@(RPC n a _) <- msgs, 0 /= length a ]) | 309 | true | true | 0 | 13 | 125 | 173 | 86 | 87 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | noByteBuffer :: Buffer Word8
noByteBuffer = unsafePerformIO $ newByteBuffer 1 ReadBuffer | 88 | noByteBuffer :: Buffer Word8
noByteBuffer = unsafePerformIO $ newByteBuffer 1 ReadBuffer | 88 | noByteBuffer = unsafePerformIO $ newByteBuffer 1 ReadBuffer | 59 | false | true | 1 | 6 | 10 | 26 | 11 | 15 | null | null |
ChrisKuklewicz/XWords | src/Lookup.hs | bsd-3-clause | test_pullTile :: Hist -> Bool
test_pullTile h@(Hist x) = let each = map fst x == nub (sort (map fst (pullTile h)))
y0 = (fromHist h)
y1 = (sort $ unfoldr (listToMaybe . pullTile) h)
y2 = (sort $ unfoldr (listToMaybe . reverse . pullTile) h)
in each && (y0==y1) && (y0==y2) | 392 | test_pullTile :: Hist -> Bool
test_pullTile h@(Hist x) = let each = map fst x == nub (sort (map fst (pullTile h)))
y0 = (fromHist h)
y1 = (sort $ unfoldr (listToMaybe . pullTile) h)
y2 = (sort $ unfoldr (listToMaybe . reverse . pullTile) h)
in each && (y0==y1) && (y0==y2) | 392 | test_pullTile h@(Hist x) = let each = map fst x == nub (sort (map fst (pullTile h)))
y0 = (fromHist h)
y1 = (sort $ unfoldr (listToMaybe . pullTile) h)
y2 = (sort $ unfoldr (listToMaybe . reverse . pullTile) h)
in each && (y0==y1) && (y0==y2) | 362 | false | true | 0 | 16 | 171 | 155 | 80 | 75 | null | null |
jaapweel/piffle | src/IrPiffle.hs | gpl-2.0 | tExp env (Binop p operand1 operator operand2) =
do thisPosition p
operand1 <- tExp env operand1
operand2 <- tExp env operand2
returnType <- match operand1 operand2
returnType <- atomic returnType
_ <- lvalue operator operand1
return (I.Binop p returnType operand1 operator operand2)
{- The ! operator takes an argument of any atomic type and returns a
boolean. -} | 415 | tExp env (Binop p operand1 operator operand2) =
do thisPosition p
operand1 <- tExp env operand1
operand2 <- tExp env operand2
returnType <- match operand1 operand2
returnType <- atomic returnType
_ <- lvalue operator operand1
return (I.Binop p returnType operand1 operator operand2)
{- The ! operator takes an argument of any atomic type and returns a
boolean. -} | 415 | tExp env (Binop p operand1 operator operand2) =
do thisPosition p
operand1 <- tExp env operand1
operand2 <- tExp env operand2
returnType <- match operand1 operand2
returnType <- atomic returnType
_ <- lvalue operator operand1
return (I.Binop p returnType operand1 operator operand2)
{- The ! operator takes an argument of any atomic type and returns a
boolean. -} | 415 | false | false | 0 | 10 | 109 | 112 | 48 | 64 | null | null |
afcowie/new-snap-server | src/Snap/Internal/Http/Server/Config.hs | bsd-3-clause | bsFromString :: String -> ByteString
bsFromString = T.encodeUtf8 . T.pack | 73 | bsFromString :: String -> ByteString
bsFromString = T.encodeUtf8 . T.pack | 73 | bsFromString = T.encodeUtf8 . T.pack | 36 | false | true | 0 | 7 | 9 | 30 | 13 | 17 | null | null |
timsears/species | Math/Combinatorics/Species/Class.hs | bsd-3-clause | ballots = ballot | 16 | ballots = ballot | 16 | ballots = ballot | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
Ming-Tang/FP15 | src/FP15/Compiler/Reduction/BExpr.hs | mit | ss (TIf p a b) = TIf <$> sst p <*> sst a <*> sst b | 50 | ss (TIf p a b) = TIf <$> sst p <*> sst a <*> sst b | 50 | ss (TIf p a b) = TIf <$> sst p <*> sst a <*> sst b | 50 | false | false | 0 | 8 | 15 | 41 | 18 | 23 | null | null |
yihuang/tagstream-conduit | Text/HTML/TagStream/ByteString.hs | bsd-3-clause | showToken hl (Special name s) = cc [hl "<!", name, " ", s, hl ">"] | 66 | showToken hl (Special name s) = cc [hl "<!", name, " ", s, hl ">"] | 66 | showToken hl (Special name s) = cc [hl "<!", name, " ", s, hl ">"] | 66 | false | false | 0 | 7 | 14 | 43 | 22 | 21 | null | null |
rodrigo-machado/verigraph | src/library/Logic/Ctl/Parser.hs | gpl-3.0 | ctlDef :: (Stream s Identity Char) => P.GenLanguageDef s u Identity
ctlDef =
P.LanguageDef
{ P.commentStart =
"{-"
, P.commentEnd =
"-}"
, P.commentLine =
"--"
, P.nestedComments =
True
, P.identStart =
lower <|> oneOf "_"
, P.identLetter =
alphaNum <|> oneOf "_'"
, P.opStart =
oneOf "&|-<~"
, P.opLetter =
oneOf "&|->"
, P.reservedOpNames =
["&&", "||", "~", "->", "<->"]
, P.reservedNames =
["true", "false", "A", "E", "U", "W"]
++ [pq++sq | pq <- ["A", "E"], sq <- ["X", "F", "G"]]
, P.caseSensitive =
True
} | 668 | ctlDef :: (Stream s Identity Char) => P.GenLanguageDef s u Identity
ctlDef =
P.LanguageDef
{ P.commentStart =
"{-"
, P.commentEnd =
"-}"
, P.commentLine =
"--"
, P.nestedComments =
True
, P.identStart =
lower <|> oneOf "_"
, P.identLetter =
alphaNum <|> oneOf "_'"
, P.opStart =
oneOf "&|-<~"
, P.opLetter =
oneOf "&|->"
, P.reservedOpNames =
["&&", "||", "~", "->", "<->"]
, P.reservedNames =
["true", "false", "A", "E", "U", "W"]
++ [pq++sq | pq <- ["A", "E"], sq <- ["X", "F", "G"]]
, P.caseSensitive =
True
} | 668 | ctlDef =
P.LanguageDef
{ P.commentStart =
"{-"
, P.commentEnd =
"-}"
, P.commentLine =
"--"
, P.nestedComments =
True
, P.identStart =
lower <|> oneOf "_"
, P.identLetter =
alphaNum <|> oneOf "_'"
, P.opStart =
oneOf "&|-<~"
, P.opLetter =
oneOf "&|->"
, P.reservedOpNames =
["&&", "||", "~", "->", "<->"]
, P.reservedNames =
["true", "false", "A", "E", "U", "W"]
++ [pq++sq | pq <- ["A", "E"], sq <- ["X", "F", "G"]]
, P.caseSensitive =
True
} | 600 | false | true | 0 | 12 | 243 | 224 | 129 | 95 | null | null |
fpco/hlint | src/Util.hs | bsd-3-clause | captureOutput :: IO () -> IO String
captureOutput act = withTemporaryFile "hlint_capture_output.txt" $ \file -> do
h <- openFile file ReadWriteMode
bout <- hGetBuffering stdout
berr <- hGetBuffering stderr
sto <- hDuplicate stdout
ste <- hDuplicate stderr
hDuplicateTo h stdout
hDuplicateTo h stderr
hClose h
act
hDuplicateTo sto stdout
hDuplicateTo ste stderr
hSetBuffering stdout bout
hSetBuffering stderr berr
readFile' file | 483 | captureOutput :: IO () -> IO String
captureOutput act = withTemporaryFile "hlint_capture_output.txt" $ \file -> do
h <- openFile file ReadWriteMode
bout <- hGetBuffering stdout
berr <- hGetBuffering stderr
sto <- hDuplicate stdout
ste <- hDuplicate stderr
hDuplicateTo h stdout
hDuplicateTo h stderr
hClose h
act
hDuplicateTo sto stdout
hDuplicateTo ste stderr
hSetBuffering stdout bout
hSetBuffering stderr berr
readFile' file | 483 | captureOutput act = withTemporaryFile "hlint_capture_output.txt" $ \file -> do
h <- openFile file ReadWriteMode
bout <- hGetBuffering stdout
berr <- hGetBuffering stderr
sto <- hDuplicate stdout
ste <- hDuplicate stderr
hDuplicateTo h stdout
hDuplicateTo h stderr
hClose h
act
hDuplicateTo sto stdout
hDuplicateTo ste stderr
hSetBuffering stdout bout
hSetBuffering stderr berr
readFile' file | 447 | false | true | 0 | 11 | 115 | 158 | 63 | 95 | null | null |
blitzcode/jacky | src/FontRendering.hs | mit | withFontRenderer :: Bool -> Bool -> Bool -> Int -> (FontRenderer -> IO a) -> IO a
withFontRenderer frDefForceAutohint frDefDisableKern frUseTexAtlas atlasTexSize f =
FT2.withFT2 $ \frFT2 -> -- We initialize our own FT2 library
TA.withTextureAtlas atlasTexSize
1
GL.RGBA
GL.RGBA8
GL.UnsignedByte
(0 :: Word32)
TFMinMag
$ \frTexAtlas ->
bracket
( do frGlyphCache <- newIORef HM.empty
frKernCache <- newIORef HM.empty
return FontRenderer { .. }
)
( \fr -> if frUseTexAtlas
then -- Textures are managed by the texture atlas, don't delete them
return ()
else -- Delete all OpenGL textures in the glyph cache
readIORef (frGlyphCache fr)
>>= GL.deleteObjectNames
. map (\(GlyphCacheEntry _ _ tex _) -> tex) . HM.elems
)
f | 1,245 | withFontRenderer :: Bool -> Bool -> Bool -> Int -> (FontRenderer -> IO a) -> IO a
withFontRenderer frDefForceAutohint frDefDisableKern frUseTexAtlas atlasTexSize f =
FT2.withFT2 $ \frFT2 -> -- We initialize our own FT2 library
TA.withTextureAtlas atlasTexSize
1
GL.RGBA
GL.RGBA8
GL.UnsignedByte
(0 :: Word32)
TFMinMag
$ \frTexAtlas ->
bracket
( do frGlyphCache <- newIORef HM.empty
frKernCache <- newIORef HM.empty
return FontRenderer { .. }
)
( \fr -> if frUseTexAtlas
then -- Textures are managed by the texture atlas, don't delete them
return ()
else -- Delete all OpenGL textures in the glyph cache
readIORef (frGlyphCache fr)
>>= GL.deleteObjectNames
. map (\(GlyphCacheEntry _ _ tex _) -> tex) . HM.elems
)
f | 1,245 | withFontRenderer frDefForceAutohint frDefDisableKern frUseTexAtlas atlasTexSize f =
FT2.withFT2 $ \frFT2 -> -- We initialize our own FT2 library
TA.withTextureAtlas atlasTexSize
1
GL.RGBA
GL.RGBA8
GL.UnsignedByte
(0 :: Word32)
TFMinMag
$ \frTexAtlas ->
bracket
( do frGlyphCache <- newIORef HM.empty
frKernCache <- newIORef HM.empty
return FontRenderer { .. }
)
( \fr -> if frUseTexAtlas
then -- Textures are managed by the texture atlas, don't delete them
return ()
else -- Delete all OpenGL textures in the glyph cache
readIORef (frGlyphCache fr)
>>= GL.deleteObjectNames
. map (\(GlyphCacheEntry _ _ tex _) -> tex) . HM.elems
)
f | 1,163 | false | true | 4 | 14 | 642 | 236 | 113 | 123 | null | null |
rvion/ride | jetpack/src/Data/ByteString/Lazy/Char8/AsC8.hs | bsd-3-clause | -- c8_readInteger :: ByteString -> Maybe (Integer, ByteString)
c8_readInteger = I.readInteger | 93 | c8_readInteger = I.readInteger | 30 | c8_readInteger = I.readInteger | 30 | true | false | 1 | 6 | 10 | 13 | 5 | 8 | null | null |
kojiromike/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | ctype (FCon c)
| c == sUN "C_Str" = "char*"
| c == sUN "C_Float" = "float"
| c == sUN "C_Ptr" = "void*"
| c == sUN "C_MPtr" = "void*"
| c == sUN "C_Unit" = "void" | 172 | ctype (FCon c)
| c == sUN "C_Str" = "char*"
| c == sUN "C_Float" = "float"
| c == sUN "C_Ptr" = "void*"
| c == sUN "C_MPtr" = "void*"
| c == sUN "C_Unit" = "void" | 172 | ctype (FCon c)
| c == sUN "C_Str" = "char*"
| c == sUN "C_Float" = "float"
| c == sUN "C_Ptr" = "void*"
| c == sUN "C_MPtr" = "void*"
| c == sUN "C_Unit" = "void" | 172 | false | false | 0 | 9 | 47 | 101 | 44 | 57 | null | null |
bitemyapp/varying | src/Example.hs | mit | -- A quadratic tween back and forth from 0 to 100 over 2 seconds.
tweeny :: Monad m => Var m Float Float
tweeny =
tween easeOutQuad 0 100 1 `andThenE` tween easeOutQuad 100 0 1 `andThen` tweeny | 197 | tweeny :: Monad m => Var m Float Float
tweeny =
tween easeOutQuad 0 100 1 `andThenE` tween easeOutQuad 100 0 1 `andThen` tweeny | 131 | tweeny =
tween easeOutQuad 0 100 1 `andThenE` tween easeOutQuad 100 0 1 `andThen` tweeny | 92 | true | true | 0 | 7 | 41 | 68 | 31 | 37 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x04DA' = "\x04D8\x0308" | 39 | decomposeChar '\x04DA' = "\x04D8\x0308" | 39 | decomposeChar '\x04DA' = "\x04D8\x0308" | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
bsl/language-dot | src/Language/Dot/Parser.hs | bsd-3-clause | semi' = semi lexer | 36 | semi' = semi lexer | 36 | semi' = semi lexer | 36 | false | false | 0 | 5 | 21 | 9 | 4 | 5 | null | null |
portnov/yaml-rpc | Network/YAML/API.hs | bsd-3-clause | testAPI :: API
testAPI = API {
apiUri = "http://home.iportnov.ru/test.api"
, apiTypes = M.fromList [("User",TUser (M.fromList [("fullName",TText),("login",TText)]))]
, apiMethods = M.fromList [("sayHello", Method {methodArgs = [THaskell "User"],
methodReturnType = TText})]
} | 333 | testAPI :: API
testAPI = API {
apiUri = "http://home.iportnov.ru/test.api"
, apiTypes = M.fromList [("User",TUser (M.fromList [("fullName",TText),("login",TText)]))]
, apiMethods = M.fromList [("sayHello", Method {methodArgs = [THaskell "User"],
methodReturnType = TText})]
} | 333 | testAPI = API {
apiUri = "http://home.iportnov.ru/test.api"
, apiTypes = M.fromList [("User",TUser (M.fromList [("fullName",TText),("login",TText)]))]
, apiMethods = M.fromList [("sayHello", Method {methodArgs = [THaskell "User"],
methodReturnType = TText})]
} | 318 | false | true | 0 | 14 | 88 | 108 | 64 | 44 | null | null |
edsko/cabal | Cabal/src/Distribution/PackageDescription/Check.hs | bsd-3-clause | checkCPPOptions :: PackageDescription -> [PackageCheck]
checkCPPOptions pkg =
catMaybes [
checkAlternatives "cpp-options" "include-dirs"
[ (flag, dir) | flag@('-':'I':dir) <- all_cppOptions]
]
where all_cppOptions = [ opts | bi <- allBuildInfo pkg
, opts <- cppOptions bi ] | 323 | checkCPPOptions :: PackageDescription -> [PackageCheck]
checkCPPOptions pkg =
catMaybes [
checkAlternatives "cpp-options" "include-dirs"
[ (flag, dir) | flag@('-':'I':dir) <- all_cppOptions]
]
where all_cppOptions = [ opts | bi <- allBuildInfo pkg
, opts <- cppOptions bi ] | 323 | checkCPPOptions pkg =
catMaybes [
checkAlternatives "cpp-options" "include-dirs"
[ (flag, dir) | flag@('-':'I':dir) <- all_cppOptions]
]
where all_cppOptions = [ opts | bi <- allBuildInfo pkg
, opts <- cppOptions bi ] | 267 | false | true | 0 | 14 | 86 | 98 | 51 | 47 | null | null |
paulsamways/sudoku | src/Solver.hs | bsd-2-clause | solve :: Grid -> Maybe Grid
solve g = let s = sortBy (\(_, Possibly xs) (_, Possibly ys) -> compare xs ys) [s | s@(_, Possibly xs) <- assocs g] in
if length s == 0
then Just g
else let (p, Possibly xs) = head s in
Solver.until (\x -> assign g p x >>= solve) xs | 305 | solve :: Grid -> Maybe Grid
solve g = let s = sortBy (\(_, Possibly xs) (_, Possibly ys) -> compare xs ys) [s | s@(_, Possibly xs) <- assocs g] in
if length s == 0
then Just g
else let (p, Possibly xs) = head s in
Solver.until (\x -> assign g p x >>= solve) xs | 305 | solve g = let s = sortBy (\(_, Possibly xs) (_, Possibly ys) -> compare xs ys) [s | s@(_, Possibly xs) <- assocs g] in
if length s == 0
then Just g
else let (p, Possibly xs) = head s in
Solver.until (\x -> assign g p x >>= solve) xs | 277 | false | true | 0 | 15 | 103 | 164 | 82 | 82 | null | null |
themoritz/cabal | cabal-install/Distribution/Client/ProjectConfig/Legacy.hs | bsd-3-clause | -- | This is a bit tricky since it has to cover globs which have embedded @,@
-- chars. But we don't just want to parse strictly as a glob since we want to
-- allow http urls which don't parse as globs, and possibly some
-- system-dependent file paths. So we parse fairly liberally as a token, but
-- we allow @,@ inside matched @{}@ braces.
--
parsePackageLocationTokenQ :: ReadP r String
parsePackageLocationTokenQ = parseHaskellString
Parse.<++ parsePackageLocationToken
where
parsePackageLocationToken :: ReadP r String
parsePackageLocationToken = fmap fst (Parse.gather outerTerm)
where
outerTerm = alternateEither1 outerToken (braces innerTerm)
innerTerm = alternateEither innerToken (braces innerTerm)
outerToken = Parse.munch1 outerChar >> return ()
innerToken = Parse.munch1 innerChar >> return ()
outerChar c = not (isSpace c || c == '{' || c == '}' || c == ',')
innerChar c = not (isSpace c || c == '{' || c == '}')
braces = Parse.between (Parse.char '{') (Parse.char '}')
alternateEither, alternateEither1,
alternatePQs, alternate1PQs, alternateQsP, alternate1QsP
:: ReadP r () -> ReadP r () -> ReadP r ()
alternateEither1 p q = alternate1PQs p q +++ alternate1QsP q p
alternateEither p q = alternateEither1 p q +++ return ()
alternate1PQs p q = p >> alternateQsP q p
alternatePQs p q = alternate1PQs p q +++ return ()
alternate1QsP q p = Parse.many1 q >> alternatePQs p q
alternateQsP q p = alternate1QsP q p +++ return () | 1,595 | parsePackageLocationTokenQ :: ReadP r String
parsePackageLocationTokenQ = parseHaskellString
Parse.<++ parsePackageLocationToken
where
parsePackageLocationToken :: ReadP r String
parsePackageLocationToken = fmap fst (Parse.gather outerTerm)
where
outerTerm = alternateEither1 outerToken (braces innerTerm)
innerTerm = alternateEither innerToken (braces innerTerm)
outerToken = Parse.munch1 outerChar >> return ()
innerToken = Parse.munch1 innerChar >> return ()
outerChar c = not (isSpace c || c == '{' || c == '}' || c == ',')
innerChar c = not (isSpace c || c == '{' || c == '}')
braces = Parse.between (Parse.char '{') (Parse.char '}')
alternateEither, alternateEither1,
alternatePQs, alternate1PQs, alternateQsP, alternate1QsP
:: ReadP r () -> ReadP r () -> ReadP r ()
alternateEither1 p q = alternate1PQs p q +++ alternate1QsP q p
alternateEither p q = alternateEither1 p q +++ return ()
alternate1PQs p q = p >> alternateQsP q p
alternatePQs p q = alternate1PQs p q +++ return ()
alternate1QsP q p = Parse.many1 q >> alternatePQs p q
alternateQsP q p = alternate1QsP q p +++ return () | 1,250 | parsePackageLocationTokenQ = parseHaskellString
Parse.<++ parsePackageLocationToken
where
parsePackageLocationToken :: ReadP r String
parsePackageLocationToken = fmap fst (Parse.gather outerTerm)
where
outerTerm = alternateEither1 outerToken (braces innerTerm)
innerTerm = alternateEither innerToken (braces innerTerm)
outerToken = Parse.munch1 outerChar >> return ()
innerToken = Parse.munch1 innerChar >> return ()
outerChar c = not (isSpace c || c == '{' || c == '}' || c == ',')
innerChar c = not (isSpace c || c == '{' || c == '}')
braces = Parse.between (Parse.char '{') (Parse.char '}')
alternateEither, alternateEither1,
alternatePQs, alternate1PQs, alternateQsP, alternate1QsP
:: ReadP r () -> ReadP r () -> ReadP r ()
alternateEither1 p q = alternate1PQs p q +++ alternate1QsP q p
alternateEither p q = alternateEither1 p q +++ return ()
alternate1PQs p q = p >> alternateQsP q p
alternatePQs p q = alternate1PQs p q +++ return ()
alternate1QsP q p = Parse.many1 q >> alternatePQs p q
alternateQsP q p = alternate1QsP q p +++ return () | 1,205 | true | true | 21 | 16 | 393 | 402 | 206 | 196 | null | null |
jstolarek/ghc | libraries/base/Data/OldList.hs | bsd-3-clause | -- The empty builder
emptySB :: SnocBuilder a
emptySB = SnocBuilder 0 [] [] | 76 | emptySB :: SnocBuilder a
emptySB = SnocBuilder 0 [] [] | 54 | emptySB = SnocBuilder 0 [] [] | 29 | true | true | 1 | 6 | 14 | 29 | 13 | 16 | null | null |
arjantop/gifter | src/Gifter/Daemon/SteamGamesTask.hs | bsd-3-clause | steamGamesSuccess :: SteamGames -> TaskSG ()
steamGamesSuccess sg = do
logTime $ $(printf "You currently own %d games") (numberOwned sg)
logTime $ $(printf "You have %d games in wishlist") (numberWishlist sg)
sgOld <- getsIntState getValue
let sgNew = over sFormKey (copyFormKeyIfMissing sgOld) sg
replaceSteamGames sgNew
where
copyFormKeyIfMissing osg = flip mplus (osg^.sFormKey) | 407 | steamGamesSuccess :: SteamGames -> TaskSG ()
steamGamesSuccess sg = do
logTime $ $(printf "You currently own %d games") (numberOwned sg)
logTime $ $(printf "You have %d games in wishlist") (numberWishlist sg)
sgOld <- getsIntState getValue
let sgNew = over sFormKey (copyFormKeyIfMissing sgOld) sg
replaceSteamGames sgNew
where
copyFormKeyIfMissing osg = flip mplus (osg^.sFormKey) | 407 | steamGamesSuccess sg = do
logTime $ $(printf "You currently own %d games") (numberOwned sg)
logTime $ $(printf "You have %d games in wishlist") (numberWishlist sg)
sgOld <- getsIntState getValue
let sgNew = over sFormKey (copyFormKeyIfMissing sgOld) sg
replaceSteamGames sgNew
where
copyFormKeyIfMissing osg = flip mplus (osg^.sFormKey) | 362 | false | true | 0 | 12 | 77 | 133 | 59 | 74 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.