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 PolyKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds, KindSignatures,GADTs,
TypeOperators,
FlexibleInstances,
ScopedTypeVariables #-}
module Data.Union (
Union (..),
inject, project, wrap, unwrap,
push, pop,
swap, rotate,
conceal
) where
... | seagull-kamome/haskell-toybox | Data/Union.hs | bsd-3-clause | 1,798 | 0 | 10 | 393 | 735 | 389 | 346 | 41 | 2 |
{-# OPTIONS_GHC -Wall #-}
module Main where
import Graphics.Rendering.Chart hiding (c)
import Graphics.Rendering.Chart.Gtk
import Data.Accessor
import Text.Printf
import Design.Config
import Design.WorkingConfig
import Aero.Drag.WettedArea
import Aero.Drag.Upsweep
import Aero.Drag.FormAndFrictional
main :: IO ()
ma... | ghorn/conceptual-design | ParasiticSummary.hs | bsd-3-clause | 3,282 | 0 | 20 | 657 | 762 | 382 | 380 | 64 | 1 |
-- 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.Quantity.MN.Corpus
( corpus
) where
import Data.String
i... | facebookincubator/duckling | Duckling/Quantity/MN/Corpus.hs | bsd-3-clause | 1,472 | 0 | 9 | 512 | 274 | 159 | 115 | 37 | 1 |
import Control.Applicative
data List a = Empty | Cons a (List a)
instance Functor List where
-- fmap :: (a -> b) -> [a] -> [b]
fmap f Empty = Empty
fmap f (Cons a b) = Cons (f a) (fmap f b)
instance Applicative List where
--pure :: a -> [a]
pure a = Cons a Empty
-- (<*>) :: [a -> b] -> [a] -> [b]
_ <*> Empt... | gahara/parsers-for-dummies | test2.hs | bsd-3-clause | 725 | 1 | 9 | 194 | 356 | 176 | 180 | -1 | -1 |
{-|
Module: FRP.Timeless.Framework.UI.Scene
Copyright: (c) 2015 Rongcui Dong
License: BSD3
Maintainer: Rongcui Dong <karl_1702@188.com>
-}
module FRP.Timeless.Framework.UI.Scene
where
import FRP.Timeless
import FRP.Timeless.Framework.UI.Events
newtype Scene = Scene {
sceneBox :: forall m s. Monad ... | carldong/timeless-SDL | src/FRP/Timeless/Framework/UI/Scene.hs | bsd-3-clause | 351 | 0 | 10 | 65 | 60 | 38 | 22 | -1 | -1 |
module Main where
import Ivory.Tower.Config
import Ivory.OS.FreeRTOS.Tower.STM32
import LDrive.Platforms
import LDrive.Tests.ADCMulti (app)
main :: IO ()
main = compileTowerSTM32FreeRTOS testplatform_stm32 p $
app (stm32config_clock . testplatform_stm32)
testplatform_adcs
testplatfor... | sorki/odrive | test/ADCMultiTest.hs | bsd-3-clause | 441 | 0 | 8 | 101 | 91 | 51 | 40 | 13 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Network.HaskellNet.SMTP
( -- * Types
Command(..)
, Response(..)
, SMTPConnection
-- * Establishing Connection
, connectSMTPPort
, connectSMTP
, connectStream
-- * Operation to a Connection
, sendCommand
, closeSMTP
-- * ... | danchoi/imapget | src/Network/HaskellNet/SMTP.hs | bsd-3-clause | 9,059 | 0 | 17 | 2,875 | 2,210 | 1,143 | 1,067 | 197 | 13 |
{-# LANGUAGE ExplicitForAll #-}
-- | This game mode lets you manage your own input. Pressing ESC will not abort the program.
-- You also don't get automatic pan and zoom controls like with `displayInWindow`.
module Graphics.Gloss.Interface.IO.Game
( module Graphics.Gloss.Data.Display
, module Graphic... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss/Graphics/Gloss/Interface/IO/Game.hs | mit | 1,743 | 0 | 16 | 491 | 249 | 157 | 92 | 27 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Register
-- Copyright : Isaac Jones 2003-2004
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This module deals with registering and unregistering packages. There are... | jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/Register.hs | gpl-3.0 | 18,469 | 0 | 22 | 4,859 | 3,029 | 1,620 | 1,409 | 283 | 8 |
<?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="tr-TR">
<title>Aktif Tarama Kuralları - Blpha | ZAP Uzantısı</title>
<maps>
<homeID>top</ho... | veggiespam/zap-extensions | addOns/simpleexample/src/main/javahelp/org/zaproxy/zap/extension/simpleexample/resources/help_tr_TR/helpset_tr_TR.hs | apache-2.0 | 1,001 | 80 | 67 | 163 | 434 | 218 | 216 | -1 | -1 |
{-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE CPP #-}
#include "fusion-phases.h"
-- | PR instance for tuples.
module Data.Array.Parallel.PArray.PData.Tuple4
( PData(..), PDatas(..)
, zip4PD)
where
import Data.Array.Parallel.Pretty
import Data.Array.Parallel.PArray.PData.Base
import Data.Array.Parallel.P... | mainland/dph | dph-lifted-vseg/Data/Array/Parallel/PArray/PData/Tuple4.hs | bsd-3-clause | 9,606 | 0 | 15 | 3,330 | 2,760 | 1,458 | 1,302 | -1 | -1 |
-------------------------------------------------------------------------
--
-- Haskell: The Craft of Functional Programming, 3e
-- Simon Thompson
-- (c) Addison-Wesley, 1996-2011.
--
-- Case study: Parsing expressions
--
-- Note that this is not a monadic approach to parsing.
--
--------------------... | c089/haskell-craft3e | ParsingBasics.hs | mit | 4,456 | 8 | 11 | 1,298 | 1,221 | 706 | 515 | 75 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-sns/gen/Network/AWS/SNS/AddPermission.hs | mpl-2.0 | 4,085 | 0 | 10 | 953 | 548 | 333 | 215 | 64 | 1 |
-------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.ShallowDeepPlugin.RepPushPass
-- Copyright : (c) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Rep Push Pass
-- This pass is used to transform shallow expr... | ku-fpg/kansas-amber | System/Hardware/Haskino/ShallowDeepPlugin/RepPushPass.hs | bsd-3-clause | 13,617 | 0 | 33 | 4,767 | 3,701 | 1,918 | 1,783 | 275 | 15 |
{-# LANGUAGE CPP #-}
module RnSplice (
rnTopSpliceDecls,
rnSpliceType, rnSpliceExpr, rnSplicePat, rnSpliceDecl,
rnBracket,
checkThLocalName
#ifdef GHCI
, traceSplice, SpliceInfo(..)
#endif
) where
#include "HsVersions.h"
import Name
import NameSet
import HsSyn
import RdrName... | tjakway/ghcjvm | compiler/rename/RnSplice.hs | bsd-3-clause | 32,074 | 0 | 21 | 9,499 | 2,261 | 1,176 | 1,085 | 160 | 5 |
module Main (main) where
import qualified Distribution.ModuleName as ModuleName
import Distribution.PackageDescription
import Distribution.PackageDescription.Check hiding (doesFileExist)
import Distribution.PackageDescription.Configuration
import Distribution.PackageDescription.Parse
import Distribution.System
import... | ekmett/ghc | utils/ghc-cabal/Main.hs | bsd-3-clause | 23,298 | 0 | 23 | 8,374 | 4,641 | 2,366 | 2,275 | 388 | 13 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE Safe #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE UndecidableInstances, Flexi... | iblumenfeld/cryptol | src/Cryptol/TypeCheck/TypeMap.hs | bsd-3-clause | 5,626 | 0 | 18 | 2,079 | 2,373 | 1,229 | 1,144 | -1 | -1 |
<?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="fa-IR">
<title>Custom Payloads Add-on</title>
<maps>
<homeID>custompayloads</homeID>
<m... | thc202/zap-extensions | addOns/custompayloads/src/main/javahelp/org/zaproxy/zap/extension/custompayloads/resources/help_fa_IR/helpset_fa_IR.hs | apache-2.0 | 978 | 82 | 53 | 157 | 396 | 209 | 187 | -1 | -1 |
{-# LANGUAGE CPP #-}
module CmmType
( CmmType -- Abstract
, b8, b16, b32, b64, b128, b256, b512, f32, f64, bWord, bHalfWord, gcWord
, cInt, cLong
, cmmBits, cmmFloat
, typeWidth, cmmEqType, cmmEqType_ignoring_ptrhood
, isFloatType, isGcPtrType, isWord32, isWord64, isFloat64, isFloat32
, ... | oldmanmike/ghc | compiler/cmm/CmmType.hs | bsd-3-clause | 15,086 | 0 | 11 | 3,373 | 2,796 | 1,498 | 1,298 | 238 | 7 |
module RecordIn4 where
data S = S1 { x :: Int } | S2 { x :: Int } deriving Show
{- map2 xs = map (\y -> y {x = 1}) xs -}
map2 xs = (case ((\ y -> y {x = 1}), xs) of
(f, []) -> []
(f, (x : xs)) -> (f x) : (map f xs))
| SAdams601/HaRe | old/testing/generativeFold/RecordIn4.hs | bsd-3-clause | 251 | 0 | 11 | 97 | 124 | 73 | 51 | 5 | 2 |
module Renaming.C1 where
import Renaming.D1
instance SameOrNot Double where
isSame a b = a ==b
isNotSame a b = a /=b
myFringe:: Tree a -> [a]
myFringe (Leaf x ) = [x]
myFringe (Branch left right) = myFringe left
| mpickering/HaRe | test/testdata/Renaming/C1.hs | bsd-3-clause | 229 | 0 | 7 | 56 | 98 | 51 | 47 | 8 | 1 |
{-| Scans page of Markdown looking for http links. When it finds them, it submits them
to webcitation.org / https://secure.wikimedia.org/wikipedia/en/wiki/WebCite
(It will also submit them to Alexa (the source for the Internet Archive), but Alexa says that
its bots take weeks to visit and may not ever.)
This module em... | imuli/gitit | plugins/WebArchiver.hs | gpl-2.0 | 2,029 | 0 | 13 | 451 | 260 | 140 | 120 | 17 | 2 |
module Graphics.UI.Bottle.Widgets.Edges(
makeVertical
) where
import Control.Lens ((^.))
import Control.Monad (mplus)
import Data.List (minimumBy)
import Data.Monoid (Monoid(..))
import Data.Ord (comparing)
import Data.Vector.Vector2 (Vector2(..))
import Graphics.UI.Bottle.Direction (Direction)
import Graphics.UI.... | sinelaw/lamdu | bottlelib/Graphics/UI/Bottle/Widgets/Edges.hs | gpl-3.0 | 2,665 | 0 | 12 | 463 | 893 | 487 | 406 | 55 | 2 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
-- Test the LANGUAGE pragma
module ShouldCompile where
#if 1
foreign import ccall "foo" foo :: Int -> IO Int
#endif
| wxwxwwxxx/ghc | testsuite/tests/parser/should_compile/read039.hs | bsd-3-clause | 164 | 0 | 7 | 27 | 27 | 17 | 10 | 3 | 0 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
-- !!! One method class from Sergey Mechveliani
-- showed up problematic newtype dict rep.
module Main where
import Data.Ratio
class MBConvertible a b where cm :: a -> b -> Maybe b
c :: MBConvertible a b => a -> b -> b
c a b =... | urbanslug/ghc | testsuite/tests/typecheck/should_run/tcrun003.hs | bsd-3-clause | 902 | 0 | 11 | 409 | 266 | 134 | 132 | 16 | 2 |
{-|
Module: Flaw.UI.DefaultStyle.Data
Description: Embedded data for default style.
License: MIT
-}
{-# LANGUAGE TemplateHaskell #-}
module Flaw.UI.DefaultStyle.Data
( loadFontData
) where
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Flaw.Build
loadFontData :: IO B.B... | quyse/flaw | flaw-ui-default-style-data/Flaw/UI/DefaultStyle/Data.hs | mit | 409 | 0 | 9 | 55 | 69 | 43 | 26 | 8 | 1 |
{-# htermination (fromIntegral :: MyInt -> Float) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Float = Float MyInt MyInt ;
data Integer = Integer MyInt ;
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
primIntToFloat :: MyInt -> Float;
... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/fromIntegral_2.hs | mit | 729 | 0 | 9 | 161 | 252 | 141 | 111 | 18 | 1 |
{-# LANGUAGE TemplateHaskell
, TypeFamilies
, OverloadedStrings #-}
module FirewallModel (
Rule(..)
, View(..)
) where
import Generics.BiGUL.TH
import GHC.Generics
import Data.Aeson
data View = View {
rules :: [Rule]
} deriving (Show, Eq)
data Rule = Rule {
ruleID :: String
, securityGroupRefFrom :: S... | prl-tokyo/MAPE-knowledge-base | Haskell/views/FirewallModel.hs | mit | 1,572 | 0 | 15 | 523 | 344 | 189 | 155 | -1 | -1 |
-- Caffeine Script
-- http://www.codewars.com/kata/5434283682b0fdb0420000e6
module Codewars.Kata.Caffeine where
caffeineBuzz :: Integer -> String
caffeineBuzz n | n `mod` 12 == 0 = "CoffeeScript"
| n `mod` 6 == 0 = "JavaScript"
| n `mod` 3 == 0 = "Java"
| otherwise = "mo... | gafiatulin/codewars | src/7 kyu/Caffeine.hs | mit | 334 | 0 | 9 | 92 | 89 | 48 | 41 | 6 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ViewPatterns #-}
module Snipcheck where
import Control.Monad
import Control.Exception
import Control.Monad.IO.Class
import Data.Char (isSpace)
import Data.List (dropWhileEnd)
import Data.Maybe
import System.Process(readCreateProcess, shell)
import Text.Pandoc (Block(..))
im... | nmattia/snipcheck | src/Snipcheck.hs | mit | 4,018 | 0 | 18 | 932 | 1,521 | 779 | 742 | 108 | 6 |
import Avus.Scan
import Criterion.Types
import Criterion.Main
noopProcessData :: FilePath -> IO ()
noopProcessData fp = processData (Just fp) (Just "null") $
processVuln (\_ b -> return b) -- noop update functions
(\_ t -> return t)
(\_ e -> return e)
main :: IO ()
main = defaultMainWit... | srenatus/avus | benchmark/AvusBenchmark.hs | mit | 576 | 0 | 12 | 125 | 186 | 95 | 91 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Applicative ((<|>))
import Text.Trifecta
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BC
import Data.FileEmbed (embedFile)
input :: ByteString
input = $(embedFile "input.txt")
data I... | genos/online_problems | advent_of_code_2016/day9/src/Main.hs | mit | 2,172 | 0 | 11 | 512 | 699 | 374 | 325 | 81 | 2 |
{-# LANGUAGE LambdaCase, NamedFieldPuns, OverloadedStrings #-}
module Main (main) where
import Devil.Config
import Devil.Daemons
import Options.Applicative
import qualified Data.Text as T
import qualified Devil.Log as Log
data Params = Params {
configFile :: String
} deriving (Show,... | EXio4/devil | src/Main.hs | mit | 961 | 0 | 16 | 333 | 246 | 128 | 118 | 31 | 2 |
{-# LANGUAGE QuasiQuotes #-}
module Minesweeper where
import Prelude hiding (map, zipWith)
import Data.Maybe (fromJust)
import qualified Data.Vector as V
import Data.Array.Repa as R hiding ((++))
import Data.Array.Repa.Repr.Vector
import Data.Array.Repa.Stencil
import ... | sdemos/minesweeper | src/Minesweeper.hs | mit | 5,242 | 0 | 18 | 1,505 | 1,229 | 673 | 556 | 76 | 2 |
sumtorial :: Integer -> Integer
sumtorial 0 = 0
sumtorial n = n + sumtorial (n - 1)
| martindavid/code-sandbox | haskell/exercises/exercise1.hs | mit | 84 | 0 | 8 | 18 | 40 | 20 | 20 | 3 | 1 |
module Main where
import Test.Framework (defaultMain)
import Language.Swift.Tests (tests)
main :: IO ()
main = defaultMain
[ tests
]
| CodaFi/language-swift | tests/Tests.hs | mit | 144 | 0 | 6 | 30 | 46 | 27 | 19 | 6 | 1 |
module Reader where
import Control.Applicative ((<$>), (<*>))
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Language
import Text.ParserCombinators.Parsec.Token
import LispData
import Numbers
-- | parses lisp code from a string and returns either the code an error message
reader :: String... | orion-42/my-lisp | Reader.hs | mit | 2,630 | 0 | 15 | 648 | 792 | 408 | 384 | 69 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
module Base.CLI (ProgramOptions(..), Action(..), usage, newCommands, standard, module System.Console.CmdArgs) where
import System.Console.CmdArgs
import Base.Common
data Action = Format | ListCommands
deriving (Show, Typeable, Data)
instance Default Action where
def = Forma... | spockz/lhs2texhl | src/Base/CLI.hs | mit | 1,973 | 0 | 12 | 421 | 311 | 185 | 126 | 39 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.SVGFESpotLightElement (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.SVGFESpotLightElement
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/SVGFESpotLightElement.hs | mit | 376 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
module GraphDB.Util.Prelude.TH
(
module Exports,
purify,
tryToReify,
isInstance',
isProperInstance',
)
where
import GraphDB.Util.Prelude hiding (Fixity)
import Language.Haskell.TH as Exports
import Language.Haskell.TH.Syntax as Exports
import THInstanceReification as Exports
purify :: Q a -> a
purify = un... | nikita-volkov/graph-db | library/GraphDB/Util/Prelude/TH.hs | mit | 686 | 0 | 8 | 110 | 228 | 127 | 101 | 19 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Server.Main where
import System.Directory
import qualified Text.Blaze.Html.Renderer.Text as H
import Text.Pandoc
import System.FilePath
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.... | lierdakil/markco | server/src/Server/Main.hs | mit | 7,255 | 0 | 21 | 1,428 | 2,497 | 1,237 | 1,260 | 189 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module HailsRock.Views where
import Prelude hiding (div, span, head, id)
import Data.Maybe (isJust, fromJust)
import qualified Data.ByteString.Lazy.Char8 as L8
import qualified Data.Text as T
import Text.Blaze.Html5 hiding (Tag, map)
import Text.Blaze.Html5.Attributes hiding ( la... | scslab/hails | examples/hails-rock/HailsRock/Views.hs | mit | 4,365 | 0 | 27 | 1,434 | 1,388 | 673 | 715 | 118 | 2 |
main :: IO()
main = putStrLn "Hello world!"
add a b = a + b
x = 10
myDrop n xs = if n <= 0 || null xs
then xs
else myDrop (n-1) (tail xs)
data BookInfo = Book Int String [String]
deriving (Show)
data MagzineInfo = Magzine Int String [String]
deriving (Show... | dalonng/hellos | haskell.hello/hello.hs | gpl-2.0 | 1,572 | 1 | 8 | 483 | 599 | 327 | 272 | -1 | -1 |
{-
Copyright (C) 2014 Jesse Rosenthal <jrosenthal@jhu.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is dis... | uws-eresearch/docx2pandoc | src/Text/Pandoc/Readers/DocX/Lists.hs | gpl-2.0 | 7,237 | 0 | 20 | 1,684 | 2,211 | 1,186 | 1,025 | 138 | 4 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.Ex.Commands.Quit
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
--... | atsukotakahashi/wi | src/library/Yi/Keymap/Vim/Ex/Commands/Quit.hs | gpl-2.0 | 3,438 | 0 | 17 | 953 | 969 | 513 | 456 | 77 | 4 |
-- A QDSL implementation of Carlson, Hudak, and Jones'
-- Geometric Region Servers,
-- by Josef Svenningsson
module Examples.Region where
import QHaskell
type Point = (Float,Float)
type Region = Point -> Bool
type Radius = Float
circle :: Radius -> Region
circle r = \p -> magnitude p <= r
outside :: Regio... | shayan-najd/QHaskell | Examples/Region.hs | gpl-3.0 | 2,038 | 2 | 11 | 500 | 428 | 227 | 201 | -1 | -1 |
module Lamdu.GUI.TagPane
( make
) where
import qualified Control.Lens as Lens
import Data.Binary.Extended (encodeS)
import qualified Data.Char as Char
import Data.Property (Property(..), pVal)
import qualified Data.Property as Property
import qualified Data.Set as Set
import qualified Data.... | Peaker/lamdu | src/Lamdu/GUI/TagPane.hs | gpl-3.0 | 12,550 | 0 | 20 | 3,527 | 3,632 | 1,913 | 1,719 | -1 | -1 |
module Stats (Stats,
initialStats,
levelInStats,
linesInStats,
scoreInStats,
addLinesToStats) where
data Stats = Stats { linesCount :: Int, score :: Int }
initialStats :: Stats
initialStats = Stats 0 0
levelInStats :: Stats -> Int
levelInStats sta... | pavelfatin/haskell-blocks | src/Stats.hs | gpl-3.0 | 820 | 0 | 8 | 251 | 231 | 125 | 106 | 24 | 6 |
-- Author: Viacheslav Lotsmanov
-- License: GPLv3 https://raw.githubusercontent.com/unclechu/xlib-keys-hack/master/LICENSE
module Utils.Sugar (spec) where
import "hspec" Test.Hspec (Spec, describe, it, shouldBe)
-- local imports
import "xlib-keys-hack" Utils.Sugar
( (.>), (|?|), (?)
, applyIf, applyUnless... | unclechu/xlib-keys-hack | test/Utils/Sugar.hs | gpl-3.0 | 1,530 | 0 | 18 | 372 | 483 | 267 | 216 | -1 | -1 |
module KRPCHS.RemoteTech
( Target(..)
, Antenna
, Comms
, antenna
, antennaStream
, antennaStreamReq
, getAntennaHasConnection
, getAntennaHasConnectionStream
, getAntennaHasConnectionStreamReq
, getAntennaPart
, getAntennaPartStream
, getAntennaPartStreamReq
, getAntennaTarget
, getAntennaTargetStream
, getAntennaTarg... | Cahu/krpc-hs | src/KRPCHS/RemoteTech.hs | gpl-3.0 | 19,170 | 0 | 12 | 2,534 | 3,896 | 1,981 | 1,915 | 321 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationssettings/List.hs | mpl-2.0 | 5,926 | 0 | 20 | 1,385 | 786 | 457 | 329 | 122 | 1 |
-- Copyright (C) 2016-2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This libr... | dashea/bdcs | importer/BDCS/Packages.hs | lgpl-2.1 | 2,097 | 0 | 19 | 489 | 397 | 210 | 187 | 28 | 1 |
module Main where
import Points (convexHull, center)
import Point (Point)
import Support (shouldEql)
p00 = (0, 0)
p10 = (1, 0)
p10' = (-1, 0)
p01 = (0, 1)
p01' = (0, -1)
p11 = (1, 1)
p11' = (-1, -1)
p20 = (2, 0)
p02 = (0, 2)
main :: IO ()
main = print $ foldl1 (++) [
center [p00] `shouldEql` p00,
center [p1... | jhnns/haskell-experiments | test/PointsSpec.hs | unlicense | 3,532 | 0 | 12 | 1,762 | 1,743 | 1,096 | 647 | 91 | 1 |
findKey :: (Eq k) => k -> [(k, v)] -> Maybe v
findKey _ [] = Nothing
findKey key ((k, v):xs)
| key == k = Just v
| otherwise = findKey key xs
findKey' :: (Eq k) => k -> [(k, v)] -> Maybe v
findKey' _ [] = Nothing
findKey' key ((k, v):xs) = case key == k of
True -> Just v
... | EricYT/Haskell | src/chapter-3-2.hs | apache-2.0 | 366 | 1 | 9 | 139 | 192 | 100 | 92 | 10 | 2 |
module FractalFlame.Variation.Types.VTransform where
import FractalFlame.Point.Types.CartesianPoint
import FractalFlame.Variation.Types.VarP
-- | Variation function (use FractalFlame.Variation.runVariation to build a VarP parameter)
type VTransform = VarP -> CartesianPoint
| anthezium/fractal_flame_renderer_haskell | FractalFlame/Variation/Types/VTransform.hs | bsd-2-clause | 277 | 0 | 5 | 27 | 33 | 23 | 10 | 4 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
module Data.Interface.Module.Entity where
import Data.Interface.Change
import Data.Interface.Name
import Data.Interface.Type
import Data.Interface.Type.Diff
-- | A top-level exported entity in a module, without a name.
d... | cdxr/haskell-interface | src/Data/Interface/Module/Entity.hs | bsd-3-clause | 4,273 | 0 | 12 | 1,064 | 1,118 | 583 | 535 | 95 | 0 |
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
{-|
The 'Message' is a single displayed event in a Channel. All Messages
have a date/time, and messages that represent ... | matterhorn-chat/matterhorn | src/Matterhorn/Types/Messages.hs | bsd-3-clause | 28,203 | 0 | 20 | 7,952 | 5,443 | 2,939 | 2,504 | 496 | 6 |
module Seventeen where
import Data.List
permute :: Int -> [Int] -> [Int] -> [[Int]]
permute goal tried []
| goal == sum tried = [tried]
| otherwise = []
permute goal tried remaining
| goal == sum tried = [tried]
| otherwise = concatMap (permute2 goal tried) (sublists remaining)
permute2 :: Int -> [... | purcell/adventofcodeteam | app/Seventeen.hs | bsd-3-clause | 705 | 0 | 12 | 169 | 345 | 174 | 171 | 21 | 1 |
{-# language CPP #-}
-- | = Name
--
-- VK_AMD_shader_core_properties2 - device extension
--
-- == VK_AMD_shader_core_properties2
--
-- [__Name String__]
-- @VK_AMD_shader_core_properties2@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 228
--
-- [__Revision__]
-- ... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_AMD_shader_core_properties2.hs | bsd-3-clause | 9,673 | 0 | 14 | 1,698 | 1,307 | 798 | 509 | -1 | -1 |
module Text.Highlighter.Lexer (runLexer) where
import Control.Monad.Except (ExceptT, runExceptT, throwError, catchError)
import Control.Monad.State (State, gets, modify, evalState)
import Text.Regex.PCRE.Light hiding (compile)
import Text.Regex.PCRE.Light.Char8 (compile)
import qualified Data.ByteString as BS
import D... | chemist/highlighter | src/Text/Highlighter/Lexer.hs | bsd-3-clause | 4,808 | 0 | 20 | 1,313 | 2,018 | 1,050 | 968 | -1 | -1 |
module Problem15 where
--
-- Problem 15: Lattice paths
--
-- Starting in the top left corner of a 2×2 grid, and only being able to move to
-- the right and down, there are exactly 6 routes to the bottom right corner.
--
-- https://projecteuler.net/project/images/p015.gif
--
-- Paths: (R=Right, D=Down)
--
-- R R D D
--... | c0deaddict/project-euler | src/Part1/Problem15.hs | bsd-3-clause | 469 | 0 | 2 | 105 | 26 | 25 | 1 | 1 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
-- |
-- Module : Simulation.Aivika.Experiment.Base.InfoView
-- Copyright : Copyright (c) 2012-2017, David Sorokin <david.sorokin@gmail.com>
-- License : BSD3
-- Maintainer : David Sorokin <david.sorokin@gmail.com>
-- Stability : experimental
-- Tested with: GHC 8.0.1
--... | dsorokin/aivika-experiment | Simulation/Aivika/Experiment/Base/InfoView.hs | bsd-3-clause | 6,535 | 0 | 21 | 2,037 | 1,330 | 693 | 637 | 131 | 5 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Jade.TopLevel ( getNetsWithName
, connectWiresWithSameSigName
, dependencyOrder
, explodeConnect
, getAllIndexesWithName
, getAllSigNames
... | drhodes/jade2hdl | src/Jade/TopLevel.hs | bsd-3-clause | 15,284 | 0 | 17 | 3,628 | 3,972 | 1,996 | 1,976 | 268 | 5 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
------------------------------------------------------------------------------
import Control.Monad.Trans
import Data.ByteString (ByteString... | Soostone/snaplet-persistent | example/Site.hs | bsd-3-clause | 2,261 | 0 | 13 | 481 | 513 | 273 | 240 | 49 | 1 |
{-# LANGUAGE PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Lex
-- Copyright : Ben Gamari 2015-2019
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This module contains a simple lexer supporting quoted ... | sopvop/cabal | Cabal/Distribution/Lex.hs | bsd-3-clause | 1,409 | 0 | 11 | 378 | 437 | 230 | 207 | 32 | 4 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE StandaloneDeriving #-}
data StackItem a where
Snum :: forall a. Fractional a => a -> StackItem a
Sop :: OpDesc -> StackItem a
deriving instance Show a => Show (StackItem a)
-- AZ added to test Trac #10399
data MaybeDefault v whe... | mpickering/ghc-exactprint | tests/examples/ghc710/GADTContext.hs | bsd-3-clause | 481 | 9 | 12 | 125 | 157 | 85 | 72 | 12 | 0 |
module Matterhorn.Events.ShowHelp where
import Prelude ()
import Matterhorn.Prelude
import Brick
import qualified Graphics.Vty as Vty
import Matterhorn.Constants
import Matterhorn.Events.Keybindings
import Matterhorn.Types
onEventShowHelp :: Vty.Event -> ... | matterhorn-chat/matterhorn | src/Matterhorn/Events/ShowHelp.hs | bsd-3-clause | 1,447 | 0 | 11 | 345 | 366 | 189 | 177 | 35 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.SrcDist
-- Copyright : Simon Marlow 2004
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This handles the @sdist@ command. The module exports a... | sopvop/cabal | Cabal/Distribution/Simple/SrcDist.hs | bsd-3-clause | 19,745 | 0 | 24 | 5,249 | 3,999 | 2,037 | 1,962 | 326 | 6 |
{-# LANGUAGE Rank2Types #-}
module Examples
( tests
) where
import Control.Applicative ((<$>))
import Control.Monad (forM)
import Data.Bits (shiftL)
import Data.List (isPrefixOf, sort)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit (Assertion, assert... | jaspervdj/dcpu16-hs | tests/Examples.hs | bsd-3-clause | 2,482 | 0 | 19 | 861 | 878 | 454 | 424 | 69 | 6 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
module Oracle.DiffOracle where
import Data.Maybe
import Data.Tuple (swap)
import Debug.Trace
import Control.Monad.Reader
import qualified Data.IntMap as M
import qualified Data.Set as S
impor... | nazrhom/vcs-clojure | src/Oracle/DiffOracle.hs | bsd-3-clause | 8,201 | 0 | 13 | 1,776 | 3,167 | 1,644 | 1,523 | 174 | 4 |
{-# LANGUAGE
DeriveFunctor
, FlexibleInstances
, ScopedTypeVariables
#-}
module Data.Trie.Pseudo where
import Prelude hiding (foldl, foldr, foldr1, lookup,
map)
import Data.Foldable hiding (all)
import Da... | athanclark/pseudo-trie | src/Data/Trie/Pseudo.hs | bsd-3-clause | 8,552 | 0 | 18 | 3,279 | 3,708 | 1,862 | 1,846 | 185 | 10 |
-- | Test utility functions
module Test.Util(utilsTests) where
import Test.Tasty
import Test.Tasty.HUnit
import Language.Haskell.Ghcid.Util
utilsTests :: TestTree
utilsTests = testGroup "Utility tests"
[dropPrefixTests
,chunksOfWordTests
]
dropPrefixTests :: TestTree
dropPrefixTests = testGroup "dropPre... | JPMoresmau/ghcid | src/Test/Util.hs | bsd-3-clause | 904 | 0 | 9 | 158 | 217 | 116 | 101 | 18 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module TauSigma.ADEV
( Statistic(..)
, Options
, options
, main
) where
import Control.Monad.Primitive (PrimMonad)
import Control.Monad.Trans
imp... | sacundim/tau-sigma | src/TauSigma/ADEV.hs | bsd-3-clause | 3,151 | 0 | 13 | 812 | 949 | 523 | 426 | 93 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
module Network.Wai.Handler.Warp.Run where
#if __GLASGOW_HA... | erikd/wai | warp/Network/Wai/Handler/Warp/Run.hs | mit | 20,199 | 0 | 24 | 6,013 | 3,760 | 1,959 | 1,801 | 311 | 18 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-lambda/gen/Network/AWS/Lambda/RemovePermission.hs | mpl-2.0 | 4,172 | 0 | 9 | 870 | 441 | 273 | 168 | 57 | 1 |
-- Copyright (c) 1998-1999 Chris Okasaki.
-- See COPYRIGHT file for terms and conditions.
module RandList
{-# DEPRECATED "This module is unmaintained, and will disappear soon" #-}
(
-- type
Seq, -- instance of Sequence, Functor, Monad, MonadPlus
-- sequence operations
empty,single,cons,snoc,app... | FranklinChen/hugs98-plus-Sep2006 | fptools/hslibs/data/edison/Seq/RandList.hs | bsd-3-clause | 12,098 | 2 | 13 | 4,006 | 5,495 | 2,831 | 2,664 | 295 | 5 |
{-#LANGUAGE NoImplicitPrelude #-}
{-#LANGUAGE LambdaCase #-}
{-#LANGUAGE ScopedTypeVariables #-}
{-#LANGUAGE OverloadedStrings #-}
module Web.Sprinkles.Cache.Memcached
where
import Web.Sprinkles.Prelude
import Web.Sprinkles.Cache
import Data.Time.Clock.POSIX
import qualified Data.HashMap.Strict as HashMap
import Data.... | tdammers/templar | src/Web/Sprinkles/Cache/Memcached.hs | bsd-3-clause | 1,249 | 0 | 21 | 409 | 300 | 164 | 136 | 34 | 2 |
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[Simplify]{The main module of the simplifier}
-}
{-# LANGUAGE CPP #-}
module Simplify ( simplTopBinds, simplExpr, simplRules ) where
#include "HsVersions.h"
import DynFlags
import SimplMonad
import Type hiding ( substTy, substTyVar, extendTvSubst,... | tjakway/ghcjvm | compiler/simplCore/Simplify.hs | bsd-3-clause | 124,411 | 20 | 25 | 38,197 | 15,479 | 8,190 | 7,289 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Distribution.Parsec.ConfVar (parseConditionConfVar) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Compat.Parsec (integral)
import Distribution.Parsec.Class (Parsec (..... | mydaum/cabal | Cabal/Distribution/Parsec/ConfVar.hs | bsd-3-clause | 5,766 | 0 | 18 | 1,885 | 1,453 | 753 | 700 | 106 | 7 |
module One where
import qualified Two
resource = "This is the sub-plugin of (" ++ Two.resource ++ ")"
| abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/hier/hier3/One.hs | bsd-3-clause | 106 | 0 | 7 | 22 | 23 | 14 | 9 | 3 | 1 |
{-# LANGUAGE PolyKinds #-}
module T16456 where
data T p = MkT
foo :: T Int
foo = _
| sdiehl/ghc | testsuite/tests/typecheck/should_fail/T16456.hs | bsd-3-clause | 85 | 0 | 5 | 21 | 26 | 16 | 10 | 5 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[NameEnv]{@NameEnv@: name environments}
-}
{-# LANGUAGE CPP #-}
module NameEnv (
-- * Var, Id and TyVar environments (maps)
NameEnv,
-- ** Manipulating these environments
mkNameEnv,... | tjakway/ghcjvm | compiler/basicTypes/NameEnv.hs | bsd-3-clause | 4,708 | 0 | 11 | 1,328 | 1,271 | 666 | 605 | 77 | 1 |
<?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="zh-CN">
<title>Groovy Support</title>
<maps>
<homeID>top</homeID>
<mapref location="map... | thc202/zap-extensions | addOns/groovy/src/main/javahelp/org/zaproxy/zap/extension/groovy/resources/help_zh_CN/helpset_zh_CN.hs | apache-2.0 | 959 | 82 | 52 | 156 | 390 | 206 | 184 | -1 | -1 |
module MultiParamIn3 where
fromMaybe :: (Maybe a) -> a
fromMaybe (Just x) = x
fromMaybe Nothing = error "fromMaybe: Nothing"
f :: (Maybe Int) -> [Int] -> (Either Int b) -> Int
f Nothing y@[] (Left a) = (hd y) + a
f Nothing y@(b_1 : b_2) (Left a) = (hd y) + a
f (Just x) y@[] (Right b) = (hd y) + (fromMaybe x)
f (J... | kmate/HaRe | old/testing/introPattern/MultiParamIn3AST.hs | bsd-3-clause | 495 | 0 | 9 | 127 | 334 | 171 | 163 | 14 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, ExistentialQuantification #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Exception
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base... | olsner/ghc | libraries/base/Control/Exception.hs | bsd-3-clause | 14,104 | 0 | 10 | 2,951 | 582 | 382 | 200 | 69 | 2 |
{-# LANGUAGE CPP #-}
module Examples.Commands where
import Data.List
import Options.Applicative
#if __GLASGOW_HASKELL__ <= 702
import Data.Monoid
(<>) :: Monoid a => a -> a -> a
(<>) = mappend
#endif
data Sample
= Hello [String]
| Goodbye
deriving Show
hello :: Parser Sample
hello = Hello <$> many (argument s... | begriffs/optparse-applicative | tests/Examples/Commands.hs | bsd-3-clause | 833 | 0 | 12 | 207 | 275 | 145 | 130 | 28 | 1 |
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. Ord a
-- => [b]
-- -> forall c. Nu... | spacekitteh/smcghc | testsuite/tests/haddock/should_compile_noflag_haddock/haddockC027.hs | bsd-3-clause | 599 | 0 | 12 | 200 | 89 | 58 | 31 | -1 | -1 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-}
{-# LANGUAGE GADTs #-}
module T2006 where
data Expr a vs where
EPrim :: String -> a -> Expr a vs
EVar :: Expr a (a,vs)
interpret :: Expr a () -> a
interpret (EPrim _ a) = a
-- interpret EVar = error "unreachable"
| olsner/ghc | testsuite/tests/pmcheck/should_compile/T2006.hs | bsd-3-clause | 305 | 0 | 8 | 67 | 79 | 45 | 34 | 8 | 1 |
module ShouldCompile where
x@_ = x
| ryantm/ghc | testsuite/tests/deSugar/should_compile/ds-wildcard.hs | bsd-3-clause | 36 | 0 | 5 | 7 | 13 | 8 | 5 | 2 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, MagicHash, UnboxedTuples, NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Float.RealFracMethods
-- Copyright : (c) Daniel Fischer 2010
-- License : see libr... | tolysz/prepare-ghcjs | spec-lts8/base/GHC/Float/RealFracMethods.hs | bsd-3-clause | 11,762 | 0 | 29 | 3,141 | 2,251 | 1,197 | 1,054 | 186 | 2 |
-- | Geometric functions concerning angles. If not otherwise specified, all angles are in radians.
module Graphics.Gloss.Geometry.Angle
( degToRad
, radToDeg
, normaliseAngle )
where
-- | Convert degrees to radians
{-# INLINE degToRad #-}
degToRad :: Float -> Float
degToRad d = d * pi / 180
-- | Convert radians t... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss/Graphics/Gloss/Geometry/Angle.hs | mit | 665 | 6 | 10 | 139 | 159 | 89 | 70 | 15 | 1 |
module Y2018.M02.D21.Solution where
{--
More P99 fun with lists from:
http://www.ic.unicamp.br/~meidanis/courses/mc336/2009s2/prolog/problemas/
P28 (**) Sorting a list of lists according to length of sublists
a) We suppose that a list (InList) contains elements that are lists themselves.
The objective is to sort th... | geophf/1HaskellADay | exercises/HAD/Y2018/M02/D21/Solution.hs | mit | 3,700 | 0 | 9 | 576 | 715 | 457 | 258 | 29 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults -fno-warn-orphans -fno-warn-missing-fields #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Yage.Prelude
( module ClassyPrelude
, io, pass
, traceShowS, traceShowS', ioTime, printIOTime, traceWith, traceStack
, globFp
-- list... | MaxDaten/yage-contrib | src/Yage/Prelude.hs | mit | 3,837 | 0 | 14 | 1,100 | 1,156 | 637 | 519 | 100 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module PeaCoq where
import Control.Lens (makeLenses)
import Data.IORef (IORef)
import Data.IntMap (IntMap)
import Snap (Snaplet)
import Snap.Snaplet.Session (SessionManager)
import System.IO
import System.Process (ProcessHandle)
type H... | Ptival/peacoq-server | lib/PeaCoq.hs | mit | 1,192 | 0 | 9 | 299 | 203 | 124 | 79 | 28 | 0 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
-- | Reexports "Test.Hspec" from a @Trustworthy@ module.
module TestHspecTrustworthy (module Test.Hspec) where
import Test.Hspec
| haskell-compat/base-compat | base-compat-batteries/test/TestHspecTrustworthy.hs | mit | 218 | 0 | 5 | 29 | 22 | 16 | 6 | 3 | 0 |
{-#LANGUAGE ScopedTypeVariables #-}
{-#LANGUAGe DataKinds #-}
{-#LANGUAGE DeriveGeneric #-}
{-#LANGUAGE DeriveAnyClass #-}
{-#LANGUAGE FlexibleContexts #-}
module Foreign.Storable.Generic.Internal.GStorableSpec where
-- Test tools
import Test.Hspec
import Test.QuickCheck
import GenericType
-... | mkloczko/derive-storable | test/Spec/Foreign/Storable/Generic/Internal/GStorableSpec.hs | mit | 4,354 | 0 | 14 | 1,211 | 1,220 | 594 | 626 | 100 | 1 |
module Drifter
(
-- * Managing Migrations
resolveDependencyOrder
, changeSequence
, migrate
-- * Types
, Drifter(..)
, ChangeName(..)
, Change(..)
, Description
, Method
, DBConnection
) where
-----------------------------------------------------------------------... | AndrewRademacher/drifter | src/Drifter.hs | mit | 1,097 | 0 | 14 | 243 | 239 | 139 | 100 | 21 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGZoomAndPan
(pattern SVG_ZOOMANDPAN_UNKNOWN, pattern SVG_ZOOMANDPAN_DISABLE,
pattern SVG_ZOOMANDPAN_MAGNIFY, js_setZoomAndPan, setZoomAndPan,
js_getZoomAndPan, getZoomAndPan, SVGZoomAndPan... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGZoomAndPan.hs | mit | 1,960 | 14 | 8 | 235 | 477 | 292 | 185 | 31 | 1 |
{-# LANGUAGE TypeFamilies #-}
module Agent.PingPong.Role.Ask where
import AgentSystem.Generic
import Agent.PingPong
import qualified Agent.PingPong.Simple.Ask as Ask
import Data.IORef
--------------------------------------------------------------------------------
data PingRole = PingRole
data PongRole = PongRole
... | fehu/h-agents | test/Agent/PingPong/Role/Ask.hs | mit | 2,150 | 0 | 13 | 618 | 413 | 211 | 202 | 39 | 1 |
module JoScript.Util.Text (foldlM, readFloat, readInt) where
import Prelude (read)
import Protolude hiding (foldlM)
import qualified Data.Text as T
foldlM :: Monad m => (b -> Char -> m b) -> b -> Text -> m b
foldlM f init bsInit = impl (pure init) bsInit where
impl acc bs
| T.null bs = acc
| otherwise = im... | AKST/jo | source/lib/JoScript/Util/Text.hs | mit | 486 | 0 | 15 | 105 | 217 | 115 | 102 | 13 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.