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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ekr/tamarin-prover | lib/term/src/Term/Substitution.hs | gpl-3.0 | -- Composition of VFresh and VFresh substitutions
----------------------------------------------------------------------
-- | @composeVFresh s1 s2@ composes the fresh substitution s1 and the free substitution s2.
-- The result is the fresh substitution s = s1.s2.
composeVFresh :: (IsConst c, Show (Lit c LVar))
=> LSubstVFresh c -> LSubst c -> LSubstVFresh c
composeVFresh s1_0 s2 =
-- all variables in vrange(s1.s2) originate from s1 and can be considered fresh.
freeToFreshRaw (s1 `compose` s2)
where
s1 = freshToFreeAvoidingFast (extendWithRenaming (varsRange s2) s1_0) (s2,s1_0)
-- Conversion between substitutions
----------------------------------------------------------------------
-- | @freshToFree s@ converts the bound variables in @s@ to free variables
-- using fresh variable names. We try to preserve variables names if possible. | 878 | composeVFresh :: (IsConst c, Show (Lit c LVar))
=> LSubstVFresh c -> LSubst c -> LSubstVFresh c
composeVFresh s1_0 s2 =
-- all variables in vrange(s1.s2) originate from s1 and can be considered fresh.
freeToFreshRaw (s1 `compose` s2)
where
s1 = freshToFreeAvoidingFast (extendWithRenaming (varsRange s2) s1_0) (s2,s1_0)
-- Conversion between substitutions
----------------------------------------------------------------------
-- | @freshToFree s@ converts the bound variables in @s@ to free variables
-- using fresh variable names. We try to preserve variables names if possible. | 611 | composeVFresh s1_0 s2 =
-- all variables in vrange(s1.s2) originate from s1 and can be considered fresh.
freeToFreshRaw (s1 `compose` s2)
where
s1 = freshToFreeAvoidingFast (extendWithRenaming (varsRange s2) s1_0) (s2,s1_0)
-- Conversion between substitutions
----------------------------------------------------------------------
-- | @freshToFree s@ converts the bound variables in @s@ to free variables
-- using fresh variable names. We try to preserve variables names if possible. | 501 | true | true | 0 | 9 | 144 | 110 | 60 | 50 | null | null |
roldugin/LiveFusion | Data/LiveFusion/Evaluator.hs | bsd-3-clause | evalAST :: Typeable t => AST t -> t
evalAST (Manifest vec) = vec | 64 | evalAST :: Typeable t => AST t -> t
evalAST (Manifest vec) = vec | 64 | evalAST (Manifest vec) = vec | 28 | false | true | 0 | 10 | 13 | 40 | 17 | 23 | null | null |
input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/API/V1/ReifyWalletError.hs | mit | createAccountError :: CreateAccountError -> V1.WalletError
createAccountError e = case e of
(CreateAccountError e') ->
createAccountErrorKernel e'
(CreateAccountWalletIdDecodingFailed _txt) ->
V1.WalletNotFound | 235 | createAccountError :: CreateAccountError -> V1.WalletError
createAccountError e = case e of
(CreateAccountError e') ->
createAccountErrorKernel e'
(CreateAccountWalletIdDecodingFailed _txt) ->
V1.WalletNotFound | 235 | createAccountError e = case e of
(CreateAccountError e') ->
createAccountErrorKernel e'
(CreateAccountWalletIdDecodingFailed _txt) ->
V1.WalletNotFound | 176 | false | true | 0 | 9 | 44 | 59 | 27 | 32 | null | null |
cdepillabout/haskell-random-dice-test | src/Main.hs | mpl-2.0 | listOfRandomRolls' :: (RandomGen g, MonadReader g m, Functor m) => m [Integer]
listOfRandomRolls' = do
allRolls <- unfoldr (Just . genRandom') <$> ask
return $ take totalRolls allRolls | 192 | listOfRandomRolls' :: (RandomGen g, MonadReader g m, Functor m) => m [Integer]
listOfRandomRolls' = do
allRolls <- unfoldr (Just . genRandom') <$> ask
return $ take totalRolls allRolls | 192 | listOfRandomRolls' = do
allRolls <- unfoldr (Just . genRandom') <$> ask
return $ take totalRolls allRolls | 113 | false | true | 0 | 11 | 35 | 73 | 36 | 37 | null | null |
shnarazk/mios | src/SAT/Mios/Util/BoolExp.hs | gpl-3.0 | -- | implication as a short cut
--
-- >>> asList ("1" ->- "2")
-- [[-1,-3],[1,3],[3,2,-4],[-3,4],[-2,4]]
(->-) :: (BoolComponent a, BoolComponent b) => a -> b -> BoolForm
(toBF -> a) ->- (toBF -> b) = (neg a) -|- b | 214 | (->-) :: (BoolComponent a, BoolComponent b) => a -> b -> BoolForm
(toBF -> a) ->- (toBF -> b) = (neg a) -|- b | 109 | (toBF -> a) ->- (toBF -> b) = (neg a) -|- b | 43 | true | true | 0 | 7 | 39 | 70 | 39 | 31 | null | null |
8l/barrelfish | hake/RuleDefs.hs | mit | compileGeneratedCFiles :: Options -> [String] -> HRule
compileGeneratedCFiles opts srcs =
Rules [ compileGeneratedCFile opts s | s <- srcs ] | 144 | compileGeneratedCFiles :: Options -> [String] -> HRule
compileGeneratedCFiles opts srcs =
Rules [ compileGeneratedCFile opts s | s <- srcs ] | 144 | compileGeneratedCFiles opts srcs =
Rules [ compileGeneratedCFile opts s | s <- srcs ] | 89 | false | true | 0 | 8 | 24 | 51 | 24 | 27 | null | null |
binesiyu/ifl | examples/ch03/MySecond.hs | mit | {-- /snippet mySecond --}
{-- snippet safeSecond --}
safeSecond :: [a] -> Maybe a
safeSecond [] = Nothing | 107 | safeSecond :: [a] -> Maybe a
safeSecond [] = Nothing | 52 | safeSecond [] = Nothing | 23 | true | true | 0 | 6 | 19 | 28 | 15 | 13 | null | null |
Lazersmoke/reee-monads | src/Control/Eff/Internal/Eff.hs | bsd-3-clause | runM (Eff u q) = extract u >>= runM . runTCQ q | 46 | runM (Eff u q) = extract u >>= runM . runTCQ q | 46 | runM (Eff u q) = extract u >>= runM . runTCQ q | 46 | false | false | 0 | 7 | 11 | 32 | 14 | 18 | null | null |
FranklinChen/Idris-dev | src/Idris/Core/Evaluate.hs | bsd-3-clause | -- | Normalise everything, whether abstract, private or public
normaliseAll :: Context -> Env -> TT Name -> TT Name
normaliseAll ctxt env t
= evalState (do val <- eval False ctxt [] (map finalEntry env) t [AtREPL]
quote 0 val) initEval | 257 | normaliseAll :: Context -> Env -> TT Name -> TT Name
normaliseAll ctxt env t
= evalState (do val <- eval False ctxt [] (map finalEntry env) t [AtREPL]
quote 0 val) initEval | 194 | normaliseAll ctxt env t
= evalState (do val <- eval False ctxt [] (map finalEntry env) t [AtREPL]
quote 0 val) initEval | 141 | true | true | 0 | 12 | 63 | 92 | 42 | 50 | null | null |
snowleopard/alga | src/Algebra/Graph/Labelled/AdjacencyMap.hs | mit | -- | Construct the /induced subgraph/ of a given graph by removing the vertices
-- that are 'Nothing'.
-- Complexity: /O(n + m)/ time.
--
-- @
-- induceJust ('vertex' 'Nothing') == 'empty'
-- induceJust ('edge' ('Just' x) 'Nothing') == 'vertex' x
-- induceJust . 'gmap' 'Just' == 'id'
-- induceJust . 'gmap' (\\x -> if p x then 'Just' x else 'Nothing') == 'induce' p
-- @
induceJust :: Ord a => AdjacencyMap e (Maybe a) -> AdjacencyMap e a
induceJust = AM . Map.map catMaybesMap . catMaybesMap . adjacencyMap
where
catMaybesMap = Map.mapKeysMonotonic fromJust . Map.delete Nothing
-- | Compute the /reflexive and transitive closure/ of a graph over the
-- underlying star semiring using the Warshall-Floyd-Kleene algorithm.
--
-- @
-- closure 'empty' == 'empty'
-- closure ('vertex' x) == 'edge' 'one' x x
-- closure ('edge' e x x) == 'edge' 'one' x x
-- closure ('edge' e x y) == 'edges' [('one',x,x), (e,x,y), ('one',y,y)]
-- closure == 'reflexiveClosure' . 'transitiveClosure'
-- closure == 'transitiveClosure' . 'reflexiveClosure'
-- closure . closure == closure
-- 'postSet' x (closure y) == Set.'Set.fromList' ('Algebra.Graph.ToGraph.reachable' x y)
-- @ | 1,300 | induceJust :: Ord a => AdjacencyMap e (Maybe a) -> AdjacencyMap e a
induceJust = AM . Map.map catMaybesMap . catMaybesMap . adjacencyMap
where
catMaybesMap = Map.mapKeysMonotonic fromJust . Map.delete Nothing
-- | Compute the /reflexive and transitive closure/ of a graph over the
-- underlying star semiring using the Warshall-Floyd-Kleene algorithm.
--
-- @
-- closure 'empty' == 'empty'
-- closure ('vertex' x) == 'edge' 'one' x x
-- closure ('edge' e x x) == 'edge' 'one' x x
-- closure ('edge' e x y) == 'edges' [('one',x,x), (e,x,y), ('one',y,y)]
-- closure == 'reflexiveClosure' . 'transitiveClosure'
-- closure == 'transitiveClosure' . 'reflexiveClosure'
-- closure . closure == closure
-- 'postSet' x (closure y) == Set.'Set.fromList' ('Algebra.Graph.ToGraph.reachable' x y)
-- @ | 840 | induceJust = AM . Map.map catMaybesMap . catMaybesMap . adjacencyMap
where
catMaybesMap = Map.mapKeysMonotonic fromJust . Map.delete Nothing
-- | Compute the /reflexive and transitive closure/ of a graph over the
-- underlying star semiring using the Warshall-Floyd-Kleene algorithm.
--
-- @
-- closure 'empty' == 'empty'
-- closure ('vertex' x) == 'edge' 'one' x x
-- closure ('edge' e x x) == 'edge' 'one' x x
-- closure ('edge' e x y) == 'edges' [('one',x,x), (e,x,y), ('one',y,y)]
-- closure == 'reflexiveClosure' . 'transitiveClosure'
-- closure == 'transitiveClosure' . 'reflexiveClosure'
-- closure . closure == closure
-- 'postSet' x (closure y) == Set.'Set.fromList' ('Algebra.Graph.ToGraph.reachable' x y)
-- @ | 772 | true | true | 2 | 10 | 328 | 109 | 60 | 49 | null | null |
YuichiroSato/GameOfSymbolGrounding | src/Data/Cell.hs | bsd-3-clause | randomExternal :: Int -> (Int, Int) -> Int -> External
randomExternal i xy0 c = case i `mod` 7 of
0 -> External Empty xy0 10
1 -> External Plant xy0 10
2 -> External Herbivore xy0 c
3 -> External Carnivore xy0 c
_ -> External Plant xy0 10 | 248 | randomExternal :: Int -> (Int, Int) -> Int -> External
randomExternal i xy0 c = case i `mod` 7 of
0 -> External Empty xy0 10
1 -> External Plant xy0 10
2 -> External Herbivore xy0 c
3 -> External Carnivore xy0 c
_ -> External Plant xy0 10 | 248 | randomExternal i xy0 c = case i `mod` 7 of
0 -> External Empty xy0 10
1 -> External Plant xy0 10
2 -> External Herbivore xy0 c
3 -> External Carnivore xy0 c
_ -> External Plant xy0 10 | 193 | false | true | 0 | 8 | 59 | 111 | 55 | 56 | null | null |
tyoko-dev/rwhile-B-haskell | src/Parser.hs | agpl-3.0 | pRep :: Parser Cmd
pRep = SRep <$> pPat <* reservedOp "<=" <*> pPat
<?> "pRep" | 85 | pRep :: Parser Cmd
pRep = SRep <$> pPat <* reservedOp "<=" <*> pPat
<?> "pRep" | 85 | pRep = SRep <$> pPat <* reservedOp "<=" <*> pPat
<?> "pRep" | 66 | false | true | 0 | 8 | 22 | 33 | 16 | 17 | null | null |
haskellGardener/yusic | src/Yusic.hs | mit | fromKeyGuide KG_As_BbMinor7 = As_Bb:Cs_Db:F:Gs_Ab :[] | 64 | fromKeyGuide KG_As_BbMinor7 = As_Bb:Cs_Db:F:Gs_Ab :[] | 64 | fromKeyGuide KG_As_BbMinor7 = As_Bb:Cs_Db:F:Gs_Ab :[] | 64 | false | false | 0 | 8 | 15 | 27 | 13 | 14 | null | null |
apyrgio/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- | The set of lvm-based disk templates
dtsLvm :: FrozenSet String
dtsLvm = diskTemplates `ConstantUtils.difference` dtsNotLvm | 127 | dtsLvm :: FrozenSet String
dtsLvm = diskTemplates `ConstantUtils.difference` dtsNotLvm | 86 | dtsLvm = diskTemplates `ConstantUtils.difference` dtsNotLvm | 59 | true | true | 0 | 5 | 16 | 23 | 13 | 10 | null | null |
TomMD/ghc | compiler/main/HscTypes.hs | bsd-3-clause | -- Pattern synonyms have no implicit Ids; the wrapper and matcher
-- are not "implicit"; they are simply new top-level bindings,
-- and they have their own declaration in an interface file
implicitClassThings :: Class -> [TyThing]
implicitClassThings cl
= -- Does not include default methods, because those Ids may have
-- their own pragmas, unfoldings etc, not derived from the Class object
-- associated types
-- No extras_plus (recursive call) for the classATs, because they
-- are only the family decls; they have no implicit things
map ATyCon (classATs cl) ++
-- superclass and operation selectors
map AnId (classAllSelIds cl) | 687 | implicitClassThings :: Class -> [TyThing]
implicitClassThings cl
= -- Does not include default methods, because those Ids may have
-- their own pragmas, unfoldings etc, not derived from the Class object
-- associated types
-- No extras_plus (recursive call) for the classATs, because they
-- are only the family decls; they have no implicit things
map ATyCon (classATs cl) ++
-- superclass and operation selectors
map AnId (classAllSelIds cl) | 481 | implicitClassThings cl
= -- Does not include default methods, because those Ids may have
-- their own pragmas, unfoldings etc, not derived from the Class object
-- associated types
-- No extras_plus (recursive call) for the classATs, because they
-- are only the family decls; they have no implicit things
map ATyCon (classATs cl) ++
-- superclass and operation selectors
map AnId (classAllSelIds cl) | 439 | true | true | 0 | 8 | 156 | 56 | 32 | 24 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | deadSimple (T_DollarExpansion _ _) = ["${VAR}"] | 47 | deadSimple (T_DollarExpansion _ _) = ["${VAR}"] | 47 | deadSimple (T_DollarExpansion _ _) = ["${VAR}"] | 47 | false | false | 0 | 7 | 5 | 20 | 10 | 10 | null | null |
teleshoes/taffybar | src/System/Taffybar/Widget/Windows.hs | bsd-3-clause | defaultWindowsConfig :: WindowsConfig
defaultWindowsConfig =
WindowsConfig
{ getMenuLabel = truncatedGetMenuLabel 35
, getActiveLabel = truncatedGetActiveLabel 35
} | 172 | defaultWindowsConfig :: WindowsConfig
defaultWindowsConfig =
WindowsConfig
{ getMenuLabel = truncatedGetMenuLabel 35
, getActiveLabel = truncatedGetActiveLabel 35
} | 172 | defaultWindowsConfig =
WindowsConfig
{ getMenuLabel = truncatedGetMenuLabel 35
, getActiveLabel = truncatedGetActiveLabel 35
} | 134 | false | true | 0 | 8 | 24 | 35 | 18 | 17 | null | null |
gatlin/psilo | src/Lib/Syntax/Surface.hs | gpl-3.0 | aSig
:: (MonadFree SurfaceAst m)
=> Symbol
-> Type
-> m a
aSig sym t = join . liftF $ SigS sym t | 112 | aSig
:: (MonadFree SurfaceAst m)
=> Symbol
-> Type
-> m a
aSig sym t = join . liftF $ SigS sym t | 112 | aSig sym t = join . liftF $ SigS sym t | 38 | false | true | 3 | 9 | 38 | 58 | 26 | 32 | null | null |
davmre/matrizer | src/Matrizer/CodeGen.hs | gpl-2.0 | generateNumpy (LiteralScalar x) = let ix = round x
isInt = x == (fromIntegral ix) in
if isInt then show ix else show x | 194 | generateNumpy (LiteralScalar x) = let ix = round x
isInt = x == (fromIntegral ix) in
if isInt then show ix else show x | 194 | generateNumpy (LiteralScalar x) = let ix = round x
isInt = x == (fromIntegral ix) in
if isInt then show ix else show x | 194 | false | false | 0 | 11 | 99 | 58 | 28 | 30 | null | null |
jtojnar/haste-compiler | Tests/Concurrency.hs | bsd-3-clause | output :: String -> CIO ()
output = liftIO . putStrLn | 53 | output :: String -> CIO ()
output = liftIO . putStrLn | 53 | output = liftIO . putStrLn | 26 | false | true | 1 | 8 | 10 | 31 | 13 | 18 | null | null |
Athas/Sindre | Sindre/X11.hs | mit | -- | Single-line text field, whose single field @value@ (also a
-- parameter, defaults to the empty string) is the contents of the
-- editing buffer.
mkTextField :: Constructor SindreX11M
mkTextField r [] = do
v <- param "value" <|> return ""
visual <- visualOpts r
return $ newWidget (TextField ("",v)) methods [field value]
recvEventI (composeI visual) (drawI visual)
where methods = M.fromList []
value = ReadWriteField "value" getValue setValue
getValue = T.pack <$> gets fieldValue
setValue v =
modify $ \s -> s { fieldText = (reverse $ T.unpack v, "") }
recvEventI (KeyPress (S.toList -> [], CharKey c)) =
changingField value $ do
modify $ \(TextField (bef, aft)) -> TextField (c:bef, aft)
fullRedraw
recvEventI (KeyPress k) =
maybe (return ()) (redraw >>) $ M.lookup k (editorCommands value)
recvEventI _ = return ()
composeI visual = do
text <- gets fieldValue
(w,h) <- back $ textExtents (font visual) text
return (Max $ fi w + padding * 2, Exact $ fi h + padding * 2)
drawI visual = drawing' visual $ \Rectangle{..} d _ -> do
(bef,_) <- gets fieldText
text <- gets fieldValue
(befw, _) <- back $ textExtents (font visual) bef
(w, h) <- back $ textExtents (font visual) text
let width = liftM snd . textExtents (font visual)
text' <- if w <= fi rectWidth then return text
else do fits <- back $ filterM (liftM (<= fi rectWidth) . width)
$ tails $ reverse text
case fits of
[] -> return ""
(t:_) -> return $ reverse t
back $ drawText (drawerFgColor d) (drawerFont d)
(rectX+padding) (rectY+padding)
(rectHeight - padding*2) text'
when (padding+befw <= fi rectWidth) $
io $ fg d drawLine (fi rectX+padding+fi befw) (fi rectY+padding)
(fi rectX+padding+fi befw) (fi rectY+padding+fi h) | 2,244 | mkTextField :: Constructor SindreX11M
mkTextField r [] = do
v <- param "value" <|> return ""
visual <- visualOpts r
return $ newWidget (TextField ("",v)) methods [field value]
recvEventI (composeI visual) (drawI visual)
where methods = M.fromList []
value = ReadWriteField "value" getValue setValue
getValue = T.pack <$> gets fieldValue
setValue v =
modify $ \s -> s { fieldText = (reverse $ T.unpack v, "") }
recvEventI (KeyPress (S.toList -> [], CharKey c)) =
changingField value $ do
modify $ \(TextField (bef, aft)) -> TextField (c:bef, aft)
fullRedraw
recvEventI (KeyPress k) =
maybe (return ()) (redraw >>) $ M.lookup k (editorCommands value)
recvEventI _ = return ()
composeI visual = do
text <- gets fieldValue
(w,h) <- back $ textExtents (font visual) text
return (Max $ fi w + padding * 2, Exact $ fi h + padding * 2)
drawI visual = drawing' visual $ \Rectangle{..} d _ -> do
(bef,_) <- gets fieldText
text <- gets fieldValue
(befw, _) <- back $ textExtents (font visual) bef
(w, h) <- back $ textExtents (font visual) text
let width = liftM snd . textExtents (font visual)
text' <- if w <= fi rectWidth then return text
else do fits <- back $ filterM (liftM (<= fi rectWidth) . width)
$ tails $ reverse text
case fits of
[] -> return ""
(t:_) -> return $ reverse t
back $ drawText (drawerFgColor d) (drawerFont d)
(rectX+padding) (rectY+padding)
(rectHeight - padding*2) text'
when (padding+befw <= fi rectWidth) $
io $ fg d drawLine (fi rectX+padding+fi befw) (fi rectY+padding)
(fi rectX+padding+fi befw) (fi rectY+padding+fi h) | 2,094 | mkTextField r [] = do
v <- param "value" <|> return ""
visual <- visualOpts r
return $ newWidget (TextField ("",v)) methods [field value]
recvEventI (composeI visual) (drawI visual)
where methods = M.fromList []
value = ReadWriteField "value" getValue setValue
getValue = T.pack <$> gets fieldValue
setValue v =
modify $ \s -> s { fieldText = (reverse $ T.unpack v, "") }
recvEventI (KeyPress (S.toList -> [], CharKey c)) =
changingField value $ do
modify $ \(TextField (bef, aft)) -> TextField (c:bef, aft)
fullRedraw
recvEventI (KeyPress k) =
maybe (return ()) (redraw >>) $ M.lookup k (editorCommands value)
recvEventI _ = return ()
composeI visual = do
text <- gets fieldValue
(w,h) <- back $ textExtents (font visual) text
return (Max $ fi w + padding * 2, Exact $ fi h + padding * 2)
drawI visual = drawing' visual $ \Rectangle{..} d _ -> do
(bef,_) <- gets fieldText
text <- gets fieldValue
(befw, _) <- back $ textExtents (font visual) bef
(w, h) <- back $ textExtents (font visual) text
let width = liftM snd . textExtents (font visual)
text' <- if w <= fi rectWidth then return text
else do fits <- back $ filterM (liftM (<= fi rectWidth) . width)
$ tails $ reverse text
case fits of
[] -> return ""
(t:_) -> return $ reverse t
back $ drawText (drawerFgColor d) (drawerFont d)
(rectX+padding) (rectY+padding)
(rectHeight - padding*2) text'
when (padding+befw <= fi rectWidth) $
io $ fg d drawLine (fi rectX+padding+fi befw) (fi rectY+padding)
(fi rectX+padding+fi befw) (fi rectY+padding+fi h) | 2,056 | true | true | 9 | 24 | 841 | 809 | 396 | 413 | null | null |
anchor/haskell-netsuite | lib/Netsuite/Types/Fields.hs | bsd-3-clause | -- | Non-Inventory Item
nsTypeFields ("noninventoryitem":_) = [
"id",
"amortizationperiod",
"amortizationtemplate",
"auctionquantity",
"auctiontype",
"availabletopartners",
"billingschedule",
"buyitnowprice",
"class",
"conditionenabled",
"conditionhelpurl",
"copydescription",
"cost",
"costcategory",
"costestimate",
"costestimatetype",
"costunits",
"countryofmanufacture",
"createddate",
"currency",
"customform",
"deferralaccount",
"deferredrevenueaccount",
"department",
"displayinebaystore",
"displayname",
"dontshowprice",
"dropshipexpenseaccount",
"ebayhandlingtime",
"ebayintlinsurancefee",
"ebayintlpackagehandlingfee",
"ebayintlshipinsurance",
"ebayintlshippingitem1",
"ebayintlshippingitem2",
"ebayintlshippingitem3",
"ebayisintlcalculatedrate",
"ebayisirregularpackage",
"ebayitemdescription",
"ebayitemlocdisplay",
"ebayitemloczipcode",
"ebayitemlots",
"ebayitemsubtitle",
"ebayitemtitle",
"ebayitemweightamt",
"ebaylayout",
"ebaypackagetype",
"ebaypagecounter",
"ebayrelistingoption",
"ebaytheme",
"ebaythemegroup",
"endauctionswhenoutofstock",
"enforceminqtyinternally",
"excludefromsitemap",
"expenseaccount",
"externalid",
"featureddescription",
"froogleproductfeed",
"gallery",
"galleryfeatured",
"gifttypeexpressship",
"gifttypegiftwrap",
"gifttypeshiptorecipient",
"handlingcost",
"handlingcostunits",
"handlinggroup",
"imagesgroup",
"imageslocation",
"includechildren",
"incomeaccount",
"internalid",
"iscalculatedrate",
"isdonationitem",
"isdropshipitem",
"isfulfillable",
"isgcocompliant",
"isinactive",
"isonline",
"isspecialorderitem",
"issueproduct",
"itemcondition",
"itemhandlingfee",
"itemid",
"iteminsurancefee",
"itemoptions",
"itemshipinsurance",
"itemtype",
"lastmodifieddate",
"listimmediate",
"listingduration",
"listingstartdate",
"listingstarttime",
"location",
"manufacturer",
"manufactureraddr1",
"manufacturercity",
"manufacturerstate",
"manufacturertariff",
"manufacturertaxid",
"manufacturerzip",
"matrixtype",
"maxdonationamount",
"metataghtml",
"minimumquantity",
"minimumquantityunits",
"mpn",
"multmanufactureaddr",
"nextagcategory",
"nextagproductfeed",
"nopricemessage",
"numactivelistings",
"numcurrentlylisted",
"offersupport",
"outofstockbehavior",
"outofstockmessage",
"overallquantitypricingtype",
"packageheight",
"packagelength",
"packagewidth",
"pagetitle",
"parent",
"preferencecriterion",
"pricinggroup",
"primarycatdisplayname",
"primarycategory",
"producer",
"productfeed",
"purchasedescription",
"purchaseunit",
"quantitypricingschedule",
"refundgivenas",
"relateditemsdescription",
"reserveprice",
"residual",
"returnpolicy",
"returnpolicydetails",
"returnshippingpaidby",
"returnswithin",
"revrecschedule",
"salesdescription",
"saleunit",
"schedulebcode",
"schedulebnumber",
"schedulebquantity",
"searchkeywords",
"secondarycatdisplayname",
"secondarycategory",
"sellonebay",
"shipasia",
"shipaustralia",
"shipcanada",
"shipeurope",
"shipgermany",
"shipindividually",
"shipjapan",
"shipmexico",
"shipnorthsouthamerica",
"shippackage",
"shippingcost",
"shippingcostunits",
"shippingdomesticmethodsgroup",
"shippingdomgroup",
"shippingintlgroup",
"shippingintlgroup1",
"shippingintlgroup2",
"shippingintlgroup3",
"shippingitem1",
"shippingitem2",
"shippingitem3",
"shippinglocationsgroup",
"shippingpackaginggroup",
"shippingrate1",
"shippingrate2",
"shippingrate3",
"shipuk",
"shipworldwide",
"shoppingdotcomcategory",
"shoppingproductfeed",
"shopzillacategoryid",
"shopzillaproductfeed",
"showasgift",
"showdefaultdonationamount",
"sitemappriority",
"softdescriptor",
"standardimages",
"startingprice",
"stockdescription",
"storecatdisplayname",
"storecatdisplayname2",
"storecategory",
"storecategory2",
"storedescription",
"storedetaileddescription",
"storedisplayimage",
"storedisplayname",
"storedisplaythumbnail",
"storeitemtemplate",
"subsidiary",
"subtype",
"supersizeimages",
"taxable",
"taxschedule",
"templatesgroup",
"unitstype",
"upccode",
"urlcomponent",
"usemarginalrates",
"vendorname",
"vsoedeferral",
"vsoedelivered",
"vsoepermitdiscount",
"vsoeprice",
"vsoesopgroup",
"weight",
"weightunit",
"weightunits",
"willship",
"yahooproductfeed"] | 4,986 | nsTypeFields ("noninventoryitem":_) = [
"id",
"amortizationperiod",
"amortizationtemplate",
"auctionquantity",
"auctiontype",
"availabletopartners",
"billingschedule",
"buyitnowprice",
"class",
"conditionenabled",
"conditionhelpurl",
"copydescription",
"cost",
"costcategory",
"costestimate",
"costestimatetype",
"costunits",
"countryofmanufacture",
"createddate",
"currency",
"customform",
"deferralaccount",
"deferredrevenueaccount",
"department",
"displayinebaystore",
"displayname",
"dontshowprice",
"dropshipexpenseaccount",
"ebayhandlingtime",
"ebayintlinsurancefee",
"ebayintlpackagehandlingfee",
"ebayintlshipinsurance",
"ebayintlshippingitem1",
"ebayintlshippingitem2",
"ebayintlshippingitem3",
"ebayisintlcalculatedrate",
"ebayisirregularpackage",
"ebayitemdescription",
"ebayitemlocdisplay",
"ebayitemloczipcode",
"ebayitemlots",
"ebayitemsubtitle",
"ebayitemtitle",
"ebayitemweightamt",
"ebaylayout",
"ebaypackagetype",
"ebaypagecounter",
"ebayrelistingoption",
"ebaytheme",
"ebaythemegroup",
"endauctionswhenoutofstock",
"enforceminqtyinternally",
"excludefromsitemap",
"expenseaccount",
"externalid",
"featureddescription",
"froogleproductfeed",
"gallery",
"galleryfeatured",
"gifttypeexpressship",
"gifttypegiftwrap",
"gifttypeshiptorecipient",
"handlingcost",
"handlingcostunits",
"handlinggroup",
"imagesgroup",
"imageslocation",
"includechildren",
"incomeaccount",
"internalid",
"iscalculatedrate",
"isdonationitem",
"isdropshipitem",
"isfulfillable",
"isgcocompliant",
"isinactive",
"isonline",
"isspecialorderitem",
"issueproduct",
"itemcondition",
"itemhandlingfee",
"itemid",
"iteminsurancefee",
"itemoptions",
"itemshipinsurance",
"itemtype",
"lastmodifieddate",
"listimmediate",
"listingduration",
"listingstartdate",
"listingstarttime",
"location",
"manufacturer",
"manufactureraddr1",
"manufacturercity",
"manufacturerstate",
"manufacturertariff",
"manufacturertaxid",
"manufacturerzip",
"matrixtype",
"maxdonationamount",
"metataghtml",
"minimumquantity",
"minimumquantityunits",
"mpn",
"multmanufactureaddr",
"nextagcategory",
"nextagproductfeed",
"nopricemessage",
"numactivelistings",
"numcurrentlylisted",
"offersupport",
"outofstockbehavior",
"outofstockmessage",
"overallquantitypricingtype",
"packageheight",
"packagelength",
"packagewidth",
"pagetitle",
"parent",
"preferencecriterion",
"pricinggroup",
"primarycatdisplayname",
"primarycategory",
"producer",
"productfeed",
"purchasedescription",
"purchaseunit",
"quantitypricingschedule",
"refundgivenas",
"relateditemsdescription",
"reserveprice",
"residual",
"returnpolicy",
"returnpolicydetails",
"returnshippingpaidby",
"returnswithin",
"revrecschedule",
"salesdescription",
"saleunit",
"schedulebcode",
"schedulebnumber",
"schedulebquantity",
"searchkeywords",
"secondarycatdisplayname",
"secondarycategory",
"sellonebay",
"shipasia",
"shipaustralia",
"shipcanada",
"shipeurope",
"shipgermany",
"shipindividually",
"shipjapan",
"shipmexico",
"shipnorthsouthamerica",
"shippackage",
"shippingcost",
"shippingcostunits",
"shippingdomesticmethodsgroup",
"shippingdomgroup",
"shippingintlgroup",
"shippingintlgroup1",
"shippingintlgroup2",
"shippingintlgroup3",
"shippingitem1",
"shippingitem2",
"shippingitem3",
"shippinglocationsgroup",
"shippingpackaginggroup",
"shippingrate1",
"shippingrate2",
"shippingrate3",
"shipuk",
"shipworldwide",
"shoppingdotcomcategory",
"shoppingproductfeed",
"shopzillacategoryid",
"shopzillaproductfeed",
"showasgift",
"showdefaultdonationamount",
"sitemappriority",
"softdescriptor",
"standardimages",
"startingprice",
"stockdescription",
"storecatdisplayname",
"storecatdisplayname2",
"storecategory",
"storecategory2",
"storedescription",
"storedetaileddescription",
"storedisplayimage",
"storedisplayname",
"storedisplaythumbnail",
"storeitemtemplate",
"subsidiary",
"subtype",
"supersizeimages",
"taxable",
"taxschedule",
"templatesgroup",
"unitstype",
"upccode",
"urlcomponent",
"usemarginalrates",
"vendorname",
"vsoedeferral",
"vsoedelivered",
"vsoepermitdiscount",
"vsoeprice",
"vsoesopgroup",
"weight",
"weightunit",
"weightunits",
"willship",
"yahooproductfeed"] | 4,962 | nsTypeFields ("noninventoryitem":_) = [
"id",
"amortizationperiod",
"amortizationtemplate",
"auctionquantity",
"auctiontype",
"availabletopartners",
"billingschedule",
"buyitnowprice",
"class",
"conditionenabled",
"conditionhelpurl",
"copydescription",
"cost",
"costcategory",
"costestimate",
"costestimatetype",
"costunits",
"countryofmanufacture",
"createddate",
"currency",
"customform",
"deferralaccount",
"deferredrevenueaccount",
"department",
"displayinebaystore",
"displayname",
"dontshowprice",
"dropshipexpenseaccount",
"ebayhandlingtime",
"ebayintlinsurancefee",
"ebayintlpackagehandlingfee",
"ebayintlshipinsurance",
"ebayintlshippingitem1",
"ebayintlshippingitem2",
"ebayintlshippingitem3",
"ebayisintlcalculatedrate",
"ebayisirregularpackage",
"ebayitemdescription",
"ebayitemlocdisplay",
"ebayitemloczipcode",
"ebayitemlots",
"ebayitemsubtitle",
"ebayitemtitle",
"ebayitemweightamt",
"ebaylayout",
"ebaypackagetype",
"ebaypagecounter",
"ebayrelistingoption",
"ebaytheme",
"ebaythemegroup",
"endauctionswhenoutofstock",
"enforceminqtyinternally",
"excludefromsitemap",
"expenseaccount",
"externalid",
"featureddescription",
"froogleproductfeed",
"gallery",
"galleryfeatured",
"gifttypeexpressship",
"gifttypegiftwrap",
"gifttypeshiptorecipient",
"handlingcost",
"handlingcostunits",
"handlinggroup",
"imagesgroup",
"imageslocation",
"includechildren",
"incomeaccount",
"internalid",
"iscalculatedrate",
"isdonationitem",
"isdropshipitem",
"isfulfillable",
"isgcocompliant",
"isinactive",
"isonline",
"isspecialorderitem",
"issueproduct",
"itemcondition",
"itemhandlingfee",
"itemid",
"iteminsurancefee",
"itemoptions",
"itemshipinsurance",
"itemtype",
"lastmodifieddate",
"listimmediate",
"listingduration",
"listingstartdate",
"listingstarttime",
"location",
"manufacturer",
"manufactureraddr1",
"manufacturercity",
"manufacturerstate",
"manufacturertariff",
"manufacturertaxid",
"manufacturerzip",
"matrixtype",
"maxdonationamount",
"metataghtml",
"minimumquantity",
"minimumquantityunits",
"mpn",
"multmanufactureaddr",
"nextagcategory",
"nextagproductfeed",
"nopricemessage",
"numactivelistings",
"numcurrentlylisted",
"offersupport",
"outofstockbehavior",
"outofstockmessage",
"overallquantitypricingtype",
"packageheight",
"packagelength",
"packagewidth",
"pagetitle",
"parent",
"preferencecriterion",
"pricinggroup",
"primarycatdisplayname",
"primarycategory",
"producer",
"productfeed",
"purchasedescription",
"purchaseunit",
"quantitypricingschedule",
"refundgivenas",
"relateditemsdescription",
"reserveprice",
"residual",
"returnpolicy",
"returnpolicydetails",
"returnshippingpaidby",
"returnswithin",
"revrecschedule",
"salesdescription",
"saleunit",
"schedulebcode",
"schedulebnumber",
"schedulebquantity",
"searchkeywords",
"secondarycatdisplayname",
"secondarycategory",
"sellonebay",
"shipasia",
"shipaustralia",
"shipcanada",
"shipeurope",
"shipgermany",
"shipindividually",
"shipjapan",
"shipmexico",
"shipnorthsouthamerica",
"shippackage",
"shippingcost",
"shippingcostunits",
"shippingdomesticmethodsgroup",
"shippingdomgroup",
"shippingintlgroup",
"shippingintlgroup1",
"shippingintlgroup2",
"shippingintlgroup3",
"shippingitem1",
"shippingitem2",
"shippingitem3",
"shippinglocationsgroup",
"shippingpackaginggroup",
"shippingrate1",
"shippingrate2",
"shippingrate3",
"shipuk",
"shipworldwide",
"shoppingdotcomcategory",
"shoppingproductfeed",
"shopzillacategoryid",
"shopzillaproductfeed",
"showasgift",
"showdefaultdonationamount",
"sitemappriority",
"softdescriptor",
"standardimages",
"startingprice",
"stockdescription",
"storecatdisplayname",
"storecatdisplayname2",
"storecategory",
"storecategory2",
"storedescription",
"storedetaileddescription",
"storedisplayimage",
"storedisplayname",
"storedisplaythumbnail",
"storeitemtemplate",
"subsidiary",
"subtype",
"supersizeimages",
"taxable",
"taxschedule",
"templatesgroup",
"unitstype",
"upccode",
"urlcomponent",
"usemarginalrates",
"vendorname",
"vsoedeferral",
"vsoedelivered",
"vsoepermitdiscount",
"vsoeprice",
"vsoesopgroup",
"weight",
"weightunit",
"weightunits",
"willship",
"yahooproductfeed"] | 4,962 | true | false | 0 | 7 | 1,092 | 668 | 443 | 225 | null | null |
vikraman/ghc | utils/ghctags/Main.hs | bsd-3-clause | startOfLocated :: Located a -> RealSrcLoc
startOfLocated lHs = case getLoc lHs of
RealSrcSpan l -> realSrcSpanStart l
UnhelpfulSpan _ -> panic "startOfLocated UnhelpfulSpan" | 215 | startOfLocated :: Located a -> RealSrcLoc
startOfLocated lHs = case getLoc lHs of
RealSrcSpan l -> realSrcSpanStart l
UnhelpfulSpan _ -> panic "startOfLocated UnhelpfulSpan" | 215 | startOfLocated lHs = case getLoc lHs of
RealSrcSpan l -> realSrcSpanStart l
UnhelpfulSpan _ -> panic "startOfLocated UnhelpfulSpan" | 173 | false | true | 0 | 8 | 65 | 52 | 23 | 29 | null | null |
mikeplus64/plissken | src/Game.hs | gpl-3.0 | saveScores :: FilePath -> GameS -> IO ()
saveScores p g = B.writeFile p (formatScores (_scores g)) | 98 | saveScores :: FilePath -> GameS -> IO ()
saveScores p g = B.writeFile p (formatScores (_scores g)) | 98 | saveScores p g = B.writeFile p (formatScores (_scores g)) | 57 | false | true | 0 | 9 | 16 | 48 | 23 | 25 | null | null |
narurien/ganeti-ceph | src/Ganeti/Query/Node.hs | gpl-2.0 | collectLiveData True cfg nodes = do
let hvs = [getDefaultHypervisorSpec cfg]
good_nodes = nodesWithValidConfig cfg nodes
-- FIXME: use storage units from calling code
storage_units = getStorageUnitsOfNodes cfg good_nodes
rpcres <- executeRpcCall good_nodes (RpcCallNodeInfo storage_units hvs)
return $ fillUpList (fillPairFromMaybe rpcResultNodeBroken pickPairUnique)
nodes rpcres
-- | Looks up the default hypervisor and it's hvparams | 466 | collectLiveData True cfg nodes = do
let hvs = [getDefaultHypervisorSpec cfg]
good_nodes = nodesWithValidConfig cfg nodes
-- FIXME: use storage units from calling code
storage_units = getStorageUnitsOfNodes cfg good_nodes
rpcres <- executeRpcCall good_nodes (RpcCallNodeInfo storage_units hvs)
return $ fillUpList (fillPairFromMaybe rpcResultNodeBroken pickPairUnique)
nodes rpcres
-- | Looks up the default hypervisor and it's hvparams | 466 | collectLiveData True cfg nodes = do
let hvs = [getDefaultHypervisorSpec cfg]
good_nodes = nodesWithValidConfig cfg nodes
-- FIXME: use storage units from calling code
storage_units = getStorageUnitsOfNodes cfg good_nodes
rpcres <- executeRpcCall good_nodes (RpcCallNodeInfo storage_units hvs)
return $ fillUpList (fillPairFromMaybe rpcResultNodeBroken pickPairUnique)
nodes rpcres
-- | Looks up the default hypervisor and it's hvparams | 466 | false | false | 1 | 12 | 84 | 98 | 44 | 54 | null | null |
bitemyapp/stm-chans | src/Control/Concurrent/STM/TMChan.hs | bsd-3-clause | newTMChanIO :: IO (TMChan a)
newTMChanIO = do
closed <- newTVarIO False
chan <- newTChanIO
return (TMChan closed chan)
-- | Like 'newBroadcastTChan'.
--
-- /Since: 2.1.0/ | 190 | newTMChanIO :: IO (TMChan a)
newTMChanIO = do
closed <- newTVarIO False
chan <- newTChanIO
return (TMChan closed chan)
-- | Like 'newBroadcastTChan'.
--
-- /Since: 2.1.0/ | 190 | newTMChanIO = do
closed <- newTVarIO False
chan <- newTChanIO
return (TMChan closed chan)
-- | Like 'newBroadcastTChan'.
--
-- /Since: 2.1.0/ | 161 | false | true | 0 | 9 | 46 | 54 | 26 | 28 | null | null |
bigs/7inch | Network/IRC/SevenInch.hs | mit | sendCmd :: TChan String -> Command -> [String] -> STM ()
sendCmd chan c args = do
let cmdStr = commandToString c args
writeTChan chan $ cmdStr ++ "\r\n" | 156 | sendCmd :: TChan String -> Command -> [String] -> STM ()
sendCmd chan c args = do
let cmdStr = commandToString c args
writeTChan chan $ cmdStr ++ "\r\n" | 156 | sendCmd chan c args = do
let cmdStr = commandToString c args
writeTChan chan $ cmdStr ++ "\r\n" | 99 | false | true | 0 | 10 | 32 | 69 | 32 | 37 | null | null |
DavidAlphaFox/darcs | src/Darcs/Patch/ConflictMarking.hs | gpl-2.0 | mangleUnravelledHunks :: PrimPatch prim => [Sealed (FL prim wX)] -> Sealed (prim wX)
--mangleUnravelledHunks [[h1],[h2]] = Deal with simple cases handily?
mangleUnravelledHunks pss =
if null nchs then bug "mangleUnravelledHunks"
else Sealed (primFromHunk (FileHunk filename l old new))
where oldf = getOld (repeat Nothing) pss
newfs = map (getHunksNew oldf) pss
l = getHunkline $ oldf : newfs
nchs = sort $ map (makeChunk l) newfs
filename = getAFilename pss
old = makeChunk l oldf
new = [top] ++ old ++ [initial] ++ intercalate [middle] nchs ++ [bottom]
top = BC.pack $ "v v v v v v v" ++ eol_c
initial= BC.pack $ "=============" ++ eol_c
middle = BC.pack $ "*************" ++ eol_c
bottom = BC.pack $ "^ ^ ^ ^ ^ ^ ^" ++ eol_c
eol_c = if any (\ps -> not (B.null ps) && BC.last ps == '\r') old
then "\r"
else "" | 996 | mangleUnravelledHunks :: PrimPatch prim => [Sealed (FL prim wX)] -> Sealed (prim wX)
mangleUnravelledHunks pss =
if null nchs then bug "mangleUnravelledHunks"
else Sealed (primFromHunk (FileHunk filename l old new))
where oldf = getOld (repeat Nothing) pss
newfs = map (getHunksNew oldf) pss
l = getHunkline $ oldf : newfs
nchs = sort $ map (makeChunk l) newfs
filename = getAFilename pss
old = makeChunk l oldf
new = [top] ++ old ++ [initial] ++ intercalate [middle] nchs ++ [bottom]
top = BC.pack $ "v v v v v v v" ++ eol_c
initial= BC.pack $ "=============" ++ eol_c
middle = BC.pack $ "*************" ++ eol_c
bottom = BC.pack $ "^ ^ ^ ^ ^ ^ ^" ++ eol_c
eol_c = if any (\ps -> not (B.null ps) && BC.last ps == '\r') old
then "\r"
else "" | 926 | mangleUnravelledHunks pss =
if null nchs then bug "mangleUnravelledHunks"
else Sealed (primFromHunk (FileHunk filename l old new))
where oldf = getOld (repeat Nothing) pss
newfs = map (getHunksNew oldf) pss
l = getHunkline $ oldf : newfs
nchs = sort $ map (makeChunk l) newfs
filename = getAFilename pss
old = makeChunk l oldf
new = [top] ++ old ++ [initial] ++ intercalate [middle] nchs ++ [bottom]
top = BC.pack $ "v v v v v v v" ++ eol_c
initial= BC.pack $ "=============" ++ eol_c
middle = BC.pack $ "*************" ++ eol_c
bottom = BC.pack $ "^ ^ ^ ^ ^ ^ ^" ++ eol_c
eol_c = if any (\ps -> not (B.null ps) && BC.last ps == '\r') old
then "\r"
else "" | 841 | true | true | 11 | 22 | 330 | 332 | 163 | 169 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Pipeline/Ghc.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Extract All Information Needed for Verification -----------------------------
--------------------------------------------------------------------------------
getGhcInfo :: Config -> GhcSpec -> FilePath -> ModSummary -> Ghc GhcInfo
getGhcInfo cfg scope hsFile summary = handleErrors $ do
liftIO $ cleanFiles hsFile
summary' <- updateDynFlags summary
parsed <- parseModule summary'
let parsed' = rewriteModule parsed
typechecked <- typecheckModule $ ignoreInline parsed'
desugared <- desugarModule typechecked
loadModule desugared
let modguts = getGhcModGuts1 desugared
hscEnv <- getSession
coreBinds <- liftIO $ anormalize (not $ nocaseexpand cfg) hscEnv modguts
let datacons = [ dataConWorkId dc
| tc <- mgi_tcs modguts
, dc <- tyConDataCons tc
]
let impVs = importVars coreBinds ++ classCons (mgi_cls_inst modguts)
let defVs = definedVars coreBinds
let useVs = readVars coreBinds
let letVs = letVars coreBinds
let derVs = derivedVars coreBinds $ fmap (fmap is_dfun) $ mgi_cls_inst modguts
setContext [IIModule $ moduleName $ ms_mod summary']
spec <- makeGhcSpec (mgi_exports modguts) typechecked (impVs ++ defVs) letVs (mg_anns $ dm_core_module desugared) coreBinds scope
return $ GI cfg hscEnv coreBinds derVs impVs (letVs ++ datacons) useVs [] [] spec | 1,635 | getGhcInfo :: Config -> GhcSpec -> FilePath -> ModSummary -> Ghc GhcInfo
getGhcInfo cfg scope hsFile summary = handleErrors $ do
liftIO $ cleanFiles hsFile
summary' <- updateDynFlags summary
parsed <- parseModule summary'
let parsed' = rewriteModule parsed
typechecked <- typecheckModule $ ignoreInline parsed'
desugared <- desugarModule typechecked
loadModule desugared
let modguts = getGhcModGuts1 desugared
hscEnv <- getSession
coreBinds <- liftIO $ anormalize (not $ nocaseexpand cfg) hscEnv modguts
let datacons = [ dataConWorkId dc
| tc <- mgi_tcs modguts
, dc <- tyConDataCons tc
]
let impVs = importVars coreBinds ++ classCons (mgi_cls_inst modguts)
let defVs = definedVars coreBinds
let useVs = readVars coreBinds
let letVs = letVars coreBinds
let derVs = derivedVars coreBinds $ fmap (fmap is_dfun) $ mgi_cls_inst modguts
setContext [IIModule $ moduleName $ ms_mod summary']
spec <- makeGhcSpec (mgi_exports modguts) typechecked (impVs ++ defVs) letVs (mg_anns $ dm_core_module desugared) coreBinds scope
return $ GI cfg hscEnv coreBinds derVs impVs (letVs ++ datacons) useVs [] [] spec | 1,391 | getGhcInfo cfg scope hsFile summary = handleErrors $ do
liftIO $ cleanFiles hsFile
summary' <- updateDynFlags summary
parsed <- parseModule summary'
let parsed' = rewriteModule parsed
typechecked <- typecheckModule $ ignoreInline parsed'
desugared <- desugarModule typechecked
loadModule desugared
let modguts = getGhcModGuts1 desugared
hscEnv <- getSession
coreBinds <- liftIO $ anormalize (not $ nocaseexpand cfg) hscEnv modguts
let datacons = [ dataConWorkId dc
| tc <- mgi_tcs modguts
, dc <- tyConDataCons tc
]
let impVs = importVars coreBinds ++ classCons (mgi_cls_inst modguts)
let defVs = definedVars coreBinds
let useVs = readVars coreBinds
let letVs = letVars coreBinds
let derVs = derivedVars coreBinds $ fmap (fmap is_dfun) $ mgi_cls_inst modguts
setContext [IIModule $ moduleName $ ms_mod summary']
spec <- makeGhcSpec (mgi_exports modguts) typechecked (impVs ++ defVs) letVs (mg_anns $ dm_core_module desugared) coreBinds scope
return $ GI cfg hscEnv coreBinds derVs impVs (letVs ++ datacons) useVs [] [] spec | 1,318 | true | true | 0 | 15 | 465 | 399 | 181 | 218 | null | null |
rtorr/elm-package | src/Catalog.hs | bsd-3-clause | getJson
:: (MonadIO m, MonadReader Manager.Environment m, MonadError String m, Json.FromJSON a)
=> String
-> FilePath
-> N.Name
-> V.Version
-> m a
getJson metadata metadataPath name version =
do cacheDir <- asks Manager.cacheDirectory
let fullMetadataPath =
cacheDir </> N.toFilePath name </> V.toString version </> metadataPath
exists <- liftIO (doesFileExist fullMetadataPath)
content <-
case exists of
True -> liftIO (LBS.readFile fullMetadataPath)
False ->
do url <- catalog metadata [("name", N.toString name), ("version", V.toString version)]
Http.send url $ \request manager ->
do response <- Client.httpLbs request manager
createDirectoryIfMissing True (dropFileName fullMetadataPath)
LBS.writeFile fullMetadataPath (Client.responseBody response)
return (Client.responseBody response)
case Json.eitherDecode content of
Right value -> return value
Left err ->
throwError $
"Unable to get " ++ metadataPath ++ " for "
++ N.toString name ++ " " ++ V.toString version ++ "\n" ++ err | 1,253 | getJson
:: (MonadIO m, MonadReader Manager.Environment m, MonadError String m, Json.FromJSON a)
=> String
-> FilePath
-> N.Name
-> V.Version
-> m a
getJson metadata metadataPath name version =
do cacheDir <- asks Manager.cacheDirectory
let fullMetadataPath =
cacheDir </> N.toFilePath name </> V.toString version </> metadataPath
exists <- liftIO (doesFileExist fullMetadataPath)
content <-
case exists of
True -> liftIO (LBS.readFile fullMetadataPath)
False ->
do url <- catalog metadata [("name", N.toString name), ("version", V.toString version)]
Http.send url $ \request manager ->
do response <- Client.httpLbs request manager
createDirectoryIfMissing True (dropFileName fullMetadataPath)
LBS.writeFile fullMetadataPath (Client.responseBody response)
return (Client.responseBody response)
case Json.eitherDecode content of
Right value -> return value
Left err ->
throwError $
"Unable to get " ++ metadataPath ++ " for "
++ N.toString name ++ " " ++ V.toString version ++ "\n" ++ err | 1,253 | getJson metadata metadataPath name version =
do cacheDir <- asks Manager.cacheDirectory
let fullMetadataPath =
cacheDir </> N.toFilePath name </> V.toString version </> metadataPath
exists <- liftIO (doesFileExist fullMetadataPath)
content <-
case exists of
True -> liftIO (LBS.readFile fullMetadataPath)
False ->
do url <- catalog metadata [("name", N.toString name), ("version", V.toString version)]
Http.send url $ \request manager ->
do response <- Client.httpLbs request manager
createDirectoryIfMissing True (dropFileName fullMetadataPath)
LBS.writeFile fullMetadataPath (Client.responseBody response)
return (Client.responseBody response)
case Json.eitherDecode content of
Right value -> return value
Left err ->
throwError $
"Unable to get " ++ metadataPath ++ " for "
++ N.toString name ++ " " ++ V.toString version ++ "\n" ++ err | 1,081 | false | true | 0 | 21 | 399 | 371 | 172 | 199 | null | null |
uwap/Idris-dev | src/Idris/ParseHelpers.hs | bsd-3-clause | initsEndAt p (x:xs) | p x = [] : x_inits_xs
| otherwise = x_inits_xs
where x_inits_xs = [x : cs | cs <- initsEndAt p xs]
{- | Create a `Name' from a pair of strings representing a base name and its
namespace.
-} | 236 | initsEndAt p (x:xs) | p x = [] : x_inits_xs
| otherwise = x_inits_xs
where x_inits_xs = [x : cs | cs <- initsEndAt p xs]
{- | Create a `Name' from a pair of strings representing a base name and its
namespace.
-} | 236 | initsEndAt p (x:xs) | p x = [] : x_inits_xs
| otherwise = x_inits_xs
where x_inits_xs = [x : cs | cs <- initsEndAt p xs]
{- | Create a `Name' from a pair of strings representing a base name and its
namespace.
-} | 236 | false | false | 2 | 9 | 68 | 75 | 34 | 41 | null | null |
CarstenKoenig/Countdown | src/lib/Countdown/Expressions.hs | mit | isValidOp Mul _ _ = True | 24 | isValidOp Mul _ _ = True | 24 | isValidOp Mul _ _ = True | 24 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
reinh/hs-phi | src/Phi.hs | mit | mkDetector :: Int -- ^ The window size
-> Int -- ^ The minimum number of samples
-> Double -- ^ The latest ping
-> Detector
mkDetector = Detector . W.mkWindow | 203 | mkDetector :: Int -- ^ The window size
-> Int -- ^ The minimum number of samples
-> Double -- ^ The latest ping
-> Detector
mkDetector = Detector . W.mkWindow | 203 | mkDetector = Detector . W.mkWindow | 34 | false | true | 0 | 7 | 75 | 32 | 18 | 14 | null | null |
thomie/vector | Data/Vector.hs | bsd-3-clause | fold1M_ = G.fold1M_ | 19 | fold1M_ = G.fold1M_ | 19 | fold1M_ = G.fold1M_ | 19 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
bravit/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyTTApp :: Name -> [Term] -> ElabD Term
reifyTTApp t [nt, n, x]
| t == reflm "P" = do nt' <- reifyTTNameType nt
n' <- reifyTTName n
x' <- reifyTT x
return $ P nt' n' x' | 283 | reifyTTApp :: Name -> [Term] -> ElabD Term
reifyTTApp t [nt, n, x]
| t == reflm "P" = do nt' <- reifyTTNameType nt
n' <- reifyTTName n
x' <- reifyTT x
return $ P nt' n' x' | 283 | reifyTTApp t [nt, n, x]
| t == reflm "P" = do nt' <- reifyTTNameType nt
n' <- reifyTTName n
x' <- reifyTT x
return $ P nt' n' x' | 240 | false | true | 0 | 10 | 149 | 101 | 45 | 56 | null | null |
ttmtran/efficient-library | src/Knights problem in Haskell/knightsProblem.hs | mit | checkLen :: [Int] -> Bool
checkLen x = (length x) == 0 | 55 | checkLen :: [Int] -> Bool
checkLen x = (length x) == 0 | 54 | checkLen x = (length x) == 0 | 28 | false | true | 0 | 7 | 12 | 31 | 16 | 15 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | happyReduction_181 _ = notHappyAtAll | 37 | happyReduction_181 _ = notHappyAtAll | 37 | happyReduction_181 _ = notHappyAtAll | 37 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | revengefully = id | 17 | revengefully = id | 17 | revengefully = id | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
23Skidoo/text | Data/Text/Lazy.hs | bsd-2-clause | commonPrefixes _ Empty = Nothing | 32 | commonPrefixes _ Empty = Nothing | 32 | commonPrefixes _ Empty = Nothing | 32 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
ItsLastDay/academic_university_2016-2018 | subjects/Haskell/5/fp05.hs | gpl-3.0 | head''' [] = Left "head'': empty list" | 45 | head''' [] = Left "head'': empty list" | 45 | head''' [] = Left "head'': empty list" | 45 | false | false | 0 | 6 | 13 | 14 | 6 | 8 | null | null |
eb-gh-cr/XMonadContrib1 | XMonad/Hooks/DebugEvents.hs | bsd-3-clause | dumpProp _ "_NET_WM_STATE" = dumpArray dumpAtom | 75 | dumpProp _ "_NET_WM_STATE" = dumpArray dumpAtom | 75 | dumpProp _ "_NET_WM_STATE" = dumpArray dumpAtom | 75 | false | false | 0 | 5 | 33 | 14 | 6 | 8 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs | bsd-3-clause | gl_DEPTH_BIAS :: GLenum
gl_DEPTH_BIAS = 0x0D1F | 46 | gl_DEPTH_BIAS :: GLenum
gl_DEPTH_BIAS = 0x0D1F | 46 | gl_DEPTH_BIAS = 0x0D1F | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
SavinaRoja/SavinaRoja.github.io | assets/centraldogma_algebraic.hs | mit | geneticCode (Codon Cytosine Thymine Guanosine) = Leucine | 59 | geneticCode (Codon Cytosine Thymine Guanosine) = Leucine | 59 | geneticCode (Codon Cytosine Thymine Guanosine) = Leucine | 59 | false | false | 0 | 7 | 9 | 19 | 9 | 10 | null | null |
brendanhay/gogol | gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs | mpl-2.0 | gcmvtowauAddtional :: Lens' GoogleCloudMlV1__TrainingOutputWebAccessURIs (HashMap Text Text)
gcmvtowauAddtional
= lens _gcmvtowauAddtional
(\ s a -> s{_gcmvtowauAddtional = a})
. _Coerce | 200 | gcmvtowauAddtional :: Lens' GoogleCloudMlV1__TrainingOutputWebAccessURIs (HashMap Text Text)
gcmvtowauAddtional
= lens _gcmvtowauAddtional
(\ s a -> s{_gcmvtowauAddtional = a})
. _Coerce | 200 | gcmvtowauAddtional
= lens _gcmvtowauAddtional
(\ s a -> s{_gcmvtowauAddtional = a})
. _Coerce | 107 | false | true | 0 | 10 | 33 | 53 | 27 | 26 | null | null |
ghcjs/ghcjs | lib/ghc/includes/GHCConstantsHaskellWrappers.hs | mit | mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int
mAX_SPEC_SELECTEE_SIZE dflags = pc_MAX_SPEC_SELECTEE_SIZE (sPlatformConstants (settings dflags)) | 138 | mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int
mAX_SPEC_SELECTEE_SIZE dflags = pc_MAX_SPEC_SELECTEE_SIZE (sPlatformConstants (settings dflags)) | 138 | mAX_SPEC_SELECTEE_SIZE dflags = pc_MAX_SPEC_SELECTEE_SIZE (sPlatformConstants (settings dflags)) | 96 | false | true | 0 | 9 | 11 | 36 | 17 | 19 | null | null |
erantapaa/bed-and-breakfast | quickcheck-tests.hs | mit | prop_plus_commutative :: Matrix Double -> Matrix Double -> Bool
prop_plus_commutative m1 m2 = m1 + m2 == m2 + m1 | 112 | prop_plus_commutative :: Matrix Double -> Matrix Double -> Bool
prop_plus_commutative m1 m2 = m1 + m2 == m2 + m1 | 112 | prop_plus_commutative m1 m2 = m1 + m2 == m2 + m1 | 48 | false | true | 0 | 7 | 19 | 42 | 20 | 22 | null | null |
TwitterFriends/twitter-friend-server | src/Example.hs | bsd-3-clause | app :: IO Application
app = S.scottyApp app' | 44 | app :: IO Application
app = S.scottyApp app' | 44 | app = S.scottyApp app' | 22 | false | true | 0 | 6 | 7 | 24 | 10 | 14 | null | null |
Mokosha/Lambency | lib/Lambency/Mesh.hs | mit | getMeshVertexTy :: Vertex a => Mesh a -> VertexTy a
getMeshVertexTy (Mesh vs _) =
let (v : _) = (undefined : vs)
in getVertexTy v | 133 | getMeshVertexTy :: Vertex a => Mesh a -> VertexTy a
getMeshVertexTy (Mesh vs _) =
let (v : _) = (undefined : vs)
in getVertexTy v | 133 | getMeshVertexTy (Mesh vs _) =
let (v : _) = (undefined : vs)
in getVertexTy v | 81 | false | true | 0 | 10 | 29 | 73 | 33 | 40 | null | null |
MathiasVP/syntax-checker-checker | buggyunparse.hs | mit | unparseExpr (Quote q) = do
incr
sq <- handle [return "", time, if_, and_, or_, cond, case_, let_,
letstar, letrec, begin, unless_, abstraction,
application] (unparseQuotation q)
return $ "(quote " ++ sq ++ ")" | 247 | unparseExpr (Quote q) = do
incr
sq <- handle [return "", time, if_, and_, or_, cond, case_, let_,
letstar, letrec, begin, unless_, abstraction,
application] (unparseQuotation q)
return $ "(quote " ++ sq ++ ")" | 247 | unparseExpr (Quote q) = do
incr
sq <- handle [return "", time, if_, and_, or_, cond, case_, let_,
letstar, letrec, begin, unless_, abstraction,
application] (unparseQuotation q)
return $ "(quote " ++ sq ++ ")" | 247 | false | false | 0 | 10 | 71 | 97 | 52 | 45 | null | null |
matterhorn-chat/matterhorn | src/Matterhorn/Types/RichText.hs | bsd-3-clause | elementGetURL (EPermalink tName pId label) =
Just (Left (tName, pId), label) | 80 | elementGetURL (EPermalink tName pId label) =
Just (Left (tName, pId), label) | 80 | elementGetURL (EPermalink tName pId label) =
Just (Left (tName, pId), label) | 80 | false | false | 0 | 8 | 14 | 37 | 19 | 18 | null | null |
wavewave/lhc-analysis-collection | exe/evchainRunXQLD_sqsg.hs | gpl-3.0 | scanwork :: FilePath -> (Double,Double,Double,Double,Int) -> IO ()
scanwork fp (mgl,msq,msl,mneut,n) = do
homedir <- getHomeDirectory
getConfig fp >>=
maybe (return ()) (\ec -> do
let ssetup = evgen_scriptsetup ec
whost = evgen_webdavroot ec
pkey = evgen_privatekeyfile ec
pswd = evgen_passwordstore ec
Just cr <- getCredential pkey pswd
let wdavcfg = WebDAVConfig { webdav_credential = cr
, webdav_baseurl = whost }
param = modelparam mgl msq msl mneut
mgrs = mgrunsetup n
evchainGen ADMXQLD111
ssetup
("Work20130421_sqsg","sqsg_2l3j2x")
param
map_sqsg_2l3j2x p_sqsg_2l3j2x
mgrs
let wsetup' = getWorkSetupCombined ADMXQLD111 ssetup param ("Work20130421_sqsg","sqsg_2l3j2x") mgrs
wsetup = wsetup' { ws_storage = WebDAVRemoteDir "montecarlo/admproject/XQLD/scan_sqsg_2l3j2x" }
putStrLn "phase2work start"
phase2work wsetup
putStrLn "phase3work start"
phase3work wdavcfg wsetup
) | 1,111 | scanwork :: FilePath -> (Double,Double,Double,Double,Int) -> IO ()
scanwork fp (mgl,msq,msl,mneut,n) = do
homedir <- getHomeDirectory
getConfig fp >>=
maybe (return ()) (\ec -> do
let ssetup = evgen_scriptsetup ec
whost = evgen_webdavroot ec
pkey = evgen_privatekeyfile ec
pswd = evgen_passwordstore ec
Just cr <- getCredential pkey pswd
let wdavcfg = WebDAVConfig { webdav_credential = cr
, webdav_baseurl = whost }
param = modelparam mgl msq msl mneut
mgrs = mgrunsetup n
evchainGen ADMXQLD111
ssetup
("Work20130421_sqsg","sqsg_2l3j2x")
param
map_sqsg_2l3j2x p_sqsg_2l3j2x
mgrs
let wsetup' = getWorkSetupCombined ADMXQLD111 ssetup param ("Work20130421_sqsg","sqsg_2l3j2x") mgrs
wsetup = wsetup' { ws_storage = WebDAVRemoteDir "montecarlo/admproject/XQLD/scan_sqsg_2l3j2x" }
putStrLn "phase2work start"
phase2work wsetup
putStrLn "phase3work start"
phase3work wdavcfg wsetup
) | 1,110 | scanwork fp (mgl,msq,msl,mneut,n) = do
homedir <- getHomeDirectory
getConfig fp >>=
maybe (return ()) (\ec -> do
let ssetup = evgen_scriptsetup ec
whost = evgen_webdavroot ec
pkey = evgen_privatekeyfile ec
pswd = evgen_passwordstore ec
Just cr <- getCredential pkey pswd
let wdavcfg = WebDAVConfig { webdav_credential = cr
, webdav_baseurl = whost }
param = modelparam mgl msq msl mneut
mgrs = mgrunsetup n
evchainGen ADMXQLD111
ssetup
("Work20130421_sqsg","sqsg_2l3j2x")
param
map_sqsg_2l3j2x p_sqsg_2l3j2x
mgrs
let wsetup' = getWorkSetupCombined ADMXQLD111 ssetup param ("Work20130421_sqsg","sqsg_2l3j2x") mgrs
wsetup = wsetup' { ws_storage = WebDAVRemoteDir "montecarlo/admproject/XQLD/scan_sqsg_2l3j2x" }
putStrLn "phase2work start"
phase2work wsetup
putStrLn "phase3work start"
phase3work wdavcfg wsetup
) | 1,043 | false | true | 0 | 18 | 343 | 285 | 142 | 143 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-lang/Language/Drasil/Chunk/UnitDefn.hs | bsd-2-clause | derCUC'' :: String -> NP -> String -> Symbol -> UnitEquation -> UnitDefn
derCUC'' a b c s ue = UD (dcc a b c) (DerivedSI (US [(s,1)]) (usymb ue) (USynonym $ usymb ue)) (getCu ue) | 178 | derCUC'' :: String -> NP -> String -> Symbol -> UnitEquation -> UnitDefn
derCUC'' a b c s ue = UD (dcc a b c) (DerivedSI (US [(s,1)]) (usymb ue) (USynonym $ usymb ue)) (getCu ue) | 178 | derCUC'' a b c s ue = UD (dcc a b c) (DerivedSI (US [(s,1)]) (usymb ue) (USynonym $ usymb ue)) (getCu ue) | 105 | false | true | 0 | 11 | 35 | 106 | 54 | 52 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getWheelSteeringInvertedStream :: KRPCHS.SpaceCenter.Wheel -> RPCContext (KRPCStream (Bool))
getWheelSteeringInvertedStream thisArg = requestStream $ getWheelSteeringInvertedStreamReq thisArg | 191 | getWheelSteeringInvertedStream :: KRPCHS.SpaceCenter.Wheel -> RPCContext (KRPCStream (Bool))
getWheelSteeringInvertedStream thisArg = requestStream $ getWheelSteeringInvertedStreamReq thisArg | 191 | getWheelSteeringInvertedStream thisArg = requestStream $ getWheelSteeringInvertedStreamReq thisArg | 98 | false | true | 0 | 9 | 13 | 43 | 21 | 22 | null | null |
crockeo/tic-taskell | src/Minimax.hs | mit | findOptimalMove :: BoardState -> Board -> Point
findOptimalMove Nil = const (-1, -1) | 84 | findOptimalMove :: BoardState -> Board -> Point
findOptimalMove Nil = const (-1, -1) | 84 | findOptimalMove Nil = const (-1, -1) | 36 | false | true | 0 | 7 | 12 | 35 | 18 | 17 | null | null |
uduki/hsQt | Qtc/Gui/QCalendarWidget.hs | bsd-2-clause | showPreviousMonth :: QCalendarWidget a -> (()) -> IO ()
showPreviousMonth x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QCalendarWidget_showPreviousMonth cobj_x0 | 164 | showPreviousMonth :: QCalendarWidget a -> (()) -> IO ()
showPreviousMonth x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QCalendarWidget_showPreviousMonth cobj_x0 | 164 | showPreviousMonth x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QCalendarWidget_showPreviousMonth cobj_x0 | 108 | false | true | 0 | 8 | 25 | 54 | 26 | 28 | null | null |
bfpg/brisparks.info | import/FacilitiesImport.hs | mit | importFacilities :: Postgres -> IO ()
importFacilities pg = do
runReaderT deleteFacilities pg
_ <- mapConcurrently (loadAndInsert pg) [1,2]
void $ runReaderT processFeatures pg | 182 | importFacilities :: Postgres -> IO ()
importFacilities pg = do
runReaderT deleteFacilities pg
_ <- mapConcurrently (loadAndInsert pg) [1,2]
void $ runReaderT processFeatures pg | 182 | importFacilities pg = do
runReaderT deleteFacilities pg
_ <- mapConcurrently (loadAndInsert pg) [1,2]
void $ runReaderT processFeatures pg | 144 | false | true | 0 | 10 | 29 | 67 | 31 | 36 | null | null |
Alllex/stm-data-collection | tests/BagTests.hs | bsd-3-clause | addTakeOneMany :: Bag.Bag b => STM (b Int) -> [Int] -> IO ()
addTakeOneMany _ [] = return () | 92 | addTakeOneMany :: Bag.Bag b => STM (b Int) -> [Int] -> IO ()
addTakeOneMany _ [] = return () | 92 | addTakeOneMany _ [] = return () | 31 | false | true | 0 | 9 | 18 | 57 | 27 | 30 | null | null |
NerdGGuy/wai-middleware-oauth2 | example/simple.hs | mit | main = do
mgr <- newManager conduitManagerSettings
runTLS (tlsSettings "certificate.pem" "key.pem") defaultSettings { settingsPort = 443 } $ cleanPath filterPath "" $ sessionApp mgr | 186 | main = do
mgr <- newManager conduitManagerSettings
runTLS (tlsSettings "certificate.pem" "key.pem") defaultSettings { settingsPort = 443 } $ cleanPath filterPath "" $ sessionApp mgr | 186 | main = do
mgr <- newManager conduitManagerSettings
runTLS (tlsSettings "certificate.pem" "key.pem") defaultSettings { settingsPort = 443 } $ cleanPath filterPath "" $ sessionApp mgr | 186 | false | false | 0 | 11 | 28 | 56 | 26 | 30 | null | null |
kmilner/tamarin-prover | lib/theory/src/Theory/Model/Fact.hs | gpl-3.0 | factTagName :: FactTag -> String
factTagName tag = case tag of
KUFact -> "KU"
KDFact -> "KD"
DedFact -> "Ded"
InFact -> "In"
OutFact -> "Out"
FreshFact -> "Fr"
(ProtoFact _ n _) -> n
TermFact -> "Term"
-- | Show a fact tag as a 'String'. This is the 'factTagName' prefixed with
-- the multiplicity. | 401 | factTagName :: FactTag -> String
factTagName tag = case tag of
KUFact -> "KU"
KDFact -> "KD"
DedFact -> "Ded"
InFact -> "In"
OutFact -> "Out"
FreshFact -> "Fr"
(ProtoFact _ n _) -> n
TermFact -> "Term"
-- | Show a fact tag as a 'String'. This is the 'factTagName' prefixed with
-- the multiplicity. | 401 | factTagName tag = case tag of
KUFact -> "KU"
KDFact -> "KD"
DedFact -> "Ded"
InFact -> "In"
OutFact -> "Out"
FreshFact -> "Fr"
(ProtoFact _ n _) -> n
TermFact -> "Term"
-- | Show a fact tag as a 'String'. This is the 'factTagName' prefixed with
-- the multiplicity. | 368 | false | true | 0 | 9 | 158 | 82 | 42 | 40 | null | null |
johnjcamilleri/hpsg | NLP/AVM.hs | mit | islist :: Value -> Bool
islist (ValAtom "elist") = True | 55 | islist :: Value -> Bool
islist (ValAtom "elist") = True | 55 | islist (ValAtom "elist") = True | 31 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
devtype-blogspot-com/Haskell-Examples | Qsort/Demo.hs | gpl-3.0 | qsort (p:xs) = (qsort lesser) ++ [p] ++ (qsort greater)
where
lesser = filter (< p) xs
greater = filter (>= p) xs
-- https://wiki.haskell.org/Introduction#Quicksort_in_Haskell | 197 | qsort (p:xs) = (qsort lesser) ++ [p] ++ (qsort greater)
where
lesser = filter (< p) xs
greater = filter (>= p) xs
-- https://wiki.haskell.org/Introduction#Quicksort_in_Haskell | 197 | qsort (p:xs) = (qsort lesser) ++ [p] ++ (qsort greater)
where
lesser = filter (< p) xs
greater = filter (>= p) xs
-- https://wiki.haskell.org/Introduction#Quicksort_in_Haskell | 197 | false | false | 2 | 8 | 46 | 80 | 38 | 42 | null | null |
rpglover64/lens | src/Control/Lens/Internal/ByteString.hs | bsd-3-clause | unpackStrict8 = B8.unpack | 25 | unpackStrict8 = B8.unpack | 25 | unpackStrict8 = B8.unpack | 25 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
nmk/Spock | src/Web/Spock/Shared.hs | bsd-3-clause | mapAllSessions :: (sess -> STM sess) -> SpockActionCtx ctx conn sess st ()
mapAllSessions f =
do mgr <- getSessMgr
sm_mapSessions mgr f
-- | Simple session persisting configuration. DO NOT USE IN PRODUCTION | 218 | mapAllSessions :: (sess -> STM sess) -> SpockActionCtx ctx conn sess st ()
mapAllSessions f =
do mgr <- getSessMgr
sm_mapSessions mgr f
-- | Simple session persisting configuration. DO NOT USE IN PRODUCTION | 218 | mapAllSessions f =
do mgr <- getSessMgr
sm_mapSessions mgr f
-- | Simple session persisting configuration. DO NOT USE IN PRODUCTION | 143 | false | true | 0 | 8 | 45 | 57 | 27 | 30 | null | null |
da-x/happy-alex-example | src/Calc/Base.hs | bsd-3-clause | lexer :: (Token -> Parser a) -> Parser a
lexer f = alexMonadScan >>= f | 70 | lexer :: (Token -> Parser a) -> Parser a
lexer f = alexMonadScan >>= f | 70 | lexer f = alexMonadScan >>= f | 29 | false | true | 0 | 8 | 14 | 35 | 17 | 18 | null | null |
rcook/github-api-haskell | test/Main.hs | mit | doctestWithIncludeDirs :: [String] -> IO ()
doctestWithIncludeDirs fs = doctest (map ((++) "-I") includeDirs ++ fs) | 115 | doctestWithIncludeDirs :: [String] -> IO ()
doctestWithIncludeDirs fs = doctest (map ((++) "-I") includeDirs ++ fs) | 115 | doctestWithIncludeDirs fs = doctest (map ((++) "-I") includeDirs ++ fs) | 71 | false | true | 0 | 10 | 15 | 52 | 26 | 26 | null | null |
urbanslug/ghc | compiler/types/TyCon.hs | bsd-3-clause | -- NB. might not take a full word
primRepSizeW dflags DoubleRep = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags | 115 | primRepSizeW dflags DoubleRep = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags | 81 | primRepSizeW dflags DoubleRep = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags | 81 | true | false | 0 | 6 | 23 | 24 | 12 | 12 | null | null |
haskell/filepath | System/FilePath/Internal.hs | bsd-3-clause | isBadCharacter :: Char -> Bool
isBadCharacter x = x >= '\0' && x <= '\31' || x `elem` ":*?><|\"" | 96 | isBadCharacter :: Char -> Bool
isBadCharacter x = x >= '\0' && x <= '\31' || x `elem` ":*?><|\"" | 96 | isBadCharacter x = x >= '\0' && x <= '\31' || x `elem` ":*?><|\"" | 65 | false | true | 2 | 8 | 18 | 48 | 23 | 25 | null | null |
ondrap/horouter | Utils.hs | mit | camelTo_ :: String -> String
camelTo_ = map toLower . drop 1 . reverse . foldl insertUnderscore []
where
insertUnderscore acc chr
| isUpper chr = chr : '_' : acc
| otherwise = chr : acc | 223 | camelTo_ :: String -> String
camelTo_ = map toLower . drop 1 . reverse . foldl insertUnderscore []
where
insertUnderscore acc chr
| isUpper chr = chr : '_' : acc
| otherwise = chr : acc | 223 | camelTo_ = map toLower . drop 1 . reverse . foldl insertUnderscore []
where
insertUnderscore acc chr
| isUpper chr = chr : '_' : acc
| otherwise = chr : acc | 194 | false | true | 0 | 10 | 74 | 82 | 38 | 44 | null | null |
brendanhay/gogol | gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs | mpl-2.0 | -- | Global permissions of the user. Read-only.
upfPermissions :: Lens' UserProFile [GlobalPermission]
upfPermissions
= lens _upfPermissions
(\ s a -> s{_upfPermissions = a})
. _Default
. _Coerce | 215 | upfPermissions :: Lens' UserProFile [GlobalPermission]
upfPermissions
= lens _upfPermissions
(\ s a -> s{_upfPermissions = a})
. _Default
. _Coerce | 167 | upfPermissions
= lens _upfPermissions
(\ s a -> s{_upfPermissions = a})
. _Default
. _Coerce | 112 | true | true | 2 | 8 | 47 | 60 | 29 | 31 | null | null |
green-haskell/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 12 | 56 | nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 12 | 56 | nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 12 | 56 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
facebookincubator/duckling | Duckling/Temperature/EN/Rules.hs | bsd-3-clause | ruleTemperatureDegrees :: Rule
ruleTemperatureDegrees = Rule
{ name = "<latent temp> degrees"
, pattern =
[ Predicate $ isValueOnly False
, regex "(deg(ree?)?s?\\.?)|°"
]
, prod = \case
(Token Temperature td:_) -> Just . Token Temperature $
withUnit TTemperature.Degree td
_ -> Nothing
} | 327 | ruleTemperatureDegrees :: Rule
ruleTemperatureDegrees = Rule
{ name = "<latent temp> degrees"
, pattern =
[ Predicate $ isValueOnly False
, regex "(deg(ree?)?s?\\.?)|°"
]
, prod = \case
(Token Temperature td:_) -> Just . Token Temperature $
withUnit TTemperature.Degree td
_ -> Nothing
} | 327 | ruleTemperatureDegrees = Rule
{ name = "<latent temp> degrees"
, pattern =
[ Predicate $ isValueOnly False
, regex "(deg(ree?)?s?\\.?)|°"
]
, prod = \case
(Token Temperature td:_) -> Just . Token Temperature $
withUnit TTemperature.Degree td
_ -> Nothing
} | 296 | false | true | 0 | 13 | 83 | 101 | 50 | 51 | null | null |
cirquit/Personal-Repository | Haskell/Playground/AdventOfCode/advent-coding/src/Day09.hs | mit | parser :: String -> Connections
parser = go [] . map words . lines
where
go :: Connections -> [[String]] -> Connections
go g [] = g
go g ((s1:"to":s2:"=":num:[]):xs)
| [(n,[])] <- readInt num = go ((s2, s1, n):(s1,s2,n):g) xs
| otherwise = error $ "no parse for: " ++ num
readInt :: String -> [(Int, String)]
readInt = reads | 411 | parser :: String -> Connections
parser = go [] . map words . lines
where
go :: Connections -> [[String]] -> Connections
go g [] = g
go g ((s1:"to":s2:"=":num:[]):xs)
| [(n,[])] <- readInt num = go ((s2, s1, n):(s1,s2,n):g) xs
| otherwise = error $ "no parse for: " ++ num
readInt :: String -> [(Int, String)]
readInt = reads | 411 | parser = go [] . map words . lines
where
go :: Connections -> [[String]] -> Connections
go g [] = g
go g ((s1:"to":s2:"=":num:[]):xs)
| [(n,[])] <- readInt num = go ((s2, s1, n):(s1,s2,n):g) xs
| otherwise = error $ "no parse for: " ++ num
readInt :: String -> [(Int, String)]
readInt = reads | 379 | false | true | 2 | 13 | 147 | 224 | 112 | 112 | null | null |
olwrapper/olwrapper | wrapper/OpenLayers/Html.hs | bsd-3-clause | -- | a \<input\> element
buttonElement = "<input>" | 50 | buttonElement = "<input>" | 25 | buttonElement = "<input>" | 25 | true | false | 0 | 4 | 7 | 7 | 4 | 3 | null | null |
arekfu/project_euler | p0092/p0092_2.hs | mit | solveUpTo :: Int -> Array Int Int
solveUpTo n = runSTArray $ do
let arrRange = (1, 2*n)
arr <- newArray arrRange 0
writeArray arr 1 1
writeArray arr 89 89
forM_ [2..n] $ \k -> do
(ks, rest) <- breakM (mpred arr) $ iterate sumSquareDigit k
s <- readArray arr $ head rest
mapM_ (\l -> if inRange arrRange l then writeArray arr l s else return ()) ks
return arr | 403 | solveUpTo :: Int -> Array Int Int
solveUpTo n = runSTArray $ do
let arrRange = (1, 2*n)
arr <- newArray arrRange 0
writeArray arr 1 1
writeArray arr 89 89
forM_ [2..n] $ \k -> do
(ks, rest) <- breakM (mpred arr) $ iterate sumSquareDigit k
s <- readArray arr $ head rest
mapM_ (\l -> if inRange arrRange l then writeArray arr l s else return ()) ks
return arr | 403 | solveUpTo n = runSTArray $ do
let arrRange = (1, 2*n)
arr <- newArray arrRange 0
writeArray arr 1 1
writeArray arr 89 89
forM_ [2..n] $ \k -> do
(ks, rest) <- breakM (mpred arr) $ iterate sumSquareDigit k
s <- readArray arr $ head rest
mapM_ (\l -> if inRange arrRange l then writeArray arr l s else return ()) ks
return arr | 369 | false | true | 0 | 18 | 116 | 198 | 91 | 107 | null | null |
bergmark/haskell-opaleye | src/Opaleye/Sql.hs | bsd-3-clause | showSqlForPostgresUnoptExplicit :: U.Unpackspec columns b -> Q.Query columns -> String
showSqlForPostgresUnoptExplicit = formatAndShowSQL .: Q.runQueryArrUnpack | 160 | showSqlForPostgresUnoptExplicit :: U.Unpackspec columns b -> Q.Query columns -> String
showSqlForPostgresUnoptExplicit = formatAndShowSQL .: Q.runQueryArrUnpack | 160 | showSqlForPostgresUnoptExplicit = formatAndShowSQL .: Q.runQueryArrUnpack | 73 | false | true | 0 | 8 | 14 | 37 | 18 | 19 | null | null |
iblech/blaze-html | src/Text/Blaze/Html/Renderer/Text.hs | bsd-3-clause | renderHtmlWith :: (ByteString -> Text) -> Html -> TL.Text
renderHtmlWith = R.renderMarkupWith | 93 | renderHtmlWith :: (ByteString -> Text) -> Html -> TL.Text
renderHtmlWith = R.renderMarkupWith | 93 | renderHtmlWith = R.renderMarkupWith | 35 | false | true | 0 | 9 | 11 | 37 | 17 | 20 | null | null |
techtangents/ablist | src/Data/AbList.hs | bsd-3-clause | abMapLefts :: (a -> a') -> AbList a b -> AbList a' b
abMapLefts = flip abMap id | 79 | abMapLefts :: (a -> a') -> AbList a b -> AbList a' b
abMapLefts = flip abMap id | 79 | abMapLefts = flip abMap id | 26 | false | true | 0 | 8 | 17 | 47 | 21 | 26 | null | null |
Persi/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | verifyNot :: (Parameters -> Token -> Writer [Note] ()) -> String -> Bool
verifyNot f s = checkNode f s == Just False | 116 | verifyNot :: (Parameters -> Token -> Writer [Note] ()) -> String -> Bool
verifyNot f s = checkNode f s == Just False | 116 | verifyNot f s = checkNode f s == Just False | 43 | false | true | 0 | 10 | 22 | 57 | 28 | 29 | null | null |
julienschmaltz/madl | src/Parser/MadlTypeChecker.hs | mit | checkMacroNameExists :: Context -> WithSourceInfo Text -> Checked Text
checkMacroNameExists context name = case isMacroNameDeclared context $ removeSourceInfo name of
True -> Left $ fmap (MultiplyDefinedNameError . (+++ " was already declared as a macro.")) name
False -> Right $ removeSourceInfo name
-- | Check if the given name has not yet been used as a macroIntegerParametername | 391 | checkMacroNameExists :: Context -> WithSourceInfo Text -> Checked Text
checkMacroNameExists context name = case isMacroNameDeclared context $ removeSourceInfo name of
True -> Left $ fmap (MultiplyDefinedNameError . (+++ " was already declared as a macro.")) name
False -> Right $ removeSourceInfo name
-- | Check if the given name has not yet been used as a macroIntegerParametername | 391 | checkMacroNameExists context name = case isMacroNameDeclared context $ removeSourceInfo name of
True -> Left $ fmap (MultiplyDefinedNameError . (+++ " was already declared as a macro.")) name
False -> Right $ removeSourceInfo name
-- | Check if the given name has not yet been used as a macroIntegerParametername | 320 | false | true | 2 | 9 | 64 | 87 | 41 | 46 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/GHC/IO/Handle/Types.hs | bsd-3-clause | isReadWriteHandleType _ = False | 47 | isReadWriteHandleType _ = False | 47 | isReadWriteHandleType _ = False | 47 | false | false | 0 | 5 | 19 | 9 | 4 | 5 | null | null |
cfredric/arithmoi | Math/NumberTheory/ArithmeticFunctions/Standard.hs | mit | totient :: (UniqueFactorisation n, Num n) => n -> n
totient = runFunction totientA | 82 | totient :: (UniqueFactorisation n, Num n) => n -> n
totient = runFunction totientA | 82 | totient = runFunction totientA | 30 | false | true | 0 | 8 | 13 | 40 | 18 | 22 | null | null |
brendanhay/gogol | gogol-script/gen/Network/Google/Script/Types.hs | mpl-2.0 | -- | View and manage forms that this application has been installed in
formsCurrentOnlyScope :: Proxy '["https://www.googleapis.com/auth/forms.currentonly"]
formsCurrentOnlyScope = Proxy | 186 | formsCurrentOnlyScope :: Proxy '["https://www.googleapis.com/auth/forms.currentonly"]
formsCurrentOnlyScope = Proxy | 115 | formsCurrentOnlyScope = Proxy | 29 | true | true | 0 | 7 | 19 | 20 | 11 | 9 | null | null |
phylake/avm3 | abc/json2.hs | mit | abcToJson :: Abc -> JSValue
abcToJson (Abc i ui d s nsi nss names sigs meta inst klas rx bodies) = kvToObject
[
("ints", toArray i)
, ("uints", toArray ui)
, ("doubles", toArray d)
, ("strings", toArray s)
, ("ns_infos", JSArray$ map (showJSON. nsinfo s_res) nsi)
, ("ns_sets", toArray nss)
, ("multinames", JSArray$ map (showJSON. multiname s_res nsi_res nss_res) names)
, ("method_signatures", JSArray$ map (method_signature m_res s_res) sigs)
, ("method_bodies", JSArray$ map (method_body s_res m_res tt_res) bodies)
, ("metadata", JSArray$ map (metadata s_res) meta)
, ("instance_infos", toArray inst)
, ("class_infos", JSArray$ map (class_info tt_res) klas)
, ("scripts", JSArray$ map (script_info tt_res) rx)
]
where
m_res :: U30 -> String
m_res i = multiname s_res nsi_res nss_res$ names !! fromIntegral i
s_res :: U30 -> String
s_res i = s !! fromIntegral i
nsi_res :: U30 -> String
nsi_res i = nsinfo_raw s_res$ nsi !! fromIntegral i
nss_res :: U30 -> String
nss_res i = "NSSET"
tt_res :: TraitsInfo -> JSValue
tt_res = traits_info m_res (trait_type m_res) | 1,139 | abcToJson :: Abc -> JSValue
abcToJson (Abc i ui d s nsi nss names sigs meta inst klas rx bodies) = kvToObject
[
("ints", toArray i)
, ("uints", toArray ui)
, ("doubles", toArray d)
, ("strings", toArray s)
, ("ns_infos", JSArray$ map (showJSON. nsinfo s_res) nsi)
, ("ns_sets", toArray nss)
, ("multinames", JSArray$ map (showJSON. multiname s_res nsi_res nss_res) names)
, ("method_signatures", JSArray$ map (method_signature m_res s_res) sigs)
, ("method_bodies", JSArray$ map (method_body s_res m_res tt_res) bodies)
, ("metadata", JSArray$ map (metadata s_res) meta)
, ("instance_infos", toArray inst)
, ("class_infos", JSArray$ map (class_info tt_res) klas)
, ("scripts", JSArray$ map (script_info tt_res) rx)
]
where
m_res :: U30 -> String
m_res i = multiname s_res nsi_res nss_res$ names !! fromIntegral i
s_res :: U30 -> String
s_res i = s !! fromIntegral i
nsi_res :: U30 -> String
nsi_res i = nsinfo_raw s_res$ nsi !! fromIntegral i
nss_res :: U30 -> String
nss_res i = "NSSET"
tt_res :: TraitsInfo -> JSValue
tt_res = traits_info m_res (trait_type m_res) | 1,139 | abcToJson (Abc i ui d s nsi nss names sigs meta inst klas rx bodies) = kvToObject
[
("ints", toArray i)
, ("uints", toArray ui)
, ("doubles", toArray d)
, ("strings", toArray s)
, ("ns_infos", JSArray$ map (showJSON. nsinfo s_res) nsi)
, ("ns_sets", toArray nss)
, ("multinames", JSArray$ map (showJSON. multiname s_res nsi_res nss_res) names)
, ("method_signatures", JSArray$ map (method_signature m_res s_res) sigs)
, ("method_bodies", JSArray$ map (method_body s_res m_res tt_res) bodies)
, ("metadata", JSArray$ map (metadata s_res) meta)
, ("instance_infos", toArray inst)
, ("class_infos", JSArray$ map (class_info tt_res) klas)
, ("scripts", JSArray$ map (script_info tt_res) rx)
]
where
m_res :: U30 -> String
m_res i = multiname s_res nsi_res nss_res$ names !! fromIntegral i
s_res :: U30 -> String
s_res i = s !! fromIntegral i
nsi_res :: U30 -> String
nsi_res i = nsinfo_raw s_res$ nsi !! fromIntegral i
nss_res :: U30 -> String
nss_res i = "NSSET"
tt_res :: TraitsInfo -> JSValue
tt_res = traits_info m_res (trait_type m_res) | 1,111 | false | true | 0 | 11 | 239 | 470 | 240 | 230 | null | null |
tomjaguarpaw/postgresql-simple | tools/GenTypeInfo.hs | bsd-3-clause | (++) :: Monoid a => a -> a -> a
(++) = mappend | 46 | (++) :: Monoid a => a -> a -> a
(++) = mappend | 46 | (++) = mappend | 14 | false | true | 0 | 7 | 12 | 30 | 17 | 13 | null | null |
DougBurke/swish | src/Swish/RDF/Datatype/XSD/Decimal.hs | lgpl-2.1 | -- |Define Datatype value for @xsd:decimal@.
--
-- Members of this datatype decimal values.
--
-- The lexical form consists of an optional @+@ or @-@
-- followed by a sequence of decimal digits, an optional
-- decimal point and a sequence of decimal digits.
--
-- The canonical lexical form has leading zeros and @+@ sign removed.
--
rdfDatatypeValXsdDecimal :: RDFDatatypeVal Double
rdfDatatypeValXsdDecimal = DatatypeVal
{ tvalName = typeNameXsdDecimal
, tvalRules = rdfRulesetXsdDecimal -- Ruleset RDFGraph
, tvalMkRules = makeRDFDatatypeRestrictionRules rdfDatatypeValXsdDecimal
-- RDFGraph -> [RDFRules]
, tvalMkMods = makeRdfDtOpenVarBindingModifiers rdfDatatypeValXsdDecimal
, tvalMap = mapXsdDecimal -- DatatypeMap Double
, tvalRel = relXsdDecimal -- [DatatypeRel Double]
, tvalMod = modXsdDecimal -- [DatatypeMod Double]
} | 969 | rdfDatatypeValXsdDecimal :: RDFDatatypeVal Double
rdfDatatypeValXsdDecimal = DatatypeVal
{ tvalName = typeNameXsdDecimal
, tvalRules = rdfRulesetXsdDecimal -- Ruleset RDFGraph
, tvalMkRules = makeRDFDatatypeRestrictionRules rdfDatatypeValXsdDecimal
-- RDFGraph -> [RDFRules]
, tvalMkMods = makeRdfDtOpenVarBindingModifiers rdfDatatypeValXsdDecimal
, tvalMap = mapXsdDecimal -- DatatypeMap Double
, tvalRel = relXsdDecimal -- [DatatypeRel Double]
, tvalMod = modXsdDecimal -- [DatatypeMod Double]
} | 630 | rdfDatatypeValXsdDecimal = DatatypeVal
{ tvalName = typeNameXsdDecimal
, tvalRules = rdfRulesetXsdDecimal -- Ruleset RDFGraph
, tvalMkRules = makeRDFDatatypeRestrictionRules rdfDatatypeValXsdDecimal
-- RDFGraph -> [RDFRules]
, tvalMkMods = makeRdfDtOpenVarBindingModifiers rdfDatatypeValXsdDecimal
, tvalMap = mapXsdDecimal -- DatatypeMap Double
, tvalRel = relXsdDecimal -- [DatatypeRel Double]
, tvalMod = modXsdDecimal -- [DatatypeMod Double]
} | 580 | true | true | 0 | 8 | 250 | 83 | 54 | 29 | null | null |
qua-bla/hamsql | src/Database/HamSql/Internal/Utils.hs | gpl-3.0 | --- Maybe Utils
maybeMap :: (a -> b) -> Maybe [a] -> [b]
maybeMap f = maybe [] (map f) | 86 | maybeMap :: (a -> b) -> Maybe [a] -> [b]
maybeMap f = maybe [] (map f) | 70 | maybeMap f = maybe [] (map f) | 29 | true | true | 0 | 8 | 19 | 52 | 27 | 25 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFGraphTest.hs | lgpl-2.1 | testGraphFormula18b = testGraphEq "g2f1-g2f2" False g2f1 g2f2 | 61 | testGraphFormula18b = testGraphEq "g2f1-g2f2" False g2f1 g2f2 | 61 | testGraphFormula18b = testGraphEq "g2f1-g2f2" False g2f1 g2f2 | 61 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
energyflowanalysis/efa-2.1 | attic/src/EFA2/Solver/Horn.hs | bsd-3-clause | leftMarked :: S.Set Formula -> Formula -> Bool
leftMarked _ (One :-> _) = True | 78 | leftMarked :: S.Set Formula -> Formula -> Bool
leftMarked _ (One :-> _) = True | 78 | leftMarked _ (One :-> _) = True | 31 | false | true | 0 | 10 | 14 | 42 | 19 | 23 | null | null |
mdorman/couch-simple | test/Functionality/Util.hs | mit | dbContext :: MonadIO m => IO Manager -> m Context
dbContext getManager = do
manager <- liftIO getManager
uuid <- liftM (fromString . ("test-" <>) . toString) (liftIO randomIO)
return $ Context manager "localhost" (Port 5984) Nothing def (Just uuid) | 254 | dbContext :: MonadIO m => IO Manager -> m Context
dbContext getManager = do
manager <- liftIO getManager
uuid <- liftM (fromString . ("test-" <>) . toString) (liftIO randomIO)
return $ Context manager "localhost" (Port 5984) Nothing def (Just uuid) | 254 | dbContext getManager = do
manager <- liftIO getManager
uuid <- liftM (fromString . ("test-" <>) . toString) (liftIO randomIO)
return $ Context manager "localhost" (Port 5984) Nothing def (Just uuid) | 204 | false | true | 0 | 12 | 45 | 106 | 50 | 56 | null | null |
antonlogvinenko/javelin | src/Javelin/Lib/ByteCode/Stats.hs | mit | oc (IInc _ _) = "iinc" | 22 | oc (IInc _ _) = "iinc" | 22 | oc (IInc _ _) = "iinc" | 22 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
vluukkal/aspreify | txtrender.hs | mit | txtargs a =
if L.length a == 0
then ""
else
"(" ++ L.unwords(L.intersperse "," (L.map unmyexpr a)) ++ ")" | 129 | txtargs a =
if L.length a == 0
then ""
else
"(" ++ L.unwords(L.intersperse "," (L.map unmyexpr a)) ++ ")" | 129 | txtargs a =
if L.length a == 0
then ""
else
"(" ++ L.unwords(L.intersperse "," (L.map unmyexpr a)) ++ ")" | 129 | false | false | 3 | 11 | 43 | 64 | 29 | 35 | null | null |
jwiegley/hnix | src/Nix/Expr/Shorthands.hs | bsd-3-clause | mkFloatF :: Float -> NExprF a
mkFloatF = NConstant . NFloat | 59 | mkFloatF :: Float -> NExprF a
mkFloatF = NConstant . NFloat | 59 | mkFloatF = NConstant . NFloat | 29 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
Persi/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | prop_readFunctionDefinition8 = isOk readFunctionDefinition "foo() (ls)" | 71 | prop_readFunctionDefinition8 = isOk readFunctionDefinition "foo() (ls)" | 71 | prop_readFunctionDefinition8 = isOk readFunctionDefinition "foo() (ls)" | 71 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
themattchan/core | src/Core/Pretty.hs | mit | pprint :: CoreProgram -> String
pprint = render . fsep . ppProgram | 66 | pprint :: CoreProgram -> String
pprint = render . fsep . ppProgram | 66 | pprint = render . fsep . ppProgram | 34 | false | true | 0 | 6 | 11 | 23 | 12 | 11 | null | null |
steve-chavez/postgrest | test/Feature/RollbackSpec.hs | mit | shouldPersistMutations reqHeaders respHeaders = do
it "does persist post" $ do
request methodPost "/items"
reqHeaders
[json|{"id":0}|]
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchStatus = 201
, matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[{"id":0}]|]
deleteItems
it "does persist put" $ do
request methodPut "/items?id=eq.0"
reqHeaders
[json|{"id":0}|]
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[{"id":0}]|]
deleteItems
it "does persist patch" $ do
postItem
request methodPatch "/items?id=eq.0"
reqHeaders
[json|{"id":-1}|]
`shouldRespondWith`
[json|[{"id":-1}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[]|]
get "/items?id=eq.-1"
`shouldRespondWith`
[json|[{"id":-1}]|]
deleteItems
it "does persist delete" $ do
postItem
request methodDelete "/items?id=eq.0"
reqHeaders
""
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[]|] | 1,340 | shouldPersistMutations reqHeaders respHeaders = do
it "does persist post" $ do
request methodPost "/items"
reqHeaders
[json|{"id":0}|]
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchStatus = 201
, matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[{"id":0}]|]
deleteItems
it "does persist put" $ do
request methodPut "/items?id=eq.0"
reqHeaders
[json|{"id":0}|]
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[{"id":0}]|]
deleteItems
it "does persist patch" $ do
postItem
request methodPatch "/items?id=eq.0"
reqHeaders
[json|{"id":-1}|]
`shouldRespondWith`
[json|[{"id":-1}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[]|]
get "/items?id=eq.-1"
`shouldRespondWith`
[json|[{"id":-1}]|]
deleteItems
it "does persist delete" $ do
postItem
request methodDelete "/items?id=eq.0"
reqHeaders
""
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[]|] | 1,340 | shouldPersistMutations reqHeaders respHeaders = do
it "does persist post" $ do
request methodPost "/items"
reqHeaders
[json|{"id":0}|]
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchStatus = 201
, matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[{"id":0}]|]
deleteItems
it "does persist put" $ do
request methodPut "/items?id=eq.0"
reqHeaders
[json|{"id":0}|]
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[{"id":0}]|]
deleteItems
it "does persist patch" $ do
postItem
request methodPatch "/items?id=eq.0"
reqHeaders
[json|{"id":-1}|]
`shouldRespondWith`
[json|[{"id":-1}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[]|]
get "/items?id=eq.-1"
`shouldRespondWith`
[json|[{"id":-1}]|]
deleteItems
it "does persist delete" $ do
postItem
request methodDelete "/items?id=eq.0"
reqHeaders
""
`shouldRespondWith`
[json|[{"id":0}]|]
{ matchHeaders = respHeaders }
get "/items?id=eq.0"
`shouldRespondWith`
[json|[]|] | 1,340 | false | false | 0 | 12 | 403 | 284 | 164 | 120 | null | null |
jrraymond/haobj | src/HaObj.hs | mit | readMtl = do
skipMany ignorable
manyTill (do skipMany ignorable
m <- material
skipMany ignorable
return m) eof | 161 | readMtl = do
skipMany ignorable
manyTill (do skipMany ignorable
m <- material
skipMany ignorable
return m) eof | 161 | readMtl = do
skipMany ignorable
manyTill (do skipMany ignorable
m <- material
skipMany ignorable
return m) eof | 161 | false | false | 0 | 11 | 67 | 48 | 19 | 29 | null | null |
ChrisBlom/Signs | src/Signs/Term.hs | mit | -- Parsing lambda terms
omitted = reserved "*" >> return Nil | 64 | omitted = reserved "*" >> return Nil | 40 | omitted = reserved "*" >> return Nil | 40 | true | false | 0 | 6 | 14 | 17 | 8 | 9 | null | null |
gnuvince/vfb-coolc | src/Pretty.hs | mit | indent :: Int
indent = 4 | 24 | indent :: Int
indent = 4 | 24 | indent = 4 | 10 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
abooij/sudbury | Graphics/Sudbury/Socket.hs | mit | findServerSocketWithName :: String -> IO FilePath
findServerSocketWithName name = do
dir <- getEnv "XDG_RUNTIME_DIR"
return $ dir </> name
-- | This is like 'connect_to_socket' in wayland-client.c | 201 | findServerSocketWithName :: String -> IO FilePath
findServerSocketWithName name = do
dir <- getEnv "XDG_RUNTIME_DIR"
return $ dir </> name
-- | This is like 'connect_to_socket' in wayland-client.c | 201 | findServerSocketWithName name = do
dir <- getEnv "XDG_RUNTIME_DIR"
return $ dir </> name
-- | This is like 'connect_to_socket' in wayland-client.c | 151 | false | true | 0 | 8 | 31 | 43 | 20 | 23 | null | null |
trskop/command-wrapper | command-wrapper-core/src/CommandWrapper/Core/Environment/Variable.hs | bsd-3-clause | getCommandWrapperToolsetVarName
:: CommandWrapperPrefix
-> CommandWrapperToolsetVarName
-> EnvVarName
getCommandWrapperToolsetVarName prefix = (prefix <>) . \case
CommandWrapperInvokeAs -> "_INVOKE_AS"
CommandWrapperFacade -> "_FACADE"
CommandWrapperPath -> "_PATH"
CommandWrapperManPath -> "_MANPATH"
CommandWrapperSystemConfigDir -> "_SYSTEM_CONFIG_DIR"
CommandWrapperUserConfigDir -> "_USER_CONFIG_DIR"
CommandWrapperLocalConfigDir -> "_LOCAL_CONFIG_DIR" | 497 | getCommandWrapperToolsetVarName
:: CommandWrapperPrefix
-> CommandWrapperToolsetVarName
-> EnvVarName
getCommandWrapperToolsetVarName prefix = (prefix <>) . \case
CommandWrapperInvokeAs -> "_INVOKE_AS"
CommandWrapperFacade -> "_FACADE"
CommandWrapperPath -> "_PATH"
CommandWrapperManPath -> "_MANPATH"
CommandWrapperSystemConfigDir -> "_SYSTEM_CONFIG_DIR"
CommandWrapperUserConfigDir -> "_USER_CONFIG_DIR"
CommandWrapperLocalConfigDir -> "_LOCAL_CONFIG_DIR" | 497 | getCommandWrapperToolsetVarName prefix = (prefix <>) . \case
CommandWrapperInvokeAs -> "_INVOKE_AS"
CommandWrapperFacade -> "_FACADE"
CommandWrapperPath -> "_PATH"
CommandWrapperManPath -> "_MANPATH"
CommandWrapperSystemConfigDir -> "_SYSTEM_CONFIG_DIR"
CommandWrapperUserConfigDir -> "_USER_CONFIG_DIR"
CommandWrapperLocalConfigDir -> "_LOCAL_CONFIG_DIR" | 383 | false | true | 7 | 8 | 74 | 92 | 39 | 53 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.