code stringlengths 2 1.05M | repo_name stringlengths 5 101 | path stringlengths 4 991 | language stringclasses 3
values | license stringclasses 5
values | size int64 2 1.05M |
|---|---|---|---|---|---|
import Control.Monad
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.Char
import Data.IORef
import Data.Vhd
import Data.Vhd.Bat
import qualified Data.Vhd.Block as Block
import Data.Vhd.Checksum
import Data.Vhd.Node
import Data.Vhd.Types
import System.Environment (getArgs)
i... | jonathanknowles/hs-vhd | Vhd.hs | Haskell | bsd-3-clause | 4,579 |
([(16, ("long double", 16, [])), (15, ("double", 8, [])), (14, ("float", 4, [])),
(13, ("unsigned long long", 8, [])), (12, ("unsigned long", 8, [])),
(11, ("unsigned int", 4, [])), (10, ("unsigned short", 2, [])), (9, (
"long long", 8, [])),
(8... | GaloisInc/verification-game | web-prover/demo-levels/find/types.hs | Haskell | bsd-3-clause | 1,940 |
module Environment where
import Graphics.Rendering.OpenGL hiding (($=))
import Graphics.UI.GLUT
import Control.Applicative
import Data.IORef
import System.Exit
import Graphics.UI.GLUT.Callbacks.Window
import Control.Concurrent
import Control.Concurrent.MVar
import System.Random
import System.IO.Unsafe
type Cor = (GL... | jailson-dias/Arca | src/Environment.hs | Haskell | bsd-3-clause | 907 |
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, StandaloneDeriving, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Atomo.Pretty (Pretty(..), Prettied) where
import Data.Char (isUpper)
import Data.IORef
import Data.Maybe (isNothing)
import Data.Ratio
import Data.Typeable
import System.IO.Unsa... | vito/atomo | src/Atomo/Pretty.hs | Haskell | bsd-3-clause | 15,361 |
-- 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
module Duckling.T... | rfranek/duckling | tests/Duckling/Temperature/JA/Tests.hs | Haskell | bsd-3-clause | 612 |
{-# LANGUAGE DeriveDataTypeable #-}
module Sgf.XMonad.Restartable.Firefox
( FirefoxProfile (..)
, FirefoxArgs
, firefoxProfile
, firefoxNoRemote
, firefoxNewInstance
, Firefox
, defaultFirefox
)
where
import Data.Typeable
import Data.Function (on)
import Sgf.Data.List
import Sgf.Con... | sgf-dma/sgf-xmonad-modules | src/Sgf/XMonad/Restartable/Firefox.hs | Haskell | bsd-3-clause | 2,369 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module Commi.Task where
import Haste.Serialize
import Haste.JSON
import Data.Typeable
import Data.Maybe
import Control.Applicative
import Genetic.Options
data Input = Input {
inputCityMatrix :: [[Int]]
, inputCityN :: Int
, inputIndividLength :: Int
,... | Teaspot-Studio/bmstu-commi-genetics-haste | Commi/Task.hs | Haskell | bsd-3-clause | 2,431 |
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.Syntax.ParserMonad
-- Copyright : (c) [1999..2004] Manuel M T Chakravarty
-- (c) 2005-2007 Duncan Coutts
-- License : BSD-style
-- Maintainer : benedikt.huber@gmail.com
-- Portability... | ian-ross/language-c | src/Language/C/Parser/ParserMonad.hs | Haskell | bsd-3-clause | 6,570 |
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE ViewPatterns #-}
module Init where
import Options
import Type
import Data.Array.Accelerate as A hiding ( fromInteger, V3 )
import Data.Array.Accelerate.Linear as A
import Prelude ( fromInteger )
import... | tmcdonell/accelerate-lulesh | src/Init.hs | Haskell | bsd-3-clause | 3,314 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
This module defines interface types and binders
-}
{-# LANGUAGE CPP, FlexibleInstances, BangPatterns #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE LambdaCase #-}
-- FlexibleInstances for ... | sdiehl/ghc | compiler/GHC/Iface/Type.hs | Haskell | bsd-3-clause | 76,725 |
module Module4.Task29 where
import Prelude hiding (lookup)
class MapLike m where
empty :: m k v
lookup :: Ord k => k -> m k v -> Maybe v
insert :: Ord k => k -> v -> m k v -> m k v
delete :: Ord k => k -> m k v -> m k v
fromList :: Ord k => [(k,v)] -> m k v
fromList [] = empty
fromList ((k,v)... | dstarcev/stepic-haskell | src/Module4/Task29.hs | Haskell | bsd-3-clause | 717 |
module Main where
import Hexdump
main :: IO ()
main = hexPrint
| wangbj/hexdump | app/Main.hs | Haskell | bsd-3-clause | 65 |
module Valkyria.Client where
import Valkyria.Env
import Prelude ()
| nfjinjing/source-code-server | src/Valkyria/Client.hs | Haskell | bsd-3-clause | 71 |
{-# LANGUAGE PackageImports #-}
module Data.Function (module M) where
import "base" Data.Function as M
| silkapp/base-noprelude | src/Data/Function.hs | Haskell | bsd-3-clause | 108 |
module BCalib.Imports
( module X
) where
import Control.Lens as X hiding (Empty)
import Data.Atlas.Histogramming as X
import Data.Monoid as X hiding (First (..), Last (..),
(<>))
import Data.Semigroup ... | cspollard/bcalib | src/BCalib/Imports.hs | Haskell | bsd-3-clause | 381 |
{-# LANGUAGE ViewPatterns, OverloadedStrings #-}
module Text.XML.PList
(
{-| This module is like `Text.XML.ToJSON', but it handles plist xml file.
-}
parseXML
, xmlToJSON
, tokensToJSON
, elementToJSON
, plistValue
, module Text.XML.ToJSON
) where
import Control.Monad (liftM)
import Data.Text (Text)... | yihuang/xml2json | Text/XML/PList.hs | Haskell | bsd-3-clause | 3,395 |
{-# LANGUAGE ScopedTypeVariables #-}
import Prelude hiding (sequence, mapM, foldl)
import Data.Traversable
import Data.Foldable
import Control.Monad (void)
import Control.Monad.Trans.Either
import Control.Monad.IO.Class
import qualified Data.Vector as V
import qualified Data.Vector.Generic as VG
import Data.Vector.Alg... | bgamari/model-fit | LifetimeFit.hs | Haskell | bsd-3-clause | 5,723 |
module Pos.Infra.Slotting.Class
( module X
) where
import Pos.Core.Slotting as X
| input-output-hk/pos-haskell-prototype | infra/src/Pos/Infra/Slotting/Class.hs | Haskell | mit | 106 |
{-# LANGUAGE CPP, MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
module Language.Haskell.GhcMod.FillSig (
sig
, refine
, auto
) where
import Data.Char (isSymbol)
import Data.Function (on)
import Data.List (find, nub, sortBy)
import qualified Data.Map as M
import Data.Ma... | cabrera/ghc-mod | Language/Haskell/GhcMod/FillSig.hs | Haskell | bsd-3-clause | 21,204 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
-- | Parsing command line targets
module Stack.Build.Target
( --... | AndrewRademacher/stack | src/Stack/Build/Target.hs | Haskell | bsd-3-clause | 13,848 |
{-#LANGUAGE ForeignFunctionInterface #-}
module Cudd.GC (
cuddEnableGarbageCollection,
cuddDisableGarbageCollection,
cuddGarbageCollectionEnabled,
c_preGCHook_sample,
c_postGCHook_sample,
regPreGCHook,
regPostGCHook
) where
import System.IO
import Foreign
import Foreign.Ptr
import Fore... | maweki/haskell_cudd | Cudd/GC.hs | Haskell | bsd-3-clause | 1,715 |
-- | Process utilities
module Haskus.System.Process
( threadDelaySec
, threadDelayMilliSec
, threadDelayMicroSec
, threadWaitRead
, threadWaitWrite
, yield
, sysFork
)
where
import Haskus.System.Sys
import Haskus.System.Linux.Handle
import Haskus.Utils.Flow
import Haskus.Format.Text (Text)
imp... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Process.hs | Haskell | bsd-3-clause | 1,439 |
{-# LANGUAGE OverloadedStrings, CPP #-}
-- | High-ish level bindings to the HTML5 audio tag and JS API.
module Haste.Audio (
module Events,
Audio, AudioSettings (..), AudioType (..), AudioSource (..),
AudioPreload (..), AudioState (..), Seek (..),
defaultAudioSettings,
mkSource, newAudio, setSource,... | akru/haste-compiler | libraries/haste-lib/src/Haste/Audio.hs | Haskell | bsd-3-clause | 7,613 |
{-# LANGUAGE QuasiQuotes #-}
module Objc (objcTests) where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit (Assertion, (@?=))
import Language.C.Quote.ObjC
objcTests :: Test
objcTests = testGroup "Objective-C"
[ testCase "Objective-C params" objcProp
, testCase "Objective-C prop... | mwu-tow/language-c-quote | tests/unit/Objc.hs | Haskell | bsd-3-clause | 4,607 |
{-# LANGUAGE CPP #-}
-- Vectorise a modules type and class declarations.
--
-- This produces new type constructors and family instances top be included in the module toplevel
-- as well as bindings for worker functions, dfuns, and the like.
module Vectorise.Type.Env (
vectTypeEnv,
) where
#include "HsVersions.h"
... | shlevy/ghc | compiler/vectorise/Vectorise/Type/Env.hs | Haskell | bsd-3-clause | 22,699 |
module Propellor.Gpg where
import Control.Applicative
import System.IO
import System.FilePath
import System.Directory
import Data.Maybe
import Data.List.Utils
import Propellor.PrivData.Paths
import Propellor.Message
import Utility.SafeCommand
import Utility.Process
import Utility.Monad
import Utility.Misc
import Util... | sjfloat/propellor | src/Propellor/Gpg.hs | Haskell | bsd-2-clause | 2,962 |
module MergePullRequest where
import qualified Github.PullRequests as Github
import Github.Auth
import Github.Data
main :: IO ()
main = do
mergeResult <- Github.updatePullRequest (GithubOAuth "authtoken") "repoOwner" "repoName" 22 (EditPullRequest { editPullRequestTitle = Just "Brand new title", editPullRequestBod... | bitemyapp/github | samples/Pulls/UpdatePull.hs | Haskell | bsd-3-clause | 513 |
{-# OPTIONS_GHC -fwarn-unused-binds #-}
module ShouldCompile() where
-- Trac #2497; test should compile without language
-- pragmas to swith on the forall
{-# RULES "id" forall (x :: a). id x = x #-}
-- Trac #2213; eq should not be reported as unused
eq,beq :: Eq a => a -> a -> Bool
eq = (==) -- Used
b... | hvr/jhc | regress/tests/1_typecheck/2_pass/ghc/T2497.hs | Haskell | mit | 402 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Category
-- Copyright : (c) Ashley Yakeley 2007
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer : ashley@semantic.o... | szatkus/haste-compiler | libraries/ghc-7.8/base/Control/Category.hs | Haskell | bsd-3-clause | 1,211 |
{- |
Module : System.JBI.Config
Description : Run-time configuration settings
Copyright : (c) Ivan Lazar Miljenovic
License : MIT
Maintainer : Ivan.Miljenovic@gmail.com
-}
module System.JBI.Config where
--------------------------------------------------------------------------------
new... | ivan-m/jbi | lib/System/JBI/Config.hs | Haskell | mit | 467 |
import System.Environment
import System.Exit
import System.Process
import Data.IORef
import Control.Monad
import System.Timeout
import Data.Maybe
import GetFullProgName
import Syntax
import NarrowingSearch
import SearchControl
import Check
import PrintProof
import TPTPSyntax hiding (App, Var, Implies, Forall)
import P... | frelindb/agsyHOL | Main.hs | Haskell | mit | 9,758 |
import qualified System.Environment
f s@(x:xs) = x:s
sign x | x > 0 = 1
| x == 0 = 0
| x < 0 = -1
test (x:xs) | x == -1 = True
| x > 0 = False
test [] = False
testc xs = case xs of (x:xs) -> x
[] -> 0
foo xs = case xs of (x:xs) -> x
[] -> []
bar ... | gitrookie/functionalcode | code/Haskell/snippets/test.hs | Haskell | mit | 2,619 |
{-# LANGUAGE TemplateHaskell #-}
{-
Copyright (C) 2012-2017 Luke Brown <http://gsd.uwaterloo.ca>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitati... | gsdlab/claferIG | test/test-suite.hs | Haskell | mit | 4,322 |
module Job.Activation
( sendActivationMail
) where
import Import
import qualified Data.ByteString.Lazy.Char8 as C
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Network.HTTP.Simple as HTTP
import Job.Common
data Mailc... | Tehnix/campaigns | Job/Activation.hs | Haskell | mit | 3,248 |
-- https://howistart.org/posts/haskell/1
module Main where
import qualified Data.ByteString.Lazy as BL
import qualified Data.Vector as V
-- from cassava
import Data.Csv
-- a simple type alias for data
type BaseballStats = (BL.ByteString, Int, BL.ByteString, Int)
fourth :: (a, b, c, d) -> d
fourth (_, _, _, d) = d
... | aitoroses/haskell-starter-repo | src/Main.hs | Haskell | mit | 633 |
{-# LANGUAGE MultiParamTypeClasses, TypeOperators
, TypeFamilies, UndecidableInstances, CPP
, FlexibleContexts #-}
type Time = Float
--data Time deriving (Ord)
--data R = NegInf | R Float | PosInf deriving (Eq,Ord)
--data Time = T R | AtLeast R
-- semantically, a behavior is a time dependant... | eulerfx/learnfp | functional_reactive_animation.hs | Haskell | mit | 3,136 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
module Language.PureScript.Linter.Imports (findUnusedImports, Name(..), UsedImports()) where
import Prelude ()
import Prelude.Compat
import qualified Data.Map as M
import Data.Maybe (mapMaybe)
import Data.List ((\\), find)
import Control.Monad.Er... | michaelficarra/purescript | src/Language/PureScript/Linter/Imports.hs | Haskell | mit | 3,353 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
module Y2017.M12.D12.Exercise where
{--
Okay, I came across an error when I was filtering articles with indexed
keywords:
time cold_filtered 6495 trump
cold_filtered: UnexpectedNull {errSQLType = "text",
errSQLTableOid = Just (Oid 50231), errSQLField = "summary"... | geophf/1HaskellADay | exercises/HAD/Y2017/M12/D12/Exercise.hs | Haskell | mit | 2,742 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Devel.Capture
( Capture
, startCapture
, logMessage
, outputChunk
, waitCaptured
) where
import Data.Text (Text)
import Data.ByteString (ByteString)
import Control.Concurrent.STM
import Data.Time (UTCTime, getCurrentT... | snoyberg/yesod-devel-beta | Yesod/Devel/Capture.hs | Haskell | mit | 1,351 |
-- | Chan with size
module Control.Concurrent.SizedChan (SizedChan, newSizedChan, writeSizedChan, readSizedChan, tryReadSizedChan, peekSizedChan, tryPeekSizedChan, isEmptySizedChan) where
import Control.Concurrent.Chan
import Data.IORef
data SizedChan a =
SizedChan
(Chan a) -- ^ The channel
(IORef Int) --... | banacorn/agda-language-server | src/Control/Concurrent/SizedChan.hs | Haskell | mit | 3,254 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Com.Mysql.Cj.Mysqlx.Protobuf.ViewSqlSecurity (ViewSqlSecurity(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Da... | naoto-ogawa/h-xproto-mysql | src/Com/Mysql/Cj/Mysqlx/Protobuf/ViewSqlSecurity.hs | Haskell | mit | 2,561 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-patchbaseline.html
module Stratosphere.Resources.SSMPatchBaseline where
import Stratosphere.ResourceImport... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/SSMPatchBaseline.hs | Haskell | mit | 7,439 |
qs1 [] = []
qs1 (x : xs) = qs1 larger ++ [x] ++ qs1 smaller
where smaller = [a | a <- xs, a <= x]
larger = [b | b <- xs, b > x]
qs2 [] = []
qs2 (x : xs) = reverse (qs2 smaller ++ [x] ++ qs2 larger)
where smaller = [a | a <- xs, a <= x]
larger = [b... | rabbitonweb/fp101x | w01/qs.hs | Haskell | apache-2.0 | 1,250 |
{-# LANGUAGE CPP #-}
module System.Console.Hawk.PackageDbs.TH
( compileTimeEnvVar
, compileTimeWorkingDirectory
) where
import Language.Haskell.TH.Syntax (TExp(TExp), Q, lift, runIO)
#if MIN_VERSION_template_haskell(2,17,0)
import Language.Haskell.TH.Syntax (Code, liftCode)
#endif
import System.Directory (... | gelisam/hawk | src/System/Console/Hawk/PackageDbs/TH.hs | Haskell | apache-2.0 | 854 |
module TextToys.Utils
( takeTo
) where
import Control.Arrow (first)
takeTo :: (a -> Bool) -> [a] -> ([a], [a])
takeTo _ [] = ([], [])
takeTo p (x:xs) | p x = ([x], xs)
| otherwise = first (x:) $ takeTo p xs
| erochest/text-toys | src/TextToys/Utils.hs | Haskell | apache-2.0 | 263 |
module Main where
import Test.Hspec
import Test.Hspec.Contrib.HUnit
import Test.HUnit
-- (1) Import your test module qualified here.
import qualified System.IO.FileSync.Tests.Join as Join
import qualified System.IO.FileSync.Tests.Tree as Tree
import qualified System.IO.FileSync.Tests.TreeT as TreeT
-- (2) Insert its... | jtapolczai/FileSync | tests/System/IO/FileSync/Tests.hs | Haskell | apache-2.0 | 530 |
module Main (main) where
import Control.Applicative ((<$>))
import Control.Monad (forever)
import Data.Data (toConstr)
import Data.Function (on)
import Data.List (groupBy)
import System.IO (hFlush, hPutStrLn, stdout)
import Poker.Cards
import Poker.Hands
main :: IO ()
main = do
let ghs = groupBy (\h1 h2 -> h1 `co... | mkscrg/chinese-poker | smart-player/main.hs | Haskell | bsd-2-clause | 882 |
{-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types,
RecordWildCards, UnboxedTuples, UnliftedFFITypes #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- |
-- Module : Data.Text.Array
-- Copyright : (c) 2009, 2010, 2011 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- P... | bos/text | src/Data/Text/Array.hs | Haskell | bsd-2-clause | 7,210 |
-- |
-- Module : Data.Packer.Endian
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Simple module to handle endianness swapping,
-- but GHC should provide (some day) primitives to call
-- into a cpu optimised version (e.g.... | vincenthz/hs-packer | Data/Packer/Endian.hs | Haskell | bsd-2-clause | 3,015 |
{-# LANGUAGE TypeOperators, DataKinds, PolyKinds, TypeFamilies,
TemplateHaskell, GADTs, UndecidableInstances, RankNTypes,
ScopedTypeVariables, MultiWayIf #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Promotion.Prelude.List
-- Cop... | int-index/singletons | src/Data/Promotion/Prelude/List.hs | Haskell | bsd-3-clause | 10,266 |
module Horbits.UI.Camera.Zoom (ZoomModel(..), linearZoom, geometricZoom, maxZoom) where
import Control.Applicative
import Control.Lens
import Control.Monad
import Data.List.NonEmpty as NE
newtype ZoomModel a = ZoomModel (NonEmpty a) deriving (Show, Eq)
maxZoom :: Getting a (... | chwthewke/horbits | src/horbits/Horbits/UI/Camera/Zoom.hs | Haskell | bsd-3-clause | 805 |
{-# LANGUAGE OverloadedStrings #-}
import System.FilePath.FindCompat((||?),always,extension,find,(==?))
import qualified Data.ByteString as BS
import Control.Applicative((<$>))
import qualified Data.ByteString.Char8 as BSC
import Text.Regex
import Maybe(isJust,fromJust)
import System(getArgs)
import qualified Data.List... | marcmo/includeSpellChecker | old/checker_old.hs | Haskell | bsd-3-clause | 1,497 |
-- 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 GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Temperatur... | facebookincubator/duckling | Duckling/Temperature/TR/Rules.hs | Haskell | bsd-3-clause | 2,859 |
{-# LANGUAGE QuasiQuotes #-}
module ApiSpecSpec (main,spec) where
import Control.Lens hiding ((.=))
import Data.Aeson
import Data.Aeson.QQ
import qualified Data.ByteString.Lazy as LazyBytes
import qualified Data.HashMap.Strict as Map
import Data.Text (Text)
import Lib... | pbogdan/swagger | test/ApiSpecSpec.hs | Haskell | bsd-3-clause | 7,996 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
import Prelude hiding (reverse)
foo :: Int -> Int -> Int
[lq| foo :: n:Nat -> m:Nat -> Nat /[n+m] |]
foo n m
| cond 1 = 0
| cond 2 && n > 1 = foo (n-1) m
| cond 3 && m > 2 = foo (n+1) (m-2)
[lq| cond :: Int -> Bool |]
cond :: Int -> Bool
cond _ = undefin... | spinda/liquidhaskell | tests/gsoc15/unknown/pos/GeneralizedTermination.hs | Haskell | bsd-3-clause | 898 |
module Main (main) where
import Criterion.Main (bgroup, defaultMain)
import qualified MVC.ServiceBench
main :: IO ()
main = defaultMain
[ bgroup "MVC.Service" MVC.ServiceBench.benchmarks
]
| cmahon/mvc-service | benchmark/Bench.hs | Haskell | bsd-3-clause | 209 |
-- |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module WebApi.Schema where
import Data.Proxy
import WebApi.Docs
import Language.Haskell.TH.Quote
import Language.Haskell.TH
import Data.Text (Text)
discovery :: Proxy api -> ()
dis... | byteally/webapi | webapi-docs/src/WebApi/Schema.hs | Haskell | bsd-3-clause | 339 |
{-# Language OverloadedStrings #-}
--------------------------------------------------------------------
-- |
-- Module : Utils.Katt.Utils
--
-- Contains shared type declarations and various utility functions.
--
module
Utils.Katt.Utils
where
import Control.Error hiding (tryIO)
import qualified Control.Exce... | davnils/katt | katt-lib/src/Utils/Katt/Utils.hs | Haskell | bsd-3-clause | 6,195 |
module Day12 (part1,part2,test1) where
import Control.Applicative
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Text.Trifecta
type Register = Char
data Instruction = CpyI Integer Register | CpyR Register Register | Inc Register | Dec Register | JnzR... | z0isch/aoc2016 | src/Day12.hs | Haskell | bsd-3-clause | 3,240 |
#!/usr/bin/runhaskell
module Main where
import GameLoader
import Data.String.Utils
import Website
main = do
putStrLn "Welcome to the HSB.\nPlease standby..."
putStrLn "Loading Team Info"
teamInfos <- loadTeams
writeFile "teamdata.csv" . join "\n" . map show $ teamInfos --Write the main team info out for AO
pu... | TheGreenMachine/Scouting-Backend | src/Main.hs | Haskell | bsd-3-clause | 479 |
{-# LANGUAGE TemplateHaskell #-}
-----------------------------------------------------------------------------
-- |
-- Licence : BSD-style (see LICENSE)
--
-- Embeded driver assembly that helps in generating bindings.
--
-----------------------------------------------------------------------------
module Foreig... | tim-m89/Salsa | Foreign/Salsa/Driver.hs | Haskell | bsd-3-clause | 524 |
module Language.Haskell.Stepeval (Scope, eval, itereval, printeval, stepeval) where
import Control.Arrow (first)
import Control.Applicative ((<$), (<$>), (<*>), (<|>))
import Control.Monad (guard, join, replicateM)
import Data.Foldable (foldMap)
import Data.List (delete, find, partition, unfoldr)
import Data.Maybe (fr... | bmillwood/stepeval | src/Language/Haskell/Stepeval.hs | Haskell | bsd-3-clause | 28,500 |
-- ^
-- Handlers for Lono endpoints
module Handlers.Lono where
import Api.Lono
import Handlers.Common
import qualified Handlers.RssReaders.Feeds as F
import qualified Handlers.RssReaders.Subscriptions as S
import qualified Handlers.RssReaders.UserPosts as U
import Persistence.Lono.Common
import Persistence.RssReaders.... | gabesoft/kapi | src/Handlers/Lono.hs | Haskell | bsd-3-clause | 3,126 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVari... | meteogrid/sigym4-units-accelerate | src/Sigym4/Units/Accelerate.hs | Haskell | bsd-3-clause | 679 |
-- |
-- This module contains functions which help when unmarshalling query responses
module Network.TableStorage.Query (
edmBinary, edmBoolean, edmDateTime, edmDouble,
edmGuid, edmInt32, edmInt64, edmString
) where
import Data.Time ( UTCTime )
import Network.TableStorage.Types
( Entity(entityColumns),
E... | paf31/tablestorage | src/Network/TableStorage/Query.hs | Haskell | bsd-3-clause | 2,446 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, TypeFamilies #-}
import qualified Common.Matrix.Matrix as M
import Common.NumMod.MkNumMod
mkNumMod True 100000000
type Zn = Int100000000
solve :: Integer -> Zn
solve n = (((mat `M.power` p) `M.multiply` initial) M.! (1, 1)) - 1
where
p = 987654321... | foreverbell/project-euler-solutions | src/356.hs | Haskell | bsd-3-clause | 490 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Network
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/network/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : provisi... | bjornbm/network | Network.hs | Haskell | bsd-3-clause | 15,722 |
module Chp84
where
{-- Functor typeclass --}
{--
And now, we're going to take a look at the Functor typeclass, which is basically for things that can be mapped over.
You're probably thinking about lists now, since mapping over lists is such a dominant idiom in Haskell. And you're right, the list type is part of the... | jamesyang124/haskell-playground | src/Chp84.hs | Haskell | bsd-3-clause | 9,801 |
{-# LANGUAGE FlexibleContexts #-}
module Cloud.AWS.RDS.Event
( describeEvents
, describeEventCategories
) where
import Cloud.AWS.Lib.Parser.Unordered (XmlElement, (.<), content)
import Control.Applicative
import Control.Monad.Trans.Resource (MonadThrow, MonadResource, MonadBaseControl)
import Data.Text (T... | worksap-ate/aws-sdk | Cloud/AWS/RDS/Event.hs | Haskell | bsd-3-clause | 2,140 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.NV.PixelDataRange
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
-... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/NV/PixelDataRange.hs | Haskell | bsd-3-clause | 963 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
-- |
-- Module: Graphics.ChalkBoard.Types
-- Copyright: (c) 2009 Andy Gill
-- License: BSD3
--
-- Maintainer: Andy Gill <andygill@ku.edu>
-- Stability: unstable
-- Portability: ghc
--
-- This module contains the types used by chalkboard, except Board itself.
--
m... | andygill/chalkboard2 | Graphics/ChalkBoard/Types.hs | Haskell | bsd-3-clause | 5,487 |
-- | Tools to build and access an AO dictionary.
module AO.Dict
( AODef, AODictMap, AODict
, buildAODict, cleanAODict, emptyAODict
, readAODict, updateAODict, unsafeUpdateAODict
, AODictIssue(..)
) where
import Control.Monad ((>=>))
import Data.Maybe (fromJust)
import qualified Data.List as L
impo... | dmbarbour/awelon | hsrc/AO/Dict.hs | Haskell | bsd-3-clause | 6,940 |
-- Tests for Statistics.Test.NonParametric
module Tests.NonParametric (tests) where
import Statistics.Distribution.Normal (standard)
import Statistics.Test.KolmogorovSmirnov
import Statistics.Test.MannWhitneyU
import Statistics.Test.KruskalWallis
import Statistics.Test.WilcoxonT
import Test.Framework (Test, testGroup)... | fpco/statistics | tests/Tests/NonParametric.hs | Haskell | bsd-2-clause | 12,172 |
-- %************************************************************************
-- %* *
-- The known-key names for Template Haskell
-- %* *
-- %**********************************... | ml9951/ghc | compiler/prelude/THNames.hs | Haskell | bsd-3-clause | 39,682 |
{-# LANGUAGE MagicHash #-}
-----------------------------------------------------------------------------
--
-- GHCi Interactive debugging commands
--
-- Pepe Iborra (supported by Google SoC) 2006
--
-- ToDo: lots of violation of layering here. This module should
-- decide whether it is above the GHC API (import GHC a... | pparkkin/eta | compiler/ETA/Interactive/Debugger.hs | Haskell | bsd-3-clause | 10,188 |
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, StandaloneDeriving #-}
import Prelude hiding (mapM)
import Options.Applicative
import Data.Monoid ((<>))
import Control.Monad.Trans.Class
import Data.Vector (Vector)
import qualified Data.Vector.Unboxed as VU
imp... | beni55/bayes-stack | network-topic-models/RunCI.hs | Haskell | bsd-3-clause | 7,455 |
module Boo where
{-@ incr :: Int -> Bool @-}
incr :: Int -> Int
incr x = x + 1
| ssaavedra/liquidhaskell | tests/crash/errmsg-mismatch.hs | Haskell | bsd-3-clause | 81 |
-- |
-- This module contains the Relapse type expression.
module Data.Katydid.Relapse.Exprs.Type
( mkTypeExpr
, typeExpr
)
where
import Data.Katydid.Relapse.Expr
-- |
-- mkTypeExpr is used by the parser to create a type expression for the specific input type.
mkTypeExpr :: [AnyExpr] -> Either String ... | katydid/haslapse | src/Data/Katydid/Relapse/Exprs/Type.hs | Haskell | bsd-3-clause | 1,218 |
{-# LANGUAGE TemplateHaskell, Rank2Types, CPP #-}
#ifndef NO_SAFE_HASKELL
{-# LANGUAGE Trustworthy #-}
#endif
-- | Test all properties in the current module, using Template Haskell.
-- You need to have a @{-\# LANGUAGE TemplateHaskell \#-}@ pragma in
-- your module for any of these to work.
module Test.QuickCheck.All(
... | soenkehahn/quickcheck | Test/QuickCheck/All.hs | Haskell | bsd-3-clause | 7,492 |
{-# LANGUAGE CPP #-}
import Data.Function
import System.Environment
import System.FilePath
import Test.Haddock
import Test.Haddock.Utils
checkConfig :: CheckConfig String
checkConfig = CheckConfig
{ ccfgRead = Just
, ccfgClean = \_ -> id
, ccfgDump = id
, ccfgEqual = (==) `on` crlfToLf
}
dirC... | Fuuzetsu/haddock | latex-test/Main.hs | Haskell | bsd-2-clause | 567 |
{-| ConstantUtils contains the helper functions for constants
This module cannot be merged with 'Ganeti.Utils' because it would
create a circular dependency if imported, for example, from
'Ganeti.Constants'.
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms... | andir/ganeti | src/Ganeti/ConstantUtils.hs | Haskell | bsd-2-clause | 6,686 |
module Models.NRS where
import BasicPrelude ( Show )
import Data.Aeson ( ToJSON )
import Data.Time ( Day )
import GHC.Generics ( Generic )
import Models.Tree
import Year
data NRS ... | dogweather/nevada-revised-statutes-parser | src/Models/NRS.hs | Haskell | bsd-3-clause | 489 |
module WhereBind where
main :: Fay ()
main =
let x = 10 :: Int
in print $ x + y
where y = 20
| fpco/fay | tests/whereBind.hs | Haskell | bsd-3-clause | 104 |
{-# LANGUAGE UnboxedTuples, CPP #-}
module State where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
newtype State s a = State { runState' :: s -> (# a, s #) }
instance Functor (State s) where
fmap f m = State $ \s -> case runState' m s of
(# r, s' #) -> (# f r, ... | siddhanathan/ghc | compiler/utils/State.hs | Haskell | bsd-3-clause | 1,332 |
{-# LANGUAGE Trustworthy #-}
-- ----------------------------------------------------------------------------
-- | This module provides scalable event notification for file
-- descriptors and timeouts.
--
-- This module should be considered GHC internal.
--
-- -----------------------------------------------------------... | spacekitteh/smcghc | libraries/base/GHC/Event.hs | Haskell | bsd-3-clause | 1,132 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.TagWindows
-- Copyright : (c) Karsten Schoelzel <kuser@gmx.de>
-- License : BSD
--
-- Maintainer : Karsten Schoelzel <kuser@gmx.de>
-- Stability : unstable
-- Portability : unportable
--
-- ... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/TagWindows.hs | Haskell | bsd-2-clause | 7,669 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.ParseUtils
-- Copyright : (c) The University of Glasgow 2004
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Utilities for parsing 'PackageDescription... | tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/ParseUtils.hs | Haskell | bsd-3-clause | 29,528 |
-- Test case of known literal with wraparound
test = case 1 :: Int of
0x10000000000000001 -> "A"
_ -> "B"
test2 = case 0x10000000000000001 :: Int of
1 -> "A"
_ -> "B"
main = putStrLn $ test ++ test2
| ezyang/ghc | testsuite/tests/codeGen/should_run/T9533b.hs | Haskell | bsd-3-clause | 237 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, MagicHash
, UnboxedTuples
#-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.TopHandler
-- Copyright : (c) The University of G... | urbanslug/ghc | libraries/base/GHC/TopHandler.hs | Haskell | bsd-3-clause | 8,607 |
{-# LANGUAGE DataKinds #-}
module T8455 where
ty = [t| 5 |]
| ghc-android/ghc | testsuite/tests/quotes/T8455.hs | Haskell | bsd-3-clause | 62 |
import System.Environment
import System.IO
import System.Directory
import Control.Monad
import Shake
import JsonSettings
import RevReport
import WithLatestLogs
import Summary
import GraphReport
import BenchNames
import GraphSummaries
import GHC.IO.Encoding
{-
We want to build everything into one executable, bit stil... | nomeata/gipeda | src/gipeda.hs | Haskell | mit | 1,225 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-pointintimerecoveryspecification.html
module Stratosphere.ResourceProperties.DynamoDBTablePoin... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/DynamoDBTablePointInTimeRecoverySpecification.hs | Haskell | mit | 2,017 |
-- This file is part of the 'union-find-array' library. It is licensed
-- under an MIT license. See the accompanying 'LICENSE' file for details.
--
-- Authors: Bertram Felgenhauer
{-# LANGUAGE RankNTypes, FlexibleContexts, CPP #-}
-- |
-- Low-level interface for managing a disjoint set data structure, based on
-- 'Con... | haskell-rewriting/union-find-array | src/Data/Union/ST.hs | Haskell | mit | 4,700 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
module Crud.Core where
-- import Data.Generics
import qualified Language.Haskell.TH as TH
-- import Language.Haskell.TH.Quote
-- import Data.Data
import Import
import Yesod.Form.Bootstrap3
import Text.Blaze
{-
Este conjunto de operaciones permite al pr... | jairoGilC/Yesod-CRUD-Generator | Crud/Core.hs | Haskell | mit | 10,805 |
module GUBS.Solver.Formula where
import Data.Foldable (toList)
import GUBS.Algebra
data Atom e = Geq e e | Eq e e
deriving (Functor, Foldable, Traversable)
data BoolLit l = BoolLit l | NegBoolLit l
deriving (Functor, Foldable, Traversable)
-- TODO gadtify
data Formula l e =
Top
| Bot
| Lit (BoolLit l)
... | mzini/gubs | src/GUBS/Solver/Formula.hs | Haskell | mit | 2,876 |
-- The sum of the squares of the first ten natural numbers is,
-- 1^2 + 2^2 + ... + 10^2 = 385
-- The square of the sum of the first ten natural numbers is,
-- (1 + 2 + ... + 10)^2 = 55^2 = 3025
-- Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 −... | daniel-beard/projecteulerhaskell | Problems/p6.hs | Haskell | mit | 565 |
data MyType = MyType
deriving (Show)
| zhangjiji/real-world-haskell | ch6/ch6.hs | Haskell | mit | 49 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.EXTsRGB
(pattern SRGB_EXT, pattern SRGB_ALPHA_EXT,
pattern SRGB8_ALPHA8_EXT,
pattern FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT, EXTsRGB,
castToEXTsRGB, gTypeEXTsRGB)
where
imp... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/EXTsRGB.hs | Haskell | mit | 1,204 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLEmbedElement
(js_getSVGDocument, getSVGDocument, js_setAlign, setAlign,
js_getAlign, getAlign, js_setHeight, setHeight, js_getHeight,
getHeight, js_setName, setName, js_getName, getName,... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLEmbedElement.hs | Haskell | mit | 6,343 |
module GetOpt.Declarative.UtilSpec (spec) where
import Prelude ()
import Helper
import System.Console.GetOpt
import GetOpt.Declarative.Util
spec :: Spec
spec = do
describe "mkUsageInfo" $ do
it "restricts output size to 80 characters" $ do
let options = [
... | hspec/hspec | hspec-core/test/GetOpt/Declarative/UtilSpec.hs | Haskell | mit | 987 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.