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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Network.Orchid.Format.Pdf (fPdf) where
import Control.Monad (liftM)
import Data.ByteString.Lazy hiding (writeFile)
import Data.FileStore (FileStore)
import Network.Orchid.Core.Format
import Prelude hiding (readFile)
import System.Process (waitForProcess, runProcess)
import Text.Document.Document
fPdf :: WikiFo... | sebastiaanvisser/orchid | src/Network/Orchid/Format/Pdf.hs | bsd-3-clause | 920 | 0 | 11 | 148 | 210 | 115 | 95 | 19 | 1 |
module HMQ.Query where
-- Copyright (c) 2008 Stephen C. Harris.
-- See COPYING file at the root of this distribution for copyright information.
import Data.Maybe
import HMQ.Metadata.TableMetadata
import HMQ.Utils.Strings
data Query =
Query
{
selectFields :: [(String, Maybe String)],
fr... | scharris/hmq | Query.hs | bsd-3-clause | 1,275 | 6 | 18 | 343 | 333 | 185 | 148 | 31 | 3 |
module Snippet where
import Haskore.Music.GeneralMIDI as MidiMusic
import Haskore.Interface.MIDI.Render as Render
-- c_major
render_to f m = Render.fileFromGeneralMIDIMusic f song where
song = MidiMusic.fromMelodyNullAttr MidiMusic.AcousticGrandPiano m
-- bach's prelude
export_to f v = render_to $ concat ["midi/",... | nfjinjing/haskore-guide | src/Snippet.hs | bsd-3-clause | 645 | 0 | 8 | 118 | 211 | 117 | 94 | 11 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Futhark.Representation.Kernels.Simplify
( simplifyKernels
, simplifyFun
)
wher... | CulpaBS/wbBach | src/Futhark/Representation/Kernels/Simplify.hs | bsd-3-clause | 13,870 | 0 | 27 | 3,644 | 4,346 | 2,165 | 2,181 | 280 | 4 |
{-|
Module : Data.Tree.Utils
Description : Several utilities for manipulating `Tree`s
Copyright : (c) Michael Klein, 2016
License : BSD3
Maintainer : lambdamichael(at)gmail.com
`TextShow` instances for `Tree`s.
Several general and specialized filters for `Tree`s.
`Tree` and `Forest` union(by).
-}
{-# LANG... | michaeljklein/git-details | src/Data/Tree/Utils.hs | bsd-3-clause | 5,407 | 0 | 11 | 1,598 | 1,180 | 622 | 558 | 69 | 3 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.VI.Corpus
( corpus
, negativeCorpus
) where
import... | facebookincubator/duckling | Duckling/Time/VI/Corpus.hs | bsd-3-clause | 13,439 | 0 | 11 | 5,531 | 4,271 | 2,601 | 1,670 | 281 | 1 |
{-# LANGUAGE MultiParamTypeClasses,TypeFamilies #-}
module Examples.Applyable.TestQQ where
import QuickWeave.Runtime.Applyable as QRApp
import QuickWeave.QuasiQuoter
data Exp = Var String
| App Exp Exp
deriving Show
instance Applyable Exp Exp where
type Result Exp Exp = Exp
fromApp = App
... | shayan-najd/QuickWeave | Examples/Applyable/ApplyQQ.hs | bsd-3-clause | 462 | 0 | 6 | 95 | 80 | 49 | 31 | 11 | 1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
-------------------------------------------------------------------------------------
-- | SSA Monad ----------------------------------------------------------------------
-------------------------------------------------------------... | UCSD-PL/nano-js | Language/Nano/SSA/SSAMonad.hs | bsd-3-clause | 6,215 | 0 | 15 | 1,298 | 1,127 | 618 | 509 | 88 | 2 |
module Main where
import Control.Applicative
import Control.Concurrent
import Control.Exception
import Control.Monad
import qualified Data.ByteString as BS
import Data.Either
import Data.Maybe
import Data.Text (pack)
import Data.Text.Encoding (encodeUtf8)
import Network (listenOn, PortID(..), PortNumber)
import Netw... | coreyoconnor/tiny-http-hp | TinyHttp.hs | bsd-3-clause | 1,966 | 0 | 17 | 581 | 502 | 257 | 245 | 43 | 2 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamili... | kylcarte/lnfunctors | src/Control/LnMonad/Reader.hs | bsd-3-clause | 1,716 | 0 | 12 | 405 | 744 | 392 | 352 | 52 | 1 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Data.Kicad.SExpr.Parse
( parse
, parseWithFilename
)
where
import Text.ParserCombinators.Parsec hiding (spaces, parse)
import qualified Text.ParserCombinators.Parsec as Parsec (parse)
import Text.Parsec.Char (endOfLine)... | kasbah/haskell-kicad-data | Data/Kicad/SExpr/Parse.hs | mit | 1,937 | 0 | 15 | 506 | 479 | 236 | 243 | 56 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.MPD.Applicative.Status
Copyright : (c) Joachim Fasting 2012
License : MIT
Maintainer : joachim.fasting@gmail.com
Stability : stable
Portability : unportable
Querying MPD's status.
-}
module Network.MPD.Applicative.Status
( clearError
, c... | sol/libmpd-haskell | src/Network/MPD/Applicative/Status.hs | mit | 5,472 | 0 | 18 | 2,252 | 1,357 | 737 | 620 | 83 | 26 |
import Text.Printf
main = do
putStrLn ("Joining " ++ "strings.")
putStrLn "First line\nSecond line"
let value = 3
printf "The value %s is interpolated" (show value)
| Bigsby/langs | src/hs/strings.hs | apache-2.0 | 183 | 0 | 9 | 44 | 53 | 24 | 29 | 6 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE... | cchalmers/optical | src/Optical/Bit.hs | bsd-3-clause | 9,343 | 0 | 14 | 2,144 | 2,880 | 1,465 | 1,415 | 230 | 1 |
{-# language CPP #-}
#ifndef ENABLE_INTERNAL_DOCUMENTATION
{-# OPTIONS_HADDOCK hide #-}
#endif
module OpenCV.Internal.C.PlacementNew ( PlacementNew(..) ) where
import "base" Foreign.Ptr ( Ptr )
--------------------------------------------------------------------------------
-- | Copy source to destination using C+... | lukexi/haskell-opencv | src/OpenCV/Internal/C/PlacementNew.hs | bsd-3-clause | 1,017 | 0 | 10 | 244 | 98 | 62 | 36 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module T14174a where
import Data.Kind
data TyFun :: * -> * -> *
type a ~> b = TyFun a b -> *
infixr 0 ~>
type family Apply (f :: k1 ~> k2) (x :: k1) :: k2
ty... | shlevy/ghc | testsuite/tests/polykinds/T14174a.hs | bsd-3-clause | 1,602 | 13 | 13 | 511 | 587 | 337 | 250 | -1 | -1 |
{-
Author: George Karachalias <george.karachalias@cs.kuleuven.be>
Pattern Matching Coverage Checking.
-}
{-# LANGUAGE CPP, GADTs, DataKinds, KindSignatures #-}
module Check (
-- Checking and printing
checkSingle, checkMatches, isAnyPmCheckEnabled,
-- See Note [Type and Term Equality Propagat... | tjakway/ghcjvm | compiler/deSugar/Check.hs | bsd-3-clause | 58,895 | 1 | 22 | 14,583 | 11,370 | 5,926 | 5,444 | -1 | -1 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Network/Wai/Handler/Warp/HTTP2/Types.hs" #-}
{-# LANGUAGE OverloadedStrings, CPP #-}
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-}
{-# LANGUAGE BangPatterns #-}... | phischu/fragnix | tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.Types.hs | bsd-3-clause | 10,994 | 0 | 19 | 2,823 | 2,563 | 1,364 | 1,199 | 309 | 2 |
{-
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... | Ye-Yong-Chi/codeworld | codeworld-base/src/GHC/Fingerprint/Type.hs | apache-2.0 | 755 | 0 | 4 | 136 | 25 | 19 | 6 | 4 | 0 |
{-
types:
A__dummy :: (*, data)
values:
p :: A__dummy -> Bool
A__dummy :: A__dummy
scope:
Prelude.A__dummy |-> Prelude.A__dummy, Type [A__dummy] []
Prelude.A__dummy |-> Prelude.A__dummy, con of A__dummy
Prelude.p |-> Prelude.p, Value
A__dummy |-> Prelude.A__dummy, Type [A__dummy] []
A__dummy |-> Prelude.A__dummy, co... | mariefarrell/Hets | ToHaskell/test/Builtin.hascasl.hs | gpl-2.0 | 669 | 0 | 11 | 178 | 117 | 67 | 50 | 11 | 2 |
module A1 where
fib n
| n <= 1 = 1
| otherwise = n1 + n2 + 1
where
n1 = fib (n-1)
n2 = fib (n-2)
n1_2 = "bob"
| RefactoringTools/HaRe | old/testing/evalMonad/A1.hs | bsd-3-clause | 142 | 0 | 9 | 63 | 76 | 39 | 37 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.Ex.Commands.Cabal
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
module Yi.Keymap.Vim.Ex.Commands.Cabal (parse) where
import ... | siddhanathan/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Cabal.hs | gpl-2.0 | 1,517 | 0 | 13 | 431 | 282 | 176 | 106 | 20 | 1 |
module HAD.Y2014.M03.D26.Exercise
( Board
, board
, getList
, Direction (..)
, viewFrom
) where
import Data.List (groupBy)
import Control.Applicative ((<*>))
import Control.Monad (liftM, replicateM)
import Test.QuickCheck
-- Preamble
-- $setup
-- >>> import Control.Applicative ((<$>), (<*>))
-- >>> impo... | 1HaskellADay/1HAD | exercises/HAD/Y2014/M03/D26/Exercise.hs | mit | 1,798 | 0 | 10 | 371 | 334 | 204 | 130 | 22 | 1 |
import Sound.Tidal.Tempo (Tempo, logicalTime, clocked, clockedTick, bps)
import Sound.OSC.FD
import Sound.OSC.Datum
--import Sound.OpenSoundControl
--import Sound.OSC.FD
import System.IO
import Control.Concurrent
mykip = "192.168.178.135";
mykport = 57120
main :: IO ()
main = do myk <- openUDP mykip mykport
... | kindohm/Tidal | sync/Canute.hs | gpl-3.0 | 803 | 1 | 16 | 187 | 300 | 151 | 149 | 21 | 1 |
module StablePtr (module Foreign.StablePtr) where
import Foreign.StablePtr
| FranklinChen/hugs98-plus-Sep2006 | packages/haskell98/StablePtr.hs | bsd-3-clause | 75 | 0 | 5 | 7 | 17 | 11 | 6 | 2 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-- This module contains logic pertaining to camliType "email"
module Shed.Blob.Email where
import Control.Arrow ((***))
import Control.Logging (log')
import Control.Monad (when)
import Data.Aeson
import ... | dbp/shed | src/Shed/Blob/Email.hs | isc | 6,011 | 0 | 22 | 1,977 | 1,799 | 940 | 859 | 111 | 2 |
-- Part 1: State monad as a functor
module Session5.State (test) where
import Prelude
data State s a = State (s -> (a, s))
instance Functor (State s) where
fmap g (State f) = State (\st -> let (a, st') = f st
b = g a
in (b, st'))
(>=... | seahug/pcph-scratch | src/Session5/State.hs | mit | 634 | 0 | 13 | 287 | 290 | 154 | 136 | 20 | 1 |
module Graphics.Cogh.Image
( newTextureFromImage
) where
import Foreign.C
import Foreign.Ptr
import Graphics.Cogh.Render
import Graphics.Cogh.Window.Internal
type ImagePtr = Ptr ()
newTextureFromImage :: Window -> FilePath -> IO Texture
newTextureFromImage w file = do
cTexture <- withCString file $ \cString ->... | ivokosir/cogh | src/Graphics/Cogh/Image.hs | mit | 497 | 0 | 10 | 84 | 127 | 68 | 59 | 13 | 1 |
{-# LANGUAGE MultiParamTypeClasses
, RankNTypes
, TemplateHaskell
#-}
-- in comments, [q| xxx |] is intended to mean 'like [| xxx |], but outside
-- of the Q monad
{- |
Description : embedded 'option types' for use in OptDesc descriptor strings
Copyright : (c) Martyn J. Pearce 2014, 2015
Li... | sixears/getopt | src/Console/Getopt/OTypes.hs | mit | 16,768 | 1 | 15 | 6,214 | 2,312 | 1,328 | 984 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-} -- allows "forall t. NetworkDescription t"
module Main where
import Control.Monad (when)
import Data.Maybe (isJust, fromJust)
import Data.List (nub)
import System.Random
import System.IO
import Debug.Trace
import Data.IORef
import Reactive.Banana as R
import Re... | KatsCyl/AsteroidRoulette | app/AsteroidGame.hs | mit | 2,546 | 0 | 17 | 671 | 800 | 410 | 390 | 67 | 3 |
module Main where
import Party
main :: IO ()
main = do
raw <- readFile "company.txt"
let guestList = maxFun $ read raw
putStrLn $ (listHeader guestList) ++ "\n" ++ (guestNames guestList)
| bachase/cis194 | hw8/Main.hs | mit | 200 | 0 | 11 | 45 | 75 | 37 | 38 | 7 | 1 |
--
-- xmonad example config file.
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
import XMonad
import System.Exit
import XMonad.Config.Gnome
import XMonad.Config.Deskt... | zbanks/dotfiles | xmonad.hs | mit | 13,879 | 0 | 15 | 3,526 | 1,949 | 1,201 | 748 | 134 | 1 |
{-# htermination delFromFM :: Ord a => FiniteMap (Maybe a) b -> (Maybe a) -> FiniteMap (Maybe a) b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_delFromFM_9.hs | mit | 122 | 0 | 3 | 24 | 5 | 3 | 2 | 1 | 0 |
{-| Module to take historical data copied from e.g.
http://www.investing.com/currencies/eur-gbp-historical-data
and stored in a text file, and convert it to haskell structures
for further processing
-}
module InvestingDotComConverter where
import Data.Char (ord)
import Data.Csv
import qualified Data.Byt... | lhoghu/yahoo-portfolio-manager | src/Data/YahooPortfolioManager/InvestingDotComConverter.hs | mit | 1,901 | 0 | 18 | 587 | 409 | 220 | 189 | 38 | 2 |
module TestStateMonad where
type Stack = [Int]
newtype State s a = State { runState :: s -> (a, s) }
instance Monad (State s) where
return x = State $ \s -> (x, s)
(State h) >>= f = State $ \s -> let (a, newState) = h s
(State g) = f a
in g ... | rockdragon/julia-programming | code/haskell/TestStateMonad.hs | mit | 662 | 0 | 13 | 227 | 325 | 176 | 149 | 23 | 2 |
module LogicProblem.Solver.Def (
RApply(..)
, REntry
, RApplyResult(..)
, isSuccess
, isFailure
, isUndetermined
, getResultEntries
, RuleResult(..)
) where
import LogicProblem.Solver.Env
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
type ApplyRule1 e = e -> RA... | fehu/h-logic-einstein | src/LogicProblem/Solver/Def.hs | mit | 1,931 | 0 | 10 | 669 | 472 | 262 | 210 | 40 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
-- | This executable generated .golden tests for importify.
module Main where
import Universum
import Path (fromRelFile, parseRelFile, (-<.>))
import Path.IO ... | kristoff3r/importify | test/GGenerator.hs | mit | 1,671 | 0 | 13 | 411 | 345 | 176 | 169 | 37 | 4 |
module Javelin.Lib.ByteCode.ConstantPool
( getConstants
) where
import qualified Data.Binary.Get as Get
import qualified Data.Map.Lazy as Map
import qualified Data.Word as Word
import qualified Unsafe.Coerce as Unsafe
import qualified Javelin.Lib.ByteCode.Data as ByteCode
import qualified Data.ByteString.UTF8 as ... | antonlogvinenko/javelin | src/Javelin/Lib/ByteCode/ConstantPool.hs | mit | 3,437 | 23 | 13 | 459 | 950 | 485 | 465 | 68 | 3 |
{-# LANGUAGE TypeSynonymInstances #-}
module Graphics.DrawGL.Fold where
import Data.List
import Graphics.DrawGL.Internal
import Graphics.DrawGL.Types
class ShapeFold a where
foldShape :: (b -> a -> b) -> b -> Shape -> b
defaultColor = Color (1,1,1,1)
instance ShapeFold Vertex where
foldShape f a (Shape _ v... | shangaslammi/hdrawgl | src/Graphics/DrawGL/Fold.hs | mit | 1,200 | 6 | 18 | 329 | 516 | 258 | 258 | 27 | 2 |
module StupidBot.Goal where
import Vindinium.Types
import Utils
import Data.Maybe (fromJust, isNothing)
import qualified Data.Set as S
import Debug.Trace
data Mine = OwnedMine HeroId | AnyMine deriving (Show) -- any excludes mines that we own
data Goal = Capture Mine | Kill HeroId | Heal | Survive deriving (Show)
ty... | flyrry/phonypony | src/StupidBot/Goal.hs | mit | 2,153 | 0 | 14 | 509 | 815 | 417 | 398 | 56 | 5 |
import System.Random
import qualified Data.Map as Map
import Data.List (sortBy)
import Data.Ord (comparing)
ns = [7,6..1]
chunks n xs
| n <= length xs = fst (splitAt n xs) : chunks n (tail xs)
| otherwise = []
rootmap str =
Map.fromListWith (Map.unionWith (+)) t
where
t = [(init s, Map.singleton ... | jsavatgy/dit-doo | code/accum-start-01.hs | gpl-2.0 | 1,649 | 0 | 15 | 376 | 755 | 388 | 367 | 43 | 1 |
-- 类型参数
data Rect = Rect Int Int
area :: Rect -> Int
area (Rect w h) = w * h
perim :: Rect -> Int
perim (Rect w h) = 2 * w + 2 * h
main = do
let r = Rect 10 5
putStrLn $ "area: " ++ show (area r)
putStrLn $ "perim: " ++ show (perim r)
| solvery/lang-features | haskell/type_5.hs | gpl-2.0 | 259 | 0 | 10 | 79 | 138 | 68 | 70 | 9 | 1 |
-- | This defines a bunch of generic commands that can be used in a
-- variety of X actions.
module XMonad.Config.Fizzixnerd.Commands where
browser = "firefox"
explorer = "nautilus"
systemMonitor = "gnome-system-monitor"
music = "rhythmbox"
video = "vlc"
myTerminal = "gnome-terminal"
compton = "killall compton; slee... | Fizzixnerd/xmonad-config | site-haskell/src/XMonad/Config/Fizzixnerd/Commands.hs | gpl-3.0 | 606 | 0 | 4 | 100 | 75 | 47 | 28 | 14 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
-- FIXME: better types in checkLevel
{-# LANGUAGE FlexibleContexts #-}
-- |
-- Copyright : (c) 2010-2012 Simon Meier & Benedikt Schmidt
-- License : GPL v3 (see LICENSE)
--
-- Maintainer : Simon Meier <iridcode@... | samscott89/tamarin-prover | lib/theory/src/Theory/Proof.hs | gpl-3.0 | 40,665 | 0 | 17 | 10,896 | 9,964 | 5,114 | 4,850 | 645 | 7 |
module FourChan.Helpers
( module FourChan.Helpers.Download
, module FourChan.Helpers.Html
) where
import FourChan.Helpers.Download
import FourChan.Helpers.Html
| xcv-/4chan.hs | lib/FourChan/Helpers.hs | gpl-3.0 | 173 | 0 | 5 | 27 | 34 | 23 | 11 | 5 | 0 |
-- module with tools for prime numbers
module Maths.NumberTheory.Primes
( primes,
factorize
) where
-- list of prime numbers generated by the Sieve of Eratosthenes
primes :: [Int]
primes = sieve $ 2:[3,5..]
where sieve (p:ns) = p : sieve [n | n <- ns, n `mod` p /= 0]
-- factorize integer
-- return list of ... | mathemage/htools | Maths/NumberTheory/Primes.hs | apache-2.0 | 632 | 0 | 12 | 208 | 209 | 114 | 95 | 12 | 1 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative hiding (many)
import Control.Monad (forM_, void)
import Control.Monad.Trans.Resource
import Data.Conduit (($$))
import qualified Data.HashMap.Strict as M
import... | erochest/whatisdh | data/loadData.hs | bsd-2-clause | 5,196 | 0 | 29 | 1,840 | 1,287 | 670 | 617 | 115 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Text.Megaparsec.ByteSpec (spec) where
import Control.Monad
import Data.ByteString (ByteString)
import Data.Char
import Data.Maybe (fromMaybe)
import Data.Proxy
import Data.Semigroup ((<>))
import Data.Void
import Data.Word (Word8)
import Tes... | recursion-ninja/megaparsec | tests/Text/Megaparsec/ByteSpec.hs | bsd-2-clause | 8,920 | 0 | 23 | 2,489 | 2,763 | 1,356 | 1,407 | 197 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QTableWidget_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:20
Warning : this file is machine generated - d... | uduki/hsQt | Qtc/Gui/QTableWidget_h.hs | bsd-2-clause | 91,523 | 0 | 18 | 19,657 | 30,066 | 14,441 | 15,625 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Display
( initWindow
, destroy
, present
) where
import Control.Monad.Reader (ask, liftIO)
import Data.Types (scrnW, scrnH)
import Linear.V2
import Render.Engine
import qualified SDL
( PixelFormat (BGR888)
, Surface
, Window
,... | Lucsanszky/soft-engine | src/Display.hs | bsd-3-clause | 1,224 | 0 | 10 | 327 | 324 | 174 | 150 | 45 | 1 |
module Part1.Problem2 where
--
-- Even Fibonacci numbers
--
-- Each new term in the Fibonacci sequence is generated by adding the previous
-- two terms. By starting with 1 and 2, the first 10 terms will be:
--
-- 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
--
-- By considering the terms in the Fibonacci sequence whose valu... | c0deaddict/project-euler | src/Part1/Problem2.hs | bsd-3-clause | 536 | 0 | 8 | 107 | 82 | 50 | 32 | 5 | 1 |
module PredictionExts(extensions, Extensions, restHr, maxHr,
predictionExts, karvonen,
karvonenInv, fromPower) where
import Ultra
import Text.Printf
data Extensions = Extensions { restHr::Double, maxHr::Double, weight::Double } deriving Show
-- The famous Karvonen fo... | jrosti/ultra | src/PredictionExts.hs | bsd-3-clause | 3,748 | 0 | 17 | 1,020 | 948 | 499 | 449 | 61 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
module Text.Scalar.CLI where
import System.IO (hPutStr, hPutStrLn, hPrint, stderr)
import Control.Monad (when)
import Text.Scalar
import Text.Pandoc.Options
import Text.Pandoc.Readers.Scalar
import Text.Pandoc (Pandoc, writeJSON)
import qualified Data.Text as T
import Options.Applicat... | corajr/scalar-convert | src/Text/Scalar/CLI.hs | bsd-3-clause | 1,861 | 0 | 15 | 450 | 545 | 278 | 267 | 48 | 5 |
-- Author: Lee Ehudin
-- Contains all event handling and UI updating code
module Controller.EventHandler (handleEvents) where
import Model.Buffer (MBuffer, ModifyMBuffer, left, right, upLine, downLine,
insert, delete, insertNewline, getScreen, getCursorPos,
writeBufferToFile)... | percivalgambit/hasked | src/Controller/EventHandler.hs | bsd-3-clause | 1,574 | 0 | 13 | 394 | 381 | 206 | 175 | 33 | 1 |
-- | Compose functions with higher arity.
--
-- Ever tried something like this:
--
-- > (length . (++)) stringA stringB
--
-- Only to find out that you can't? The second function takes two parameters,
-- and as such the simple function composition does not work.
--
-- A well known solution to this problem is this fun o... | jcristovao/altcomposition | Data/AltComposition.hs | bsd-3-clause | 12,837 | 0 | 15 | 3,057 | 2,647 | 1,544 | 1,103 | 120 | 2 |
module Hashids where
encode :: [Int] -> String
encode nums = show nums
decode :: String -> [Int]
decode hashid = read hashid
| newhoggy/hashids-haskell | src/Hashids.hs | bsd-3-clause | 128 | 0 | 6 | 26 | 50 | 27 | 23 | 5 | 1 |
{-# LANGUAGE GADTs, RankNTypes, TupleSections #-}
module QnA5
where
type Input = String
type Prompt = String
type Color = String
type Size = Int
type Weight = Int
type Height = Int
data Question a = Question {
prompt :: Prompt,
answer :: Input -> a
}
doYouKnowYourSizeQ :: Question Bool
doYouKnowYourSizeQ = Que... | homam/fsm-conversational-ui | src/QnA5.hs | bsd-3-clause | 2,443 | 0 | 12 | 572 | 1,041 | 558 | 483 | 65 | 2 |
{-# LANGUAGE ImplicitParams, TupleSections, RecordWildCards, ScopedTypeVariables #-}
-- Convert flattened spec to internal representation
module Frontend.SpecInline (specSimplify, spec2Internal, specXducers2Internal) where
import Data.List
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Set as ... | termite2/tsl | Frontend/SpecInline.hs | bsd-3-clause | 31,321 | 0 | 27 | 10,156 | 8,575 | 4,526 | 4,049 | 403 | 3 |
{-# LANGUAGE KindSignatures, PolyKinds, MultiParamTypeClasses, FunctionalDependencies, ConstraintKinds, NoImplicitPrelude, TypeFamilies, TypeOperators, FlexibleContexts, FlexibleInstances, UndecidableInstances, UndecidableSuperClasses, RankNTypes, GADTs, ScopedTypeVariables, DataKinds, AllowAmbiguousTypes, LambdaCase, ... | ekmett/hask | src/Hask/Tensor.hs | bsd-3-clause | 4,904 | 2 | 12 | 1,054 | 2,195 | 1,163 | 1,032 | -1 | -1 |
module Handler.Home where
--import Import
--import Yesod.Form.Bootstrap3 (BootstrapFormLayout (..), renderBootstrap3,
-- withSmallInput)
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes... | lubomir/dot-race | Handler/Home.hs | bsd-3-clause | 1,487 | 0 | 3 | 346 | 44 | 42 | 2 | 1 | 0 |
module Diffbot.FrontPage where
import Data.Maybe
import Diffbot.Types
-- | Takes in a multifaceted \"homepage\" and returns individual page
-- elements.
data FrontPage = FrontPage
{ frontPageAll :: Bool
-- ^ Returns all content from page, including navigation and
-- similar links that the Diffbot visu... | tymmym/diffbot | src/Diffbot/FrontPage.hs | bsd-3-clause | 1,516 | 0 | 9 | 504 | 256 | 146 | 110 | 25 | 1 |
module EveTypes (
module EveTypes.Blueprints
) where
import EveTypes.Blueprints
| Frefreak/Gideon | src/EveTypes.hs | bsd-3-clause | 89 | 0 | 5 | 18 | 17 | 11 | 6 | 3 | 0 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2014 Edward Kmett and Gabríel Arthúr Pétursson
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-- Portability ... | phaazon/gl | src/Graphics/GL/Types.hs | bsd-3-clause | 4,086 | 42 | 16 | 1,140 | 923 | 493 | 430 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
module Sync.Local.Hashing where
import Control.Monad.Trans
import qualified Data.ByteString.Lazy as BL
import Data.Maybe
import System.IO
import Text.ProtocolBuffers
import Sync.Hashing
import Sync.Internal.Types
imp... | mcmaniac/sync | src/Sync/Local/Hashing.hs | bsd-3-clause | 1,194 | 0 | 10 | 296 | 254 | 133 | 121 | 31 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
module Main where
import Control.Concurrent (threadDelay)
import Control.Monad (when, forever)
import Data.ByteString (unpack)
import Data.ByteString.Base32 (decode)
import Data.ByteString.Char8 (pack)
import Data.Monoid
import Data.OTP
import Data.Time
import... | pbogdan/otp-auth | src/Main.hs | bsd-3-clause | 1,933 | 0 | 18 | 487 | 615 | 303 | 312 | 68 | 3 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- TODO:
-- XXX on error in thread, kill everything.
-- XXX prove each assertion only once?
-- Dependence on timeout. Not clear how to remove it, since Haskell doesn't
-- have a good mechanism to guarantee killi... | VCTLabs/cbmc-reporter | src/Report.hs | bsd-3-clause | 17,278 | 0 | 23 | 4,655 | 4,278 | 2,216 | 2,062 | 305 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
module Astro.Coords.TNRSpec where
import Test.Hspec
import Test.QuickCheck
import Data.AEq
import TestUtil
import TestInstances
import Astrodynamics (greenwichRA)
import Astro.Coords
import Astro.Coords.ECR
import Astro.Coords.TNR
import Astro.Coords.PosVel
import Astro.Time -- ... | bjornbm/astro | test/Astro/Coords/TNRSpec.hs | bsd-3-clause | 2,869 | 0 | 17 | 559 | 850 | 440 | 410 | 63 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverlappingInstances #-}... | texodus/forml | src/hs/lib/Forml/Optimize/Inline.hs | bsd-3-clause | 7,358 | 0 | 13 | 1,714 | 2,600 | 1,327 | 1,273 | 134 | 7 |
{-|
Unit tests module for the longest path algorithm. Checks that the
following properties hold true for randomly generated DAGs:
* The only DAG in in which the longest path is empty is the DAG
of order 0.
* If the longest path is not empty, then the first vertex has
no predecessors and the last no successors in the ... | alexisVallet/ag44-graph-algorithms | Test/LongestPath.hs | bsd-3-clause | 2,059 | 0 | 11 | 388 | 304 | 165 | 139 | 36 | 3 |
module Graphics.UI.SDL
( module Init
, module Exception
, module Types
, module Audio
, module Timer
, module Events
, module Video
, module Version
) where
import Graphics.UI.SDL.Init as Init
import Graphics.UI.SDL.Exception as Exception
import Graphics.U... | abbradar/MySDL | src/Graphics/UI/SDL.hs | bsd-3-clause | 537 | 0 | 4 | 124 | 113 | 86 | 27 | 17 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE FlexibleContexts #-}
-- | Symbolic links
module Haskus.System.Linux.FileSystem.SymLink
( sysSymlink
, ReadSymLinkErrors
, readSymbolicLink
)
whe... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Linux/FileSystem/SymLink.hs | bsd-3-clause | 2,883 | 0 | 22 | 824 | 568 | 299 | 269 | 60 | 10 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
module Stanag.EoIrLaserOperatingState where
import Ivory.Language
import Stanag.Packing
import Util.Logger
eoIrLaserOperatingStateInstance :: MemArea (Stored Uin... | GaloisInc/loi | Stanag/EoIrLaserOperatingState.hs | bsd-3-clause | 465 | 0 | 9 | 46 | 69 | 41 | 28 | 12 | 1 |
module Homework8.Employee where
import Data.Tree
-- Employee names are represented by Strings.
type Name = String
-- The amount of fun an employee would have at the party, represented
-- by an Integer
type Fun = Integer
-- An Employee consists of a name and a fun score.
data Employee = Emp { empName :: Name, empFun... | gabluc/CIS194-Solutions | src/Homework8/Employee.hs | bsd-3-clause | 1,411 | 1 | 13 | 415 | 487 | 258 | 229 | 32 | 1 |
{-# -fglasgow-exts #-}
module DNS.Type (question, rquestion,
putLine, enc, Bufi, Data,
Question(Q), MayIO,
RR(RR), RClass, RType,
Name, satisfies, Zone(..), MayIOSt,
Packet(..), converge, WState, PSt,
errorPacket, emptyPacket, hashQuestion
) where
import Data.Char
import Data.Int (Int32)
import Dat... | creswick/hsntp | DNS/Type.hs | bsd-3-clause | 3,243 | 42 | 14 | 847 | 1,560 | 836 | 724 | 104 | 4 |
module CreateEnv
( createEnv
) where
import Fragnix.Environment (
persistEnvironment)
import Fragnix.Paths (
builtinEnvironmentPath,cbitsPath,includePath)
import Language.Haskell.Exts (
Module,parseFileContentsWithMode,defaultParseMode,ParseMode(..),baseFixities,
ParseResult(ParseOk,ParseFailed),
SrcSpa... | phischu/fragnix | app/CreateEnv.hs | bsd-3-clause | 9,308 | 5 | 16 | 1,504 | 2,475 | 1,298 | 1,177 | 179 | 2 |
import Control.Monad
import Data.Maybe
import Data.Functor
import Text.XkbCommon
import Common
xor :: Bool -> Bool -> Bool
xor x y = (x || y) && not (x && y)
testFile :: Context -> String -> Bool -> IO ()
testFile ctx path shouldwork = do
str <- readFile (datadir++path)
let keymap = newKeymapFromString ctx st... | tulcod/haskell-xkbcommon | tests/filecomp.hs | mit | 665 | 10 | 10 | 130 | 236 | 121 | 115 | 21 | 1 |
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
module System.HFind.Combinators where
import Prelude hiding (... | xcv-/hfind | src/System/HFind/Combinators.hs | mit | 7,832 | 0 | 17 | 2,143 | 3,733 | 1,839 | 1,894 | 171 | 6 |
{-# LANGUAGE FlexibleContexts #-}
{- |
Module : ./CSL/GenericInterpreter.hs
Description : Generic ASState functionality for AssignmentStores
Copyright : (c) Ewaryst Schulz, DFKI Bremen 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Ewaryst.Schulz@dfki.de
Stability : experimental
Port... | spechub/Hets | CSL/GenericInterpreter.hs | gpl-2.0 | 4,294 | 0 | 12 | 945 | 1,273 | 628 | 645 | 86 | 2 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples, RankNTypes #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ST
-- Copyright : (c) The University of Glasgow, 1992-2002
-- License : see ... | sdiehl/ghc | libraries/base/GHC/ST.hs | bsd-3-clause | 4,383 | 0 | 16 | 972 | 837 | 478 | 359 | 58 | 1 |
module Distribution.Client.Dependency.Modular.Index where
import Data.List as L
import Data.Map as M
import Prelude hiding (pi)
import Distribution.Client.Dependency.Modular.Dependency
import Distribution.Client.Dependency.Modular.Flag
import Distribution.Client.Dependency.Modular.Package
-- | An index contains info... | IreneKnapp/Faction | faction/Distribution/Client/Dependency/Modular/Index.hs | bsd-3-clause | 970 | 0 | 13 | 150 | 282 | 172 | 110 | 15 | 1 |
module IRTS.CodegenC (codegenC) where
import Idris.AbsSyntax
import IRTS.Bytecode
import IRTS.Lang
import IRTS.Simplified
import IRTS.Defunctionalise
import IRTS.System
import IRTS.CodegenCommon
import Idris.Core.TT
import Util.System
import Numeric
import Data.Char
import Data.Bits
import Data.List (intercalate)
imp... | aaronc/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | 33,130 | 0 | 27 | 9,489 | 15,144 | 7,533 | 7,611 | 592 | 32 |
{-
(c) The University of Glasgow 2006-2012
(c) The GRASP Project, Glasgow University, 1992-2002
Various types used during typechecking, please see TcRnMonad as well for
operations on these types. You probably want to import it, instead of this
module.
All the monads exported here are built on top of the same IOEnv m... | fmthoma/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | 90,836 | 0 | 16 | 27,061 | 10,760 | 6,186 | 4,574 | 875 | 5 |
{-# LANGUAGE OverloadedStrings, Rank2Types, LiberalTypeSynonyms #-}
module Circles (circlesClass) where
import Control.Applicative
import Control.Monad
import Data.String (fromString)
import Data.Void
import Lens.Family2
import React
-- model
data Circ = C1 | C2 | C3 | C4 deriving (Eq, Show)
data CircState = Circ... | adarqui/react-haskell | example/animation/Circles.hs | mit | 3,505 | 0 | 18 | 1,110 | 1,203 | 643 | 560 | 92 | 2 |
-- |
-- Module : Criterion.Monad
-- Copyright : (c) 2009 Neil Brown
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
--
-- The environment in which most criterion code executes.
module Criterion.Monad
(
Criterion
, withConfig
,... | paulolieuthier/criterion | Criterion/Monad.hs | bsd-2-clause | 2,369 | 10 | 28 | 499 | 581 | 311 | 270 | 45 | 2 |
{- $Id: testAFRPMain.hs,v 1.9 2003/11/10 21:28:58 antony Exp $
******************************************************************************
* A F R P *
* *
* Module: ... | ony/Yampa-core | tests/testAFRPMain.hs | bsd-3-clause | 2,541 | 2 | 15 | 945 | 549 | 288 | 261 | 46 | 6 |
{-| General purpose utilities
The names in this module clash heavily with the Haskell Prelude, so I
recommend the following import scheme:
> import Pipes
> import qualified Pipes.Prelude as P -- or use any other qualifier you prefer
Note that 'String'-based 'IO' is inefficient. The 'String'-based utili... | michaelt/series | notes/pipeprelude.hs | bsd-3-clause | 20,812 | 0 | 21 | 6,461 | 5,223 | 2,637 | 2,586 | -1 | -1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
Module: Projectile
This module provides utility functions to gather various paths of a project
-}
module Projectile (getProjectRoot... | roman/Haskell-projectile | src/Projectile.hs | isc | 6,420 | 0 | 17 | 1,646 | 999 | 554 | 445 | 131 | 3 |
-- |Quake VM builtin functions reader.
module Builtin (BuiltinDefs, getBuiltins) where
import Control.Arrow ((>>>))
import Data.List (isPrefixOf)
import Data.Map (Map, fromList, toList)
import Language.C
import Language.C.Analysis
import Language.C.System.GCC (newGCC)
-- |Alias to a map of functions declarations.
t... | ftrvxmtrx/qvmgen | Builtin.hs | mit | 1,538 | 0 | 14 | 306 | 480 | 261 | 219 | 29 | 1 |
-- | All these methods work as follows:
-- |
-- | Given a feasible (or near feasible trajectory), an HJB style cost metric, ControlledSystem System, will attempt to improve that trajectory to a better one.
-- | Uses Optimize.NonLinear as a backend in all cases.
import qualified RapidlyExploringRandomTree as RRT
-- | ... | Zomega/thesis | Wurm/Trajectory/Optimize.hs | mit | 1,640 | 1 | 8 | 255 | 174 | 100 | 74 | -1 | -1 |
{-# htermination (pr :: MyInt -> MyInt -> MyInt) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data Dummy = Nil
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data Ordering = LT | EQ | GT ;
stop :: MyBool -> a;
stop MyFalse = stop MyFalse;
error :: a;
error = stop MyTrue;
... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/CARET_2.hs | mit | 5,745 | 20 | 15 | 1,201 | 2,957 | 1,480 | 1,477 | 143 | 1 |
module Main (main) where
import System.Environment
import System.Console.GetOpt
import Prelude hiding (Left, Right)
import XBattBar.Types
import XBattBar.Core (start)
defaultOptions :: Options
defaultOptions = Options {
onTop = False,
thickness = 2,
... | polachok/xbattbar | src/Main.hs | mit | 2,167 | 0 | 13 | 722 | 646 | 359 | 287 | 49 | 1 |
module Symmath
(
module Symmath.Eval,
module Symmath.Terms,
module Symmath.Functiontable,
module Symmath.Constants,
module Symmath.Derivate,
module Symmath.Simplify,
module Symmath.Util,
module Symmath.Parse,
module Symmath.RPNParse,
module Symmath.TermToTex,
module Symmath.... | Spheniscida/symmath | Symmath.hs | mit | 617 | 0 | 5 | 97 | 127 | 81 | 46 | 24 | 0 |
--------------------------------------------------------------------
-- |
-- Copyright : © Oleg Grenrus 2014
-- License : MIT
-- Maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
-- Stability : experimental
-- Portability: non-portable
--
-- This module re-exports 'Set'-based implementation.
------------------------... | phadej/boolean-normal-forms | src/Data/Algebra/Boolean/CNF.hs | mit | 483 | 0 | 5 | 52 | 37 | 30 | 7 | 3 | 0 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PatternSynonyms #-}
module GLUtils where
import Language.Haskell.TH.Ppr (bytesToString)
import qualified Graphics.GL.Core32 as GL
import qualified Graphics.GL.Types as GL
import qualified Foreign as F
import qualified Foreign.C.String as F
import qualified Foreign.C.Types as F... | soupi/haskell-sdl2gl | src/MySDL/GLUtils.hs | mit | 1,087 | 0 | 12 | 144 | 276 | 150 | 126 | 22 | 7 |
module Data.Mole.Builder where
import Data.Mole.Types
import Data.Mole.Builder.Html
import Data.Mole.Builder.Binary
import Data.Mole.Builder.JavaScript
import Data.Mole.Builder.Image
import Data.Mole.Builder.Stylesheet
import System.FilePath
bu... | wereHamster/mole | src/Data/Mole/Builder.hs | mit | 754 | 0 | 12 | 188 | 181 | 97 | 84 | 17 | 7 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE InstanceSigs #-}
module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.HashDB (authHashDBWithForm)
import Yesod.A... | ahushh/Monaba | monaba/src/Foundation.hs | mit | 14,760 | 0 | 22 | 3,630 | 3,534 | 1,851 | 1,683 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
-- |
-- Module : Data.Sorted
-- Copyright : (c) Joseph Abrahamson 2013
-- License : MIT
--
-- Maintainer : me@jspha.com
-- Stability : experimental
-- Portability : non-portable
--
-- Operations on lazily sorted lists. Use 'Sorted' to indicate a list
-- with a sorted constrain... | tel/sorted | src/Data/Sorted.hs | mit | 2,684 | 0 | 12 | 776 | 889 | 474 | 415 | 46 | 2 |
module Main where
import Prelude
import Criterion
import Criterion.Main
import qualified PostgreSQL.Binary.Encoding as E
main =
defaultMain
[
value "bool" E.bool True
,
value "int2" E.int2_int16 1000
,
value "int4" E.int4_int32 1000
,
value "int8" E.int8_int64 1000
... | nikita-volkov/postgresql-binary | encoding/Main.hs | mit | 1,445 | 0 | 15 | 418 | 379 | 195 | 184 | 31 | 1 |
-- Growth of a Population
-- http://www.codewars.com/kata/563b662a59afc2b5120000c6/train/haskell
module Codewars.G964.Arge where
nbYear :: Int -> Double -> Int -> Int -> Int
nbYear p0 percent aug p | p <= p0 = 0
| otherwise = 1 + nbYear px percent aug p
where px = p0 + ... | gafiatulin/codewars | src/7 kyu/Arge.hs | mit | 367 | 0 | 11 | 106 | 108 | 55 | 53 | 5 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
-- | This module provides an abstraction over 'STM', which can be used
-- with 'MonadConc'.
module Control.Monad.STM.Class where
import Control.Concurrent.STM (STM)
import Control.Concurrent.STM.TVar (TVar, newTVar, readTVar, writeTVar)
import Control.Except... | bitemyapp/dejafu | Control/Monad/STM/Class.hs | mit | 5,534 | 0 | 12 | 1,262 | 1,550 | 843 | 707 | 95 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.