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 DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.BuildInfo (
BuildInfo(..),
emptyBuildInfo,
allLanguages,
allExtensions,
usedExtensions,
hcOptions,
hcProfOptions,
hcSharedOptions,
) where
import Prelude ()
import Distribution.Compat.Prelude... | sopvop/cabal | Cabal/Distribution/Types/BuildInfo.hs | bsd-3-clause | 7,270 | 0 | 11 | 2,167 | 1,374 | 821 | 553 | 143 | 1 |
-- |
-- Module : Language.C.Syntax
-- Copyright : (c) 2006-2011 Harvard University
-- (c) 2011-2013 Geoffrey Mainland
-- (c) 2013 Manuel M T Chakravarty
-- : (c) 2013-2015 Drexel University
-- License : BSD-style
-- Maintainer : mainland@cs.drexel.edu
{-# LANG... | mwu-tow/language-c-quote | Language/C/Syntax.hs | bsd-3-clause | 34,130 | 0 | 10 | 12,156 | 10,130 | 5,088 | 5,042 | 1,206 | 7 |
{-# LANGUAGE FlexibleContexts #-}
module Mental.Memoize where
import Protolude
import qualified Data.Map as Map
memoizeM :: (Ord a, MonadState (Map a b) m)
=> (a -> m b)
-> a
-> m b
memoizeM = memoizeM' identity const
memoizeM' :: (Ord a, MonadState s m)
=> (s -> ... | romac/mental | src/Mental/Memoize.hs | bsd-3-clause | 640 | 0 | 19 | 237 | 269 | 134 | 135 | 23 | 2 |
-- continuedfraction.hs
module Math.ContinuedFraction where
import Math.NumberTheoryFundamentals (intSqrt)
import Math.QQ
import Math.QuadraticField
-- initially we're only interested in continued fractions for quadratic irrationalities
-- we are looking to write
-- sqrt n = a0 + 1/a1+ 1/a2+ 1/a3+ ...
-... | nfjinjing/bench-euler | src/Math/ContinuedFraction.hs | bsd-3-clause | 2,696 | 6 | 14 | 704 | 778 | 432 | 346 | 31 | 1 |
data X
= X {
foo :: Int,
bar :: String
} deriving (Eq, Ord Show)
f x = x
| itchyny/vim-haskell-indent | test/recordtype/eq_first.in.hs | mit | 73 | 3 | 6 | 20 | 38 | 20 | 18 | -1 | -1 |
module MCTS.Games.Confrontation where
data Side = Light
| Dark
deriving (Eq)
data Piece = Aragorn
| Boromir
| Frodo
| Gandalf
| Gimli
| Legolas
| Merry
| Pippin
| Sam
| Balrog
| BlackRider... | rudyardrichter/MCTS | src/MCTS/Games/Confrontation.hs | mit | 2,683 | 0 | 8 | 1,435 | 623 | 360 | 263 | 109 | 18 |
module CO4.Algorithms.TopologicalSort
(bindingGroups, adtGroups)
where
import Data.Graph (stronglyConnComp,flattenSCC)
import Data.List (nub)
import CO4.Language
import CO4.Names (untypedName)
import CO4.Algorithms.Free (free)
-- |Computes groups of mutually recurs... | apunktbau/co4 | src/CO4/Algorithms/TopologicalSort.hs | gpl-3.0 | 1,141 | 0 | 12 | 293 | 331 | 178 | 153 | 21 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{- |
Module : Neovim.RPC.EventHandler
Description : Event handling loop
Copyright : (c) Sebastian Witte
License : Apache-2.0
Maintainer : woozletoff@gmail.com
Stability : experimental
-}
module Neovim.RPC.Event... | saep/nvim-hs | library/Neovim/RPC/EventHandler.hs | apache-2.0 | 3,458 | 0 | 17 | 967 | 785 | 412 | 373 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module HERMIT.Context
( -- * HERMIT Contexts
-- ** Path Synonyms
AbsolutePathH
, LocalPathH
-- ** The Standard Contex... | conal/hermit | src/HERMIT/Context.hs | bsd-2-clause | 16,385 | 0 | 15 | 4,320 | 2,947 | 1,627 | 1,320 | 214 | 9 |
{-# LANGUAGE BangPatterns #-}
module Tests.ImportanceSampler where
import Data.Dynamic
import Language.Hakaru.Types
import Language.Hakaru.Lambda
import Language.Hakaru.Distribution
import Language.Hakaru.ImportanceSampler
-- import Test.QuickCheck.Monadic
import Tests.Models
-- Some test programs in our language
... | bitemyapp/hakaru | Tests/ImportanceSampler.hs | bsd-3-clause | 3,832 | 2 | 13 | 1,129 | 1,371 | 674 | 697 | 100 | 5 |
-- |
-- Module : Crypto.ECC.Edwards25519
-- License : BSD-style
-- Maintainer : Olivier Chéron <olivier.cheron@gmail.com>
-- Stability : experimental
-- Portability : unknown
--
-- Arithmetic primitives over curve edwards25519.
--
-- Twisted Edwards curves are a familly of elliptic curves allowing
-- comple... | vincenthz/cryptonite | Crypto/ECC/Edwards25519.hs | bsd-3-clause | 13,150 | 0 | 13 | 3,756 | 2,282 | 1,217 | 1,065 | 212 | 2 |
module RunSampler ( SamplerModel (..)
, SamplerOpts (..), samplerOpts
, runSampler
, createSweeps
) where
import Options.Applicative
import Data.Monoid ((<>))
import System.FilePath.Posix ((</>))
import Syst... | beni55/bayes-stack | network-topic-models/RunSampler.hs | bsd-3-clause | 7,342 | 0 | 18 | 2,818 | 1,881 | 915 | 966 | 151 | 2 |
{-
Teak synthesiser for the Balsa language
Copyright (C) 2007-2010 The University of Manchester
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... | Mahdi89/eTeak | src/Options.hs | bsd-3-clause | 13,461 | 0 | 17 | 3,874 | 3,231 | 1,641 | 1,590 | 208 | 9 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
module TcRnExports (tcRnExports, exports_from_avail) where
import GhcPrelude
import HsSyn
import PrelNames
import RdrName
import TcRnMonad
import TcEnv
import ... | ezyang/ghc | compiler/typecheck/TcRnExports.hs | bsd-3-clause | 29,466 | 56 | 23 | 9,607 | 5,470 | 2,833 | 2,637 | 412 | 16 |
-----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
-- Maintainer : Todd Mohney <toddmohney@gmail.com>
--
-- The deploy keys API, as described at
-- <https://developer.github.com/v3/repos/keys>
module GitHub.Endpoints.Repos.DeployKeys (
-- * Querying d... | jwiegley/github | src/GitHub/Endpoints/Repos/DeployKeys.hs | bsd-3-clause | 1,778 | 0 | 10 | 258 | 360 | 193 | 167 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
-- | Functions for manipulating translation units.
--
-- To start analyzing a translation unit, call 'Index.withNew' to create a new index and
-- call 'withParsed' in the callback. Inside the callback for 'withParsed', you'l... | deech/LibClang | src/Clang/TranslationUnit.hs | bsd-3-clause | 9,598 | 0 | 16 | 2,614 | 1,089 | 592 | 497 | 87 | 3 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilie... | flowbox-public/accelerate-cuda | Data/Array/Accelerate/CUDA/Array/Cache.hs | bsd-3-clause | 6,399 | 0 | 17 | 1,612 | 1,515 | 807 | 708 | 90 | 3 |
{-# LANGUAGE BangPatterns, MagicHash #-}
-- |
-- Module : Data.Text.Internal.Fusion
-- Copyright : (c) Tom Harper 2008-2009,
-- (c) Bryan O'Sullivan 2009-2010,
-- (c) Duncan Coutts 2009
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
--... | bgamari/text | src/Data/Text/Internal/Fusion.hs | bsd-2-clause | 8,823 | 0 | 22 | 3,030 | 2,263 | 1,191 | 1,072 | 152 | 4 |
{-# LANGUAGE CPP, ForeignFunctionInterface, GeneralizedNewtypeDeriving,
OverloadedStrings #-}
-- | Core types and operations for DOM manipulation.
module Haste.DOM.Core (
Elem (..), IsElem (..), Attribute, AttrName (..),
set, with, attribute, children,
click, focus, blur,
document, document... | akru/haste-compiler | libraries/haste-lib/src/Haste/DOM/Core.hs | bsd-3-clause | 8,425 | 0 | 11 | 1,742 | 1,910 | 1,021 | 889 | 145 | 4 |
-- | Parsing all context-free grammars using Earley's algorithm.
module Text.Earley
( -- * Context-free grammars
Prod, satisfy, (<?>), Grammar, rule
, -- * Derived operators
symbol, namedSymbol, word
, -- * Parsing
Report(..), Result(..), parser, allParses, fullParses
-- * Recognition
, report
... | bitemyapp/Earley | Text/Earley.hs | bsd-3-clause | 411 | 0 | 5 | 79 | 83 | 58 | 25 | 9 | 0 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ru-RU">
<title>Active Scan Rules - Beta | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | thc202/zap-extensions | addOns/ascanrulesBeta/src/main/javahelp/org/zaproxy/zap/extension/ascanrulesBeta/resources/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 996 | 78 | 67 | 162 | 440 | 221 | 219 | -1 | -1 |
module Scope2 where
-- import qualified Control.Parallel.Strategies as T
import qualified Control.Parallel.Strategies as S
-- should fail, as there are two possible qualifiers...
f = let (n1, n22_2)
= S.runEval
(do n1' <- S.rpar n11
n22_2 <- S.rpar n22
... | RefactoringTools/HaRe | old/testing/evalAddEvalMon/Scope2_TokOut.hs | bsd-3-clause | 434 | 0 | 15 | 177 | 98 | 53 | 45 | 10 | 1 |
module Mod5 where
f1 0 l = take 42 l
f1 n l = take n l
f2 0 hi = drop 0 hi
f2 0 l = drop 0 l
f2 n l = drop n l
g = 42 | kmate/HaRe | old/testing/instantiate/Mod5_TokOut.hs | bsd-3-clause | 121 | 0 | 5 | 44 | 84 | 41 | 43 | 7 | 1 |
-- | This is the syntax for bkp files which are parsed in 'ghc --backpack'
-- mode. This syntax is used purely for testing purposes.
module BkpSyn (
-- * Backpack abstract syntax
HsUnitId(..),
LHsUnitId,
HsModuleSubst,
LHsModuleSubst,
HsModuleId(..),
LHsModuleId,
HsComponentId(..),
... | ezyang/ghc | compiler/backpack/BkpSyn.hs | bsd-3-clause | 2,669 | 0 | 12 | 718 | 492 | 295 | 197 | 47 | 0 |
module List1 where
data Expr = Var String Int Int |
Add Expr Expr |
Mul Expr Expr
eval :: [Expr] -> [Int]
eval xs = [x | (Var var_1 x y) <- xs] | kmate/HaRe | old/testing/addField/List1_TokOut.hs | bsd-3-clause | 170 | 0 | 9 | 60 | 75 | 42 | 33 | 6 | 1 |
-- | Module with single foreign export
module MyForeignLib.Hello (sayHi) where
import MyForeignLib.SomeBindings
import MyForeignLib.AnotherVal
foreign export ccall sayHi :: IO ()
-- | Say hi!
sayHi :: IO ()
sayHi = putStrLn $
"Hi from a foreign library! Foo has value " ++ show valueOfFoo
++ " and anotherVal h... | mydaum/cabal | cabal-testsuite/PackageTests/ForeignLibs/src/MyForeignLib/Hello.hs | bsd-3-clause | 350 | 0 | 8 | 66 | 75 | 41 | 34 | 8 | 1 |
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
module ShouldCompile where
-- I bet this test is a mistake! From the layout it
-- looks as if 'test' takes three args, the latter two
-- of higher rank. But the parens around these args are
-- missing, so it parses as
-- test :: [a]
-- -> forall a. ... | ghc-android/ghc | testsuite/tests/haddock/should_compile_noflag_haddock/haddockC027.hs | bsd-3-clause | 652 | 0 | 12 | 205 | 90 | 59 | 31 | -1 | -1 |
{-# LANGUAGE MultiWayIf #-}
module TcMultiWayIfFail where
x1 = if | True -> 1 :: Int
| False -> "2"
| otherwise -> [3 :: Int]
| wxwxwwxxx/ghc | testsuite/tests/typecheck/should_fail/TcMultiWayIfFail.hs | bsd-3-clause | 154 | 0 | 8 | 54 | 46 | 25 | 21 | 5 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
{-|
Module : SodaFunctions
Description : SODA Query Level Functions
Copyright : (c) Steven W
License : MIT
Maintainer : Steven W <StevenW.Info@gmail.com>
Stability : Unstable
The types for adding in SODA query level functi... | StevenWInfo/haskell-soda | src/SodaFunctions.hs | mit | 18,516 | 0 | 17 | 4,759 | 4,502 | 2,304 | 2,198 | 169 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE BangPatterns #-}
module Crypto.Hash.SHA256
(
SHA256
, SHA224
) where
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as LBS
import qualified Data.ByteString.Lazy.Char8 as LC
import Data.ByteString (ByteString)
impor... | wangbj/hashing | src/Crypto/Hash/SHA256.hs | mit | 8,091 | 0 | 26 | 2,059 | 3,070 | 1,646 | 1,424 | 184 | 1 |
{-# LANGUAGE EmptyDataDecls, DeriveGeneric, OverloadedStrings, ScopedTypeVariables #-}
{-|
Module : Main
Description : The @minimalistic@ HAAP example
This module presents a minimalistic example of the usage of HAAP, consisting on testing an @HSpec@
specification, running several code analysis plugins, providing... | hpacheco/HAAP | examples/tourney/tourney.hs | mit | 3,203 | 0 | 14 | 657 | 750 | 408 | 342 | 63 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Text.Greek.Source.Perseus.TEI where
--import Text.Greek.Parse.Utility
import Text.Greek.Xml.Parse
--import Text.Parsec.Char
--import Text.Parsec.Combinator
import qualified Data.Text as Text
import qualified Data.X... | scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/Source/Perseus/TEI.hs | mit | 1,023 | 2 | 10 | 164 | 246 | 139 | 107 | 31 | 1 |
module Tests.Application where
import Test.Tasty
import MoneyStacks.Application as App
import GHC.IO.Handle
import System.IO
import System.Directory
import System.Environment (withArgs)
-- |return as String what is printed to StdOut
catchOutput :: IO () -> IO String
catchOutput f = do
tmpd <- getTemporaryDirectory... | apirogov/MoneyStacks | tests/Tests/Application.hs | mit | 880 | 0 | 8 | 145 | 225 | 111 | 114 | 23 | 1 |
-- | The module that contains all of the type definitions in the library.
-- They're contained in one place so that recursive module imports may be
-- avoided when only because of type definitions.
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAG... | crockeo/whatisthisgame | src/WhatIsThisGame/Data.hs | mit | 9,542 | 0 | 11 | 3,211 | 1,628 | 933 | 695 | 149 | 1 |
module Network.IRC.Client.Encode
( packWithEncoding
, unpackWithEncoding
, fromStrict' ) where
import Data.Text.Encoding
import qualified Data.Text as T
import qualified Data.ByteString as P (ByteString) -- type name only
import qualified Data.ByteString as S
impor... | cosmo0920/hs-IRC | Network/IRC/Client/Encode.hs | mit | 1,137 | 0 | 9 | 224 | 192 | 121 | 71 | 19 | 1 |
module Ch4prob where
-- 4.8.1 --
halve :: [a] -> ([a], [a])
halve x = splitAt dee x
where
dee = (length x) `div` 2
-- 4.8.2.a --
safetail1 xs = if null xs then [] else tail xs
-- 4.8.2.b --
safetail2 xs | null xs = []
| otherwise =... | HaskellForCats/HaskellForCats | MenaBeginning/Ch004/ch4Probs2.hs | mit | 1,241 | 0 | 9 | 436 | 298 | 164 | 134 | 20 | 2 |
-- | SPDX-License-Identifier: MIT
--
-- Implements the /HMAC-Based One-Time Password Algorithm/ (HOTP) as
-- defined in [RFC 4226](https://tools.ietf.org/html/rfc4226)
-- and the /Time-Based One-Time Password Algorithm/ (TOTP) as defined
-- in [RFC 6238](https://tools.ietf.org/html/rfc6238).
--
-- Many operations in th... | matshch/OTP | src/Data/OTP.hs | mit | 7,909 | 0 | 22 | 2,085 | 1,025 | 570 | 455 | 100 | 3 |
-- | Compiling the payoff language to Futhark
module Examples.PayoffToFuthark where
import Data.List
import ContractTranslation
import Contract
import Data.Text.Template
import qualified Data.ByteString.Lazy as S
import qualified Data.Text as T
import qualified Data.Text.Lazy as E
internalFuncName = "payoffInternal... | annenkov/contracts | Coq/Extraction/contracts-haskell/src/Examples/PayoffToFuthark.hs | mit | 7,701 | 0 | 18 | 2,213 | 2,297 | 1,154 | 1,143 | 128 | 11 |
module FunctorsAndMonoids where
import Data.Char
import Data.List
import Data.Monoid
import Control.Applicative
import qualified Data.Foldable as F
fmapIO = do line <- fmap (intersperse '-' . reverse . map toUpper) getLine
putStrLn line
-- Works with partial application for '+' function ... | aquatir/remember_java_api | code-sample-haskell/hello_world/func_magic/functors_and_monoids.hs | mit | 3,006 | 0 | 12 | 808 | 760 | 417 | 343 | 40 | 1 |
factorial :: Integer -> Integer
factorial n
| n==0 =1
| n>0 =n* factorial (n-1)
| otherwise =error " undefined negative error "
main=print(factorial 200)
| manuchandel/Academics | Principles-Of-Programming-Languages/factorial.hs | mit | 158 | 0 | 9 | 29 | 81 | 38 | 43 | 6 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
-- | A Shakespearean module for TypeScript, introducing type-safe,
-- compile-time variable and url interpolation. It is exactly the same as
-- "Text.Julius", except that the ... | yesodweb/shakespeare | Text/TypeScript.hs | mit | 5,640 | 1 | 16 | 1,048 | 541 | 332 | 209 | 61 | 1 |
{-|
Handler for a single image, showing the image, title, description, tags, and allows
the uploader to modify everything.
-}
module Handler.Image where
import Text.Julius (rawJS)
import Yesod.Auth
import Database.Esqueleto
import Control.Arrow
import Import hiding ((==.), delete, (=.), update)
import Handler.Tags
m... | alexisVallet/aci-webapp | Handler/Image.hs | gpl-2.0 | 5,364 | 0 | 33 | 1,640 | 1,041 | 528 | 513 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
-- Copyright (C) 2002-2003 David Roundy
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- ... | DavidAlphaFox/darcs | src/Darcs/UI/Commands/Move.hs | gpl-2.0 | 15,292 | 0 | 22 | 4,014 | 3,612 | 1,908 | 1,704 | 291 | 13 |
module Playlist where
import Control.Monad.Trans.State
import Data.List
import System.FilePath as F
type Song = F.FilePath
data Ext = M3u | Pls | Wpl | Xspf | Other deriving Eq
--A playlist is basically its location and a list of its songs
data Playlist = Pl {getPath :: F.FilePath,
getSongs :: [... | fcostantini/PlEb | src/Playlist.hs | gpl-3.0 | 1,009 | 0 | 11 | 332 | 331 | 179 | 152 | 27 | 6 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{- | This module contains definitions for asynchronous actions that can be
performed by worker ... | Southern-Exposure-Seed-Exchange/southernexposure.com | server/src/Workers.hs | gpl-3.0 | 19,987 | 0 | 28 | 6,314 | 4,358 | 2,261 | 2,097 | 372 | 33 |
module Game.Setup(setupGame) where
import Data.IORef
import qualified Linear as L
import Model.Camera
import Model.ClearColor
import Model.Entity
import Model.GameState
import Model.InputState
import Model.Light
import Model.... | halvorgb/AO2D | src/Game/Setup.hs | gpl-3.0 | 4,384 | 0 | 12 | 1,517 | 1,306 | 718 | 588 | 95 | 1 |
module Handler.ScreenCaptureDetections (
postScreenCaptureDetectionsR) where
import Data.Aeson
import Handler.Extension
import Import
import Model.Device
import Model.PushNotification
data POSTRequest = POSTRequest ByteString Text
instance FromJSON POSTRequest wher... | rumuki/rumuki-server | src/Handler/ScreenCaptureDetections.hs | gpl-3.0 | 1,207 | 0 | 14 | 213 | 244 | 123 | 121 | -1 | -1 |
{- Chapter 2
-}
-- What is the difference between -> and <-?
removeNonUppercase :: [Char] -> [Char]
removeNonUppercase st = [s | s <- st, elem s ['A'..'Z']]
addThree :: Int -> Int -> Int -> Int
addThree x y z = x + y + z
-- The difference between Integer and Int is that Integer has BIG numbers...
factorial :: Intege... | medik/lang-hack | Haskell/LearnYouAHaskell/c02/chapter2.hs | gpl-3.0 | 800 | 0 | 8 | 160 | 147 | 82 | 65 | 8 | 1 |
module Fathens.Bitcoin.Wallet.Address (
Prefix_(isTestnet)
, Prefix(..)
, isCompressing
, findBySymbol
, getPayload
, appendPayload
) where
import Control.Applicative
import Control.Monad
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as... | sawatani/bitcoin-hall | src/Fathens/Bitcoin/Wallet/Address.hs | gpl-3.0 | 3,573 | 0 | 10 | 1,079 | 1,315 | 670 | 645 | 88 | 1 |
----------------------------------------------------------------------
-- |
-- Module : Text.Bib.Reader.BibTeX
-- Copyright : 2015-2017 Mathias Schenner,
-- 2015-2016 Language Science Press.
-- License : GPL-3
--
-- Maintainer : mschenner.dev@gmail.com
-- Stability : experimental
-- Po... | synsem/texhs | src/Text/Bib/Reader/BibTeX.hs | gpl-3.0 | 1,572 | 0 | 14 | 245 | 251 | 151 | 100 | 17 | 2 |
module Cortex.Miranda.GrandMonadStack
( GrandMonadStack
, LesserMonadStack
) where
-- Functional dependencies with multiple monads of the same type (State monads
-- in this instance) suck big time. GHC wasn't able to compile the code, so
-- instead this ugly static monad stack is used.
import Control.Mon... | maarons/Cortex | Miranda/GrandMonadStack.hs | agpl-3.0 | 786 | 0 | 9 | 123 | 107 | 66 | 41 | 9 | 0 |
{-# LANGUAGE BangPatterns
, CPP
, FlexibleContexts
, FlexibleInstances
, GADTs
, MultiParamTypeClasses
, TypeFamilies
, TupleSections
, ScopedTypeVariables #-}
-- | Provides high level functions to define and apply filters on image... | RaphaelJ/friday | src/Vision/Image/Filter/Internal.hs | lgpl-3.0 | 30,964 | 0 | 22 | 11,293 | 8,128 | 4,044 | 4,084 | 491 | 5 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | Hashing functions and HMAC DRBG definition
module Network.Haskoin.Crypto.Hash
( Hash512(getHash512)
, Hash256(getHash256)
, Hash160(getHash160)
, CheckSum32(getCheckSum32)
, hash512
, hash256
, hash160
, hashSHA1
, doubleHash256
, addressHash
, checkSum32
, hmac512
, hma... | plaprade/haskoin | haskoin-core/src/Network/Haskoin/Crypto/Hash.hs | unlicense | 8,764 | 0 | 15 | 2,552 | 2,406 | 1,302 | 1,104 | 192 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Paths_agora (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import Foreign
import Foreign.C
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getE... | Lacaranian/hserv | dist/build/autogen/Paths_agora.hs | apache-2.0 | 3,043 | 0 | 21 | 737 | 889 | 467 | 422 | 72 | 5 |
import Test.Say
import Test.Answer
import SimpleJson
run :: String
run = sayHi ++ " " ++ answer
| EricYT/Haskell | src/test.hs | apache-2.0 | 97 | 0 | 6 | 18 | 32 | 18 | 14 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fwarn-typed-holes #-}
module Main where
import Codec.Picture
import Codec.Picture.Types
import Control.Error
import Control.Monad
import Control.Monad.IO.Class
import Co... | erochest/intelligent-design | Main.hs | apache-2.0 | 2,394 | 0 | 18 | 720 | 657 | 344 | 313 | 60 | 2 |
{-# LANGUAGE MultiParamTypeClasses
, TemplateHaskell
, ScopedTypeVariables
, FlexibleInstances
, FlexibleContexts
, UndecidableInstances
#-}
import Unbound.LocallyNameless
--import Control.Applicative
import Control.Arrow ((+++))
import Control.Monad
import ... | nickng/gong | StuffParams.hs | apache-2.0 | 16,336 | 0 | 22 | 5,029 | 5,304 | 2,670 | 2,634 | -1 | -1 |
module Poset.A332809 (a332809, a332809_list) where
import Poset.Wichita (wichitaRanks)
import Data.Set (Set)
import qualified Data.Set as Set
a332809 :: Integer -> Int
a332809 = sum . map Set.size . wichitaRanks
a332809_list :: [Int]
a332809_list = map a332809 [1..]
| peterokagey/haskellOEIS | src/Poset/A332809.hs | apache-2.0 | 269 | 0 | 8 | 39 | 90 | 53 | 37 | 8 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Data.Propagator.Cell where
import Control.Monad
import Control.Monad.ST
import Data.Foldable
import Data.Primitive.... | Icelandjack/propagators | src/Data/Propagator/Cell.hs | bsd-2-clause | 2,088 | 0 | 14 | 539 | 1,155 | 579 | 576 | 52 | 4 |
-- 153
import Euler(toDigitsBase)
kk = 1000
countLarger k = length $ filter moreDigits $ take k $ iterate genSqrt (3,2)
where moreDigits (n,d) = countDigits n > countDigits d
countDigits x = length $ toDigitsBase 10 x
genSqrt (n,d) = (d*2+n, n+d)
main = putStrLn $ show $ countLarger kk
| higgsd/euler | hs/57.hs | bsd-2-clause | 314 | 0 | 9 | 78 | 143 | 74 | 69 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Web.Pagure.Internal.Wreq
-- Copyright : (C) 2015 Ricky Elrod
-- License : BSD2 (see LICENSE file)
-- Maintainer : Ricky Elrod <relrod@redhat.com>
-- Stability : experimental
-- Portability :... | fedora-infra/pagure-haskell | src/Web/Pagure/Internal/Wreq.hs | bsd-2-clause | 2,365 | 0 | 15 | 380 | 491 | 267 | 224 | 38 | 2 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, OverloadedStrings, ViewPatterns #-}
module TKYProf
( TKYProf (..)
, Route (..)
, resourcesTKYProf
, Handler
, Widget
, module Yesod.Core
, module Settings
, module StaticFiles
, module Model
, module Control.Monad.STM
, StaticRoute
, lift
... | maoe/tkyprof | TKYProf.hs | bsd-2-clause | 3,804 | 0 | 16 | 724 | 674 | 375 | 299 | 56 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Backends.Hoogle
-- Copyright : (c) Neil Mitchell 2006-2008
-- License : BSD-like
--
-- Maintainer : haddock@projects.haskell.org
-- Stability : experimental
-- Portability : portable
--
-- Write ou... | nominolo/haddock2 | src/Haddock/Backends/Hoogle.hs | bsd-2-clause | 10,311 | 0 | 18 | 2,949 | 4,030 | 2,059 | 1,971 | 198 | 12 |
{-
Problem 24
What is the 10^6th permutation of 0123456789?
Result
2783915460
4.42 s
-}
module Problem24 (solution) where
import Data.Permute
import CommonFunctions
import Data.Maybe
start = listPermute 10 [0..9]
nextN :: (Integral i) => i -> Permute -> Maybe Permute... | quchen/HaskellEuler | src/Problem24.hs | bsd-3-clause | 552 | 0 | 10 | 148 | 167 | 86 | 81 | 11 | 1 |
module Listen (listenSocket) where
import Network.Socket
listenQueueLength :: Int
listenQueueLength = 2048
listenSocket :: String -> IO Socket
listenSocket portNumber = do
let hint = defaultHints {addrFlags = [AI_PASSIVE]}
addrinfos <- getAddrInfo (Just hint) Nothing (Just portNumber)
let serveraddr = he... | kazu-yamamoto/witty | src/Listen.hs | bsd-3-clause | 602 | 0 | 12 | 106 | 169 | 80 | 89 | 15 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Yall.Lenq
-- Copyright : (c) 2012 Michael Sloan
-- License : BSD-style (see the LICENSE file)
-- Maintainer : Michael Sloan <mgsloan@gmail.com>
-- Stability : experimental
-- Portability : GHC only
-... | mgsloan/lenq | src/Data/Yall/Lenq.hs | bsd-3-clause | 1,014 | 0 | 6 | 156 | 91 | 62 | 29 | 6 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.StencilTwoSide
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabili... | haskell-opengl/OpenGLRaw | src/Graphics/GL/EXT/StencilTwoSide.hs | bsd-3-clause | 774 | 0 | 5 | 105 | 62 | 46 | 16 | 10 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANG... | achirkin/easytensor | easytensor/src-base/Numeric/DataFrame/Internal/Backend/Family/FloatX4.hs | bsd-3-clause | 17,779 | 0 | 25 | 5,187 | 6,256 | 3,280 | 2,976 | 383 | 1 |
{-|
Module : Omnifmt.Directory
Description : System directory utilities.
Copyright : (c) Henry J. Wylde, 2015
License : BSD3
Maintainer : public@hjwylde.com
System directory utilities.
-}
module Omnifmt.Directory (
-- * Changing directories
withCurrentDirectory,
) where
import Control.Monad.Catc... | hjwylde/omnifmt | src/Omnifmt/Directory.hs | bsd-3-clause | 833 | 0 | 10 | 138 | 132 | 75 | 57 | 8 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Example where
import Development.GitRev
panic :: String -> a
panic msg = error panicMsg
where panicMsg =
concat [ "[panic ", $(gitBranch), "@", $(gitHash)
, " (", $(gitCommitDate), ")"
, " (", $(gitCommitCount), " commits in HEAD)"
... | silky/gitrev | Example.hs | bsd-3-clause | 474 | 0 | 11 | 154 | 127 | 71 | 56 | 13 | 1 |
--file : Main.hs
--date : 17/01/18
--author : mi-na
--rational : main logic
--main logic
module Main where
--outer module(self-defined)
import FieldD
import InitializeO
import StatusO
import TurnO
import CliminalO
import AlgorithmO
--outer module(public)
import System.Random
import System.IO
import... | mi-na/scotland_yard | app/Main.hs | bsd-3-clause | 1,558 | 0 | 13 | 389 | 364 | 194 | 170 | 35 | 2 |
import Control.Distributed.Process
import Control.Distributed.Process.Node (initRemoteTable)
import Control.Distributed.Process.Zookeeper
import Control.Monad (void)
import System.Environment (getArgs)
-- Run the program with "args" to request a job named "args" - run with no
-- args to startup a boss and each worker.... | jeremyjh/distributed-process-zookeeper | examples/Boss.hs | bsd-3-clause | 2,950 | 0 | 22 | 1,290 | 590 | 277 | 313 | 61 | 4 |
module Main where
import System.Exit (exitFailure, exitSuccess)
import System.IO (hPutStrLn, stderr)
import qualified CabalBounds.Args as Args
import CabalBounds.Main (cabalBounds)
main :: IO ()
main = do
args <- Args.get
error <- cabalBounds args
case error of
Just err -> hPutStrLn stderr ("cabal-boun... | dan-t/cabal-bounds | exe/Main.hs | bsd-3-clause | 380 | 0 | 13 | 81 | 120 | 65 | 55 | 12 | 2 |
module Main (main) where
import Control.Monad
import Data.List
import DynFlags
import Language.Haskell.Extension
main :: IO ()
main = do
let ghcExtensions = map flagSpecName xFlags
cabalExtensions = map show [ toEnum 0 :: KnownExtension .. ]
ghcOnlyExtensions = ghcExtensions \\ cabalExtensions
... | bitemyapp/ghc | testsuite/tests/driver/T4437.hs | bsd-3-clause | 2,172 | 0 | 16 | 923 | 345 | 183 | 162 | 48 | 1 |
module Main where
{-
- The purpose of this program is to provide a nice and easy way to split up multiple
- segments of one audio file, separated by 'quiet' times, into their own separate files.
-}
-- Currently I am thinking that downsampling, averaging and elevating again might be the
-- correct solution here.
-... | CIFASIS/wavy | src/Splitter.hs | bsd-3-clause | 4,127 | 0 | 14 | 836 | 997 | 528 | 469 | 68 | 2 |
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, ConstraintKinds, PatternGuards, StandaloneDeriving #-}
#if !(MIN_VERSION_base(4,8,0))
{-# LANGUAGE OverlappingInstances #-}
#endif
module Idris.ParseHelpers where
import Prelude hiding (pi)
import Text.Trifecta.Delta
import Text.Trifecta hiding (span, stringLiteral, charL... | athanclark/Idris-dev | src/Idris/ParseHelpers.hs | bsd-3-clause | 26,092 | 0 | 25 | 8,581 | 7,488 | 3,824 | 3,664 | 439 | 8 |
module Day9 where
import Text.Megaparsec
import Text.Megaparsec.Lexer hiding (space)
import Text.Megaparsec.String
marker1 :: Parser Int
marker1 = do
_ <- char '('
numChars <- fromIntegral <$> integer
_ <- char 'x'
repCount <- fromIntegral <$> integer
_ <- char ')'
_ <- coun... | liff/adventofcode-2016 | app/Day9.hs | bsd-3-clause | 1,110 | 0 | 10 | 252 | 402 | 189 | 213 | 37 | 1 |
-- | Calculates yield sizes using rewriting functions.
module ADP.Multi.Rewriting.YieldSize where
import Data.Map (Map)
import qualified Data.Map as Map
import Control.Monad (liftM2)
import ADP.Multi.Parser
import ADP.Multi.Rewriting.Model
type YieldAnalysisAlgorithm a = a -> [ParserInfo] -> ParserInfo
-- for dim1... | adp-multi/adp-multi | src/ADP/Multi/Rewriting/YieldSize.hs | bsd-3-clause | 2,473 | 0 | 19 | 764 | 631 | 364 | 267 | 43 | 2 |
{- |
Module : ./THF/PrintTHF.hs
Description : A printer for the TPTP-THF Syntax
Copyright : (c) A. Tsogias, DFKI Bremen 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Alexis.Tsogias@dfki.de
Stability : provisional
Portability : portable
A printer for the TPTP-THF Input Syntax v5.1.0... | spechub/Hets | THF/PrintTHF.hs | gpl-2.0 | 16,451 | 0 | 18 | 4,358 | 5,093 | 2,371 | 2,722 | 383 | 3 |
module Control.Schule.DB where
-- $Id$
import Control.SQL
import Control.Types
import Control.Schule.Typ
import qualified Control.Student.Type as CST
import qualified Control.Student.DB
import Prelude hiding ( all )
-- | get alle Schulen aus DB
-- TODO: implementiere filter
get :: IO [ Schule ]
get = get_from_wher... | florianpilz/autotool | src/Control/Schule/DB.hs | gpl-2.0 | 1,823 | 13 | 16 | 560 | 598 | 306 | 292 | 54 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Applicative
-- Copyright : Conor McBride and Ross Paterson 2005
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer : ross@soi.city.ac.uk
-- Stability : experimental
-... | alekar/hugs | packages/base/Control/Applicative.hs | bsd-3-clause | 6,090 | 18 | 11 | 1,272 | 1,885 | 1,034 | 851 | 99 | 1 |
--
-- Copyright (c) 2014 Joachim Breitner
--
module CallArity
( callArityAnalProgram
, callArityRHS -- for testing
) where
import VarSet
import VarEnv
import DynFlags ( DynFlags )
import BasicTypes
import CoreSyn
import Id
import CoreArity ( typeArity )
import CoreUtils ( exprIsCheap, exprIsTrivial )
--i... | olsner/ghc | compiler/simplCore/CallArity.hs | bsd-3-clause | 29,200 | 0 | 17 | 7,033 | 3,275 | 1,786 | 1,489 | 209 | 2 |
--{-# LANGUAGE NamedFieldPuns, Safe #-}
{-# LANGUAGE NamedFieldPuns #-}
import Control.Concurrent.MVar (takeMVar)
import Control.Monad (forM, forM_, replicateM)
import Data.List (group, intercalate)
import Debug.Trace (trace)
import RP ( RP, RPE, RPR, RPW, ThreadState(..), tid, runRP, forkRP, joinRP, synchronizeRP, th... | anthezium/MonadicRP | src/RPmoveCbackNoSyncTest.hs | gpl-3.0 | 3,714 | 0 | 19 | 1,006 | 1,030 | 511 | 519 | 66 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE JavaScriptFFI #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
Copyright 2017 The CodeWorld Authors. 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 o... | venkat24/codeworld | funblocks-client/src/Blockly/Workspace.hs | apache-2.0 | 5,029 | 31 | 14 | 1,086 | 1,010 | 526 | 484 | 96 | 2 |
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.ParserCombinators.Parsec.Pos
-- Copyright : (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provis... | aslatter/parsec | src/Text/ParserCombinators/Parsec/Pos.hs | bsd-2-clause | 848 | 0 | 4 | 191 | 78 | 57 | 21 | 19 | 0 |
{-|
Module : Idris.TypeSearch
Description : A Hoogle for Idris.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE ScopedTypeVariables #-}
module Idris.TypeSearch (
searchByType
, searchPred
, defaultScoreFunction
) where
import Control.Applicative (Applicative (..), (<... | ozgurakgun/Idris-dev | src/Idris/TypeSearch.hs | bsd-3-clause | 23,307 | 0 | 20 | 5,697 | 8,540 | 4,589 | 3,951 | 411 | 22 |
-------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.Compiler
-- Copyright : (c) University of Kansas
-- System.Hardware.Arduino (c) Levent Erkok
-- License : BSD3
-- Stability : experimental
--
-- 'C' code generator for... | ku-fpg/kansas-amber | System/Hardware/Haskino/Compiler.hs | bsd-3-clause | 104,124 | 0 | 30 | 25,595 | 36,355 | 16,844 | 19,511 | 2,585 | 13 |
-- !!! testing newTVarIO
import Control.Concurrent
import Control.Concurrent.STM
import System.IO.Unsafe
var = unsafePerformIO $ newTVarIO 3
main = do x <- atomically $ readTVar var; print x
| gridaphobe/packages-stm | tests/stm054.hs | bsd-3-clause | 194 | 0 | 9 | 30 | 57 | 30 | 27 | 5 | 1 |
module RefacWhereLet(refacWhereLet) where
import PrettyPrint
import PosSyntax
import AbstractIO
import Maybe
import TypedIds
import UniqueNames hiding (srcLoc)
import PNT
import TiPNT
import List
import RefacUtils hiding (getParams)
import PFE0 (findFile)
import MUtils (( # ))
import RefacLocUtils
import System
impo... | kmate/HaRe | old/testing/removeCon/Untitled.hs | bsd-3-clause | 968 | 0 | 12 | 221 | 179 | 104 | 75 | 23 | 1 |
-- 1. Load a set of modules with "nothing" target
-- 2. Load it again with "interpreted" target
-- 3. Execute some code
-- a. If the recompilation checker is buggy this will die due to missing
-- code
-- b. If it's correct, it will recompile because the target has changed.
--
-- This program must be called ... | olsner/ghc | testsuite/tests/ghc-api/apirecomp001/myghc.hs | bsd-3-clause | 2,032 | 0 | 18 | 561 | 475 | 236 | 239 | 41 | 3 |
module Measures where
{-@ data Wrapper a <p :: a -> Prop, r :: a -> a -> Prop >
= Wrap (rgref_ref :: a<p>) @-}
data Wrapper a = Wrap (a)
-- Two measures
{-@ measure fwdextends :: Int -> Int -> Prop @-}
{-@ measure actionP :: Int -> Prop @-}
{-@ data Wrapper2 = Wrapper2 (unwrapper :: (Wrapper<{\x -> (true)},{\x... | abakst/liquidhaskell | tests/pos/Measures.hs | bsd-3-clause | 502 | 0 | 9 | 108 | 41 | 27 | 14 | 3 | 0 |
{-# LANGUAGE NamedFieldPuns #-}
data SomeRec = SomeRec { a :: Integer, b :: Integer } | Y | X deriving Show
fun :: SomeRec -> SomeRec
fun SomeRec{a} = SomeRec{a=a+1, b=10}
fun2 :: SomeRec -> SomeRec
fun2 r = let a = 5 in r{a}
main = do
let r = SomeRec{a=1, b=2}
print r
print (fun r)
print (fun2 r)
... | beni55/ghcjs | test/fay/namedFieldPuns.hs | mit | 479 | 0 | 12 | 152 | 203 | 107 | 96 | 15 | 2 |
{-# LANGUAGE QuasiQuotes #-}
module MHMC.Display.Help
(
helpinfo,
help
) where
import Control.Monad.Trans.RWS.Lazy
import Data.Default
import Data.String.QQ
import Graphics.Vty
import MHMC.RWS
help :: Int -> Int -> Image
help height cursor = cropBottom (height - 4)
$ pad 0 0 0 height
$ foldl1 (<->)
... | killmous/MHMC | src/MHMC/Display/Help.hs | mit | 1,121 | 0 | 12 | 457 | 145 | 83 | 62 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Leankit.Types.CardHistoryItem where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero)
import Data.Aeson
import Leankit.Types.Common
data CardHistoryItem = CardHistoryItem {
_cardId :: CardID,
_overrideType ... | dtorok/leankit-hsapi | Leankit/Types/CardHistoryItem.hs | mit | 4,781 | 0 | 34 | 2,398 | 710 | 388 | 322 | 84 | 0 |
import Distribution.Simple
import System.Environment
-- Hacking this to work based on:
--
-- https://stackoverflow.com/a/39019781
--
-- Relies on `happy` existing at /usr/bin/happy; eg. on Arch Linux:
--
-- sudo pacman -S stack happy
main = do
args <- getArgs
let args' = if elem "configure" args
then ar... | wincent/docvim | Setup.hs | mit | 402 | 0 | 12 | 78 | 65 | 36 | 29 | -1 | -1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
module Betfair.APING.Types.KeyLineSelection
( KeyLi... | joe9/betfair-api | src/Betfair/APING/Types/KeyLineSelection.hs | mit | 716 | 0 | 9 | 136 | 116 | 73 | 43 | 18 | 0 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE CPP #-}
module IHaskell.Test.Eval (testEval) where
import Prelude
import Data.List (stripPrefix)
import Control.Monad (when, forM_)
import Data.IORef (newIORef, modifyIORef, readIORef)
import System.Directory (getTemporaryDire... | sumitsahrawat/IHaskell | src/tests/IHaskell/Test/Eval.hs | mit | 5,445 | 0 | 17 | 1,618 | 1,402 | 737 | 665 | 111 | 9 |
module Game where
data GameState = EndGame | SomeResultantAction_ChangeMe deriving (Eq, Show)
data GameAction = SomeGameAction_ChangeMe
runGame [] = EndGame
runGame _ = SomeResultantAction_ChangeMe
| PolyglotSymposium/textual-game-hs | Game.hs | mit | 200 | 0 | 6 | 26 | 50 | 28 | 22 | 5 | 1 |
module Class4 where
data String
class Show a where
show :: a -> String
fn1 x y = (fn2 x, y)
where
fn2 x = show x
| Lemmih/haskell-tc | tests/Class4.hs | mit | 124 | 0 | 7 | 38 | 57 | 30 | 27 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-targetgroupsconfig.html
module Stratosphere.ResourceProperties.EC2SpotFleetTargetGroupsConfig w... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EC2SpotFleetTargetGroupsConfig.hs | mit | 1,727 | 0 | 13 | 162 | 177 | 105 | 72 | 24 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.