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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE StandaloneDeriving, FlexibleContexts, UndecidableInstances #-}
newtype Fix f = In (f (Fix f))
deriving instance Show (f (Fix f)) => Show (Fix f)
deriving instance Eq (f (Fix f)) => Eq (Fix f)
out :: Fix f -> f (Fix f)
out (In x) = x
type Algebra f a = f a -> a
cata :: Functor f => Algebra f a -> Fix f... | ItsLastDay/academic_university_2016-2018 | subjects/Haskell/13/homework.hs | gpl-3.0 | 3,321 | 0 | 10 | 994 | 839 | 426 | 413 | 57 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Database.Alteryx.CLI.PrettyPrinters
(
printRecordInfo
) where
import Database.Alteryx.Types
import Control.Lens
import Control.Newtype as NT
import Data.Monoid
import Data.Text as T
import Data.Text.IO
import Prelude hiding (putStrLn)
printRecordInfo :: RecordInfo -... | MichaelBurge/yxdb-utils | src/Database/Alteryx/CLI/PrettyPrinters.hs | gpl-3.0 | 842 | 0 | 19 | 247 | 248 | 132 | 116 | 27 | 3 |
module SugarScape.Visual.GlossRunner
( runGloss
) where
import Data.IORef
import Control.Monad.Random
import qualified Graphics.Gloss as GLO
import Graphics.Gloss.Interface.IO.Animate
import Graphics.Gloss.Interface.IO.Simulate
import SugarScape.Core.Scenario
import SugarScape.Core.Simulation
import SugarScape.V... | thalerjonathan/phd | public/towards/SugarScape/experimental/concurrent/src/SugarScape/Visual/GlossRunner.hs | gpl-3.0 | 2,496 | 0 | 12 | 746 | 570 | 298 | 272 | 64 | 2 |
module Freenet.Pcfb (
-- * PCFB (Periodic Cipher Feed Back) Mode
mkPCFB, pcfbEncipher, pcfbEncipherWord8,
pcfbDecipher, pcfbDecipherWord8
) where
import Control.Applicative ( (<*>), (<$>) )
import Control.Monad ( when )
import Control.Monad.ST.Safe
import Data.Bits ( xor )
import qualified Data.Byt... | waldheinz/ads | src/lib/Freenet/Pcfb.hs | gpl-3.0 | 2,378 | 0 | 14 | 516 | 813 | 413 | 400 | 57 | 1 |
module Database.Design.Ampersand.Classes.Relational
(Relational(..)
) where
import Data.Maybe
import Database.Design.Ampersand.Core.AbstractSyntaxTree
import Database.Design.Ampersand.ADL1.Expression
import Database.Design.Ampersand.Basics
class Association r => Relational r where
properties :: r -> [Prop]
... | 4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/Classes/Relational.hs | gpl-3.0 | 9,529 | 0 | 19 | 3,328 | 2,646 | 1,373 | 1,273 | 154 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
--
-- 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 3 of the License, or
-- a... | tmishima/haskell-dbus | examples/export.hs | gpl-3.0 | 1,960 | 11 | 12 | 398 | 379 | 195 | 184 | 30 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.AppsReseller
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla... | brendanhay/gogol | gogol-apps-reseller/gen/Network/Google/AppsReseller.hs | mpl-2.0 | 7,557 | 0 | 20 | 1,385 | 788 | 575 | 213 | 161 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Get.hs | mpl-2.0 | 3,308 | 0 | 15 | 783 | 393 | 237 | 156 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/SetIAMPolicy.hs | mpl-2.0 | 5,761 | 0 | 16 | 1,237 | 785 | 460 | 325 | 117 | 1 |
module Sound.MikMod.Synonyms where
import Foreign.C.Types
type UBYTE = CUChar
type SBYTE = CChar
type UWORD = CUShort
type SWORD = CShort
type ULONG = CUInt
type SLONG = CInt
type BOOL = CInt
decodeBool :: BOOL -> Bool
decodeBool 0 = False
decodeBool 1 = True
decodeBool x = error ("decodeBool " ++ show x)
encodeBoo... | evanrinehart/mikmod | Sound/MikMod/Synonyms.hs | lgpl-3.0 | 462 | 0 | 8 | 91 | 158 | 90 | 68 | 18 | 2 |
module SetArrow where
import Set
import PairSet
import BoolSet
infixr 1 ~>>>
infixr 3 ~&&&
class SetArrow a where
(~>>>) :: (LatticeSet s1, LatticeSet s2, LatticeSet s3)
=> a s1 s2 -> a s2 s3 -> a s1 s3
(~&&&) :: (LatticeSet s1, LatticeSet s2, LatticeSet s3)
=> a s1 s2 -> a s1 s3 -> a s1... | ntoronto/drbayes | drbayes/direct/haskell-impl/SetArrow.hs | lgpl-3.0 | 765 | 0 | 12 | 204 | 355 | 182 | 173 | 18 | 0 |
module Test where
import Control.Monad.State
import qualified Data.Map as Map
import Data.Maybe (fromJust)
import Expr
import Infer (inferType)
import Lexer (lexer)
import Parser (parseExpr, parseTy... | scturtle/InferW | Test.hs | unlicense | 6,435 | 0 | 17 | 2,524 | 1,238 | 729 | 509 | 101 | 1 |
module HStatusBar.Decl
( Decl
, decl
, arg
, argInt
) where
import HStatusBar.Types
import Text.Megaparsec hiding (string)
import qualified Text.Megaparsec as MP
import Text.Megaparsec.Text
type Decl = Parser Module
string :: Text -> Parser Text
string literal = pack... | michalrus/hstatusbar | src/HStatusBar/Decl.hs | apache-2.0 | 952 | 0 | 14 | 225 | 320 | 168 | 152 | 30 | 1 |
-- Copyright 2020 Google LLC
--
-- 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 agreed to in ... | google/cabal2bazel | bzl/tests/proto/CamelCaseDir/CamelCaseDirTest.hs | apache-2.0 | 743 | 0 | 6 | 117 | 52 | 39 | 13 | 4 | 1 |
module AlecSequences.A269524Spec (main, spec) where
import Test.Hspec
import AlecSequences.A269524 (a269524)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A269524" $
it "correctly computes the first 20 elements" $
take 20 (map a269524 [1..]) `shouldBe` expectedValue where
expectedValue = [... | peterokagey/haskellOEIS | test/AlecSequences/A269524Spec.hs | apache-2.0 | 369 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- Copyright (C) 2009-2011 John Millikin <john@john-millikin.com>
--
-- 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/licen... | jmillikin/haskell-dbus | examples/export.hs | apache-2.0 | 1,864 | 11 | 12 | 366 | 375 | 192 | 183 | 29 | 1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
------------------------------------------------------------------------------
-- | This module tha handles login stuff (Snaplet.Auth needs some help)
module Login where
------------------------------------------------------------------------------
import ... | santolucito/Peers | src/Login.hs | apache-2.0 | 3,554 | 0 | 15 | 723 | 723 | 394 | 329 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
--------------------------------------------------------------------
-- |
-- Copyright : (c) McGraw Hill Financial 2014
-- License : BSD2
-- Maintain... | PipocaQuemada/ermine | src/Ermine/Loader/Filesystem.hs | bsd-2-clause | 4,874 | 0 | 14 | 1,129 | 1,097 | 613 | 484 | -1 | -1 |
import Yesod.Default.Config (fromArgs)
import Yesod.Default.Main (defaultMain)
import Application (withBottleStory)
main :: IO ()
main = defaultMain fromArgs withBottleStory | konn/BottleStory | main.hs | bsd-2-clause | 185 | 0 | 6 | 29 | 51 | 29 | 22 | 5 | 1 |
-- | The module provides feature selection functions which extract
-- features present in the dataset, i.e. features which directly occure
-- the dataset.
module Data.CRF.Chain1.Constrained.DAG.Feature.Present
( presentFeats
, presentOFeats
, presentTFeats
, presentSFeats
) where
import Data.DAG (DAG)
imp... | kawu/crf-chain1-constrained | src/Data/CRF/Chain1/Constrained/DAG/Feature/Present.hs | bsd-2-clause | 1,954 | 0 | 13 | 439 | 520 | 281 | 239 | 42 | 1 |
module Language.Haskell.GhcMod.Utils where
import Control.Exception (bracket)
import System.Directory (getCurrentDirectory, setCurrentDirectory)
import System.Process (readProcessWithExitCode)
import System.Exit (ExitCode(..))
import System.IO (hPutStrLn, stderr)
-- dropWhileEnd is not provided prior to base 4.5.0.0.... | darthdeus/ghc-mod-ng | Language/Haskell/GhcMod/Utils.hs | bsd-3-clause | 1,375 | 0 | 17 | 310 | 505 | 261 | 244 | 31 | 2 |
module Reduction.Segmentation where
import NML (Path)
connectingPaths :: [Path] -> [Path]
connectingPaths = id -- Haskell's identity function
-- | validateSegmentation returns True when ther are no connecting paths,
-- and False otherwise.
validateSegmentation :: [Path] -> Bool
validateSegmentation ps = null ps
| maertsen/netPropCheck | Reduction/Segmentation.hs | bsd-3-clause | 315 | 0 | 6 | 45 | 60 | 36 | 24 | 6 | 1 |
module CLasH.Normalize.NormalizeTypes where
-- Standard modules
import qualified Control.Monad.Trans.Writer as Writer
import qualified Data.Monoid as Monoid
-- GHC API
import qualified CoreSyn
-- Local imports
import CLasH.Translator.TranslatorTypes
-- Wrap a writer around a TranslatorSession, to run a single trans... | christiaanb/clash | clash/CLasH/Normalize/NormalizeTypes.hs | bsd-3-clause | 2,391 | 0 | 8 | 870 | 271 | 167 | 104 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.Mail.Mime.Parser.Internal.Rfc2045
Copyright : (c) 2015 Alberto Valverde González
License : BSD3
Maintainer : alberto@toscat.net
Stability : provisional
Portability : unknown
This module provides parsers for the grammar d... | meteogrid/mime-mail-parser | Network/Mail/Mime/Parser/Internal/Rfc2045.hs | bsd-3-clause | 5,874 | 0 | 16 | 1,180 | 1,590 | 841 | 749 | 139 | 7 |
{-# LANGUAGE CPP #-}
#ifndef MIN_VERSION_profunctors
#define MIN_VERSION_profunctors(x,y,z) 0
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Machine.Moore
-- Copyright : (C) 2012 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- M... | YoEight/machines | src/Data/Machine/Moore.hs | bsd-3-clause | 2,868 | 0 | 16 | 667 | 984 | 516 | 468 | 71 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
{-# OPTIONS_GHC -Wall #-}
-- | Contains the common types used through bitcoin RPC calls, that aren't
-- specific to a single submodule.
module Network.Bitcoin.Types ( Client
, BitcoinException(..)
, HexStr... | cgaebel/network-bitcoin | src/Network/Bitcoin/Types.hs | bsd-3-clause | 2,682 | 0 | 7 | 793 | 242 | 159 | 83 | 29 | 0 |
{-# LANGUAGE StandaloneDeriving #-}
module System.TaskL.Task where
import Data.ByteString.Char8 (ByteString)
import Data.Map (Map)
import Data.Tree (Tree(..), Forest)
import System.TaskL.Strings (Label(), Name())
-- | A task, with its variable bindings and body.
data Task = T... | solidsnack/taskl | System/TaskL/Task.hs | bsd-3-clause | 1,096 | 0 | 10 | 236 | 334 | 196 | 138 | 19 | 0 |
module Main where
import Network.Salvia.Impl.Cgi
import Network.Salvia.Handler.ExtendedFileSystem
main :: IO ()
main = start "/code/salvia-extras" (hCgiEnv (hExtendedFileSystem ".")) ()
| sebastiaanvisser/salvia-demo | src/CgiDemo.hs | bsd-3-clause | 189 | 0 | 9 | 22 | 54 | 31 | 23 | 5 | 1 |
module Hughes where
import Data.Monoid
newtype Hughes a = Hughes ([a] -> [a])
runHughes :: Hughes a -> [a]
runHughes (Hughes k) = k []
mkHughes :: [a] -> Hughes a
mkHughes xs = Hughes (\ys -> mappend xs ys)
------------------------------------------------------------
consDumb :: a -> Hughes a -> Hughes a
consDumb... | bitemyapp/kata | Hughes.hs | bsd-3-clause | 878 | 0 | 8 | 162 | 348 | 177 | 171 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import System.Environment
import qualified Data.Text as T
import Scraper
import Analytics
import Persist
main :: IO ()
main = do
args <- getArgs
let boardid = case length args of
1 -> T.pack $ head args
_ -> "b"
Right b... | k4smiley/Chan | app/Main.hs | bsd-3-clause | 448 | 0 | 14 | 132 | 129 | 63 | 66 | 15 | 2 |
{-# LANGUAGE DeriveFunctor #-}
module ProgramArgs
(
parseProgramArgs
, ProgramArgs(..)
, Command(..)
, Target(..)
, CompareTarget(..)
, Verbosity(..)
, OutputFormat(..)
)
where
import Data.Foldable
import Options.Applicative
import LoadPackageInterface
parseProgramArgs :: IO ProgramArgs
parseProgra... | cdxr/haskell-interface | module-diff/ProgramArgs.hs | bsd-3-clause | 3,797 | 0 | 14 | 1,007 | 924 | 495 | 429 | 113 | 3 |
import TestImport
main :: IO ()
main = makeFoundation >>= warp 3000
| SimSaladin/rnfssp | rnfssp-media/tests/warped.hs | bsd-3-clause | 70 | 0 | 6 | 14 | 26 | 13 | 13 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
module Forms.Search (searchForm) where
import Foundation
import Yesod
import Data.Text (Text)
import Control.Applicative
searchForm :: Html -> Form ImgHost ImgHost (FormResult Text, Widget)
searchForm = renderTable $ are... | pankajmore/Imghost | Forms/Search.hs | bsd-3-clause | 363 | 0 | 8 | 48 | 82 | 47 | 35 | 10 | 1 |
module Nine where
------------------------------------------------------
-- (**) Pack consecutive duplicates of list elements
-- into sublists.
-- If a list contains repeated elements
-- they should be placed in separate sublists.
------------------------------------------------------
pack :: (Eq a) => [a] -> [... | michael-j-clark/hjs99 | src/1to10/Nine.hs | bsd-3-clause | 415 | 0 | 11 | 66 | 100 | 58 | 42 | 4 | 1 |
{-# LANGUAGE
MultiParamTypeClasses
, TemplateHaskell
, ScopedTypeVariables
, FlexibleInstances
, FlexibleContexts
, UndecidableInstances
, ViewPatterns
, StandaloneDeriving
, DeriveFunctor , DeriveFoldable , DeriveTraversable
#-}
module Spire.Canonical.Types where
import Control.Monad.Except
imp... | spire/spire | src/Spire/Canonical/Types.hs | bsd-3-clause | 11,431 | 2 | 13 | 2,554 | 4,980 | 2,554 | 2,426 | 286 | 2 |
{-# LANGUAGE FlexibleContexts, TypeOperators #-}
{-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
----------------------------------------------------------------------
-- |
-- Mo... | conal/reification-rules | src/ReificationRules/MonoPrims.hs | bsd-3-clause | 3,182 | 0 | 11 | 920 | 980 | 537 | 443 | 64 | 1 |
module X86_64Inst where
import CodeGen
import Registers
call :: String -> CodeGen Env ()
call f = emit $ "\tcall\t" ++ f
binOp :: (RegOrImm a, RegOrImm b) => String
-> a -> b -> CodeGen Env ()
binOp op a b
| isAtSP a && isAtSP b = do sp <- getStackPointer
binOp' (Ref sp) (Ref s... | dagit/helisp | src/X86_64Inst.hs | bsd-3-clause | 1,793 | 0 | 12 | 513 | 866 | 429 | 437 | 48 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module System.FastLogger
( Logger
, timestampedLogEntry
, combinedLogEntry
, newLogger
, newLoggerWithCustomErrorFunction
, logMsg
, stopLogger
) where
-... | afcowie/new-snap-server | src/System/FastLogger.hs | bsd-3-clause | 10,659 | 3 | 17 | 3,995 | 1,768 | 930 | 838 | 179 | 1 |
module Y2015.Day24 (answer1, answer2) where
import Data.List (nub, sortBy, minimumBy, sortOn)
import Control.Arrow (first)
import Control.Monad.Trans.State
import Control.Monad (guard)
answer1 :: IO ()
answer1 =
let
target = sum weights `quot` 3
firstGroups =
sortOn (length . fst) $ se... | geekingfrog/advent-of-code | src/Y2015/Day24.hs | bsd-3-clause | 2,293 | 0 | 15 | 750 | 745 | 421 | 324 | 68 | 4 |
module AnimPaint where
import Rumpus
import qualified Data.Sequence as Seq
maxBlots = 1000
start :: Start
start = do
initialPosition <- getPosition
setState (initialPosition, Seq.empty :: Seq EntityID)
myDragContinues ==> \_ -> withState $ \(lastPosition, blots) -> do
newPose <- get... | lukexi/rumpus | pristine/Painting/AnimPaint.hs | bsd-3-clause | 1,310 | 0 | 28 | 556 | 346 | 169 | 177 | 29 | 1 |
{-# LANGUAGE ViewPatterns, TupleSections, PatternGuards, BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module Supercompile.Drive (supercompile) where
import Supercompile.Match
import Supercompile.Residualise
import Supercompile.Split
import Core.FreeVars
import Core.Renaming
import Core.Syntax
import... | batterseapower/supercompilation-by-evaluation | Supercompile/Drive.hs | bsd-3-clause | 6,032 | 0 | 21 | 1,449 | 1,996 | 1,060 | 936 | 114 | 4 |
module Hive.Error
( HiveError(..)
, displayHiveError
) where
import Mitchell.Prelude
import Data.HexBoard (BoardIndex)
import Hive.Bug
data HiveError
= OneHiveRule
| FreedomToMoveRule BoardIndex BoardIndex
| NoSuchBug Bug [Bug]
| NoQueenByTurn4
| IndexOutOfBounds BoardIndex
| PlaceOnOccupiedCell
... | mitchellwrosen/hive | hive/src/Hive/Error.hs | bsd-3-clause | 2,311 | 0 | 12 | 509 | 390 | 206 | 184 | -1 | -1 |
module Shopskell where
import Shopskell.Internal
| thaume/shopskell | src/Shopskell.hs | bsd-3-clause | 50 | 0 | 4 | 6 | 9 | 6 | 3 | 2 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module System.MassFileSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Data.Time
import System.MassFile
main :: IO ()
main = hspec spec
dayStub :: Integer -> UTCTime
dayStub n = (UTCTime (ModifiedJulianDay n) (fromIntegral n))
nextDayStub :: UTCTime
nextD... | smurphy8/massFileHandler | test/System/MassFileSpec.hs | bsd-3-clause | 1,251 | 0 | 18 | 286 | 370 | 188 | 182 | 25 | 1 |
module Scheduler where
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Monad
import Data.Map (Map(..))
import Data.Maybe
import Data.Time
import qualified Data.Map as Map
import ThreadManager
import Util
data Scheduler = Scheduler { manager :: ThreadManager,
loc... | Ornedan/dom3statusbot | Scheduler.hs | bsd-3-clause | 2,363 | 0 | 16 | 661 | 795 | 403 | 392 | 53 | 1 |
{-# LANGUAGE RecordWildCards, ScopedTypeVariables, PatternGuards #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
module Development.Shake.Database(
Time, offsetTime, Duration, duration, Trace,
Database, withDatabase,
Ops(..), build, Depends,
pr... | nh2/shake | Development/Shake/Database.hs | bsd-3-clause | 19,144 | 8 | 32 | 6,219 | 6,355 | 3,214 | 3,141 | 329 | 24 |
quickSort :: Ord a => [a] -> [a]
quickSort [] = []
quickSort (x:xs) = quickSort(left) ++ [ x ] ++ quickSort(right)
where
left = [y | y <- xs, y < x]
right = [z | z <- xs, z >= x]
| zubie7a/Programming_Paradigms | 3_Functional_Programming/Haskell_2_Quicksort/quicksort.hs | mit | 223 | 0 | 9 | 87 | 123 | 65 | 58 | 5 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Fun.Quiz.Type where
import Autolib.Reader
import Autolib.ToDoc
import Data.Typeable
data Fun_Quiz2 = Fun_Quiz2 deriving ( Eq, Ord, Read, Show, Typeable )
$(derives [makeReader, makeToDoc] [''Fun_Quiz2])
data Param = Param
{ expression_size :: Int
, table_size :: Int... | florianpilz/autotool | src/Fun/Quiz/Type.hs | gpl-2.0 | 526 | 6 | 9 | 102 | 160 | 93 | 67 | 15 | 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 #-}
-- ... | fmapfmapfmap/amazonka | amazonka-dynamodb/gen/Network/AWS/DynamoDB/Query.hs | mpl-2.0 | 37,492 | 0 | 17 | 7,597 | 2,956 | 1,931 | 1,025 | 252 | 1 |
-- Module : Network.AWS.Internal
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- you can obt... | brendanhay/amazonka-limited | src/Network/AWS/Internal.hs | mpl-2.0 | 1,148 | 0 | 4 | 268 | 119 | 93 | 26 | 14 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/CreateDataSourceFromRedshift.hs | mpl-2.0 | 9,508 | 0 | 9 | 1,733 | 787 | 495 | 292 | 86 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module Servers.MainServer where
import Lib.ServantHelpers
import Servant.API
import Servers.AdminServer
import Servers.AuthServer
import Servers.ProjectServer
import Servers.TenantServer
type Mai... | virtualsaleslab/simplestore | src/Servers/MainServer.hs | unlicense | 601 | 0 | 7 | 193 | 94 | 54 | 40 | 20 | 1 |
{- |
Composable statistics. See
* <http://squing.blogspot.com/2008/11/beautiful-folding.html>
* <http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=232>
-}
{-# LANGUAGE ExistentialQuantification #-}
module Math.Probably.FoldingStats where
import Control.Applicative
import Data.Foldable
data Fold b c = forall a. F ... | glutamate/probably | Math/Probably/FoldingStats.hs | bsd-3-clause | 5,601 | 16 | 22 | 1,537 | 2,880 | 1,544 | 1,336 | 120 | 2 |
{-# OPTIONS -fno-warn-orphans #-}
module Main (main) where
import Control.DeepSeq
import Criterion.Main
import Network
import Network.BitTorrent.Exchange.Protocol as BT
import Data.Torrent.Block as BT
import Data.Torrent.Bitfield as BT
instance NFData PortNumber where
rnf = rnf . (fromIntegral :: PortNumber -> In... | DavidAlphaFox/bittorrent | bench/Main.hs | bsd-3-clause | 989 | 0 | 8 | 206 | 306 | 165 | 141 | 25 | 1 |
module Blockchain.Communication (
recvMsg,
sendMsg
) where
import Control.Monad.IO.Class
import Control.Monad.Trans
import Data.Binary.Put
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import System.IO
import Blockchain.Data.RLP
import Blockchain.Context
import Blockchain.D... | jamshidh/ethereum-vm | src/Blockchain/Communication.hs | bsd-3-clause | 1,363 | 0 | 12 | 209 | 415 | 210 | 205 | 40 | 1 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, TypeSynonymInstances #-}
-- |
-- Module : Where
-- Copyright : 2003 Shae Erisson
--
-- License: lGPL
--
-- Slightly specialised version of Where for associating projects with their urls.
-- Code almost all copied.
module Plugin.Where (theModule) where
import... | dmalikov/lambdabot | Plugin/Where.hs | mit | 2,326 | 0 | 13 | 594 | 540 | 279 | 261 | 40 | 5 |
import System
infinity = 1/0
delta = sqrt e where e = encodeFloat (floatRadix e) (-floatDigits e)
infixl 7 .*, *|
data Vector = V !Double !Double !Double deriving (Show, Eq)
s *| V x y z = V (s * x) (s * y) (s * z)
instance Num Vector where
V x y z + V x' y' z' = V (x + x') (y + y') (z + z')
V x y z - V x' y' z... | hvr/jhc | regress/tests/7_large/RayT.hs | mit | 3,400 | 24 | 23 | 1,152 | 2,104 | 1,058 | 1,046 | 100 | 4 |
{-# LANGUAGE TypeFamilies #-}
module Kind where
import Data.Kind (Type)
class C (a :: Type -> Type) where
type T a
foo :: a x -> T a
foo = undefined
| sdiehl/ghc | testsuite/tests/indexed-types/should_compile/Kind.hs | bsd-3-clause | 156 | 0 | 8 | 38 | 58 | 33 | 25 | -1 | -1 |
{-
Copyright (C) 2007-2015 John MacFarlane <jgm@berkeley.edu>
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 License, or
(at your option) any later version.
This program is ... | gbataille/pandoc | src/Text/Pandoc/Readers/TeXMath.hs | gpl-2.0 | 1,801 | 0 | 12 | 429 | 152 | 87 | 65 | 13 | 3 |
{-# LANGUAGE TypeFamilies, GADTs #-}
module T8368 where
data Foo = Bar
data family Fam a
data instance Fam a where
MkFam :: Foo
| ghc-android/ghc | testsuite/tests/indexed-types/should_fail/T8368.hs | bsd-3-clause | 135 | 0 | 5 | 31 | 31 | 20 | 11 | 6 | 0 |
module Main(main) where
import Numeric
import Data.Ratio
main = print ((fromRat (132874 % 23849))::Double)
| beni55/ghcjs | test/pkg/base/Numeric/num001.hs | mit | 109 | 0 | 10 | 16 | 44 | 26 | 18 | 4 | 1 |
module Graphics.UI.SDL00Spec where
--import Graphics.UI.SDL00
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "RTLD LIBSDL" $ do
it "load/free libsdl" $ do
pending
| kkardzis/sdlhs | test/Graphics/UI/SDL00Spec.hs | isc | 217 | 0 | 12 | 51 | 64 | 33 | 31 | 9 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Universe.Objects.Celestial (
CelestialBody(..)
, Star(..)
, StarSpectrumClass(..)
, StarLifeStage(..)
, Planet(..)
, PlanetClass(..)
, Comet(..)
, Asteroid(..)
) where
import Universe.Objects
data StarSpectrumClass = TODO -- TODO
data StarLifeStage = TODO' ... | fehu/hgt | core-universe/src/Universe/Objects/Celestial.hs | mit | 846 | 0 | 7 | 215 | 238 | 138 | 100 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
module HsToCoq.Plugin (plugin) where
import Data.Text (pack)
import Control.Monad.IO.Class
import System.IO
import GhcPlugins hiding (vcat)
import Unique
import TcType... | antalsz/hs-to-coq | src/lib/HsToCoq/Plugin.hs | mit | 5,931 | 4 | 15 | 1,834 | 2,209 | 1,127 | 1,082 | 153 | 1 |
{- |
Module : Main
Description : Entry point. Parses command line arguments and runs program
Copyright : (c) Peter Uhlenbruck 2017
License : MIT Licence
-}
module Main where
import System.Environment
import Interpreter
import System.IO as IO
import Data.ByteString.Lazy as BS
main :: IO ()
main = do
... | puhlenbruck/hf | app/Main.hs | mit | 1,065 | 0 | 10 | 204 | 255 | 137 | 118 | 17 | 1 |
module L.Util.Utils
(
(|>)
,bind2
,bind3
,endsWith
,extract
,mkString
,strip
,zipWithIndex
) where
import Data.List
(|>) :: (a -> b) -> (b -> c) -> a -> c
(|>) = flip (.)
mkString :: String -> [String] -> String
mkString s l = concat $ intersperse s l
endsWith :: String -> String -> Boo... | joshcough/L5-Haskell | src/L/Util/Utils.hs | mit | 962 | 0 | 11 | 260 | 498 | 263 | 235 | 35 | 3 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.MutationEvent (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.MutationEvent
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Gener... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/MutationEvent.hs | mit | 352 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
module Zwerg.Options where
import Zwerg.Prelude
data Options = Options
{ effectsLevel :: Int
, backgroundLevel :: Int
}
defaultOptions :: Options
defaultOptions = Options
{ effectsLevel = 5
, backgroundLevel = 5
}
| zmeadows/zwerg | lib/Zwerg/Options.hs | mit | 235 | 0 | 8 | 54 | 56 | 35 | 21 | 9 | 1 |
{-|
Module : Haste.GAPI.GPlus.Person
Description : Functions for working on persons
Copyright : (c) Jonathan Skårstedt, 2016
License : MIT
Maintainer : jonathan.skarstedt@gmail.com
Stability : experimental
Portability : Haste
Functions which maps to the Google API
-}
module Haste.GAPI.GPlus.Person where
... | nyson/haste-gapi | Haste/GAPI/GPlus/Person.hs | mit | 372 | 0 | 3 | 63 | 13 | 10 | 3 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html
module Stratosphere.Resources.ApiGatewayApiKey where
import Stratosphere.ResourceImport... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/ApiGatewayApiKey.hs | mit | 4,195 | 0 | 14 | 501 | 733 | 417 | 316 | 55 | 1 |
module Problem0002 where
fibonaccis = 1 : 2 : zipWith (+) fibonaccis (tail fibonaccis)
evenFibonaccisLessThan maxNumber = [x | x <- takeWhile (<= maxNumber) fibonaccis, x `mod` 2 == 0]
sumOfEvenFibonacciesLessThan :: Integer -> Integer
sumOfEvenFibonacciesLessThan maxNumber = sum (evenFibonaccisLessThan maxNumbe... | Sobieck00/practice | pe/nonvisualstudio/haskell/OldWork/Implementation/Problem0002.hs | mit | 323 | 0 | 9 | 48 | 100 | 54 | 46 | 5 | 1 |
{-# LANGUAGE OverloadedStrings, LambdaCase #-}
module Abyss.Game (initGame, Action (..)) where
import Prelude hiding ((.), id)
import Abyss.Stats
import Abyss.Item (Item)
import qualified Abyss.Item as Item
import qualified Abyss.Spell as Spell
import qualified Abyss.Monster as Monster
import Core.Types
import Core.E... | jameshsmith/HRL | Server/Abyss/Game.hs | mit | 6,283 | 0 | 17 | 2,020 | 2,304 | 1,194 | 1,110 | 168 | 6 |
-- Informatics 1 - Functional Programming
-- Lab week tutorial part II
--
--
import Data.Char
import PicturesSVG
import Test.QuickCheck
import Data.List.Split
-- Exercise 1
-- write the correct type and the definition for
isFENChar :: Char -> Bool
isFENChar ch = elem (toLower ... | PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator2/lab2chess.hs | cc0-1.0 | 3,556 | 0 | 10 | 922 | 815 | 439 | 376 | 59 | 2 |
-- -*- mode: haskell -*-
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, UndecidableInstances, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances #-}
module Fun.Cache
-- $Id$
( Cache -- abstrakt
, empty
, find
, insert
)
where
import Prelude hiding ( lookup )
import Autolib.FiniteMap
import Autolib.... | Erdwolf/autotool-bonn | src/Fun/Cache.hs | gpl-2.0 | 904 | 2 | 9 | 217 | 338 | 178 | 160 | -1 | -1 |
{-|
Print some statistics for the journal.
-}
{-# LANGUAGE OverloadedStrings #-}
module Hledger.Cli.Commands.Stats (
statsmode
,stats
)
where
import Data.List
import Data.Maybe
import Data.Ord
import Data.HashSet (size, fromList)
-- import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Calend... | ony/hledger | hledger/Hledger/Cli/Commands/Stats.hs | gpl-3.0 | 4,723 | 0 | 14 | 1,413 | 1,248 | 662 | 586 | 81 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Controllers.HomeController(
) where
import Controller.Types(Action)
import Controller(defaultControllerResponse, responseBadRequest)
--import Routing(findRoute)
import qualified DB
| shinjiro-itagaki/shinjirecs | shinjirecs-api/src/Controllers/HomeController.hs | gpl-3.0 | 299 | 0 | 5 | 29 | 38 | 26 | 12 | 7 | 0 |
module P21NumToNameSpec (main,spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck((==>))
import Control.Exception(evaluate) -- for testing errors thrown by pure code
import P21NumToName hiding (main)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "getMonth" $ do
... | ciderpunx/57-exercises-for-programmers | test/P21NumToNameSpec.hs | gpl-3.0 | 2,829 | 0 | 16 | 822 | 714 | 348 | 366 | 70 | 1 |
#! /usr/bin/env nix-shell
#! nix-shell -i runhaskell
#! nix-shell -E "let ghc = n.haskellPackages.ghcWithPackages (p: [p.base-unicode-symbols p.X11]); d = n.mkShell { buildInputs = [ghc]; }; n = import (fetchTarball { url = \"https://github.com/NixOS/nixpkgs/archive/a3fa481cb683d619ab9e1a64877f3c0c5fd24f40.tar.gz\"; sh... | unclechu/place-cursor-at | src/place-cursor-at.hs | gpl-3.0 | 18,643 | 0 | 22 | 5,085 | 5,599 | 2,984 | 2,615 | -1 | -1 |
{-# LANGUAGE CPP, OverloadedStrings #-}
{-|
hledger-web - a hledger add-on providing a web interface.
Copyright (c) 2007-2012 Simon Michael <simon@joyful.com>
Released under GPL version 3 or later.
-}
module Hledger.Web.Main
where
-- yesod scaffold imports
import Yesod.Default.Config --(fromArgs)
-- import Yesod.De... | mstksg/hledger | hledger-web/Hledger/Web/Main.hs | gpl-3.0 | 3,613 | 0 | 17 | 823 | 837 | 437 | 400 | 68 | 2 |
module Nacc where
import Data.List
--import Data.Tuple.Select
import Text.Printf
import Types
import Utils
alt :: Acc -> [Nacc] -> Acc
alt acc naccs =
altAcc
where
nacc = find (\n -> acc == (ncAcc n)) naccs
altAcc = case nacc of
Just n -> ncAlt n
Nothing -> "Error: couldn't find alt nacc" --... | blippy/sifi | src/Nacc.hs | gpl-3.0 | 624 | 0 | 12 | 152 | 206 | 108 | 98 | 20 | 2 |
-- Tests the assembler by reading in the files from the ASM program directory
-- and testing the assembled result against the matching files in the HACK program directory
import Hack.Assembler
import Control.Arrow ((***))
import Control.Monad (when)
import Data.Char (digitToInt)
import Data.Word (Word16)
import Syste... | goakley/Hackskell | src/tests/test_assembler.hs | gpl-3.0 | 1,735 | 0 | 18 | 327 | 691 | 380 | 311 | 33 | 1 |
module Math.Structure.Ring.Division
where
import Prelude hiding ( (+), (-), negate, subtract
, (*), (/), recip, (^), (^^)
)
import Math.Structure.Additive
import Math.Structure.Multiplicative
import Math.Structure.Ring.Integral
class (IntegralDomain r, MultiplicativeGrou... | martinra/algebraic-structures | src/Math/Structure/Ring/Division.hs | gpl-3.0 | 353 | 2 | 8 | 82 | 100 | 67 | 33 | -1 | -1 |
-- Copyright © 2014 Bart Massey
-- Based on material Copyright © 2013 School of Haskell
-- https://www.fpcomplete.com/school/advanced-haskell/
-- building-a-file-hosting-service-in-yesod
-- This work is made available under the "GNU AGPL v3", as
-- specified the terms in the file COPYING in this
-- distribution.
{-... | BartMassey/hgallery | Handler/Down.hs | agpl-3.0 | 802 | 0 | 11 | 142 | 138 | 72 | 66 | 15 | 1 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell, TypeFamilies #-}
module Model.Party.Types
( PartyRow(..)
, Party(..)
, Loaded(..)
, loadedToMaybe
, Account(..)
, getPartyId
, SiteAuth(..)
, nobodyParty
, rootParty
, staffParty
, nobodySiteAuth
, blankParty
, blankAccount
) where
import qua... | databrary/databrary | src/Model/Party/Types.hs | agpl-3.0 | 5,196 | 0 | 15 | 1,197 | 1,058 | 621 | 437 | -1 | -1 |
--
-- Copyright (C) 2004-5 Don Stewart - http://www.cse.unsw.edu.au/~dons
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) a... | sheganinans/plugins | src/System/Eval/Haskell.hs | lgpl-2.1 | 11,677 | 0 | 19 | 3,114 | 1,674 | 879 | 795 | 121 | 3 |
-- | Tutorial example based on
-- http://haskell-distributed-next.github.io/tutorials/ch-tutorial1.html
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Control.Distributed.Process
import Control.Distributed.Process.Node
import Network.Transport.TCP (createTransport, defaultTCPParameters)
... | alanz/cloud-haskell-play | src/tut1.hs | unlicense | 1,672 | 0 | 16 | 340 | 333 | 168 | 165 | 27 | 2 |
fib = (!!) fibs . pred
where fibs = 0 : 1 : map f [2..]
f n = (fibs !! (n - 2)) + (fibs !! (n - 1))
-- This part is related to the Input/Output and can be used as it is
-- Do not modify it
main = do
input <- getLine
print . fib . (read :: String -> Int) $ input
| itsbruce/hackerrank | func/recur/fibs.hs | unlicense | 285 | 0 | 11 | 90 | 117 | 63 | 54 | 6 | 1 |
module Palindromes.A298481 (a298481)where
import Helpers.PalindromicPartition (binaryRepresentation, postPalindromeTails)
a298481 :: Int -> Int
a298481 n = recurse 0 [binaryRepresentation n] where
recurse k tails
| count > 0 = count
| otherwise = recurse (k + 1) (concatMap postPalindromeTails tails) where
... | peterokagey/haskellOEIS | src/Palindromes/A298481.hs | apache-2.0 | 362 | 0 | 11 | 65 | 123 | 64 | 59 | 8 | 1 |
{-# LANGUAGE TypeFamilies, TypeOperators, FlexibleContexts,
MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables,
UndecidableInstances #-}
{- |
Module : Data.YokoRaw
Copyright : (c) The University of Kansas 2012
License : BSD3
Maintainer : nicolas.frisby@gmail.com
Stability : experime... | nfrisby/yoko | Data/YokoRaw.hs | bsd-2-clause | 4,705 | 0 | 10 | 982 | 1,136 | 627 | 509 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : Opengl.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:14
Warning : this file is machine generated - do not mo... | uduki/hsQt | Qtc/Opengl.hs | bsd-2-clause | 1,533 | 0 | 5 | 196 | 226 | 159 | 67 | 34 | 0 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QDialog.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:14
Warning : this file is machine generated - do not m... | uduki/hsQt | Qtc/Gui/QDialog.hs | bsd-2-clause | 46,205 | 0 | 14 | 7,875 | 15,912 | 8,066 | 7,846 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Web.Pagure.Users
-- Copyright : (C) 2015 Ricky Elrod
-- License : BSD2 (see LICENSE file)
-- Maintainer : Ricky Elrod <relrod@redhat.com>
-- Stability : experimental
-- Portability : ghc (le... | fedora-infra/pagure-haskell | src/Web/Pagure/Users.hs | bsd-2-clause | 2,150 | 0 | 15 | 371 | 387 | 216 | 171 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}
-- | Simple code motion transformation performing common sub-expression elimination and variable
-- hoi... | emwap/feldspar-language | src/Language/Syntactic/Sharing/SimpleCodeMotion3.hs | bsd-3-clause | 9,687 | 0 | 16 | 2,579 | 2,878 | 1,471 | 1,407 | -1 | -1 |
{-# Language FlexibleContexts #-}
-- | Names specific to western music tradition
module Temporal.Music.Western(
-- * Basic functions
-- | All basic functions (composition, time stretching,
-- dynamic changing of volume and pitch etc, etc) live in this module.
module Temporal.Music,
-- * Volume
... | spell-music/temporal-music-notation-western | src/Temporal/Music/Western.hs | bsd-3-clause | 4,623 | 8 | 8 | 1,094 | 1,024 | 627 | 397 | 79 | 1 |
{-
Texture3D.hs (adapted from texture3d.c which is (c) Silicon Graphics, Inc)
Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de>
This file is part of HOpenGL and distributed under a BSD-style license
See the file libraries/GLUT/LICENSE
This program demonstrates using a three-dimensional texture.... | FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/examples/RedBook/Texture3D.hs | bsd-3-clause | 3,479 | 0 | 14 | 799 | 1,114 | 541 | 573 | 71 | 1 |
module Main where
import Language.Haskell.Exts.Pretty (prettyPrint)
import Language.Haskell.Exts.Syntax
import System.Environment
import qualified Data.Map as M
import Text.Printf
import DSL
import Combinators
import Utils
convertors =
[ ("Word8", ("W8#", "indexWord8OffAddr#"))
, ("Word", ("W#", "indexWord8Of... | vincenthz/hs-gen-storable | src/GenTable.hs | bsd-3-clause | 5,833 | 0 | 30 | 2,804 | 1,642 | 826 | 816 | 94 | 11 |
module Data.BtcExchanges (
Currency (..)
, CurrencyPair (..)
, Exchange (..)
, counter
, base
) where
data Exchange = Btce | Campbx | Bitstamp deriving (Show, Eq, Read)
data Currency = USD | AUD | CAD | CHF | CNY | DKK | EUR | GBP | HKD | JPY | NZD | PLN | RUB | SEK | SGD | THB | BTC | LTC de... | RobinKrom/BtcExchanges | src/Data/BtcExchanges.hs | bsd-3-clause | 2,216 | 0 | 6 | 805 | 663 | 360 | 303 | 83 | 1 |
module EFA.IO.PLTParser where
import EFA.Signal.Record (SigId(SigId))
import EFA.IO.Parser (number, eol)
import Text.ParserCombinators.Parsec
import Control.Applicative ((*>), liftA2)
import Control.Monad.HT (void)
type Tables v = ([v], [Table v])
type Table v = (SigId, [v])
datasetToken :: Parser ()
datasetToke... | energyflowanalysis/efa-2.1 | src/EFA/IO/PLTParser.hs | bsd-3-clause | 1,026 | 0 | 10 | 181 | 427 | 235 | 192 | 28 | 1 |
{-# OPTIONS -Wall -fno-warn-missing-signatures #-}
module TweetProxy.Types where
data Config = Config {
configListen :: Int,
configKey :: String,
configSecret :: String
}
| passy/tweetproxy | src/TweetProxy/Types.hs | bsd-3-clause | 185 | 0 | 8 | 37 | 34 | 22 | 12 | 6 | 0 |
module Framework.Location.Api where
import Data.Text
import Control.Monad.Reader hiding ( join )
import Control.Monad.Error ( throwError )
import Control.Monad.State ( get )
import Framework.Profile as Profile
import Common.Location.Types
import DB.Location.LocationAction
import Common.Location.Instances.Create
impor... | ojw/admin-and-dev | src/Framework/Location/Api.hs | bsd-3-clause | 2,751 | 0 | 9 | 423 | 647 | 339 | 308 | 64 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.