code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
function onPlot(sprite, plot) {
var game = sprite.game;
var scene = game.scene;
game.log("onPlot - by [" + sprite.scene.name + "]" + sprite.name);
var profile = scene.get("player");
if (profile.progress != 0) {
if (game.music("battle").isPlaying()) plot.musicFadeOut("battle", 2000);
else if(game.music("bo... | joelam789/oge2d | examples/stg/Assets/scenes/battle/sprites/gameover.hs | mit | 805 | 41 | 12 | 118 | 416 | 242 | 174 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Functions to update accounting table.
module AAA.Account ( addAccount
, getPermissions
, permit
, secretMatches ) where
import AAA.Types
import qualified AAA.Crypto as C
import qualified Data.Map as M
import... | manpages/AAA | src/AAA/Account.hs | mit | 3,248 | 0 | 12 | 1,002 | 722 | 388 | 334 | 45 | 2 |
module HChip.Debug where
import Control.Lens
import Control.Monad
import Control.Monad.Trans
import Text.Printf
import HChip.Machine
dumpState :: Emu ()
dumpState = do
forM_ [0x0..0xF] $ \r -> do
v <- load16 (Reg r)
liftIO $ printf "R%X: %d " r v
liftIO $ putStrLn ""
z <- use zero
when z $ liftIO $ putStr "Z... | chpatrick/hchip | HChip/Debug.hs | mit | 503 | 0 | 14 | 112 | 225 | 103 | 122 | 21 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html
module Stratosphere.ResourceProperties.EMRInstanceGroupConfigConfiguration whe... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EMRInstanceGroupConfigConfiguration.hs | mit | 3,038 | 0 | 12 | 249 | 337 | 194 | 143 | 32 | 1 |
module Main where
import Test.QuickCheck
import Test.QuickCheck.Function
-- Functor QuickCheck property test. Based on functor laws.
functorIdentity :: (Functor f, Eq (f a)) => f a -> Bool
functorIdentity f = fmap id f == f
functorCompose :: (Eq(f c), Functor f) => (a -> b) -> (b -> c) -> f a -> Bool
functorCompose ... | raventid/coursera_learning | haskell/chapter16/functor/app/Main.hs | mit | 6,652 | 0 | 12 | 1,473 | 2,240 | 1,167 | 1,073 | 141 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE QuasiQuotes #-}
module Graphics.Urho3D.Container.Str(
UrhoString
, UrhoWString
, StringVector
, WStringVector
, stringContext
, loadUrhoString
, loadUrhoText
, loadConstUrhoString
, loadConstUrhoText
, loadConstUrhoWText
) where
import qualifie... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Container/Str.hs | mit | 4,654 | 0 | 12 | 743 | 1,046 | 578 | 468 | -1 | -1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.RpcHeaderProtos.RpcKindProto (RpcKindProto(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeabl... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/RpcHeaderProtos/RpcKindProto.hs | mit | 2,780 | 0 | 11 | 424 | 662 | 361 | 301 | 56 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE... | benkolera/phb | hs/Phb/Db/Internal.hs | mit | 7,603 | 0 | 15 | 1,981 | 1,097 | 582 | 515 | 89 | 1 |
module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
#if MIN_VERSION_classy_prelude(1, 0, 0)
import ClassyPrelude as X hiding (Handler)
#else
import ClassyPrelude as X
#endif
import Foundation as X
import Test.Hspec ... | random-j-farmer/hs-little-helper | test/TestImport.hs | mit | 731 | 0 | 10 | 191 | 157 | 92 | 65 | 18 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE S... | phile314/tasty-silver | Test/Tasty/Silver/Interactive.hs | mit | 30,905 | 0 | 32 | 8,543 | 7,208 | 3,679 | 3,529 | 665 | 19 |
-- Starting with the number 1 and moving to the right in a clockwise
-- direction a 5 by 5 spiral is formed as follows:
-- 21 22 23 24 25
-- 20 7 8 9 10
-- 19 6 1 2 11
-- 18 5 4 3 12
-- 17 16 15 14 13
-- It can be verified that the sum of the numbers on the diagonals is
-- 101.
-- What is the sum of the num... | whittle/euler | src/Euler/Problem028.hs | mit | 747 | 0 | 14 | 201 | 169 | 94 | 75 | 11 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Text.HamletSpec (spec) where
import HamletTestTypes (ARecord(..))
import Test.HUnit hiding (Test)
import Test.Hspec hiding (Arg)
import Prelude hiding (reverse)
import Text.Hamlet
import Text.Hamlet.RT
import Data.List (intercalate)
import qualifie... | yesodweb/shakespeare | test/Text/HamletSpec.hs | mit | 27,717 | 0 | 17 | 6,761 | 5,650 | 3,026 | 2,624 | 567 | 2 |
module Control.Concurrent.FFI where
import Control.Concurrent (ThreadId,forkIO,myThreadId,killThread,
MVar,putMVar,takeMVar,newEmptyMVar)
import qualified Control.Concurrent.Chan as A
import Control.Concurrent.Chan.Synchronous
import Control.Monad
type AgdaUnit a = ()
type AgdaChan ... | ma82/concurrent-agda | ffi/Control/Concurrent/FFI.hs | mit | 1,430 | 0 | 11 | 340 | 466 | 232 | 234 | 31 | 1 |
module Laika.Building.ByteString.Builder where
import Laika.Prelude
import Data.ByteString.Builder.Internal
import Foreign
import qualified Data.Text.Encoding as C
import qualified Laika.Building.ByteString.Builder.BoundedPrims as D
{-# INLINE byteListOfLength #-}
byteListOfLength :: Int -> [Word8] -> Builder
byteLi... | nikita-volkov/laika | library/Laika/Building/ByteString/Builder.hs | mit | 744 | 0 | 14 | 127 | 187 | 103 | 84 | 19 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-}
module Stackage.BuildPlanSpec (spec) where
import qualified Data.Map as Map
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Data.Yaml
import qualified Data.Yaml as Y
import Distrib... | fpco/stackage-curator | test/Stackage/BuildPlanSpec.hs | mit | 5,906 | 0 | 18 | 2,023 | 1,590 | 895 | 695 | 134 | 2 |
{-|
Module: Flaw.Itch.WebApi
Description: Itch WebAPI.
License: MIT
-}
{-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving, OverloadedStrings, ViewPatterns #-}
module Flaw.Itch.WebApi
( ItchWebApiKey(..)
, itchWebApiMe
, itchWebApiDownloadKeys
, ItchUserId(..)
, ItchUser(..)
, ItchGameId(..)
, ItchDo... | quyse/flaw | flaw-itch-webapi/Flaw/Itch/WebApi.hs | mit | 3,304 | 0 | 18 | 525 | 961 | 530 | 431 | 80 | 2 |
import System.Environment
import Data.List
import Data.List.Split -- Type 'cabal install split'
isoyg :: String -> [String]
isoyg s = endBy "your grave" s
splitAll :: [String] -> [[String]]
splitAll args = map isoyg args
splitAndJoin :: [String] -> String
splitAndJoin args =
let merge lns = foldr (\i r -> i ++ "\... | suetanvil/isplitonyourgrave | isoyg.hs | mit | 454 | 0 | 13 | 99 | 173 | 89 | 84 | 15 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module NFA.Quiz where
import Autolib.NFA
import qualified NFA.Property as A
import qualified Exp.Property as E
import Autolib.Reader
import Autolib.Symbol
import Autolib.ToDoc
import Data.Typeable
data NFAC c Int => From c = From_Exp [ E.Property c ]
| From_NFA [ A.Property c ... | florianpilz/autotool | src/NFA/Quiz.hs | gpl-2.0 | 1,158 | 11 | 11 | 293 | 354 | 193 | 161 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Testing of different parts of the EnCL Implementation
Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : ewaryst.schulz@dfki.de
Stability : experimenta... | nevrenato/Hets_Fork | CSL/quickchecks.hs | gpl-2.0 | 4,467 | 0 | 16 | 1,211 | 1,555 | 784 | 771 | 100 | 2 |
module BinTree
where
inTree :: (Ord a,Show a) => a -> BinTree a -> Bool
addTree :: (Ord a,Show a) => a -> BinTree a -> BinTree a
delTree :: (Ord a,Show a) => a -> BinTree a -> BinTree a
buildTree :: (Ord a,Show a) => [a] -> BinTree a
inorder :: (Ord a,Show a) => BinTree a -> [a]
data (Ord a) => Bin... | collective/ECSpooler | backends/haskell/haskell_libs/BinTree.hs | gpl-2.0 | 1,567 | 0 | 10 | 623 | 678 | 332 | 346 | 31 | 1 |
-- | This module implements the parse-bib tool. It uses the UU-Parsinglib parser combinators
-- to allow for a forgiving, self-correcting Bib-parser. It is also quite readable, thanks to the advanced
-- library used.
module ParseBib.Parser where
--import Parsers etc...
import Text.ParserCombinators.UU
imp... | toothbrush/cco-bibtex2html | ParseBib/Parser.hs | gpl-3.0 | 3,172 | 0 | 15 | 953 | 519 | 280 | 239 | 34 | 1 |
module Web.Last.Group where
import Control.Applicative
import Control.Arrow
import Web.Last.Types
import Web.Last.Request
import qualified Web.Last.Parsing as P
import Text.JSON.Combinators
getMembers :: String -> Last (Paged (User,[Image]))
getMembers group = pagedRequest "group.getmembers" [("group",group)] [] pa ... | jamii/hs-last | src/Web/Last/Group.hs | gpl-3.0 | 1,797 | 0 | 12 | 270 | 652 | 351 | 301 | 23 | 1 |
-- TabCode - A parser for the Tabcode lute tablature language
--
-- Copyright (C) 2015-2017 Richard Lewis
-- Author: Richard Lewis <richard@rjlewis.me.uk>
-- This file is part of TabCode
-- TabCode is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as publi... | TransformingMusicology/tabcode-haskell | src/TabCode/Parser.hs | gpl-3.0 | 16,975 | 0 | 21 | 4,333 | 6,427 | 3,099 | 3,328 | 436 | 15 |
module Main where
import Hero.Game(runGame)
main :: IO ()
main = do putStr "Enter your name: "
name <- getLine
runGame name
| brennie/hero-old | Main.hs | gpl-3.0 | 148 | 0 | 7 | 46 | 48 | 24 | 24 | 6 | 1 |
import System.IO
import Data.List
import GHC.Show
{-
fac 1 = 1
fac n = n * (fac (n-1))
main = print (fac 5)
-}
{-
fac n = if (n==1) then 1
else n * fac(n-1)
--main = print (fac 6)
-}
{-
imap f [] = []
imap f (x:xs) = f x: imap f xs
main = print (imap fac [1..10])
-}
{-
length1 [] = 0
length1 (x:xs) = 1 + length... | rahulaaj/ML-Library | src/Tutorials/factorial.hs | gpl-3.0 | 2,307 | 0 | 13 | 582 | 215 | 122 | 93 | 9 | 1 |
{- This file is part of PhoneDirectory.
Copyright (C) 2009 Michael Steele
PhoneDirectory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any lat... | mikesteele81/Phone-Directory | src/Document.hs | gpl-3.0 | 4,742 | 0 | 18 | 1,155 | 999 | 538 | 461 | 92 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Css.FourOhFourCss where
import Clay
-- | CSS for the 404 page.
fourOhFourStyles :: Css
fourOhFourStyles = do
"#contentDiv" ? do
margin nil (px 25) nil (px 25)
"#picDiv" ? do
margin nil (px 25) nil (px 25)
"#links" ? do
"list-style-type" -:... | cchens/courseography | hs/Css/FourOhFourCss.hs | gpl-3.0 | 328 | 0 | 12 | 87 | 97 | 48 | 49 | 11 | 1 |
{- Copyright 2013 Gabriel Gonzalez
This file is part of the Suns Search Engine
The Suns Search Engine is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at your
o... | Gabriel439/suns-search | src/AMQP/Proxy.hs | gpl-3.0 | 6,023 | 0 | 20 | 1,850 | 1,234 | 690 | 544 | 109 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-drive/gen/Network/Google/Resource/Drive/Changes/List.hs | mpl-2.0 | 4,974 | 0 | 16 | 1,208 | 644 | 381 | 263 | 98 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/CreateGroup.hs | mpl-2.0 | 4,452 | 0 | 14 | 958 | 632 | 382 | 250 | 80 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module RenderDocs where
import CMark
import Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes as A
import Text.Blaze.Html.Renderer.Pretty (renderHtml)
import Text.Blaze.Internal (stringValue)
import Data.Text.Lazy as T
import Data.Text.Lazy.Encoding as E
import Data.Text as T... | eriksvedang/Carp | src/RenderDocs.hs | mpl-2.0 | 5,056 | 0 | 29 | 1,672 | 1,534 | 757 | 777 | 110 | 5 |
module Number where
import Debug.Trace
import Data.List (unfoldr)
import Data.Maybe (listToMaybe)
import System.Random
type Modulo = Integer
type Exponent = Integer
type Seed = StdGen
type Range = (Integer,Integer)
gcdx :: Integer -> Integer -> (Integer,Integer,Integer)
gcdx a b | a>=b = gcdx' a b
| ot... | facundoq/toys | rsa/number.hs | agpl-3.0 | 5,722 | 0 | 14 | 1,706 | 1,771 | 927 | 844 | 92 | 1 |
{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses,
FlexibleInstances, TypeSynonymInstances,
EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}
module HEP.Jet.FastJet.Class.TNamed.RawType where
-- import Foreign.Ptr
import Foreign.ForeignPtr
-- impo... | wavewave/HFastJet | oldsrc/HEP/Jet/FastJet/Class/TNamed/RawType.hs | lgpl-2.1 | 588 | 0 | 8 | 97 | 93 | 56 | 37 | -1 | -1 |
-- second to last elements of list
f :: [a] -> a
f [] = error "Empty list provided, requires length > 0"
f (x:y:[]) = x
f (x:xs) = f xs
| ekalosak/haskell-practice | pr2.hs | lgpl-3.0 | 137 | 0 | 9 | 33 | 66 | 34 | 32 | 4 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-|
Module : Haskoin.Crypto.Hash
Copyright : No rights reserved
License : MIT
Maintainer : jprupp@protonmail.ch
Stability : experimental
Portability : POSIX
Hashing functions and corresponding data types. Uses functions from the
cryptonite l... | haskoin/haskoin | src/Haskoin/Crypto/Hash.hs | unlicense | 7,305 | 0 | 15 | 2,068 | 1,879 | 1,014 | 865 | 174 | 1 |
module Chapter06 where
-- CHAPTER 6. TYPECLASSES p. 206
data TisAnInteger =
TisAn Integer deriving (Show)
data TwoIntegers =
Two Integer Integer deriving (Show)
data StringOrInt =
TisAnInt Int
| TisAString String deriving (Show)
data Pair a =
Pair a a deriving (Show)
data Tuple a b =
Tuple a b
data W... | prt2121/haskell-practice | ch6-11-17-25/src/Chapter06.hs | apache-2.0 | 1,709 | 0 | 8 | 425 | 692 | 375 | 317 | 41 | 1 |
{-# Language OverloadedStrings #-}
module Command (
Command(..),
parse,
) where
import Control.Exception
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS
import Data.Functor
import System.IO
data Command
= Set ByteString Int Int ByteString
| Add ByteString Int Int Byte... | tanakh/hkvs | Command.hs | bsd-3-clause | 2,010 | 0 | 14 | 528 | 795 | 397 | 398 | 64 | 12 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
module HYQLFinance(
symbols,
yqlParams,
yqlBuildUrl,
httpExceptionHandler,
getYqlXML,
getElementFromXML,
findStringsInElement,
getStocksFromElement,
refreshStocks
)where
--import Control.Monad
import Network.HTTP... | mKarpis/hyql-finance | src/HYQLFinance.hs | bsd-3-clause | 3,519 | 0 | 18 | 725 | 764 | 407 | 357 | 71 | 3 |
module Text.RDF.RDF4H.TurtleParser_ConformanceTest where
-- Testing imports
import Test.Framework.Providers.API
import Test.Framework.Providers.HUnit
import qualified Test.HUnit as TU
-- Import common libraries to facilitate tests
import Control.Monad (liftM)
import Data.RDF.GraphTestUtils
import Data.RDF.Query
impor... | ddssff/rdf4h | testsuite/tests/Text/RDF/RDF4H/TurtleParser_ConformanceTest.hs | bsd-3-clause | 6,761 | 0 | 14 | 1,521 | 1,916 | 987 | 929 | 119 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module CMUDict where
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS
import Data.Attoparsec.ByteString (Parser)
import qualified Data.Attoparsec.ByteString as AP
import qualified Data.Attoparsec.ByteString.Char8 as APC
import Data.Trie (Trie)
i... | cmika/mnuh | src/CMUDict.hs | bsd-3-clause | 2,763 | 0 | 14 | 646 | 933 | 519 | 414 | 77 | 1 |
module Bot.Modules.Hooks
( defaultHooks
, adjustHook
, matches
, execute
) where
import Bot.Core.Types
import Bot.Core.Base (io, reply)
import Bot.Modules.Records
import Interfaces.HTML (isHTML, titleHTML)
import Control.Monad.State (gets, when, modify)
import Text.Regex.Posix
import qualified Dat... | vehk/Indoril | src/Bot/Modules/Hooks.hs | bsd-3-clause | 1,822 | 1 | 15 | 503 | 635 | 341 | 294 | 42 | 2 |
module Parse.TestHelpers where
import Elm.Utils ((|>))
import Test.HUnit (Assertion, assertEqual)
import Test.Framework
import Test.Framework.Providers.HUnit
import Parse.Helpers (IParser, iParse)
import Reporting.Annotation hiding (map, at)
import Reporting.Region
import Text.ParserCombinators.Parsec.Combinator (eo... | fredcy/elm-format | tests/Parse/TestHelpers.hs | bsd-3-clause | 2,396 | 0 | 16 | 788 | 698 | 365 | 333 | 59 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Parsec.Pos
-- Copyright : (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
-- Port... | maurer/15-411-Haskell-Base-Code | src/Text/Parsec/Pos.hs | bsd-3-clause | 4,188 | 0 | 14 | 860 | 741 | 406 | 335 | 56 | 3 |
-- | The Version of Jat.
module Jat.Utils.Version
(
version
)
where
-- | The current version.
version :: String
version = "1.1.0"
| ComputationWithBoundedResources/jat | src/Jat/Utils/Version.hs | bsd-3-clause | 139 | 0 | 4 | 32 | 24 | 16 | 8 | 5 | 1 |
{-# LANGUAGE TemplateHaskell, TypeOperators #-}
module Data.Git.Types where
import Foreign.Ptr
import Foreign.ForeignPtr
import Bindings.Libgit2
newtype Repository = Repository {repoPrim :: ForeignPtr C'git_repository}
newtype ObjectDB = ObjectDB {odbPrim :: Ptr C'git_odb}
newtype Config = Co... | iand675/hgit | Data/Git/Types.hs | bsd-3-clause | 954 | 0 | 8 | 164 | 240 | 131 | 109 | 22 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
************************************************************************
* *
\section[OccurAnal]{Occurrence analysis pass}
* ... | mettekou/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | 80,282 | 0 | 16 | 22,168 | 7,995 | 4,372 | 3,623 | 570 | 7 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[Constants]{Info about this compilation}
-}
module ETA.Main.Constants where
hiVersion :: Integer
hiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
cProjectName, cProjectVersion, cProjectVersionInt, cProjectPatchLevel, cProjec... | alexander-at-github/eta | compiler/ETA/Main/Constants.hs | bsd-3-clause | 1,676 | 0 | 7 | 222 | 225 | 150 | 75 | 36 | 1 |
module Tests.Data (dataTests)
where
import Test.HUnit
import EPseudocode.Lexer
import EPseudocode.Data
dataTests = TestList [
"list" ~:
"{1, 2}" ~=? showExpr (List [Int 1, Int 2])
, "nested list" ~:
"{1, {4, 5}, 3}" ~=? showExpr (List [Int 1, List [Int 4, Int 5], Int 3])
, "float" ~:
"42.42" ~=? s... | paulbarbu/ePseudocode | test/Tests/Data.hs | bsd-3-clause | 703 | 0 | 14 | 158 | 252 | 129 | 123 | 21 | 1 |
#!/usr/bin/runhaskell
module Main (main) where
import Distribution.Simple
main :: IO ()
main = defaultMain
| jwiegley/svndump | Setup.hs | bsd-3-clause | 110 | 0 | 6 | 17 | 30 | 18 | 12 | 4 | 1 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
import Language.Haskell.Liquid.Prelude
mylen :: [a] -> Int
mylen [] = 0
mylen (_:xs) = 1 + mylen xs
mymap f [] = []
mymap f (x:xs) = (f x) : (mymap f xs)
zs :: [Int]
zs = [1..100]
prop2 = liquidAssertB (n1 == n2)
where n1 = mylen zs
... | spinda/liquidhaskell | tests/gsoc15/unknown/pos/meas3.hs | bsd-3-clause | 353 | 0 | 9 | 106 | 166 | 90 | 76 | 13 | 1 |
-----------------------------------------------------------
-- Daan Leijen (c) 1999-2000, daan@cs.uu.nl
-----------------------------------------------------------
module MonParser ( parseMondrian
, parseMondrianFromFile
, prettyFile
, ParseError
... | FranklinChen/hugs98-plus-Sep2006 | packages/parsec/examples/Mondrian/MonParser.hs | bsd-3-clause | 8,503 | 6 | 19 | 2,524 | 1,756 | 922 | 834 | 172 | 2 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.AMD.BlendMinmaxFactor
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portab... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/AMD/BlendMinmaxFactor.hs | bsd-3-clause | 689 | 0 | 4 | 81 | 40 | 33 | 7 | 4 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Model where
import Control.Monad.Reader (ask)
import Control.Monad.State (modify)
import ... | alexchekmenev/haskell-exam | src/Model.hs | bsd-3-clause | 3,102 | 0 | 15 | 887 | 687 | 385 | 302 | 60 | 2 |
module CS173.Tourney where
import Paths_CS173Tourney -- created by Cabal
import Data.IORef
import Data.Maybe (fromJust)
import qualified Data.Maybe as Y
import System.Log.Logger
import Text.JSON
import System.Directory
import System.Process
import System.Timeout
import System.IO
import Control.Concurrent
import Databa... | jesboat/173tourney | server-src/CS173/Tourney.hs | bsd-3-clause | 9,615 | 0 | 27 | 2,651 | 2,743 | 1,312 | 1,431 | 221 | 5 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Utils.Utils where
{-
Some utility functions, often used to program 'left to right'
-}
import Control.Monad
import Data.Either
import Data.Foldable
import Data.Maybe
import Data.List (intercalate, isPrefixOf)
import Data.Map (Map)
im... | pietervdvn/ALGT | src/Utils/Utils.hs | bsd-3-clause | 11,634 | 614 | 14 | 2,653 | 5,663 | 3,047 | 2,616 | 286 | 2 |
--{-#LANGUAGE GeneralizedNewtypeDeriving#-}
module IRC.Bot.BotData
(BotData(..)
,BotDataIO
,BotDataV
,BotDataVIO
,writeMessage
) where
import Control.Monad.Reader (runReaderT, ask, liftIO)
import Network
import System.IO
import Control.Monad.Reader
import Text.Printf
import Data.Maybe
import Te... | TheRedPepper/YBot | src/IRC/Bot/BotData.hs | bsd-3-clause | 2,809 | 0 | 15 | 613 | 579 | 338 | 241 | 55 | 2 |
{- |
Provide a class that renders multiple Haskell values in a text form
that is accessible by gnuplot.
Maybe we add a method for the binary interface to gnuplot later.
-}
module Graphics.Gnuplot.Value.Tuple (
C(text, columnCount),
ColumnCount(ColumnCount),
) where
import System.Locale (defaultTimeLocale, )
... | wavewave/gnuplot | src/Graphics/Gnuplot/Value/Tuple.hs | bsd-3-clause | 2,855 | 0 | 11 | 666 | 868 | 474 | 394 | 63 | 1 |
module Main where
import qualified Data.Map as M
import Htn
data Term' = HasTarget Bool
| HasAmmo Bool
| HasMagazine Bool
| CanSeeTarget Bool
| AtTarget Bool
deriving (Eq, Ord, Show)
data PrimitiveTask' = Melee
| Shot
| Re... | y-kamiya/ai-samples | app/AttackHtn.hs | bsd-3-clause | 3,001 | 0 | 12 | 659 | 947 | 520 | 427 | 64 | 1 |
{-# LANGUAGE TypeApplications #-}
module Test.Spec.NewPayment (
spec
-- Public to be used by other testing modules.
, Fixture (..)
, withFixture
, withPayment
) where
import Universum
import Control.Lens (to)
import Test.Hspec (Spec, describe, shouldBe, shouldSa... | input-output-hk/pos-haskell-prototype | wallet/test/unit/Test/Spec/NewPayment.hs | mit | 17,388 | 0 | 30 | 7,344 | 3,494 | 1,824 | 1,670 | -1 | -1 |
import Rest.Top ( main ) | florianpilz/autotool | src/rest.hs | gpl-2.0 | 24 | 0 | 5 | 4 | 11 | 6 | 5 | 1 | 0 |
-----------------------------------------------------------
-- Daan Leijen (c) 2000, http://www.cs.uu.nl/~daan
--
-- $version: $
--
-- Pretty print module based on Philip Wadlers "prettier printer"
-- "A prettier printer"
-- Draft paper, April 1997, revised March 1998.
-- http://cm.bell-labs.com/cm/cs/w... | jaapweel/bloop | PPrint.hs | gpl-2.0 | 14,805 | 0 | 16 | 5,089 | 3,686 | 1,923 | 1,763 | 248 | 10 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/File.hs | gpl-3.0 | 1,093 | 0 | 5 | 197 | 77 | 59 | 18 | 6 | 0 |
module DataDupCon2 where
data A = A
data B = A
| roberth/uu-helium | test/staticerrors/DataDupCon2.hs | gpl-3.0 | 49 | 0 | 5 | 13 | 18 | 11 | 7 | 3 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-cloudsearch/gen/Network/AWS/CloudSearch/IndexDocuments.hs | mpl-2.0 | 4,418 | 0 | 15 | 927 | 579 | 349 | 230 | 72 | 1 |
{-# LANGUAGE Rank2Types #-}
module Model.Issue where
import Import
import Data.Filter
import Data.Order
import Widgets.Tag (pickForegroundColor)
import qualified Data.Set as S
import qualified Data.Text as T
import qualified Github.Issues as GH
import ... | chreekat/snowdrift | Model/Issue.hs | agpl-3.0 | 3,219 | 0 | 14 | 1,047 | 677 | 356 | 321 | -1 | -1 |
import Distribution.ArchLinux.AUR
import Control.Monad
--
-- packages maintained by arch-haskell
--
me = "arch-haskell"
main = do
packages <- maintainer me
forM_ packages $ putStrLn . packageName
| archhaskell/archlinux-web | scripts/mypackages.hs | bsd-3-clause | 207 | 2 | 9 | 38 | 55 | 26 | 29 | 6 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.String.HTML (
-- * The HTML Widget
HTMLWidget,
-- * Constructor
mkHTMLWidget) where
-- To keep `cabal repl` happy when running... | FranklinChen/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/HTML.hs | mit | 1,562 | 0 | 13 | 358 | 283 | 158 | 125 | 33 | 1 |
{-
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | xwysp/codeworld | codeworld-base/src/Text/Printf.hs | apache-2.0 | 737 | 0 | 4 | 136 | 23 | 17 | 6 | 4 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Stack.Solver
( cabalSolver
, getGhcVersion
, solveExtraDeps
) where
import Control.Exception.Enclosed (tryIO)
import Co... | wskplho/stack | src/Stack/Solver.hs | bsd-3-clause | 8,052 | 0 | 23 | 2,680 | 1,968 | 999 | 969 | 166 | 5 |
{-
******************************************************************************
* H M T C *
* *
* Module: SrcPos *
*... | jbracker/supermonad-plugin | examples/monad/hmtc/original/SrcPos.hs | bsd-3-clause | 1,796 | 0 | 10 | 801 | 202 | 113 | 89 | 21 | 0 |
-- In this example, the first import declaration should be removed.
module B3 (myFringe)where
import C1 hiding (myFringe)
import C1 (Tree(Leaf,Branch))
myFringe:: Tree a -> [a]
myFringe (Leaf x ) = [x]
myFringe (Branch left right) = myFringe right
sumSquares (x:xs)= x^2 + sumSquares xs
sumSquares [] =0 ... | kmate/HaRe | old/testing/cleanImports/B3.hs | bsd-3-clause | 332 | 0 | 7 | 74 | 120 | 67 | 53 | 8 | 1 |
module M1 where
--Any type/data constructor name declared in this module can be renamed.
--Any type variable can be renamed.
--Rename type Constructor 'BTree' to 'MyBTree'
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: (Monad m, Ord a) => [a] -> m (BTree a)
buildtree [] = ... | kmate/HaRe | old/testing/unfoldAsPatterns/M1_TokOut.hs | bsd-3-clause | 1,013 | 0 | 15 | 417 | 351 | 174 | 177 | 21 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
-- | Low-level bytestring builders. Most users want to use the more
-- type-safe 'Data.Csv.Incremental' module instead.
module Data.Csv.Builder
(
-- * Encoding single records and headers
encodeHeader
, encodeRecord
, encodeNamedRecord
, encodeDefaultOrdere... | jb55/cassava | Data/Csv/Builder.hs | bsd-3-clause | 2,643 | 0 | 9 | 444 | 453 | 254 | 199 | 44 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module App where
import Database.Persist.Sqlite
import Network.Wai
import Network.Wai.Handler.Warp
import Servant
import API.Contact
import DB
import Model
type ServerAPI = "contacts" :> ContactsAPI
server :: Server ServerAPI
server = contactsServer
app ::... | lexi-lambda/haskell-rolodex | src/App.hs | isc | 455 | 0 | 8 | 74 | 121 | 69 | 52 | 19 | 1 |
-- Existential type
-- ref: https://wiki.haskell.org/Existential_type
-- trac: https://prime.haskell.org/wiki/ExistentialQuantification
-- 1. Intro
-- Normally when creating a new type using type, newtype, data, etc., every type variable that appears on the right-hand side must also appear on the left-hand side. ... | Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Existential-type.hs | mit | 7,118 | 23 | 13 | 1,569 | 1,440 | 747 | 693 | -1 | -1 |
{-# OPTIONS_GHC -Wall #-}
module ExprT where
data ExprT = Lit Integer
| Add ExprT ExprT
| Mul ExprT ExprT
deriving (Show, Eq)
| tamasgal/haskell_exercises | CIS-194/homework-05/ExprT.hs | mit | 151 | 0 | 6 | 48 | 39 | 23 | 16 | 6 | 0 |
module Demo where
import BreveLang
import BreveEval
import Synth
import qualified Data.Map.Lazy as Map
import Data.Maybe (fromJust)
-- Sample program:
-- Define the program
-- Parse it to get the statements
-- eval it to get the traces
-- Make an update for it
-- Synthesize!!
-- Woops, didn't get what we expected
--... | Solumin/ScriptNScribe | src/Demo.hs | mit | 3,534 | 0 | 13 | 749 | 625 | 314 | 311 | 54 | 1 |
module Main where
import AST
import Control.Monad.Reader
import Control.Monad.Trans.Except
import Data.List (intercalate)
import Data.Maybe (fromJust, listToMaybe, mapMaybe)
import Data.Monoid
import Parser ... | andreasfrom/natlang | Main.hs | mit | 3,626 | 0 | 18 | 954 | 1,500 | 775 | 725 | 73 | 5 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Control.Monad (forM, when)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Control (liftBaseOp)
import Control.Monad.Trans.Except (runExceptT, ExceptT(..),... | fpco/inline-c-nag | examples/ode-runge-kutta.hs | mit | 3,600 | 0 | 20 | 891 | 980 | 510 | 470 | 77 | 3 |
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-}
module Unit (unitTests) where
import Data.Aeson
import Data.Attoparsec.Text (eitherResult, parse)
import Data.ByteString.Lazy (ByteString, fromStrict)
import Data.Maybe (fromJust)
import Data.Text ... | muhbaasu/haskell-db-fahrplan-api | tests/Unit.hs | mit | 3,083 | 0 | 10 | 519 | 554 | 317 | 237 | 51 | 1 |
module Main where
double x = x + x
main = putStrLn "Hello, World !!\n"
| skywind3000/language | haskell/double.hs | mit | 88 | 0 | 5 | 32 | 24 | 13 | 11 | 3 | 1 |
module GHCJS.DOM.SVGUseElement (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SVGUseElement.hs | mit | 43 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module C where
import Unbound.Generics.LocallyNameless hiding (prec,empty,Data,Refl,Val)
import Unbound.Generics.LocallyNameless.Internal.Fold (toListOf)
import Unbound.Generics.LocallyNameless.Alpha
import Control.Monad
import Control.Monad.Except
import qualified Data.List as List
import Data.Map (Map)
import qual... | sweirich/tal | src/C.hs | mit | 13,598 | 0 | 21 | 3,685 | 5,654 | 2,788 | 2,866 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
import Data.Aeson
import Data.Decimal
import Data.Word8
parse precision (Number n) = return $ Data.Decimal.realFracToDecimal precision n
parse precision x = fail $ "Expectig a number in the JSON to parse to a D... | michalc/haskell-experiments | json.hs | mit | 744 | 0 | 8 | 121 | 190 | 100 | 90 | 17 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{- |
Module : Orville.PostgreSQL.Expr.Name.IndexName
Copyright : Flipstone Technology Partners 2021
License : MIT
-}
module Orville.PostgreSQL.Internal.Expr.Name.IndexName
( IndexName,
indexName,
)
where
import Orville.PostgreSQL.Internal.Expr.Name.Identifier (... | flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/Name/IndexName.hs | mit | 597 | 0 | 7 | 75 | 90 | 60 | 30 | 11 | 1 |
merge :: Ord a => [a] -> [a] -> [a]
merge [] ys = ys
merge xs [] = xs
merge xs@(x:xt) ys@(y:yt)
| x <= y = x : merge xt ys
| otherwise = y : merge xs yt
mergesort :: Ord a => [a] -> [a]
mergesort [] = []
mergesort [x] = [x]
mergesort list =
merge left righ... | dzeban/cs | sorting/mergesort.hs | mit | 454 | 0 | 9 | 176 | 232 | 118 | 114 | 14 | 1 |
module Lesson05 where
-- Today's lesson is all about *style*. I bet you're tired of running these
-- little apps in the bottom of the IDE. Wouldn't it be cool to have a fully
-- powered website instead? Also, the display of a hand is pretty verbose.
-- Let's make our hand display prettier.
import Helper
import Helper... | snoyberg/haskell-impatient-poker-players | src/Lesson05.hs | mit | 4,275 | 0 | 16 | 1,013 | 642 | 324 | 318 | 63 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-datastore-retentionperiod.html
module Stratosphere.ResourceProperties.IoTAnalyticsDatastoreReten... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/IoTAnalyticsDatastoreRetentionPeriod.hs | mit | 2,318 | 0 | 12 | 205 | 264 | 151 | 113 | 27 | 1 |
module Command.Transfer (transferCommand) where
import Database.HDBC
import Database.HDBC.Sqlite3
import Util
transferCommand :: [String] -> String -> IO ()
transferCommand (amountString:envelope:[]) flags = do
conn <- getDbConnection
let positiveAmount = readInteger100 amountString
let amount = if 'r'... | jpotterm/manila-hs | src/Command/Transfer.hs | cc0-1.0 | 793 | 0 | 12 | 147 | 218 | 108 | 110 | 16 | 2 |
module Configure where
import Linear.V2
-- one unit is equal to 10 meters
data Ball = Ball {name :: String, mass :: Double, semidiameter :: Double, speed :: V2 Double, location :: V2 Double, step :: V2 Double} deriving (Eq, Show, Read)
radius1 :: Double
radius1 = 0.05
radius2 :: Double
radius2 = 0.05
mass1 :: Do... | bitterharvest/BilliardBalls | src/Configure.hs | gpl-2.0 | 4,813 | 0 | 9 | 1,619 | 415 | 246 | 169 | 26 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Sandbox
-- Copyright : 2007-2014 Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GPL
--
-- Maintainer : Juergen Nicklisch-Franken <info@leksah.org>
-- Stability ... | JPMoresmau/leksah | src/IDE/Sandbox.hs | gpl-2.0 | 5,318 | 0 | 18 | 1,097 | 1,403 | 761 | 642 | 115 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Vim.TestExCommandParsers (tests) where
import Control.Applicative
import Data.List (inits)
import Data.Maybe
import Data.Monoid
import qualified Data.Text as T
import Test.QuickCheck
import Test.Tasty (TestTree, testG... | formrre/yi | yi-keymap-vim/tests/Vim/TestExCommandParsers.hs | gpl-2.0 | 5,978 | 0 | 15 | 1,843 | 1,203 | 670 | 533 | 130 | 3 |
-- Copyright (C) 2002-2005,2007 David Roundy
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program is distrib... | DavidAlphaFox/darcs | harness/Darcs/Test/Patch/Examples/Set1.hs | gpl-2.0 | 18,259 | 0 | 17 | 5,861 | 4,753 | 2,516 | 2,237 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables, NoMonomorphismRestriction, RecordWildCards #-}
module Main where
import Control.Applicative
import Control.Monad
import Control.Monad.Error
import Control.Monad.Reader
import Control.Monad.State
import Data.Conduit
import... | wavewave/lhc-analysis-collection | exe/2013-06-10-XQLD-sqsg.hs | gpl-3.0 | 6,264 | 0 | 20 | 1,832 | 1,577 | 898 | 679 | 135 | 3 |
module Main where
import Data.List
import Data.Char
-- |The core IO part of the code
main =
do
dictionary <- readFile "src/linuxwords.txt"
let list = (lines dictionary)
putStrLn "1. Words containing string"
putStrLn "2. Words starting with string"
putStrLn "3. Words ending with string"
putStrLn "... | cdm1006/Words | src/Main.hs | gpl-3.0 | 7,501 | 152 | 26 | 2,206 | 2,240 | 1,102 | 1,138 | 178 | 26 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeOperators #-}
module Routes.Admin.Products
( ProductAPI
, productRoutes
) where
import Control.Monad (forM_, unless)
import Control.Mona... | Southern-Exposure-Seed-Exchange/southernexposure.com | server/src/Routes/Admin/Products.hs | gpl-3.0 | 19,437 | 0 | 22 | 6,164 | 4,440 | 2,413 | 2,027 | 436 | 7 |
module Rebass.FileStatus where
import Rebass.Path
import System.IO
import System.Time(CalendarTime)
import System.Time(ClockTime, toCalendarTime)
import System.Directory(getDirectoryContents, doesDirectoryExist, getModificationTime)
import System.Posix.Files(getFile... | codeflows/rebass | src/Rebass/FileStatus.hs | gpl-3.0 | 2,093 | 0 | 13 | 663 | 556 | 296 | 260 | 35 | 2 |
{-# LANGUAGE FlexibleInstances
, FlexibleContexts #-}
module XMonad.Hooks.DynamicLog.Dzen2.StatusText where
import XMonad hiding (Status, Position, Color, Dimension, Font)
import XMonad.Hooks.DynamicLog.Dzen2.Font
import XMonad.Hooks.DynamicLog.Dzen2.Render
import XMonad.Hooks.DynamicLog.Dzen2.Content
... | Fizzixnerd/xmonad-config | site-haskell/src/XMonad/Hooks/DynamicLog/Dzen2/StatusText.hs | gpl-3.0 | 1,865 | 0 | 11 | 365 | 736 | 387 | 349 | 43 | 1 |
module Codewars.Exercise.Inversions where
import Data.List
countInversions :: Ord a => [a] -> Int
countInversions = length . inv
where inv xs = [(a,b) | (a:bs) <- tails xs, b <- bs, a > b]
--
| ice1000/OI-codes | codewars/1-100/calculate-number-of-inversions-in-array.hs | agpl-3.0 | 196 | 0 | 11 | 39 | 94 | 52 | 42 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Erd.Config
( Config(..)
, configIO
, defaultConfig
, defaultConfigFile
, Notation(..)
)
where
import Control.Exception (tryJust)
import Control.Monad ... | BurntSushi/erd | src/Erd/Config.hs | unlicense | 12,273 | 0 | 20 | 4,227 | 2,952 | 1,612 | 1,340 | 266 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.