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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- File Parser.hs
module Make.Parser
(
makefile
)
where
import Text.ParserCombinators.Parsec
import Make.Primitives
-- Returns the complete list of Rules
makefile :: GenParser Char st [Rule]
makefile =
do result <- many parseRule
eof
return result
-- Parses a Rule, separately parses the target, sourc... | sahnib/haskell-make | src/Make/Parser.hs | mit | 1,239 | 0 | 11 | 297 | 376 | 186 | 190 | 46 | 1 |
module Language.Pepa.Compile.MarkovChain
( MarkovChain
, Row
, Probability
, ProbVector
, indexProbVector
, solveForSteadyState
)
where
{- Standard Library Modules Imported -}
{- External Library Modules Imported -}
import qualified Data.Matrix as Matrix
import qualified Data.Matrix.Solve as Solve
{- Loc... | allanderek/ipclib | Language/Pepa/Compile/MarkovChain.hs | gpl-2.0 | 5,259 | 0 | 9 | 1,237 | 294 | 185 | 109 | 31 | 1 |
module Grammatik.Hierarchie
-- -- $Id$
( typ0
, typ1
, typ2
, typ3
, immergut
, monoton
, kontextsensitiv
, kontextfrei
, linear
, rechtslinear, linkslinear
, at_most_one_terminal_in_rhs
, epsfrei
, kettenfrei
, chomsky
, greibach
)
where
import Grammatik.Type
import qualified Autolib.Reporter.Checker as C
impo... | marcellussiegburg/autotool | collection/src/Grammatik/Hierarchie.hs | gpl-2.0 | 8,407 | 133 | 24 | 2,183 | 2,612 | 1,354 | 1,258 | 191 | 3 |
module Chap02.Data.BinaryTree where
import Prelude hiding (foldr)
import Test.QuickCheck (Arbitrary(..), sized)
import Control.Applicative (pure, liftA3)
import Data.Foldable
data BinaryTree a = E
| T (BinaryTree a) a (BinaryTree a)
deriving (Show, Eq)
instance Functor (BinaryTree... | stappit/okasaki-pfds | src/Chap02/Data/BinaryTree.hs | gpl-3.0 | 1,365 | 0 | 14 | 430 | 618 | 315 | 303 | 39 | 1 |
module DynamicGraphs.GraphOptions where
import Data.Aeson (FromJSON (parseJSON), withObject, (.!=), (.:?))
import qualified Data.Text.Lazy as T
data GraphOptions =
GraphOptions { taken :: [T.Text], -- courses to exclude from graph
departments :: [T.Text], -- department prefixes to inclu... | Courseography/courseography | app/DynamicGraphs/GraphOptions.hs | gpl-3.0 | 2,741 | 0 | 13 | 1,095 | 462 | 260 | 202 | 49 | 1 |
import Control.Monad
import Data.ByteString.Char8 (pack, unpack, singleton)
import Data.Maybe
import System.Environment
import System.Exit
import System.Hardware.Serialport
helpMsg = unlines [ "Usage: powerstrip [OPTION] DEVICE COMMAND [PORT]..."
, "An interface for the USB controlled powerstrip writ... | chrisrosset/powerstrip | powerstrip.hs | gpl-3.0 | 2,488 | 9 | 13 | 645 | 846 | 434 | 412 | 53 | 3 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Language.ArrayForth.HLL.Compile where
import Control.Applicative ((<$), (<$>), (<*), (<*>))
import Control.Arrow (second)
import Control.Monad.Free (Free (..))
import Cont... | TikhonJelvis/array-forth-hll | src/Language/ArrayForth/HLL/Compile.hs | gpl-3.0 | 4,849 | 0 | 21 | 1,877 | 1,599 | 825 | 774 | 85 | 28 |
module Sorters
( msort, msortwith
, oemerge, oemerges
, unimerge, unimerges
, diff, dsplit
, uniq, us
, Plug(..), unplug
)
where
import Trace
infixl 5 `oemerge`
infixl 5 `unimerge`
msort :: Ord a => [a] -> [a]
msort = oemerges . runs -- todo: which is better?
-- mrgsort
-- utilities for sorting and merging ... | jwaldmann/rx | src/Sorters.hs | gpl-3.0 | 3,509 | 19 | 15 | 921 | 1,873 | 1,012 | 861 | 86 | 3 |
module Language.Objection.SyntaxTree
where
import Data.Int
import qualified Data.Map as M
type Identifier = String
data Module = Module (M.Map Identifier Class)
deriving (Show, Read, Eq)
data PrivacyLevel = Private | Protected | Public
deriving (Show, Read, Eq)
data Primitive = Pr... | jhance/objection | Language/Objection/SyntaxTree.hs | gpl-3.0 | 2,859 | 0 | 9 | 978 | 578 | 330 | 248 | 54 | 0 |
module P31KarvonenHRSpec (main,spec) where
import Test.Hspec
import P31KarvonenHR hiding (main)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "targetHR" $ do
it "calculates the book example at 55% correctly" $ do
targetHR 22 65 55 `shouldBe` 138
it "calculates the book example at... | ciderpunx/57-exercises-for-programmers | test/P31KarvonenHRSpec.hs | gpl-3.0 | 772 | 0 | 14 | 192 | 220 | 108 | 112 | 20 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
module Bluesnap.Client.API (
Object(..)
, retrieve
, create
, update
) where
import Prelude hiding (last, log)
import Data.Char (toLower)
import Data.List (find)
import Data.List.Split (splitOn)
impor... | andorp/hs-bluesnap | src/Bluesnap/Client/API.hs | gpl-3.0 | 4,028 | 0 | 14 | 864 | 1,082 | 565 | 517 | 80 | 1 |
module PdfGenerator
(createPDF) where
import System.Process
import GHC.IO.Handle.Types
import ImageConversion (removeImage)
import Data.List.Utils (replace)
-- | Opens a new process to create a PDF from a TEX (texName) and deletes
-- the tex file and extra files created by pdflatex
createPDF :: String -> IO ()
cr... | miameng/courseography | app/PdfGenerator.hs | gpl-3.0 | 1,438 | 0 | 12 | 516 | 235 | 123 | 112 | 30 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/SuperChatEvents/List.hs | mpl-2.0 | 6,337 | 0 | 20 | 1,543 | 980 | 568 | 412 | 141 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
, makeLogWare
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger (liftL... | montanonic/well-typed | Application.hs | agpl-3.0 | 7,029 | 0 | 13 | 1,804 | 1,054 | 565 | 489 | -1 | -1 |
--
-- Copyright 2017-2018 Azad Bolour
-- Licensed under GNU Affero General Public License v3.0 -
-- https://github.com/azadbolour/boardgame/blob/master/LICENSE.md
--
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
module BoardGame.Common.Message.HandShakeResponse (
HandShakeResponse(..)
, tupl... | azadbolour/boardgame | haskell-server/src/BoardGame/Common/Message/HandShakeResponse.hs | agpl-3.0 | 855 | 0 | 8 | 117 | 149 | 90 | 59 | 17 | 1 |
module QuantLib.Stochastic ( module Q ) where
import QuantLib.Stochastic.Process as Q
import QuantLib.Stochastic.Discretize as Q
import QuantLib.Stochastic.Random as Q
import QuantLib.Stochastic.PureMT as Q
| paulrzcz/hquantlib | src/QuantLib/Stochastic.hs | lgpl-3.0 | 208 | 0 | 4 | 24 | 44 | 32 | 12 | 5 | 0 |
module Utils (tuplein, tuplecomp) where
tuplecomp :: (Eq a, Show a) => (a, a) -> a -> a
tuplecomp t n
| n == fst t = snd t
| n == snd t = fst t
| otherwise = -- error "tuple does not contain thing"
error ("<" ++ show t ++ "> does not contain <" ++ show n ++ ">")
-- <tuplein t n> is true ... | ekalosak/haskell-practice | Utils.hs | lgpl-3.0 | 470 | 0 | 12 | 160 | 204 | 100 | 104 | 12 | 1 |
{-# LANGUAGE LambdaCase #-}
module Main where
import Control.Exception
import Control.Concurrent
import Control.Monad
import Data.Char
import Data.Maybe
import System.Console.GetOpt
import System.Environment
import qualified Data.ByteString.Lazy as L
import qualified Network.WebSockets as WS
lGetLine = fmap (L.pack . ... | aweinstock314/wscat | src/wscat.hs | apache-2.0 | 2,395 | 0 | 14 | 447 | 761 | 408 | 353 | 48 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Service.SMF
( handleDiscover,
handleCommand
) where
import Shelly
import Prelude hiding (FilePath)
import qualified Data.Text as T
default (T.Text)
handleDiscover :: IO St... | AlainODea/haskell-amqp-examples | Service/SMF.hs | apache-2.0 | 816 | 0 | 9 | 145 | 212 | 112 | 100 | 25 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
module Network.IRC.MessageBus
( MessageBus
, newMessageBus
, MessageChannel
, newMessageChannel
, sendMessage
, receiveMessage
, receiveMessageEither
, closeMe... | abhin4v/hask-irc | hask-irc-core/Network/IRC/MessageBus.hs | apache-2.0 | 2,290 | 0 | 9 | 402 | 647 | 327 | 320 | 53 | 1 |
import Data.List
cons a as = Just (a:as)
ans' _ [] = Nothing
ans' m (a:as) =
if m < a
then Nothing
else if m == a
then Just [a]
else if a' /= Nothing
then a' >>= (cons a)
else b'
where
a' = ans' (m-a) as
b' = ans' m as
ans m a =
let o = ans' m ... | a143753/AOJ | ALDS1_5_A.hs | apache-2.0 | 644 | 0 | 13 | 284 | 296 | 149 | 147 | 27 | 4 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 709
{-# LANGUAGE AutoDeriveTypeable #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.Maybe
-- Copyright : (c) 2007 Yitzak Gale, Eric Kidd
-- License : BSD-style (see the file LICENS... | holoed/Junior | lib/transformers-0.4.3.0/Control/Monad/Trans/Maybe.hs | apache-2.0 | 5,481 | 0 | 15 | 1,188 | 1,679 | 898 | 781 | 89 | 2 |
{-# LANGUAGE ViewPatterns #-}
{-| Implementation of the Ganeti configuration database.
-}
{-
Copyright (C) 2011, 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions o... | yiannist/ganeti | src/Ganeti/Config.hs | bsd-2-clause | 24,039 | 0 | 20 | 5,579 | 5,395 | 2,809 | 2,586 | 414 | 4 |
{-# LANGUAGE TemplateHaskell, DeriveFunctor #-}
{-| Some common Ganeti types.
This holds types common to both core work, and to htools. Types that
are very core specific (e.g. configuration objects) should go in
'Ganeti.Objects', while types that are specific to htools in-memory
representation should go into 'Ganeti.... | apyrgio/ganeti | src/Ganeti/Types.hs | bsd-2-clause | 32,624 | 0 | 11 | 6,399 | 7,516 | 4,238 | 3,278 | 668 | 2 |
{-# LANGUAGE FlexibleContexts, RankNTypes #-}
module Cloud.AWS.EC2.Instance
( describeInstances
, runInstances
, defaultRunInstancesRequest
, terminateInstances
, startInstances
, stopInstances
, rebootInstances
, getConsoleOutput
, getPasswordData
, describeInstanceStatus
,... | worksap-ate/aws-sdk | Cloud/AWS/EC2/Instance.hs | bsd-3-clause | 28,553 | 0 | 68 | 6,577 | 5,498 | 2,876 | 2,622 | -1 | -1 |
module GreedyIndSet where
import Graph(ArrayGraph(..), Subgraph(..))
import Data.IntMap(IntMap,(!))
import Data.IntSet(IntSet, member, delete)
import Data.List(foldl')
import Util(mapFst)
remainingNeighbors :: IntMap [Int] -> IntSet -> Int -> [Int]
remainingNeighbors graph vs = filter (flip member vs) . (graph !)
u... | cullina/Extractor | src/GreedyIndSet.hs | bsd-3-clause | 2,371 | 0 | 16 | 615 | 1,188 | 641 | 547 | 59 | 3 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveDataTypeab... | joozek78/stack | src/Stack/Setup.hs | bsd-3-clause | 40,416 | 0 | 30 | 12,974 | 9,649 | 4,789 | 4,860 | 816 | 15 |
{-
mkindex :: Making index.html for the current directory.
-}
import Control.Applicative
import Data.Bits
import Data.Time
import Data.Time.Clock.POSIX
import System.Directory
import System.Locale
import System.Posix.Files
import Text.Printf
indexFile :: String
indexFile = "index.html"
main :: IO ()
main = do
c... | mietek/mighttpd2 | utils/mkindex.hs | bsd-3-clause | 2,450 | 39 | 14 | 520 | 727 | 374 | 353 | 57 | 3 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section[StgLint]{A ``lint'' pass to check for Stg correctness}
-}
{-# LANGUAGE CPP #-}
module StgLint ( lintStgBindings ) where
import StgSyn
import Bag ( Bag, emptyBag, isEmptyBag, snocBag, bagToList )
import Id ( Id, idType,... | GaloisInc/halvm-ghc | compiler/stgSyn/StgLint.hs | bsd-3-clause | 18,096 | 0 | 19 | 5,271 | 4,775 | 2,436 | 2,339 | -1 | -1 |
module HasOffers.API.Brand.Advertiser
where
import Data.Text
import GHC.Generics
import Data.Aeson
import Control.Applicative
import Network.HTTP.Client
import qualified Data.ByteString.Char8 as BS
import HasOffers.API.Common
--------------------------------------------------------------------------------
u... | kelecorix/api-hasoffers | src/HasOffers/API/Brand/Advertiser.hs | bsd-3-clause | 842 | 0 | 8 | 186 | 176 | 96 | 80 | 22 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
-- | Import this module qualified as follows:
--
-- @
-- import qualified Money
-- @
--
-- Note: This module exports support for many well-known currencies
-- out-of-the-box, but you are not limited to t... | k0001/haskell-money | safe-money/src/Money.hs | bsd-3-clause | 39,920 | 0 | 6 | 5,897 | 12,501 | 7,279 | 5,222 | 644 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-- | Useful utilities that don't really fit in a specific location.
module Language.MiniStg.Util (
show',
Validate(..),
-- * Prettyprinter extensions
commaSep,
spaceSep,
bulletList,
pluralS,
) where
import Data.Bifunctor
import Data... | Neuromancer42/ministgwasm | src/Language/MiniStg/Util.hs | bsd-3-clause | 1,898 | 0 | 10 | 509 | 589 | 312 | 277 | 41 | 1 |
{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
module Network.IRC.Bot.Core
( simpleBot
, simpleBot'
, BotConf(..)
, nullBotConf
, User(..)
, nullUser
) where
import Control.Concurrent (ThreadId, forkIO, threadDelay)
import Control.Concurrent.Chan (Chan, dupChan, newChan, readCh... | hrushikesh/ircbot | Network/IRC/Bot/Core.hs | bsd-3-clause | 11,300 | 0 | 21 | 3,546 | 2,756 | 1,437 | 1,319 | 183 | 3 |
import System.Environment (getArgs)
import Data.List (isInfixOf, isPrefixOf)
import Data.List.Split (splitOn)
concatstr :: [(String, Bool)] -> String
concatstr [] = []
concatstr ((xs, _):yss) = xs ++ concatstr yss
prefix :: String -> String -> String
prefix xs [] = []
prefix xs (y... | nikai3d/ce-challenges | hard/str_substitution.hs | bsd-3-clause | 1,622 | 0 | 16 | 612 | 768 | 395 | 373 | 28 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Tests.Test.HUnitPlus.Main where
import Data.List
import Distribution.TestSuite
import System.Directory
import Test.HUnitPlus.Main
import Test.HUnitPlus.Base
import qualified Data.Text as Strict
makeMainTest :: (String, IO (), IO (), Bool, [TestSuite], Opts) -> Test
makeMainT... | emc2/HUnit-Plus | test/Tests/Test/HUnitPlus/Main.hs | bsd-3-clause | 8,906 | 0 | 25 | 2,163 | 2,623 | 1,502 | 1,121 | 180 | 4 |
{- FSQL : Expr/Typed.hs -- Typed expression data types and functions
-
- Copyright (C) 2015 gahag
- All rights reserved.
-
- This software may be modified and distributed under the terms
- of the BSD license. See the LICENSE file for details.
-}
{-# LANGUAGE GADTs, MultiParamTypeClasses, FlexibleContexts, Flexi... | gahag/FSQL | src/Expr/Typed.hs | bsd-3-clause | 2,762 | 0 | 9 | 881 | 987 | 523 | 464 | 50 | 1 |
{-# LANGUAGE FlexibleContexts, CPP #-}
module ParseNFA where
import qualified Data.Set as S
import qualified Data.Map.Strict as M
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ( (<$>), (<*>), (<*) )
#endif
import Control.Monad ( when, (>=>) )
import Control.Monad.Trans ( lift )
import Control.Monad.Trans.... | owst/Penrose | src/ParseNFA.hs | bsd-3-clause | 7,797 | 0 | 17 | 2,361 | 2,182 | 1,167 | 1,015 | 138 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Miso.Mathml.Element
-- Copyright : (C) 2016-2018 David M. Johnson
-- License : BSD3-style (see the file LICENSE)
-- Maintainer : David M. J... | dmjio/miso | src/Miso/Mathml/Element.hs | bsd-3-clause | 857 | 0 | 9 | 157 | 99 | 62 | 37 | 10 | 1 |
{-# LANGUAGE LambdaCase, OverloadedStrings, RecordWildCards #-}
module Output where
-- Pretty printer functions for the ANSI output.
import Prelude as P hiding (putStrLn)
import Data.Int
import Data.List as L
import Data.Maybe
import Data.Monoid
import Data.Text as T
impo... | taksuyu/marktime | marktime/Output.hs | bsd-3-clause | 2,559 | 0 | 14 | 587 | 761 | 371 | 390 | 54 | 4 |
-- |
-- Module: Math.NumberTheory.Zeta.Dirichlet
-- Copyright: (c) 2018 Alexandre Rodrigues Baldé
-- Licence: MIT
-- Maintainer: Alexandre Rodrigues Baldé <[email protected]>
--
-- Dirichlet beta-function.
{-# LANGUAGE ScopedTypeVariables #-}
module Math.NumberTheory.Zeta.Dirichlet
( betas
, be... | Bodigrim/arithmoi | Math/NumberTheory/Zeta/Dirichlet.hs | mit | 2,582 | 0 | 16 | 673 | 528 | 307 | 221 | 32 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
module Yesod.Core.Internal.TH where
import Prelude hiding (exp)
import Yesod.Core.Handler
import Language.Haskel... | geraldus/yesod | yesod-core/src/Yesod/Core/Internal/TH.hs | mit | 9,103 | 0 | 20 | 2,941 | 2,010 | 1,058 | 952 | 167 | 7 |
--
--
--
-----------------
-- Exercise 6.24.
-----------------
--
--
--
module E'6'24 where
-- 6.23 works correctly.
--
-- Really, I wouldn't say anything before (coverage-) testing.
-- I don't know how to do this in Haskell, yet.
| pascal-knodel/haskell-craft | _/links/E'6'24.hs | mit | 238 | 0 | 2 | 46 | 17 | 16 | 1 | 1 | 0 |
--
--
--
-----------------
-- Exercise 5.27.
-----------------
--
--
--
module E'5'27 where
-- Subchapter 5.1 (exercise relevant definitions) ...
type Person = String
type Book = String
type Database = [ (Person , Book) ]
exampleDB :: Database
exampleDB
= [
( "Alice" , "Tintin" ) ,
... | pascal-knodel/haskell-craft | _/links/E'5'27.hs | mit | 1,594 | 0 | 8 | 575 | 159 | 110 | 49 | 14 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE CPP #-}
module Main where
import Foundation
import Foundation.Array
import Foundation.Foreign
import Foundation.List.DList
import Foundation.Primitive
import Foundation.Check
i... | vincenthz/hs-foundation | foundation/tests/Checks.hs | bsd-3-clause | 10,305 | 0 | 23 | 3,008 | 3,020 | 1,621 | 1,399 | 160 | 2 |
{-
Codec for de/encoding form data shipped in URL query strings
or in POST request bodies. (application/x-www-form-urlencoded)
(cf. RFC 3986.)
-}
module Codec.URLEncoder
( encodeString
, decodeString
) where
import qualified Codec.Binary.UTF8.String as UTF8 ( encodeString )
import Codec.Percen... | sof/flickr | Codec/URLEncoder.hs | bsd-3-clause | 942 | 0 | 12 | 210 | 345 | 180 | 165 | 23 | 7 |
-- Compile this with 'ghc -o Game Game.hs' and run it with './Game'.
import Data.List
import Graphics.Gloss.Game
-- Window size
width = 600
height = 400
-- A sprite representing our character
slimeSprite = scale 0.5 0.5 (bmp "Slime.bmp")
slimeWidth = fst (snd (boundingBox slimeSprite))
slimeHeight = snd (snd (bou... | mchakravarty/lets-program | step5/Game.hs | bsd-3-clause | 4,174 | 0 | 12 | 1,175 | 1,082 | 593 | 489 | 41 | 3 |
{-# LANGUAGE NumDecimals #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Marshal (tests) where
import qualified Data.List.NonEmpty as NE
import Data.Proxy
import Data.Text (Text)
import ... | quchen/stg | test/Testsuite/Test/Marshal.hs | bsd-3-clause | 5,055 | 0 | 15 | 1,550 | 1,049 | 607 | 442 | 114 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module: Network.FastIRC.IO
-- Copyright: (c) 2010 Ertugrul Soeylemez
-- License: BSD3
-- Maintainer: Ertugrul Soeylemez <[email protected]>
-- Stability: alpha
--
-- This module helps you with doing input and output on IRC connections
-- or even log files.
module Network.... | chrisdone/hulk | fastirc-0.2.0/Network/FastIRC/IO.hs | bsd-3-clause | 1,396 | 0 | 13 | 325 | 331 | 174 | 157 | 33 | 3 |
module Servant.Server.Auth.Token.LevelDB(
LevelDBBackendT
, runLevelDBBackendT
, LevelDBEnv
, newLevelDBEnv
) where
import Control.Monad.Base
import Control.Monad.Catch
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.Trans.Control
import Control.Monad.Trans.Resource
import Serv... | VyacheslavHashov/servant-auth-token | servant-auth-token-leveldb/src/Servant/Server/Auth/Token/LevelDB.hs | bsd-3-clause | 5,942 | 0 | 12 | 896 | 1,280 | 693 | 587 | -1 | -1 |
{-# LANGUAGE GADTs, EmptyDataDecls, KindSignatures, ExistentialQuantification, ScopedTypeVariables, DeriveDataTypeable, DeriveFunctor, NoMonomorphismRestriction, ViewPatterns, RankNTypes #-}
module Intuitionistic where
-- only propositional, sorry
import Prelude hiding (catch)
import Data.Typeable
import Data.Functo... | diflying/logitext | Intuitionistic.hs | bsd-3-clause | 4,996 | 0 | 14 | 1,350 | 1,426 | 776 | 650 | 104 | 1 |
module Main (main) where
import qualified Language.Futhark.SyntaxTests
import qualified Futhark.Representation.AST.Syntax.CoreTests
import qualified Futhark.Representation.AST.AttributesTests
import qualified Futhark.Optimise.AlgSimplifyTests
import Test.Framework (defaultMain, testGroup, Test)
allTests :: [Test]
al... | ihc/futhark | unittests/futhark_tests.hs | isc | 687 | 0 | 7 | 67 | 138 | 87 | 51 | 14 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-| Implementation of the Ganeti Ssconf interface.
-}
{-
Copyright (C) 2012 Google Inc.
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 of the Li... | dblia/nosql-ganeti | src/Ganeti/Ssconf.hs | gpl-2.0 | 4,932 | 0 | 14 | 1,205 | 918 | 519 | 399 | 86 | 2 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module OpenCog.Lojban.Syntax.Types where
import Prelude hiding (id,(.),(<*>),(<$>),pure,(*>),(<*),foldl)
import qualified Data.Map as M
import Data.List (partition,isPrefixOf,isSuffixOf,nub,any,intercalate)
import Data.Maybe (fro... | ruiting/opencog | opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban/Syntax/Types.hs | agpl-3.0 | 2,222 | 0 | 11 | 421 | 793 | 445 | 348 | 47 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module T15843a where
import Language.Haskell.TH
first_of_2 = [| (909,) |]
second_of_2 = [| (,909) |]
empty_2 = [| (,) |]
full_2 = [| (909,606) |]
third_of_3 = [| (,,909) |]
fi... | sdiehl/ghc | testsuite/tests/th/T15843a.hs | bsd-3-clause | 604 | 0 | 4 | 125 | 94 | 71 | 23 | -1 | -1 |
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE DataKinds #-}
module Bug where
pattern PATTERN = ()
wrongLift :: PATTERN
wrongLift = undefined
| sdiehl/ghc | testsuite/tests/patsyn/should_fail/T9161-1.hs | bsd-3-clause | 144 | 0 | 6 | 24 | 26 | 16 | 10 | 6 | 1 |
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
-- | Expand allocations inside of maps when possible.
module Futhark.Pass.ExpandAllocations
( expandAllocations )
where
import Control.Applicative
import Control.Monad.Except
import Control.Monad.State
import qualified Data.Map.Strict as M
import qualified ... | ihc/futhark | src/Futhark/Pass/ExpandAllocations.hs | isc | 11,134 | 0 | 18 | 2,976 | 3,122 | 1,588 | 1,534 | 199 | 3 |
{-
Joseph Eremondi
Program Verification
UU# 4229924
March 4, 2015
-}
module WLP where
import Types
import Z3Utils
import Data.Data
import Data.Generics
import Data.List (sort)
import qualified Data.Map as Map
--trace _ x = x
--Constants limiting how far we ... | JoeyEremondi/utrecht-pv | WLP.hs | mit | 11,517 | 0 | 17 | 2,537 | 3,301 | 1,744 | 1,557 | 184 | 4 |
module PageForkableWiki where
import Protolude hiding (Meta, ignore)
import Data.Aeson
import Data.Default (def)
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HM
import Data.List ... | seagreen/housejeffries | page-forkable-wiki/src/PageForkableWiki.hs | mit | 7,964 | 0 | 19 | 2,124 | 1,885 | 998 | 887 | 195 | 2 |
module Encoder where
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Reader
import Control.Monad.Trans.State
import qualified Data.Bimap as B
import Data.Maybe (fromJust)
import Types
type Lit = Int
type LitCount = Int
type CNF = [Clause]
type Clause = [Lit]
data Environment = Env
{ bimap :: B... | rodamber/vmc-hs | sat/Encoder.hs | mit | 1,260 | 0 | 11 | 265 | 536 | 290 | 246 | 40 | 1 |
module Data.Set.Extensions where
import Control.Exception.Base as Exception
import Data.List as List
import Data.List.Extensions as ListExt
import Data.Map as Map
import Data.Set as Set
import Prelude.Extensions as PreludeExt
notNull = ((.) not Set.null)
deleteMin :: Ord a => Set a -> Set a
deleteMin = \set -> (Set.d... | stevedonnelly/haskell | code/Data/Set/Extensions.hs | mit | 1,025 | 0 | 13 | 189 | 467 | 251 | 216 | 23 | 1 |
-- Copyright (c) 2016-present, SoundCloud Ltd.
-- All rights reserved.
--
-- This source code is distributed under the terms of a MIT license,
-- found in the LICENSE file.
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Kubern... | soundcloud/haskell-kubernetes | lib/Kubernetes/Model/V1/DownwardAPIVolumeSource.hs | mit | 2,056 | 0 | 14 | 725 | 256 | 156 | 100 | 30 | 1 |
-- Polymorphic Data Types
data List t = E | C t (List t) deriving Show
lst1 :: List Int
lst1 = C 3 (C 5 (C 2 E))
lst2 :: List Char
lst2 = C 'x' (C 'y' (C 'z' E))
lst3 :: List Bool
lst3 = C True (C False E)
filterList :: (t -> Bool) -> List t -> List t
filterList _ E = E
filterList p (C x xs)
| p x = C x (fi... | v0lkan/learning-haskell | 001-polymorphism.hs | mit | 644 | 0 | 9 | 178 | 374 | 186 | 188 | 20 | 1 |
module Main where
{-
24bitbmp用
40bitinfo
windows bitmap
-}
import System.Environment(getArgs)
import qualified Data.ByteString.Lazy as Bl
import Numeric (showHex)
cfold = foldr (++) []
rsInt :: (Show a,Read a)=> a -> Int
rsInt = read . show
dropTake :: Int -> Int -> [a] -> [a]
dropTake d t = (take t) . (drop d)
dr... | HSU-MilitaryLogisticsClub/Free-Test | src/bmphask/bmpread24.hs | mit | 1,551 | 0 | 17 | 413 | 619 | 322 | 297 | 34 | 1 |
{-# LANGUAGE PackageImports #-}
import "fitd-web" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| silky/foot-in-the-door | app/devel.hs | mit | 126 | 0 | 6 | 19 | 34 | 20 | 14 | 5 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module Blunt.App.Script where
import Data.Function ((&))
import qualified Data.Text.Lazy as Text
import Language.Javascript.JMacro
import qualified Text.PrettyPrint.Leijen.Text as PrettyPrint
script :: Text.Text
script = js & renderJs & PrettyPrint.renderOneLine & PrettyPrint.displayT
j... | tfausak/blunt | library/Blunt/App/Script.hs | mit | 1,216 | 0 | 7 | 256 | 87 | 58 | 29 | 11 | 1 |
--------------------------------------------------------------------------
-- Copyright (c) 2007-2010, ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:
-- ETH Zurich D-INFK, Haldeneg... | modeswitch/barrelfish | hake/ArmGem5.hs | mit | 7,239 | 18 | 17 | 2,874 | 1,009 | 563 | 446 | 128 | 1 |
-- | Definitions for use of LaTeXMathML in HTML.
-- (See <http://math.etsu.edu/LaTeXMathML/>)
module Text.Pandoc.LaTeXMathML ( latexMathMLScript ) where
import System.FilePath ( (</>) )
import Text.Pandoc.Shared (readDataFile)
-- | String containing LaTeXMathML javascript.
latexMathMLScript :: Maybe FilePath -> IO S... | kowey/pandoc-old | src/Text/Pandoc/LaTeXMathML.hs | gpl-2.0 | 593 | 0 | 10 | 85 | 116 | 62 | 54 | 9 | 1 |
{-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE MultiParamTypeClasses
, CPP
, TemplateHaskell
#-}
module Gx.Internal.Backend.GLFW where
#ifdef WITHGLFW
import Gx.Internal.Backend.Types
import Gx.Data.Input (Key (..), MouseButton (..))
import qualified Gx.Data.Input as I
import Gx.Data.Window
import... | andgate/GXK | src/Gx/Internal/Backend/GLFW.hs | gpl-2.0 | 19,957 | 0 | 30 | 5,150 | 4,655 | 2,339 | 2,316 | 5 | 0 |
-----------------------------------------------------------------------------
--
-- Module : App.Screen
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- |
--
-----------------------------------------------------------------------------
module App.Sc... | triplepointfive/hegine | src/App/Screen.hs | gpl-2.0 | 1,278 | 0 | 11 | 304 | 314 | 174 | 140 | 26 | 1 |
----------------------------------------------------------------------
-- |
-- Module : Main
-- Maintainer : Markus Forsberg
-- Stability : (stability)
-- Portability : (portability)
--
-- > CVS $Date: 2006/03/03 17:22:23 $
-- > CVS $Author: markus $
-- > CVS $Revision: 1.5 $
--
-- Main file of FM backend.
----... | isido/functional-morphology-for-koine-greek | lib/Options.hs | gpl-3.0 | 2,657 | 0 | 11 | 736 | 627 | 354 | 273 | 49 | 2 |
{-# LANGUAGE Rank2Types, NoMonomorphismRestriction, ScopedTypeVariables #-}
module Database.Design.Ampersand.Test.TestScripts (getTestScripts,testAmpersandScripts) where
import Data.List
import Data.Char(toUpper)
import System.FilePath ((</>),takeExtension)
import Control.Monad --(filterM, forM_, foldM,when)
import Co... | 4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/Test/TestScripts.hs | gpl-3.0 | 4,952 | 0 | 18 | 1,426 | 1,491 | 752 | 739 | 106 | 4 |
{-# LANGUAGE DeriveFunctor #-}
module FractalComonad where
import Control.Comonad
import Control.Applicative
data Layer a = Layer a
deriving (Show, Read, Eq, Functor)
instance Comonad Layer where
-- duplicate :: w a -> w (w a)
duplicate (Layer l) = Layer (Layer l)
-- extract :: w a -> a
extract (Layer ... | graninas/Haskell-Algorithms | Tests/Fractal/FractalOfFrcactals.hs | gpl-3.0 | 1,981 | 0 | 9 | 437 | 429 | 235 | 194 | 32 | 1 |
module DL3001 (tests) where
import Helpers
import Test.Hspec
tests :: SpecWith ()
tests = do
let ?rulesConfig = mempty
describe "DL3001 - invalid CMD rules" $ do
it "invalid cmd" $ do
ruleCatches "DL3001" "RUN top"
onBuildRuleCatches "DL3001" "RUN top"
it "install ssh" $ do
ruleCatchesN... | lukasmartinelli/hadolint | test/DL3001.hs | gpl-3.0 | 421 | 0 | 13 | 96 | 103 | 47 | 56 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, FlexibleContexts, TypeOperators #-}
import Control.Monad.Exception
import qualified Data.ByteString.Lazy as B
import qualified Data.Map as M
import JVM.ClassFile
import JVM.Converter
import JVM.Assembler
import JVM.Builder hiding (generate)
import qualified JVM.Builder as J
import JVM.... | portnov/simple-pascal-compiler | spc-jvm/Test.hs | lgpl-3.0 | 3,162 | 0 | 13 | 832 | 892 | 473 | 419 | 99 | 1 |
module ProjectM36.WCWidth where
import Data.Set.Range
import Data.Char
wIDEEASTASIAN :: RangeSet Int
wIDEEASTASIAN = foldr insertRange empty [
(0x1100, 0x115f), -- Hangul Choseong Kiyeok ..Hangul Choseong Filler
(0x231a, 0x231b), -- Watch ..Hourglass
(0x2329, 0x232a), -- Left-pointing... | agentm/project-m36 | src/lib/ProjectM36/WCWidth.hs | unlicense | 28,798 | 0 | 8 | 7,304 | 4,150 | 2,863 | 1,287 | 415 | 1 |
module EKG.A169849Spec (main, spec) where
import Test.Hspec
import EKG.A169849 (a169849)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A169849" $
it "correctly computes the first 20 elements" $
take 20 (map a169849 [1..]) `shouldBe` expectedValue where
expectedValue = [9,3,6,2,4,8,10,5,15,... | peterokagey/haskellOEIS | test/EKG/A169849Spec.hs | apache-2.0 | 353 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
import Prelude
data DataInt = D Int
deriving (Show, Eq, Ord)
type ID = Int
showID :: ID -> String
showID = show
newtype NewTypeInt = N Int
deriving(Show, Ord, Eq)
| EricYT/Haskell | src/chapter-6-5.hs | apache-2.0 | 201 | 0 | 6 | 69 | 71 | 40 | 31 | 8 | 1 |
module ForthEvaluator where
import Prelude
import qualified Data.Map as Map
data NativeFunc = Drop | Plus | Apply | Eval | Define deriving (Show, Eq)
data ProgramUnit = Word String | Symbol String | Native NativeFunc | ForthInt Int | ForthString String | ForthLambda [ProgramUnit] deriving (Show, Eq)
type ProgramSta... | niilohlin/ForthEvaluator | ForthEvaluator.hs | apache-2.0 | 2,628 | 0 | 15 | 486 | 963 | 527 | 436 | 37 | 2 |
module Delahaye.A337974Spec (main, spec) where
import Test.Hspec
import Delahaye.A337974 (a337974)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A337974" $
it "correctly computes the first 20 elements" $
take 20 (map a337974 [1..]) `shouldBe` expectedValue where
expectedValue = [1, 3, 9, 7... | peterokagey/haskellOEIS | test/Delahaye/A337974Spec.hs | apache-2.0 | 393 | 0 | 10 | 78 | 160 | 95 | 65 | 10 | 1 |
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-}
{-| Utility functions. -}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistrib... | dimara/ganeti | src/Ganeti/Utils.hs | bsd-2-clause | 30,095 | 0 | 24 | 7,586 | 6,966 | 3,667 | 3,299 | 496 | 5 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QFontComboBox.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:15
Warning : this file is machine generated - do... | uduki/hsQt | Qtc/Gui/QFontComboBox.hs | bsd-2-clause | 48,116 | 0 | 14 | 7,518 | 15,140 | 7,677 | 7,463 | -1 | -1 |
{-| Logical Volumes data collector.
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this... | apyrgio/snf-ganeti | src/Ganeti/DataCollectors/Lv.hs | bsd-2-clause | 6,701 | 0 | 19 | 1,314 | 1,315 | 702 | 613 | 113 | 2 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, RankNTypes, CPP #-}
module Graphics.UI.FormsCompose (
GtkForm(..),
Widget (..),
widgetNetwork,
WidgetNetwork(..),
widgetAddToBin,
Layout (..),
gtkWindow,
gtkWidgetWindow,
gtkMessageBox,
gtkDialog,
gtkLabel,
gtkReactLab... | jvmap/Forms-compose | src/Graphics/UI/FormsCompose.hs | bsd-3-clause | 13,348 | 0 | 20 | 3,392 | 3,073 | 1,555 | 1,518 | -1 | -1 |
module IptAdmin.AccessControl where
import Control.Exception (catch, SomeException)
import Control.Monad.Error
import Control.Monad.State
import Data.IORef
import Data.Map
import Data.Maybe
import Happstack.Server.SimpleHTTP
import IptAdmin.LoginPage as LoginPage (pageHandlers)
import IptAdmin.Static as Static
import... | etarasov/iptadmin | src/IptAdmin/AccessControl.hs | bsd-3-clause | 3,968 | 0 | 20 | 1,401 | 796 | 409 | 387 | 68 | 5 |
module Generics.SOP.NP
(
module Data.SOP.NP
) where
import Data.SOP.NP | well-typed/generics-sop | generics-sop/src/Generics/SOP/NP.hs | bsd-3-clause | 79 | 0 | 5 | 17 | 22 | 15 | 7 | 4 | 0 |
module Problem3 where
import Data.Char
import Data.List
import Control.Applicative
import System.IO
-- Given two sequences a1, a2.. an (ai is the profit per click of the i-th ad) and b1, b2, . . . , bn (bi is
-- the average number of clicks per day of the i-th slot), we need to partition them into n pairs (ai, bi))
-... | msosnicki/algorithms | app/week3/Problem3.hs | bsd-3-clause | 954 | 0 | 19 | 217 | 291 | 152 | 139 | 23 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.GeoJSON.Geometries
-- Copyright : (C) 2016 Markus Bare... | alios/geojson-types | src/Data/GeoJSON/Geometries.hs | bsd-3-clause | 13,227 | 0 | 11 | 2,568 | 4,043 | 2,075 | 1,968 | -1 | -1 |
module ThreadLanguage where
type Name = String
----------------------
--- Command syntax ---
----------------------
--- Top-level program is a collection of communicating subprocesses.
data Prog = PL [Comm]
data Exp = Plus Exp Exp | Var Name | Lit Int | GetPID
data BoolExp = Equal... | palexand/interpreters | ResumptionMonad/ThreadLanguage.hs | bsd-3-clause | 2,096 | 38 | 12 | 749 | 786 | 401 | 385 | 51 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Test.BulkAPI (spec) where
import Data.Function ((&))
#if MIN_VERSION_base(4,11,0)
import Data.Functor ((<&>))
#endif
import Test.Common
import Test.Import
import qualified Data.HashMap.Strict as HM
im... | bitemyapp/bloodhound | tests/Test/BulkAPI.hs | bsd-3-clause | 7,434 | 0 | 26 | 2,132 | 2,046 | 1,029 | 1,017 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
module TokenGenerator where
import Types
import Data.Bool
import Data.Text (unpack, pack, Text)
import Data.Aeson hiding ((.=))
import Data.Time (UTCTime, NominalDiffTime)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import Control.Lens
import Da... | sphaso/firebase-haskell-client | src/TokenGenerator.hs | bsd-3-clause | 2,133 | 2 | 18 | 412 | 446 | 240 | 206 | 34 | 1 |
{-# LANGUAGE ConstraintKinds #-}
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2015 Dimitri Sabadie
-- License : BSD3
--
-- Maintainer : Dimitri Sabadie <[email protected]>
-- Stability : experimental
-- Portability : portable
--
-- Logging inter... | phaazon/quaazar | src/Quaazar/Utils/Log.hs | bsd-3-clause | 3,969 | 0 | 11 | 873 | 790 | 454 | 336 | -1 | -1 |
{-# LANGUAGE MagicHash #-}
module Doublee where
import GHC.Exts
f :: Double# -> Double
f x = D# (x +## 1.324##)
| dterei/Scraps | haskell/Doublee.hs | bsd-3-clause | 115 | 0 | 7 | 24 | 37 | 21 | 16 | 5 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.TransformFeedback
-- Copyright : (c) Sven Panne, Lars Corbijn 2011-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portabilit... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/TransformFeedback.hs | bsd-3-clause | 5,003 | 0 | 11 | 593 | 599 | 346 | 253 | 71 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
module Database.Relational.Schema.MySQLInfo.KeyColumnUsage where
import Data.Int (Int16)
import Database.Record.TH (derivingShow)
import Database.Relational.Query.TH (defineTableTypesAndRecordDefault)
import Database.Rel... | krdlab/haskell-relational-record-driver-mysql | src/Database/Relational/Schema/MySQLInfo/KeyColumnUsage.hs | bsd-3-clause | 698 | 0 | 9 | 150 | 143 | 99 | 44 | 15 | 0 |
{-# LANGUAGE StandaloneDeriving, UndecidableInstances #-}
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2015 Dimitri Sabadie
-- License : BSD3
--
-- Maintainer : Dimitri Sabadie <[email protected]>
-- Stability : experimental
-- Portability : por... | phaazon/quaazar | src/Quaazar/Utils/Scoped.hs | bsd-3-clause | 2,604 | 0 | 11 | 435 | 823 | 459 | 364 | -1 | -1 |
{-# LANGUAGE CPP #-}
-------------------------------------------------------------------------------
--
-- | Command-line parser
--
-- This is an abstract command-line parser used by both StaticFlags and
-- DynFlags.
--
-- (c) The University of Glasgow 2005
--
----------------------------------------------------------... | jstolarek/ghc | compiler/main/CmdLineParser.hs | bsd-3-clause | 10,480 | 0 | 18 | 3,399 | 3,344 | 1,722 | 1,622 | 185 | 15 |
{-# LANGUAGE FlexibleContexts #-}
module Data.Array.Unboxed.YC
( Unboxed(..)
, modifySTUArray
) where
import Control.Monad.ST (ST)
import Data.Array.IArray (IArray)
import Data.Array.MArray (newArray, readArray, writeArray, unsafeFreeze)
import Data.Array.ST (STUArray)
import Data.Array.Unboxed (UArray)
import ... | yairchu/hmm | src/Data/Array/Unboxed/YC.hs | bsd-3-clause | 1,208 | 0 | 12 | 238 | 458 | 249 | 209 | 31 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
module Unit.CommitQueue
( tests
) where
import Control.Concurrent (forkIO, threadDelay)
import qualified Control.Logging as Logging
import Control.Monad.Free
import Control... | sgraf812/feed-gipeda | tests/Unit/CommitQueue.hs | bsd-3-clause | 5,349 | 0 | 15 | 1,355 | 1,285 | 651 | 634 | 97 | 3 |
module Aws.S3.Commands
(
module Aws.S3.Commands.CopyObject
, module Aws.S3.Commands.DeleteBucket
, module Aws.S3.Commands.DeleteObject
, module Aws.S3.Commands.DeleteObjects
, module Aws.S3.Commands.GetBucket
, module Aws.S3.Commands.GetBucketLocation
, module Aws.S3.Commands.GetObject
, module Aws.S3.Commands.GetSer... | Soostone/aws | Aws/S3/Commands.hs | bsd-3-clause | 824 | 0 | 5 | 62 | 174 | 127 | 47 | 24 | 0 |
import Control.Parallel
import Data.Word
-- Gain a lot of speed here using Word32 type and `mod` for parity checking
-- instead of `even`. This is all since it keeps the values unboxed.
collatzLen :: Int -> Word32 -> Int
collatzLen c 1 = c
collatzLen c n = collatzLen (c+1) $ if n `mod` 2 == 0 then n `div` 2 else 3*n+1... | dterei/Scraps | euler/p14/p14_par.hs | bsd-3-clause | 543 | 0 | 10 | 142 | 201 | 111 | 90 | 11 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.