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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zepto-lang/zepto-js | src/Zepto/Primitives/LogMathPrimitives.hs | gpl-2.0 | numPow [SimpleVal (Number (NumI n)), wrong@(SimpleVal (Number (NumS base)))] =
if base > -1
then return $ fromSimple $ Number $ NumI $ n ^ (fromIntegral base::Integer)
else throwError $ TypeMismatch "positive" wrong | 235 | numPow [SimpleVal (Number (NumI n)), wrong@(SimpleVal (Number (NumS base)))] =
if base > -1
then return $ fromSimple $ Number $ NumI $ n ^ (fromIntegral base::Integer)
else throwError $ TypeMismatch "positive" wrong | 235 | numPow [SimpleVal (Number (NumI n)), wrong@(SimpleVal (Number (NumS base)))] =
if base > -1
then return $ fromSimple $ Number $ NumI $ n ^ (fromIntegral base::Integer)
else throwError $ TypeMismatch "positive" wrong | 235 | false | false | 2 | 12 | 52 | 105 | 53 | 52 | null | null |
ddssff/lens | src/Control/Lens/Tuple.hs | bsd-3-clause | proxyN2 :: Proxy N2
proxyN2 = Proxy | 35 | proxyN2 :: Proxy N2
proxyN2 = Proxy | 35 | proxyN2 = Proxy | 15 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
jpvillaisaza/pocket-haskell | src/Web/Pocket/Request.hs | mit | headers :: [(HeaderName, ByteString)]
headers =
[ ("Content-Type", "application/json")
, ("X-Accept", "application/json")
] | 129 | headers :: [(HeaderName, ByteString)]
headers =
[ ("Content-Type", "application/json")
, ("X-Accept", "application/json")
] | 129 | headers =
[ ("Content-Type", "application/json")
, ("X-Accept", "application/json")
] | 91 | false | true | 0 | 6 | 18 | 38 | 24 | 14 | null | null |
kcsmnt0/demesne | src/Stdlib.hs | bsd-3-clause | mkGt [x, y] = Z3.mkGt x y | 25 | mkGt [x, y] = Z3.mkGt x y | 25 | mkGt [x, y] = Z3.mkGt x y | 25 | false | false | 0 | 6 | 6 | 22 | 11 | 11 | null | null |
chadbrewbaker/combinat | svg/src/gen_figures.hs | bsd-3-clause | in = do
export "plane_partition.svg" (Width 320) $ drawPlanePartition3D $
PlanePart [[5,4,3,3,1],[4,4,2,1],[3,2],[2,1],[1],[1]]
export "noncrossing.svg" (Width 256) $ pad 1.10 $ drawNonCrossingCircleDiagram' orange True $
NonCrossing [[3],[5,4,2],[7,6,1],[9,8]]
export "young_tableau.svg" (Wid... | 965 | main = do
export "plane_partition.svg" (Width 320) $ drawPlanePartition3D $
PlanePart [[5,4,3,3,1],[4,4,2,1],[3,2],[2,1],[1],[1]]
export "noncrossing.svg" (Width 256) $ pad 1.10 $ drawNonCrossingCircleDiagram' orange True $
NonCrossing [[3],[5,4,2],[7,6,1],[9,8]]
export "young_tableau.svg" (W... | 965 | main = do
export "plane_partition.svg" (Width 320) $ drawPlanePartition3D $
PlanePart [[5,4,3,3,1],[4,4,2,1],[3,2],[2,1],[1],[1]]
export "noncrossing.svg" (Width 256) $ pad 1.10 $ drawNonCrossingCircleDiagram' orange True $
NonCrossing [[3],[5,4,2],[7,6,1],[9,8]]
export "young_tableau.svg" (W... | 965 | false | false | 1 | 12 | 209 | 438 | 248 | 190 | null | null |
serokell/time-warp | src/Control/TimeWarp/Manager/Job.hs | mit | -- | Add second manager as a job to first manager.
addManagerAsJob :: (MonadIO m, MonadTimed m, MonadBaseControl IO m)
=> JobCurator -> InterruptType -> JobCurator -> m ()
addManagerAsJob curator intType managerJob = do
interrupter <- inCurrentContext $ interruptAllJobs managerJob intType
addJob... | 521 | addManagerAsJob :: (MonadIO m, MonadTimed m, MonadBaseControl IO m)
=> JobCurator -> InterruptType -> JobCurator -> m ()
addManagerAsJob curator intType managerJob = do
interrupter <- inCurrentContext $ interruptAllJobs managerJob intType
addJob curator (JobInterrupter interrupter) $
\(r... | 470 | addManagerAsJob curator intType managerJob = do
interrupter <- inCurrentContext $ interruptAllJobs managerJob intType
addJob curator (JobInterrupter interrupter) $
\(runMarker -> ready) -> fork_ $ awaitAllJobs managerJob >> liftIO ready
-- | Adds job executing in another thread, where interrupting kill... | 333 | true | true | 0 | 11 | 103 | 120 | 59 | 61 | null | null |
mcschroeder/ghc | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | {-
Note [Rule free var hack] (Not a hack any more)
~~~~~~~~~~~~~~~~~~~~~~~~~
We used not to include the Id in its own rhs free-var set.
Otherwise the occurrence analyser makes bindings recursive:
f x y = x+y
RULE: f (f x y) z ==> f x (f y z)
However, the occurrence analyser distinguishes "non-rule l... | 1,469 | vectsFreeVars :: [CoreVect] -> VarSet
vectsFreeVars = mapUnionVarSet vectFreeVars
where
vectFreeVars (Vect _ rhs) = runFVSet $ filterFV isLocalId $ expr_fvs rhs
vectFreeVars (NoVect _) = noFVs
vectFreeVars (VectType _ _ _) = noFVs
vectFreeVars (VectClass _) = noFVs
vectFreeVars (VectI... | 899 | vectsFreeVars = mapUnionVarSet vectFreeVars
where
vectFreeVars (Vect _ rhs) = runFVSet $ filterFV isLocalId $ expr_fvs rhs
vectFreeVars (NoVect _) = noFVs
vectFreeVars (VectType _ _ _) = noFVs
vectFreeVars (VectClass _) = noFVs
vectFreeVars (VectInst _) = noFVs
-- this funct... | 861 | true | true | 0 | 7 | 387 | 130 | 61 | 69 | null | null |
mb64/unit-calc | src/Units/Units.hs | gpl-3.0 | yards = Tagged 1 :: P.Num a => Tagged Yard a | 44 | yards = Tagged 1 :: P.Num a => Tagged Yard a | 44 | yards = Tagged 1 :: P.Num a => Tagged Yard a | 44 | false | false | 0 | 7 | 10 | 26 | 12 | 14 | null | null |
sbidin/sdl2-gfx | src/SDL/Primitive.hs | mit | -- | Renders a transparent ellipse, bordered by a line of a given 'Color'.
--
-- The 'Radius' arguments are the horizontal and vertical radius of the ellipse
-- respectively, in pixels.
ellipse :: MonadIO m => Renderer -> Pos -> Radius -> Radius -> Color -> m ()
ellipse (Renderer p) (V2 x y) rx ry (V4 r g b a) =
thro... | 451 | ellipse :: MonadIO m => Renderer -> Pos -> Radius -> Radius -> Color -> m ()
ellipse (Renderer p) (V2 x y) rx ry (V4 r g b a) =
throwIfNeg_ "SDL.Primitive.ellipse" "ellipseRGBA" $
SDL.Raw.Primitive.ellipse
p (cint x) (cint y) (cint rx) (cint ry) r g b a | 265 | ellipse (Renderer p) (V2 x y) rx ry (V4 r g b a) =
throwIfNeg_ "SDL.Primitive.ellipse" "ellipseRGBA" $
SDL.Raw.Primitive.ellipse
p (cint x) (cint y) (cint rx) (cint ry) r g b a | 188 | true | true | 0 | 12 | 92 | 140 | 71 | 69 | null | null |
Soares/tagwiki | src/Context.hs | mit | popPP :: (Contextual m) => m ()
popPP = modifyTrail ascendRef | 61 | popPP :: (Contextual m) => m ()
popPP = modifyTrail ascendRef | 61 | popPP = modifyTrail ascendRef | 29 | false | true | 0 | 7 | 10 | 28 | 14 | 14 | null | null |
keera-studios/hsQt | Qtc/Gui/QApplication.hs | bsd-2-clause | qqApplicationWidgetAt :: ((QPoint t1)) -> IO (QWidget ())
qqApplicationWidgetAt (x1)
= withQWidgetResult $
withObjectPtr x1 $ \cobj_x1 ->
qtc_QApplication_widgetAt cobj_x1 | 181 | qqApplicationWidgetAt :: ((QPoint t1)) -> IO (QWidget ())
qqApplicationWidgetAt (x1)
= withQWidgetResult $
withObjectPtr x1 $ \cobj_x1 ->
qtc_QApplication_widgetAt cobj_x1 | 181 | qqApplicationWidgetAt (x1)
= withQWidgetResult $
withObjectPtr x1 $ \cobj_x1 ->
qtc_QApplication_widgetAt cobj_x1 | 123 | false | true | 0 | 9 | 29 | 60 | 30 | 30 | null | null |
rvion/lamdu | Lamdu/Sugar/Convert/Binder.hs | gpl-3.0 | makeFieldParamActions ::
MonadA m =>
Maybe V.Var -> V.Var -> [T.Tag] -> FieldParam -> StoredLam m ->
ConvertM m (FuncParamActions m)
makeFieldParamActions mRecursiveVar param tags fp storedLam =
do
addParam <- makeAddFieldParam mRecursiveVar param mkNewTags storedLam
delParam <- makeDelF... | 591 | makeFieldParamActions ::
MonadA m =>
Maybe V.Var -> V.Var -> [T.Tag] -> FieldParam -> StoredLam m ->
ConvertM m (FuncParamActions m)
makeFieldParamActions mRecursiveVar param tags fp storedLam =
do
addParam <- makeAddFieldParam mRecursiveVar param mkNewTags storedLam
delParam <- makeDelF... | 591 | makeFieldParamActions mRecursiveVar param tags fp storedLam =
do
addParam <- makeAddFieldParam mRecursiveVar param mkNewTags storedLam
delParam <- makeDelFieldParam mRecursiveVar tags fp storedLam
pure FuncParamActions
{ _fpAddNext = addParam
, _fpDelete = delParam
... | 446 | false | true | 0 | 13 | 172 | 182 | 91 | 91 | null | null |
nomeata/ghc | utils/hpc/HpcMarkup.hs | bsd-3-clause | charEncodingTag :: String
charEncodingTag =
"<meta http-equiv=\"Content-Type\" " ++
"content=\"text/html; " ++ "charset=" ++ show localeEncoding ++ "\">" | 167 | charEncodingTag :: String
charEncodingTag =
"<meta http-equiv=\"Content-Type\" " ++
"content=\"text/html; " ++ "charset=" ++ show localeEncoding ++ "\">" | 167 | charEncodingTag =
"<meta http-equiv=\"Content-Type\" " ++
"content=\"text/html; " ++ "charset=" ++ show localeEncoding ++ "\">" | 141 | false | true | 0 | 8 | 31 | 37 | 16 | 21 | null | null |
pepeiborra/muterm-framework | MuTerm/Framework/GraphViz.hs | bsd-3-clause | compoundNode (DotNode a b) (CompoundNode (DotNode c d) n3) = CompoundNode (DotNode a d) n3 | 90 | compoundNode (DotNode a b) (CompoundNode (DotNode c d) n3) = CompoundNode (DotNode a d) n3 | 90 | compoundNode (DotNode a b) (CompoundNode (DotNode c d) n3) = CompoundNode (DotNode a d) n3 | 90 | false | false | 0 | 8 | 14 | 50 | 23 | 27 | null | null |
sdiehl/ghc | libraries/base/Data/Type/Equality.hs | bsd-3-clause | -- | Transitivity of equality
trans :: (a :~: b) -> (b :~: c) -> (a :~: c)
trans Refl Refl = Refl | 97 | trans :: (a :~: b) -> (b :~: c) -> (a :~: c)
trans Refl Refl = Refl | 67 | trans Refl Refl = Refl | 22 | true | true | 0 | 8 | 22 | 51 | 26 | 25 | null | null |
elitak/hs-datahand | src/DataHand/Layouts/Games/DoTA2.hs | gpl-3.0 | selO = ø | 8 | selO = ø | 8 | selO = ø | 8 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
vikraman/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | nameIsHomePackageImport :: Module -> Name -> Bool
-- True if the Name is defined in module of this package
-- /other than/ the this_mod
nameIsHomePackageImport this_mod
= \nm -> case nameModule_maybe nm of
Nothing -> False
Just nm_mod -> nm_mod /= this_mod
&& modu... | 507 | nameIsHomePackageImport :: Module -> Name -> Bool
nameIsHomePackageImport this_mod
= \nm -> case nameModule_maybe nm of
Nothing -> False
Just nm_mod -> nm_mod /= this_mod
&& moduleUnitId nm_mod == this_pkg
where
this_pkg = moduleUnitId this_mod
-- | Returns... | 421 | nameIsHomePackageImport this_mod
= \nm -> case nameModule_maybe nm of
Nothing -> False
Just nm_mod -> nm_mod /= this_mod
&& moduleUnitId nm_mod == this_pkg
where
this_pkg = moduleUnitId this_mod
-- | Returns True if the Name comes from some other package: n... | 371 | true | true | 0 | 11 | 134 | 79 | 40 | 39 | null | null |
ksaveljev/hake-2 | src/Game/Monsters/MFlyer.hs | bsd-3-clause | flyerPain :: EntPain
flyerPain =
GenericEntPain "flyer_pain" $ \selfRef _ _ _ -> do
self <- readRef selfRef
when ((self^.eHealth) <= (self^.eMaxHealth) `div` 2) $
modifyRef selfRef (\v -> v & eEntityState.esSkinNum .~ 1)
levelTime <- use $ gameBaseGlobals.gbLevel.llTime
unless (levelTime < (s... | 1,481 | flyerPain :: EntPain
flyerPain =
GenericEntPain "flyer_pain" $ \selfRef _ _ _ -> do
self <- readRef selfRef
when ((self^.eHealth) <= (self^.eMaxHealth) `div` 2) $
modifyRef selfRef (\v -> v & eEntityState.esSkinNum .~ 1)
levelTime <- use $ gameBaseGlobals.gbLevel.llTime
unless (levelTime < (s... | 1,481 | flyerPain =
GenericEntPain "flyer_pain" $ \selfRef _ _ _ -> do
self <- readRef selfRef
when ((self^.eHealth) <= (self^.eMaxHealth) `div` 2) $
modifyRef selfRef (\v -> v & eEntityState.esSkinNum .~ 1)
levelTime <- use $ gameBaseGlobals.gbLevel.llTime
unless (levelTime < (self^.ePainDebounceTim... | 1,460 | false | true | 0 | 22 | 570 | 413 | 204 | 209 | null | null |
Peaker/lamdu | src/Lamdu/GUI/StatusBar/Common.hs | gpl-3.0 | combineEdges :: _ => m (Double -> StatusWidget f -> StatusWidget f -> StatusWidget f)
combineEdges =
Glue.mkPoly ?? Glue.Horizontal
<&> \(Glue.Poly (|||)) width (StatusWidget xw xe) (StatusWidget yw ye) ->
let padding = max 0 (width - combinedWidths)
combinedWidths = xw ^. M.width + yw ^. M.width
... | 449 | combineEdges :: _ => m (Double -> StatusWidget f -> StatusWidget f -> StatusWidget f)
combineEdges =
Glue.mkPoly ?? Glue.Horizontal
<&> \(Glue.Poly (|||)) width (StatusWidget xw xe) (StatusWidget yw ye) ->
let padding = max 0 (width - combinedWidths)
combinedWidths = xw ^. M.width + yw ^. M.width
... | 449 | combineEdges =
Glue.mkPoly ?? Glue.Horizontal
<&> \(Glue.Poly (|||)) width (StatusWidget xw xe) (StatusWidget yw ye) ->
let padding = max 0 (width - combinedWidths)
combinedWidths = xw ^. M.width + yw ^. M.width
in StatusWidget
{ _widget = xw ||| Spacer.makeHorizontal padding ||| yw
... | 363 | false | true | 4 | 13 | 114 | 178 | 87 | 91 | null | null |
jeffreyrosenbluth/Sheet | app/Main.hs | bsd-3-clause | process Total = get >>= outputStrLn . displayEntry . total . sheet >> repl | 83 | process Total = get >>= outputStrLn . displayEntry . total . sheet >> repl | 83 | process Total = get >>= outputStrLn . displayEntry . total . sheet >> repl | 83 | false | false | 0 | 9 | 22 | 29 | 14 | 15 | null | null |
christiaanb/ghc | compiler/types/Type.hs | bsd-3-clause | -- There used to be a special case for when
-- ty == TyVarTy tv
-- (a not-uncommon case) in which case the substitution was dropped.
-- But the type-tidier changes the print-name of a type variable without
-- changing the unique, and that led to a bug. Why? Pre-tidying, we had
... | 886 | zip_ty_env tvs tys env = pprTrace "Var/Type length mismatch: " (ppr tvs $$ ppr tys) env | 99 | zip_ty_env tvs tys env = pprTrace "Var/Type length mismatch: " (ppr tvs $$ ppr tys) env | 99 | true | false | 0 | 8 | 257 | 47 | 27 | 20 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Elements/Interactive.hs | bsd-3-clause | -- | A short-hand notion for @ el \"textarea\" ... @
textAreaN ∷ forall t m a. DomBuilder t m ⇒ m a → m a
textAreaN children = snd <$> textAreaN' children | 154 | textAreaN ∷ forall t m a. DomBuilder t m ⇒ m a → m a
textAreaN children = snd <$> textAreaN' children | 101 | textAreaN children = snd <$> textAreaN' children | 48 | true | true | 0 | 8 | 32 | 48 | 24 | 24 | null | null |
kindohm/tidal-midi | Sound/Tidal/MIDI/System1M.hs | gpl-3.0 | (rosc2mod, rosc2mod_p) = pF "rosc2mod" (Just 0) | 47 | (rosc2mod, rosc2mod_p) = pF "rosc2mod" (Just 0) | 47 | (rosc2mod, rosc2mod_p) = pF "rosc2mod" (Just 0) | 47 | false | false | 0 | 7 | 6 | 24 | 12 | 12 | null | null |
kenta2/retrograde | Chess.hs | agpl-3.0 | my_boardsize :: (Integer,Integer);
my_boardsize = (4,4) | 55 | my_boardsize :: (Integer,Integer)
my_boardsize = (4,4) | 54 | my_boardsize = (4,4) | 20 | false | true | 2 | 5 | 5 | 30 | 15 | 15 | null | null |
mslovy/barrelfish | hake/RuleDefs.hs | mit | mackerel :: Options -> String -> HRule
mackerel opts dev = mackerel_generic opts dev "bitfield-driver" | 102 | mackerel :: Options -> String -> HRule
mackerel opts dev = mackerel_generic opts dev "bitfield-driver" | 102 | mackerel opts dev = mackerel_generic opts dev "bitfield-driver" | 63 | false | true | 0 | 6 | 14 | 31 | 15 | 16 | null | null |
vTurbine/ghc | compiler/iface/IfaceType.hs | bsd-3-clause | eqIfaceTvBndrs _ _ _ = Nothing | 30 | eqIfaceTvBndrs _ _ _ = Nothing | 30 | eqIfaceTvBndrs _ _ _ = Nothing | 30 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
KirillTim/raft-haskell | test/Spec.hs | bsd-3-clause | main :: IO ()
main = defaultMain followerTestGroup | 50 | main :: IO ()
main = defaultMain followerTestGroup | 50 | main = defaultMain followerTestGroup | 36 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
elieux/ghc | compiler/nativeGen/Dwarf/Types.hs | bsd-3-clause | pprByte :: Word8 -> SDoc
pprByte x = ptext (sLit "\t.byte ") <> ppr (fromIntegral x :: Word) | 92 | pprByte :: Word8 -> SDoc
pprByte x = ptext (sLit "\t.byte ") <> ppr (fromIntegral x :: Word) | 92 | pprByte x = ptext (sLit "\t.byte ") <> ppr (fromIntegral x :: Word) | 67 | false | true | 0 | 8 | 17 | 43 | 21 | 22 | null | null |
ezyang/ghc | libraries/base/Control/Arrow.hs | bsd-3-clause | returnA :: Arrow a => a b b
returnA = arr id | 44 | returnA :: Arrow a => a b b
returnA = arr id | 44 | returnA = arr id | 16 | false | true | 0 | 6 | 11 | 26 | 12 | 14 | null | null |
spechub/Hets | OWL2/Sublogic.hs | gpl-2.0 | requireQualNumberRestrictions :: OWLSub -> OWLSub
requireQualNumberRestrictions sl = sl {numberRestrictions = Qualified} | 120 | requireQualNumberRestrictions :: OWLSub -> OWLSub
requireQualNumberRestrictions sl = sl {numberRestrictions = Qualified} | 120 | requireQualNumberRestrictions sl = sl {numberRestrictions = Qualified} | 70 | false | true | 0 | 6 | 11 | 26 | 14 | 12 | null | null |
walkie/CC-Syntactic | src/CC/BinaryChoice.hs | bsd-3-clause | tree :: ASTF (Tree Int :+: List (Tree Int t) :+: ChcT :+: One Int) (Tree Int t)
vtree = node (one 0) (cons (node vint nil) nil)
| 128 | vtree :: ASTF (Tree Int :+: List (Tree Int t) :+: ChcT :+: One Int) (Tree Int t)
vtree = node (one 0) (cons (node vint nil) nil) | 128 | vtree = node (one 0) (cons (node vint nil) nil) | 47 | false | true | 1 | 11 | 28 | 86 | 40 | 46 | null | null |
spechub/Hets | HasCASL/Symbol.hs | gpl-2.0 | idsOfKind :: Kind -> Set.Set Id
idsOfKind kd = case kd of
ClassKind i -> Set.singleton i
FunKind _ k1 k2 _ -> Set.union (idsOfKind k1) $ idsOfKind k2 | 153 | idsOfKind :: Kind -> Set.Set Id
idsOfKind kd = case kd of
ClassKind i -> Set.singleton i
FunKind _ k1 k2 _ -> Set.union (idsOfKind k1) $ idsOfKind k2 | 153 | idsOfKind kd = case kd of
ClassKind i -> Set.singleton i
FunKind _ k1 k2 _ -> Set.union (idsOfKind k1) $ idsOfKind k2 | 121 | false | true | 0 | 11 | 32 | 74 | 34 | 40 | null | null |
abstools/habs | src/ABS/Compiler/Codegen/StmExp.hs | bsd-3-clause | tStmExp (ABS.EEq (ABS.ELit ABS.LNull) (ABS.ELit ABS.LThis)) = pure ([hs|I'.pure False|], ABS.TSimple $ ABS.U_ $ ABS.U ((0,0),"Bool")) | 133 | tStmExp (ABS.EEq (ABS.ELit ABS.LNull) (ABS.ELit ABS.LThis)) = pure ([hs|I'.pure False|], ABS.TSimple $ ABS.U_ $ ABS.U ((0,0),"Bool")) | 133 | tStmExp (ABS.EEq (ABS.ELit ABS.LNull) (ABS.ELit ABS.LThis)) = pure ([hs|I'.pure False|], ABS.TSimple $ ABS.U_ $ ABS.U ((0,0),"Bool")) | 133 | false | false | 0 | 10 | 15 | 82 | 44 | 38 | null | null |
brendanhay/gogol | gogol-toolresults/gen/Network/Google/ToolResults/Types/Product.hs | mpl-2.0 | -- | Total number of unique Non-SDK API\'s accessed.
nsauvrUniqueAPIs :: Lens' NonSdkAPIUsageViolationReport (Maybe Int32)
nsauvrUniqueAPIs
= lens _nsauvrUniqueAPIs
(\ s a -> s{_nsauvrUniqueAPIs = a})
. mapping _Coerce | 232 | nsauvrUniqueAPIs :: Lens' NonSdkAPIUsageViolationReport (Maybe Int32)
nsauvrUniqueAPIs
= lens _nsauvrUniqueAPIs
(\ s a -> s{_nsauvrUniqueAPIs = a})
. mapping _Coerce | 179 | nsauvrUniqueAPIs
= lens _nsauvrUniqueAPIs
(\ s a -> s{_nsauvrUniqueAPIs = a})
. mapping _Coerce | 109 | true | true | 2 | 8 | 42 | 60 | 28 | 32 | null | null |
swian/minesweeper | src/App/Ui.hs | bsd-3-clause | keyEvent st (V.EvKey V.KRight []) = M.continue $ st & position._1 %~ min (st^.board.maxX) . (+ 1) | 102 | keyEvent st (V.EvKey V.KRight []) = M.continue $ st & position._1 %~ min (st^.board.maxX) . (+ 1) | 102 | keyEvent st (V.EvKey V.KRight []) = M.continue $ st & position._1 %~ min (st^.board.maxX) . (+ 1) | 102 | false | false | 0 | 10 | 21 | 61 | 31 | 30 | null | null |
amccausl/Swish | Swish/HaskellRDF/SwishScript.hs | lgpl-2.1 | restOfLine :: N3Parser String
restOfLine =
do { s <- manyTill anyChar (char '\n')
; whiteSpace
; return s
} | 157 | restOfLine :: N3Parser String
restOfLine =
do { s <- manyTill anyChar (char '\n')
; whiteSpace
; return s
} | 156 | restOfLine =
do { s <- manyTill anyChar (char '\n')
; whiteSpace
; return s
} | 126 | false | true | 0 | 11 | 69 | 51 | 23 | 28 | null | null |
mikeizbicki/histogram | src/Graphics/Histogram.hs | bsd-3-clause | histogram :: BinningStrat -> [Double] -> Histogram
histogram strat xs = histogramNumBins (strat xs) xs | 102 | histogram :: BinningStrat -> [Double] -> Histogram
histogram strat xs = histogramNumBins (strat xs) xs | 102 | histogram strat xs = histogramNumBins (strat xs) xs | 51 | false | true | 0 | 7 | 14 | 38 | 19 | 19 | null | null |
spacekitteh/smcghc | testsuite/tests/lib/integer/integerGmpInternals.hs | bsd-3-clause | newByteArray :: Word# -> IO MBA
newByteArray sz = IO $ \s -> case newPinnedByteArray# (word2Int# sz) s of (# s, arr #) -> (# s, MBA arr #) | 138 | newByteArray :: Word# -> IO MBA
newByteArray sz = IO $ \s -> case newPinnedByteArray# (word2Int# sz) s of (# s, arr #) -> (# s, MBA arr #) | 138 | newByteArray sz = IO $ \s -> case newPinnedByteArray# (word2Int# sz) s of (# s, arr #) -> (# s, MBA arr #) | 106 | false | true | 0 | 12 | 28 | 69 | 33 | 36 | null | null |
mmirman/cmu-skillswap-2012 | GuessTheNumber.hs | bsd-3-clause | main = do
args <- getArgs
case args of
["-server"] -> runServer $(autoService 'Keeper)
["-client"] -> runServer guesserClient
_ -> do
putStrLn "running both the client and the server. -server or -client"
-- find all services that should run on the host Keeper,
-- and runs them on a b... | 454 | main = do
args <- getArgs
case args of
["-server"] -> runServer $(autoService 'Keeper)
["-client"] -> runServer guesserClient
_ -> do
putStrLn "running both the client and the server. -server or -client"
-- find all services that should run on the host Keeper,
-- and runs them on a b... | 454 | main = do
args <- getArgs
case args of
["-server"] -> runServer $(autoService 'Keeper)
["-client"] -> runServer guesserClient
_ -> do
putStrLn "running both the client and the server. -server or -client"
-- find all services that should run on the host Keeper,
-- and runs them on a b... | 454 | false | false | 0 | 15 | 117 | 87 | 41 | 46 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/Utils.hs | bsd-3-clause | ofBlockMap :: BlockId -> LabelMap CmmBlock -> CmmGraph
ofBlockMap entry bodyMap = CmmGraph {g_entry=entry, g_graph=GMany NothingO bodyMap NothingO} | 147 | ofBlockMap :: BlockId -> LabelMap CmmBlock -> CmmGraph
ofBlockMap entry bodyMap = CmmGraph {g_entry=entry, g_graph=GMany NothingO bodyMap NothingO} | 147 | ofBlockMap entry bodyMap = CmmGraph {g_entry=entry, g_graph=GMany NothingO bodyMap NothingO} | 92 | false | true | 0 | 7 | 17 | 48 | 25 | 23 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4942 = 4941 | 11 | 4942 = 4941 | 11 | 4942 = 4941 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
beni55/ghcjs | src/Gen2/Rts.hs | mit | -- rtsDebug = renderJs (addDebug $ jsSaturate (Just "h$RTS") rts')
rtsText :: DynFlags -> CgSettings -> TL.Text
rtsText dflags = (<>"\n") . displayT . renderPretty 0.8 150 . pretty . rts dflags | 194 | rtsText :: DynFlags -> CgSettings -> TL.Text
rtsText dflags = (<>"\n") . displayT . renderPretty 0.8 150 . pretty . rts dflags | 126 | rtsText dflags = (<>"\n") . displayT . renderPretty 0.8 150 . pretty . rts dflags | 81 | true | true | 0 | 9 | 32 | 53 | 27 | 26 | null | null |
ExNexu/Idris-dev | src/IRTS/Compiler.hs | bsd-3-clause | irTree :: [Name] -> SC -> Idris LExp
irTree args tree = do
logLvl 3 $ "Compiling " ++ show args ++ "\n" ++ show tree
LLam args <$> irSC M.empty tree | 156 | irTree :: [Name] -> SC -> Idris LExp
irTree args tree = do
logLvl 3 $ "Compiling " ++ show args ++ "\n" ++ show tree
LLam args <$> irSC M.empty tree | 156 | irTree args tree = do
logLvl 3 $ "Compiling " ++ show args ++ "\n" ++ show tree
LLam args <$> irSC M.empty tree | 119 | false | true | 0 | 11 | 39 | 75 | 34 | 41 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo WriteArrayArrayOp_ByteArray = mkGenPrimOp (fsLit "writeByteArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, byteArrayPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) | 208 | primOpInfo WriteArrayArrayOp_ByteArray = mkGenPrimOp (fsLit "writeByteArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, byteArrayPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) | 208 | primOpInfo WriteArrayArrayOp_ByteArray = mkGenPrimOp (fsLit "writeByteArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, byteArrayPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) | 208 | false | false | 0 | 7 | 15 | 51 | 26 | 25 | null | null |
nikai3d/ce-challenges | hard/poker_hands.hs | bsd-3-clause | cardval 'K' = 13 | 16 | cardval 'K' = 13 | 16 | cardval 'K' = 13 | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
kim/amazonka | amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types.hs | mpl-2.0 | -- | 'JobWatermark' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'jwEncryption' @::@ 'Maybe' 'Encryption'
--
-- * 'jwInputKey' @::@ 'Maybe' 'Text'
--
-- * 'jwPresetWatermarkId' @::@ 'Maybe' 'Text'
--
jobWatermark :: JobWatermark
jobWatermark = JobWatermark
{ _jwPresetWatermarkI... | 411 | jobWatermark :: JobWatermark
jobWatermark = JobWatermark
{ _jwPresetWatermarkId = Nothing
, _jwInputKey = Nothing
, _jwEncryption = Nothing
} | 173 | jobWatermark = JobWatermark
{ _jwPresetWatermarkId = Nothing
, _jwInputKey = Nothing
, _jwEncryption = Nothing
} | 144 | true | true | 0 | 7 | 85 | 45 | 30 | 15 | null | null |
prasmussen/glot-www | Glot/Language.hs | mit | -- TODO: get static root from arg
svgLogoPath :: LanguageConfig -> Text.Text
svgLogoPath LanguageConfig{..} =
Text.intercalate "/" ["static", "img", logoName <> ".svg"] | 172 | svgLogoPath :: LanguageConfig -> Text.Text
svgLogoPath LanguageConfig{..} =
Text.intercalate "/" ["static", "img", logoName <> ".svg"] | 138 | svgLogoPath LanguageConfig{..} =
Text.intercalate "/" ["static", "img", logoName <> ".svg"] | 95 | true | true | 2 | 7 | 25 | 49 | 27 | 22 | null | null |
ibabushkin/wormbot | src/IRC.hs | gpl-3.0 | serverPrefix :: Parser Prefix
serverPrefix = ServerPrefix <$>
(char ':' *> (ServerName <$> P.takeWhile (/= ' ')) <* char ' ') | 129 | serverPrefix :: Parser Prefix
serverPrefix = ServerPrefix <$>
(char ':' *> (ServerName <$> P.takeWhile (/= ' ')) <* char ' ') | 129 | serverPrefix = ServerPrefix <$>
(char ':' *> (ServerName <$> P.takeWhile (/= ' ')) <* char ' ') | 99 | false | true | 0 | 12 | 24 | 51 | 26 | 25 | null | null |
pharaun/hGnucash | src/GnuCashParser.hs | apache-2.0 | xpGnuCash :: PU [XT.Node] GnuCash
xpGnuCash =
xpWrap
(uncurry GnuCash)
(\(GnuCash count books) -> (count, books))
-- TODO: verify type ~= "books"
(xpElemNodes "gnc-v2" (xpPair xpCountData (xpList xpBooks))) | 242 | xpGnuCash :: PU [XT.Node] GnuCash
xpGnuCash =
xpWrap
(uncurry GnuCash)
(\(GnuCash count books) -> (count, books))
-- TODO: verify type ~= "books"
(xpElemNodes "gnc-v2" (xpPair xpCountData (xpList xpBooks))) | 242 | xpGnuCash =
xpWrap
(uncurry GnuCash)
(\(GnuCash count books) -> (count, books))
-- TODO: verify type ~= "books"
(xpElemNodes "gnc-v2" (xpPair xpCountData (xpList xpBooks))) | 208 | false | true | 0 | 11 | 63 | 79 | 42 | 37 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/CgUtils.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
--
-- STG/Cmm GlobalReg
--
-- -----------------------------------------------------------------------------
-- | We map STG registers onto appropriate CmmExprs. Either they map
-- to real machine registers or stored as offsets from BaseR... | 534 | get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr
get_GlobalReg_addr dflags BaseReg = regTableOffset dflags 0 | 114 | get_GlobalReg_addr dflags BaseReg = regTableOffset dflags 0 | 59 | true | true | 0 | 6 | 62 | 43 | 24 | 19 | null | null |
sviperll/LambdaInterpreter | src/Lambda/Zipper.hs | gpl-3.0 | unwind :: MarkedZipper -> MarkedTerm
unwind (MarkedZipper (Zip [] i)) = i | 73 | unwind :: MarkedZipper -> MarkedTerm
unwind (MarkedZipper (Zip [] i)) = i | 73 | unwind (MarkedZipper (Zip [] i)) = i | 36 | false | true | 0 | 9 | 11 | 38 | 18 | 20 | null | null |
michalkonecny/mixed-types-num | src/Data/Convertible/Base.hs | bsd-3-clause | convError' :: (Show a, Typeable a, Typeable b) =>
String -> a -> b -> ConvertResult b
convError' msg inpval retval =
Left $ ConvertError {
convSourceValue = show inpval,
convSourceType = show . typeOf $ inpval,
convDestType = show . typeOf $ retval,
... | 346 | convError' :: (Show a, Typeable a, Typeable b) =>
String -> a -> b -> ConvertResult b
convError' msg inpval retval =
Left $ ConvertError {
convSourceValue = show inpval,
convSourceType = show . typeOf $ inpval,
convDestType = show . typeOf $ retval,
... | 346 | convError' msg inpval retval =
Left $ ConvertError {
convSourceValue = show inpval,
convSourceType = show . typeOf $ inpval,
convDestType = show . typeOf $ retval,
convErrorMessage = msg} | 245 | false | true | 2 | 9 | 119 | 110 | 56 | 54 | null | null |
23Skidoo/snap-core | src/Snap/Internal/Test/RequestBuilder.hs | bsd-3-clause | responseToString :: Response -> IO ByteString
responseToString resp = do
let act = rspBodyToEnum $ rspBody resp
(listOut, grab) <- Streams.listOutputStream
void $ act listOut
builder <- liftM mconcat grab
return $! toByteString $ fromShow resp `mappend` builder
----------------------------------... | 692 | responseToString :: Response -> IO ByteString
responseToString resp = do
let act = rspBodyToEnum $ rspBody resp
(listOut, grab) <- Streams.listOutputStream
void $ act listOut
builder <- liftM mconcat grab
return $! toByteString $ fromShow resp `mappend` builder
----------------------------------... | 692 | responseToString resp = do
let act = rspBodyToEnum $ rspBody resp
(listOut, grab) <- Streams.listOutputStream
void $ act listOut
builder <- liftM mconcat grab
return $! toByteString $ fromShow resp `mappend` builder
------------------------------------------------------------------------------
-... | 646 | false | true | 0 | 11 | 112 | 108 | 58 | 50 | null | null |
lukexi/game-pal | src/Graphics/VR/Pal/Hands.hs | bsd-3-clause | onRightHandEvent _ _ = return () | 32 | onRightHandEvent _ _ = return () | 32 | onRightHandEvent _ _ = return () | 32 | false | false | 1 | 6 | 5 | 17 | 7 | 10 | null | null |
mdorman/couch-simple | src/lib/Database/Couch/Explicit/DocBase.hs | mit | get :: (FromJSON a, MonadIO m)
=> ByteString -- ^ A prefix for the document ID
-> RetrieveDoc -- ^ Parameters for document retrieval
-> DocId -- ^ The document ID
-> Maybe DocRev -- ^ An optional document revision
-> Context
-> m (Result a)
get prefix param doc rev =
structureRequest request p... | 1,073 | get :: (FromJSON a, MonadIO m)
=> ByteString -- ^ A prefix for the document ID
-> RetrieveDoc -- ^ Parameters for document retrieval
-> DocId -- ^ The document ID
-> Maybe DocRev -- ^ An optional document revision
-> Context
-> m (Result a)
get prefix param doc rev =
structureRequest request p... | 1,073 | get prefix param doc rev =
structureRequest request parse
where
request = do
accessBase prefix doc rev
setQueryParam $ toQueryParameters param
parse = do
-- Do our standard status code checks
checkStatusCode
-- And then handle 304 appropriately
s <- responseStatus
v... | 808 | false | true | 0 | 14 | 276 | 171 | 81 | 90 | null | null |
m00nlight/99-problems | haskell/p-84.hs | bsd-3-clause | -- | 'eliminate' return value of a maybe type
eliminate :: Maybe a -> a
eliminate Nothing = error "Found Nothing" | 113 | eliminate :: Maybe a -> a
eliminate Nothing = error "Found Nothing" | 67 | eliminate Nothing = error "Found Nothing" | 41 | true | true | 0 | 7 | 20 | 30 | 13 | 17 | null | null |
sru-systems/protobuf-simple | src/Parser/EnumGenerator.hs | mit | getEnumValue :: EnumValueDesc -> State GenState Builder
getEnumValue = return . fromString . EnumValueDesc.getName | 114 | getEnumValue :: EnumValueDesc -> State GenState Builder
getEnumValue = return . fromString . EnumValueDesc.getName | 114 | getEnumValue = return . fromString . EnumValueDesc.getName | 58 | false | true | 0 | 6 | 13 | 30 | 15 | 15 | null | null |
soupi/pursuit-client | src/Web/Pursuit/Client.hs | bsd-3-clause | find :: String -> IO [Element]
find s = do
r <- get ("https://pursuit.purescript.org/search?q=" ++ s)
let txt = r ^. responseBody . to decodeUtf8
let res = txt ^.. html . allAttributed (folded . only "search-result")
pure res | 241 | find :: String -> IO [Element]
find s = do
r <- get ("https://pursuit.purescript.org/search?q=" ++ s)
let txt = r ^. responseBody . to decodeUtf8
let res = txt ^.. html . allAttributed (folded . only "search-result")
pure res | 241 | find s = do
r <- get ("https://pursuit.purescript.org/search?q=" ++ s)
let txt = r ^. responseBody . to decodeUtf8
let res = txt ^.. html . allAttributed (folded . only "search-result")
pure res | 210 | false | true | 1 | 10 | 54 | 95 | 46 | 49 | null | null |
infotroph/pandoc | src/Text/Pandoc/Writers/Docx.hs | gpl-2.0 | inlineToOpenXML opts (Math mathType str) = do
let displayType = if mathType == DisplayMath
then DisplayBlock
else DisplayInline
case writeOMML displayType <$> readTeX str of
Right r -> return [r]
Left _ -> inlinesToOpenXML opts (texMathToInlines mathTyp... | 326 | inlineToOpenXML opts (Math mathType str) = do
let displayType = if mathType == DisplayMath
then DisplayBlock
else DisplayInline
case writeOMML displayType <$> readTeX str of
Right r -> return [r]
Left _ -> inlinesToOpenXML opts (texMathToInlines mathTyp... | 326 | inlineToOpenXML opts (Math mathType str) = do
let displayType = if mathType == DisplayMath
then DisplayBlock
else DisplayInline
case writeOMML displayType <$> readTeX str of
Right r -> return [r]
Left _ -> inlinesToOpenXML opts (texMathToInlines mathTyp... | 326 | false | false | 0 | 12 | 104 | 94 | 44 | 50 | null | null |
DanielSchuessler/hstri | QuadCoordinates/MatchingEquations.hs | gpl-3.0 | unsafeToQAdmissible :: Triangulation -> q -> QAdmissible q
unsafeToQAdmissible = UnsafeToQAdmissible | 100 | unsafeToQAdmissible :: Triangulation -> q -> QAdmissible q
unsafeToQAdmissible = UnsafeToQAdmissible | 100 | unsafeToQAdmissible = UnsafeToQAdmissible | 41 | false | true | 0 | 7 | 10 | 22 | 11 | 11 | null | null |
LouisJenkinsCS/Minimal-JVM | MateVMRuntime/GC.hs | bsd-3-clause | getSizeDebug :: RefObj a => a -> IO Int
getSizeDebug obj = do
intObj <- getIntPtr obj
printfGc $ printf "objTo evacuate: 0x%08x\n" (fromIntegral intObj :: Int)
size' <- size obj
printfGc $ printf "size was %i\n" size'
return size'
-- splits [a] into (large objects, normal objects) | 293 | getSizeDebug :: RefObj a => a -> IO Int
getSizeDebug obj = do
intObj <- getIntPtr obj
printfGc $ printf "objTo evacuate: 0x%08x\n" (fromIntegral intObj :: Int)
size' <- size obj
printfGc $ printf "size was %i\n" size'
return size'
-- splits [a] into (large objects, normal objects) | 293 | getSizeDebug obj = do
intObj <- getIntPtr obj
printfGc $ printf "objTo evacuate: 0x%08x\n" (fromIntegral intObj :: Int)
size' <- size obj
printfGc $ printf "size was %i\n" size'
return size'
-- splits [a] into (large objects, normal objects) | 253 | false | true | 0 | 10 | 59 | 88 | 39 | 49 | null | null |
reuleaux/pire | src/Pire/Parser/PiParseUtils.hs | bsd-3-clause | ParseP p s =
let
cs = untie $ constr_names piPrelude
-- orig
-- res = runFreshM (L.evalStateT (runParserT (do { whiteSpace; v <- p; eof; return v}) [] "<interactive>" s) cs)
-- later: don't require eof
res = runFreshM (L.evalStateT (runParserT (do { whiteSpace; v <- p; return v}) [] "<interactive>... | 1,099 | piParseP p s =
let
cs = untie $ constr_names piPrelude
-- orig
-- res = runFreshM (L.evalStateT (runParserT (do { whiteSpace; v <- p; eof; return v}) [] "<interactive>" s) cs)
-- later: don't require eof
res = runFreshM (L.evalStateT (runParserT (do { whiteSpace; v <- p; return v}) [] "<interactiv... | 1,099 | piParseP p s =
let
cs = untie $ constr_names piPrelude
-- orig
-- res = runFreshM (L.evalStateT (runParserT (do { whiteSpace; v <- p; eof; return v}) [] "<interactive>" s) cs)
-- later: don't require eof
res = runFreshM (L.evalStateT (runParserT (do { whiteSpace; v <- p; return v}) [] "<interactiv... | 1,099 | false | false | 0 | 17 | 258 | 131 | 71 | 60 | null | null |
shlevy/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | exprToCoercion_maybe _ = Nothing | 44 | exprToCoercion_maybe _ = Nothing | 44 | exprToCoercion_maybe _ = Nothing | 44 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
ulricha/dsh | src/Database/DSH/VSL/Opt/Properties/ReqColumns.hs | bsd-3-clause | fromPropTriple _ = fail "not a property triple" | 65 | fromPropTriple _ = fail "not a property triple" | 65 | fromPropTriple _ = fail "not a property triple" | 65 | false | false | 0 | 5 | 25 | 12 | 5 | 7 | null | null |
GaloisInc/saw-script | saw-core/src/Verifier/SAW/Module.hs | bsd-3-clause | -- | @insImport i m@ returns the module obtained by importing @i@ into @m@,
-- using a predicate to specify which names are imported from @i@ into @m@. In
-- the case of name clashes, an error is signaled.
insImport :: (ResolvedName -> Bool) -> Module -> Module -> Module
insImport name_p i m =
(foldl' insResolvedName... | 447 | insImport :: (ResolvedName -> Bool) -> Module -> Module -> Module
insImport name_p i m =
(foldl' insResolvedName m $ Map.elems $
Map.filter name_p (moduleResolveMap i))
{ moduleImports = Map.insert (moduleName i) i (moduleImports m) } | 241 | insImport name_p i m =
(foldl' insResolvedName m $ Map.elems $
Map.filter name_p (moduleResolveMap i))
{ moduleImports = Map.insert (moduleName i) i (moduleImports m) } | 175 | true | true | 0 | 10 | 81 | 109 | 54 | 55 | null | null |
DanielG/cabal-helper | src/CabalHelper/Compiletime/Log.hs | apache-2.0 | logIOError :: Verbose => String -> IO (Maybe a) -> IO (Maybe a)
logIOError label a = do
a `catchIOError` \ex -> do
vLog $ label ++ ": " ++ show ex
return Nothing | 175 | logIOError :: Verbose => String -> IO (Maybe a) -> IO (Maybe a)
logIOError label a = do
a `catchIOError` \ex -> do
vLog $ label ++ ": " ++ show ex
return Nothing | 175 | logIOError label a = do
a `catchIOError` \ex -> do
vLog $ label ++ ": " ++ show ex
return Nothing | 111 | false | true | 0 | 13 | 47 | 85 | 40 | 45 | null | null |
tomberek/rulestesting | Examples.hs | bsd-3-clause | line1 :: (Category a) => a b b
line1 = [structural| proc g -> do
id -< g|] | 87 | line1 :: (Category a) => a b b
line1 = [structural| proc g -> do
id -< g|] | 87 | line1 = [structural| proc g -> do
id -< g|] | 56 | false | true | 0 | 6 | 30 | 29 | 17 | 12 | null | null |
UBMLtonGroup/timberc | src/Core2Kindle.hs | bsd-3-clause | cFun env (ETempl x tx te c) = do tx@(Kindle.TCon n []) <- cAType env tx -- Type-checker guarantees tx is a struct type name
te <- cValTEnv env te
(t,c) <- cCmd (pushSelf x (addATEnv [(x,Kindle.tRef tx)] (addTEnv te en... | 864 | cFun env (ETempl x tx te c) = do tx@(Kindle.TCon n []) <- cAType env tx -- Type-checker guarantees tx is a struct type name
te <- cValTEnv env te
(t,c) <- cCmd (pushSelf x (addATEnv [(x,Kindle.tRef tx)] (addTEnv te en... | 864 | cFun env (ETempl x tx te c) = do tx@(Kindle.TCon n []) <- cAType env tx -- Type-checker guarantees tx is a struct type name
te <- cValTEnv env te
(t,c) <- cCmd (pushSelf x (addATEnv [(x,Kindle.tRef tx)] (addTEnv te en... | 864 | false | false | 0 | 16 | 437 | 300 | 149 | 151 | null | null |
mgmeier/extra | test/Test.hs | bsd-3-clause | _unused5 x = readFile' | 22 | _unused5 x = readFile' | 22 | _unused5 x = readFile' | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mainland/dph | dph-prim-par/Data/Array/Parallel/Unlifted.hs | bsd-3-clause | indexs_avs = indexsFromVectorsUPVSegdP | 43 | indexs_avs = indexsFromVectorsUPVSegdP | 43 | indexs_avs = indexsFromVectorsUPVSegdP | 43 | false | false | 0 | 4 | 7 | 6 | 3 | 3 | null | null |
allanderek/ipclib | Language/Pepa/Analysis/Analysis.hs | gpl-2.0 | hprintAnResult :: AnalysisResult -> String
hprintAnResult ( ExcessActions par acts1 acts2 ) =
unwords [ "The process:"
, Print.hprintComponent par
, "cooperates over the actions"
, Print.hprintCooperationSet $ ActionSet acts1
, "but neither side performs the act... | 399 | hprintAnResult :: AnalysisResult -> String
hprintAnResult ( ExcessActions par acts1 acts2 ) =
unwords [ "The process:"
, Print.hprintComponent par
, "cooperates over the actions"
, Print.hprintCooperationSet $ ActionSet acts1
, "but neither side performs the act... | 399 | hprintAnResult ( ExcessActions par acts1 acts2 ) =
unwords [ "The process:"
, Print.hprintComponent par
, "cooperates over the actions"
, Print.hprintCooperationSet $ ActionSet acts1
, "but neither side performs the actions:"
, Print.hprintCooperatio... | 356 | false | true | 0 | 8 | 124 | 72 | 37 | 35 | null | null |
ezyang/ghc | testsuite/tests/profiling/should_run/heapprof001.hs | bsd-3-clause | -- shift disjunction within conjunction
disin (Dis p (Con q r)) = Con (disin (Dis p q)) (disin (Dis p r)) | 105 | disin (Dis p (Con q r)) = Con (disin (Dis p q)) (disin (Dis p r)) | 65 | disin (Dis p (Con q r)) = Con (disin (Dis p q)) (disin (Dis p r)) | 65 | true | false | 0 | 9 | 20 | 61 | 29 | 32 | null | null |
sule45/FP2016 | src/Integration.hs | bsd-3-clause | integrate' (ESub exp1 exp2) = case (integrate' exp1, integrate' exp2) of
(Nothing, _) -> Nothing
(_, Nothing) -> Nothing
(Just exp1', Just exp2') -> (Just (ESub exp1' exp2'))
-- cosx | 318 | integrate' (ESub exp1 exp2) = case (integrate' exp1, integrate' exp2) of
(Nothing, _) -> Nothing
(_, Nothing) -> Nothing
(Just exp1', Just exp2') -> (Just (ESub exp1' exp2'))
-- cosx | 318 | integrate' (ESub exp1 exp2) = case (integrate' exp1, integrate' exp2) of
(Nothing, _) -> Nothing
(_, Nothing) -> Nothing
(Just exp1', Just exp2') -> (Just (ESub exp1' exp2'))
-- cosx | 318 | false | false | 0 | 11 | 165 | 90 | 47 | 43 | null | null |
kmate/HaRe | old/testing/addCon/Case2AST.hs | bsd-3-clause | f x = case g of
(C1 x) -> x
(C3 a) -> addedC3
where g = C1 42 | 89 | f x = case g of
(C1 x) -> x
(C3 a) -> addedC3
where g = C1 42 | 89 | f x = case g of
(C1 x) -> x
(C3 a) -> addedC3
where g = C1 42 | 89 | false | false | 2 | 9 | 46 | 54 | 23 | 31 | null | null |
mjhopkins/StopPayingForFreeMonads | Expressions.hs | mit | mulExpr_eval :: Int
mulExpr_eval = eval mulExpr | 47 | mulExpr_eval :: Int
mulExpr_eval = eval mulExpr | 47 | mulExpr_eval = eval mulExpr | 27 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
shlevy/ghc | compiler/types/Coercion.hs | bsd-3-clause | -- | A CoherenceCo c1 c2 applies the coercion c2 to the left-hand type
-- in the kind of c1. This function uses sym to get the coercion on the
-- right-hand type of c1. Thus, if c1 :: s ~ t, then mkCoherenceRightCo c1 c2
-- has the kind (s ~ (t |> c2)) down through type constructors.
-- The second coercion must be repr... | 455 | mkCoherenceRightCo :: Coercion -> Coercion -> Coercion
mkCoherenceRightCo c1 c2 = mkSymCo (mkCoherenceCo (mkSymCo c1) c2) | 121 | mkCoherenceRightCo c1 c2 = mkSymCo (mkCoherenceCo (mkSymCo c1) c2) | 66 | true | true | 0 | 9 | 81 | 51 | 26 | 25 | null | null |
fmapfmapfmap/amazonka | amazonka-s3/gen/Network/AWS/S3/Types/Product.hs | mpl-2.0 | -- | Undocumented member.
wcRoutingRules :: Lens' WebsiteConfiguration [RoutingRule]
wcRoutingRules = lens _wcRoutingRules (\ s a -> s{_wcRoutingRules = a}) . _Default . _Coerce | 177 | wcRoutingRules :: Lens' WebsiteConfiguration [RoutingRule]
wcRoutingRules = lens _wcRoutingRules (\ s a -> s{_wcRoutingRules = a}) . _Default . _Coerce | 151 | wcRoutingRules = lens _wcRoutingRules (\ s a -> s{_wcRoutingRules = a}) . _Default . _Coerce | 92 | true | true | 1 | 11 | 23 | 57 | 28 | 29 | null | null |
acowley/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | pprTickCts (EtaReduction v) = ppr v | 47 | pprTickCts (EtaReduction v) = ppr v | 47 | pprTickCts (EtaReduction v) = ppr v | 47 | false | false | 0 | 6 | 17 | 19 | 8 | 11 | null | null |
jwiegley/ghc-release | libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Preference.hs | gpl-3.0 | preferInstalledOrdering :: I -> I -> Ordering
preferInstalledOrdering (I _ (Inst _)) (I _ (Inst _)) = EQ | 104 | preferInstalledOrdering :: I -> I -> Ordering
preferInstalledOrdering (I _ (Inst _)) (I _ (Inst _)) = EQ | 104 | preferInstalledOrdering (I _ (Inst _)) (I _ (Inst _)) = EQ | 58 | false | true | 0 | 12 | 17 | 58 | 27 | 31 | null | null |
thekafkaf/brolang | src/Lexer.hs | mit | semiSep = Tok.semiSep lexer | 30 | semiSep = Tok.semiSep lexer | 30 | semiSep = Tok.semiSep lexer | 30 | false | false | 0 | 6 | 6 | 11 | 5 | 6 | null | null |
valderman/domplate | Text/Domplate/Context.hs | bsd-3-clause | typeOf (Bool _) = "boolean" | 29 | typeOf (Bool _) = "boolean" | 29 | typeOf (Bool _) = "boolean" | 29 | false | false | 0 | 7 | 6 | 15 | 7 | 8 | null | null |
joe9/barrelfish | hake/RuleDefs.hs | mit | --
-- Build a Flounder THC stubs file from a definition.
--
flounderTHCStub :: Options -> String -> [String] -> HRule
flounderTHCStub opts ifn srcs =
let cfile = flounderTHCStubPath opts ifn
hfile = flounderTHCHdrPath ifn
arch = optArch opts
in
Rules [ flounderRule opts [
... | 592 | flounderTHCStub :: Options -> String -> [String] -> HRule
flounderTHCStub opts ifn srcs =
let cfile = flounderTHCStubPath opts ifn
hfile = flounderTHCHdrPath ifn
arch = optArch opts
in
Rules [ flounderRule opts [
Str "--thc-stubs", flounderIfFileLoc ifn,
... | 532 | flounderTHCStub opts ifn srcs =
let cfile = flounderTHCStubPath opts ifn
hfile = flounderTHCHdrPath ifn
arch = optArch opts
in
Rules [ flounderRule opts [
Str "--thc-stubs", flounderIfFileLoc ifn,
Out arch cfile
],
... | 474 | true | true | 0 | 9 | 210 | 133 | 65 | 68 | null | null |
jimfinnis/keith | firmware/common/regparse.hs | mit | appendTerminatorToBlocks :: [Block] -> [Block]
appendTerminatorToBlocks xs = map _appendTerm xs
where
_appendTerm:: Block -> Block
_appendTerm b@(Block n ys nocom) =
if not $ ... | 642 | appendTerminatorToBlocks :: [Block] -> [Block]
appendTerminatorToBlocks xs = map _appendTerm xs
where
_appendTerm:: Block -> Block
_appendTerm b@(Block n ys nocom) =
if not $ ... | 642 | appendTerminatorToBlocks xs = map _appendTerm xs
where
_appendTerm:: Block -> Block
_appendTerm b@(Block n ys nocom) =
if not $ isCommonBlock b then (Block n
... | 595 | false | true | 0 | 16 | 398 | 135 | 72 | 63 | null | null |
ihc/futhark | src/Futhark/Optimise/MemoryBlockMerging/Liveness/LastUse.hs | isc | lookInFunDefFParam :: LoreConstraints lore =>
FParam lore -> FindM lore ()
lookInFunDefFParam (Param x _) = do
first_uses_x <- lookupEmptyable x <$> asks ctxFirstUses
modifyCurFirstUses $ S.union first_uses_x | 234 | lookInFunDefFParam :: LoreConstraints lore =>
FParam lore -> FindM lore ()
lookInFunDefFParam (Param x _) = do
first_uses_x <- lookupEmptyable x <$> asks ctxFirstUses
modifyCurFirstUses $ S.union first_uses_x | 234 | lookInFunDefFParam (Param x _) = do
first_uses_x <- lookupEmptyable x <$> asks ctxFirstUses
modifyCurFirstUses $ S.union first_uses_x | 137 | false | true | 0 | 9 | 53 | 72 | 32 | 40 | null | null |
dalaing/free | src/Control/Comonad/Trans/Coiter.hs | bsd-3-clause | coiterTDataType :: DataType
coiterTDataType = mkDataType "Control.Comonad.Trans.Coiter.CoiterT" [coiterTConstr] | 111 | coiterTDataType :: DataType
coiterTDataType = mkDataType "Control.Comonad.Trans.Coiter.CoiterT" [coiterTConstr] | 111 | coiterTDataType = mkDataType "Control.Comonad.Trans.Coiter.CoiterT" [coiterTConstr] | 83 | false | true | 0 | 6 | 7 | 19 | 10 | 9 | null | null |
johannesgerer/buchhaltung | src/Buchhaltung/Common.hs | mit | commentPrefix :: ImportTag -> T.Text
commentPrefix (ImportTag tag) = tag <> ": " | 80 | commentPrefix :: ImportTag -> T.Text
commentPrefix (ImportTag tag) = tag <> ": " | 80 | commentPrefix (ImportTag tag) = tag <> ": " | 43 | false | true | 0 | 6 | 12 | 34 | 16 | 18 | null | null |
tomgr/webcspm | src/Site.hs | bsd-3-clause | -- | The application's routes.
routes :: [(BS.ByteString, Handler App App ())]
routes = [
("/", index),
("/help", help),
("/static/", serveDirectory "resources/static")] | 181 | routes :: [(BS.ByteString, Handler App App ())]
routes = [
("/", index),
("/help", help),
("/static/", serveDirectory "resources/static")] | 150 | routes = [
("/", index),
("/help", help),
("/static/", serveDirectory "resources/static")] | 102 | true | true | 0 | 8 | 33 | 62 | 37 | 25 | null | null |
jwiegley/ghc-release | compiler/main/DriverPipeline.hs | gpl-3.0 | maybeMergeStub :: CompPipeline Phase
maybeMergeStub
= do
PipeState{maybe_stub_o} <- getPipeState
if isJust maybe_stub_o then return MergeStub else return StopLn | 171 | maybeMergeStub :: CompPipeline Phase
maybeMergeStub
= do
PipeState{maybe_stub_o} <- getPipeState
if isJust maybe_stub_o then return MergeStub else return StopLn | 171 | maybeMergeStub
= do
PipeState{maybe_stub_o} <- getPipeState
if isJust maybe_stub_o then return MergeStub else return StopLn | 134 | false | true | 0 | 9 | 29 | 49 | 22 | 27 | null | null |
HaskellZhangSong/derive-topdown | src/Data/Derive/TopDown/Lib.hs | mit | tvb2kind (KindedTV n _ kind) = kind | 35 | tvb2kind (KindedTV n _ kind) = kind | 35 | tvb2kind (KindedTV n _ kind) = kind | 35 | false | false | 0 | 6 | 6 | 20 | 9 | 11 | null | null |
ezyang/rlimits | Control/RLimits.hs | bsd-3-clause | newRCRef :: RC -> a -> IO (RCRef a)
newRCRef (RC# rc) p = IO $ \s -> case newRCRef# rc p s of (# s' , r #) -> (# s' , RCRef# r #) | 129 | newRCRef :: RC -> a -> IO (RCRef a)
newRCRef (RC# rc) p = IO $ \s -> case newRCRef# rc p s of (# s' , r #) -> (# s' , RCRef# r #) | 129 | newRCRef (RC# rc) p = IO $ \s -> case newRCRef# rc p s of (# s' , r #) -> (# s' , RCRef# r #) | 93 | false | true | 0 | 11 | 35 | 78 | 39 | 39 | null | null |
hsyl20/graphics-efl | src/Graphics/Efl/Widgets/Reactive.hs | bsd-3-clause | transitionEvent :: Transition s -> Event
transitionEvent (Transition (Signal ev _) _) = ev | 90 | transitionEvent :: Transition s -> Event
transitionEvent (Transition (Signal ev _) _) = ev | 90 | transitionEvent (Transition (Signal ev _) _) = ev | 49 | false | true | 0 | 9 | 13 | 37 | 18 | 19 | null | null |
phadej/stack | src/Stack/Setup.hs | bsd-3-clause | getGhcKey :: (MonadReader env m, MonadThrow m, HasPlatform env, HasGHCVariant env, MonadLogger m, MonadIO m, MonadCatch m, MonadBaseControl IO m)
=> m Text
getGhcKey = do
ghcVariant <- asks getGHCVariant
platform <- asks getPlatform
osKey <- getOSKey platform
return $ osKey <> T.pack (ghcVaria... | 340 | getGhcKey :: (MonadReader env m, MonadThrow m, HasPlatform env, HasGHCVariant env, MonadLogger m, MonadIO m, MonadCatch m, MonadBaseControl IO m)
=> m Text
getGhcKey = do
ghcVariant <- asks getGHCVariant
platform <- asks getPlatform
osKey <- getOSKey platform
return $ osKey <> T.pack (ghcVaria... | 340 | getGhcKey = do
ghcVariant <- asks getGHCVariant
platform <- asks getPlatform
osKey <- getOSKey platform
return $ osKey <> T.pack (ghcVariantSuffix ghcVariant) | 174 | false | true | 0 | 11 | 70 | 127 | 58 | 69 | null | null |
conal/hermit-extras | src/HERMIT/Extras.hs | bsd-3-clause | observeR' False = const idR | 27 | observeR' False = const idR | 27 | observeR' False = const idR | 27 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
brendanhay/gogol | gogol-container/gen/Network/Google/Container/Types/Product.hs | mpl-2.0 | -- | [Output only] The current status of this cluster.
cStatus :: Lens' Cluster (Maybe ClusterStatus)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a}) | 152 | cStatus :: Lens' Cluster (Maybe ClusterStatus)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a}) | 97 | cStatus = lens _cStatus (\ s a -> s{_cStatus = a}) | 50 | true | true | 2 | 9 | 26 | 55 | 25 | 30 | null | null |
alasconnect/auth0 | src/Auth0/Management/Users.hs | apache-2.0 | usersPolyApi :: Proxy (UsersPolyApi appMd userMd)
usersPolyApi = Proxy | 70 | usersPolyApi :: Proxy (UsersPolyApi appMd userMd)
usersPolyApi = Proxy | 70 | usersPolyApi = Proxy | 20 | false | true | 1 | 7 | 8 | 26 | 11 | 15 | null | null |
M42/math | code/haskell/infinitesearch.hs | mit | -- Auxiliary functions
-----------------------------------------------------------------------
proptest :: Cantor -> Bool
proptest s = odd (coerce (s 2) + coerce (s 3) + coerce (s 5)) | 183 | proptest :: Cantor -> Bool
proptest s = odd (coerce (s 2) + coerce (s 3) + coerce (s 5)) | 88 | proptest s = odd (coerce (s 2) + coerce (s 3) + coerce (s 5)) | 61 | true | true | 0 | 11 | 23 | 61 | 30 | 31 | null | null |
acharal/hopes | src/prover/Logic/SR.hs | gpl-2.0 | compose_trees HZero r = r | 25 | compose_trees HZero r = r | 25 | compose_trees HZero r = r | 25 | false | false | 0 | 4 | 4 | 12 | 5 | 7 | null | null |
MasseR/xmonadcontrib | XMonad/Hooks/ManageDocks.hs | bsd-3-clause | docksEventHook _ = return (All True) | 36 | docksEventHook _ = return (All True) | 36 | docksEventHook _ = return (All True) | 36 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
sol/hakyll | src/Hakyll/Web/Page/Metadata.hs | bsd-3-clause | copyField :: String -- ^ Key to copy
-> String -- ^ Destination to copy to
-> Page a -- ^ Page on which this should be applied
-> Page a -- ^ Resulting page
copyField src dst = renderField src dst id | 233 | copyField :: String -- ^ Key to copy
-> String -- ^ Destination to copy to
-> Page a -- ^ Page on which this should be applied
-> Page a
copyField src dst = renderField src dst id | 212 | copyField src dst = renderField src dst id | 42 | true | true | 0 | 8 | 76 | 45 | 23 | 22 | null | null |
ml9951/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprInstr (MULLW_MayOflo reg1 reg2 reg3) = vcat [
hcat [ ptext (sLit "\tmullwo\t"), pprReg reg1, ptext (sLit ", "),
pprReg reg2, ptext (sLit ", "),
pprReg reg3 ],
hcat [ ptext (sLit "\tmfxer\t"), pprReg reg1 ],
... | 536 | pprInstr (MULLW_MayOflo reg1 reg2 reg3) = vcat [
hcat [ ptext (sLit "\tmullwo\t"), pprReg reg1, ptext (sLit ", "),
pprReg reg2, ptext (sLit ", "),
pprReg reg3 ],
hcat [ ptext (sLit "\tmfxer\t"), pprReg reg1 ],
... | 536 | pprInstr (MULLW_MayOflo reg1 reg2 reg3) = vcat [
hcat [ ptext (sLit "\tmullwo\t"), pprReg reg1, ptext (sLit ", "),
pprReg reg2, ptext (sLit ", "),
pprReg reg3 ],
hcat [ ptext (sLit "\tmfxer\t"), pprReg reg1 ],
... | 536 | false | false | 0 | 11 | 259 | 173 | 85 | 88 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.