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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-|
Module : Numeric.AERN.Poly.IntPoly.Addition
Description : out-rounded polynomial addit... | michalkonecny/aern | aern-poly/src/Numeric/AERN/Poly/IntPoly/Addition.hs | bsd-3-clause | 10,915 | 47 | 15 | 2,538 | 2,611 | 1,349 | 1,262 | 236 | 2 |
{-# LANGUAGE DataKinds #-}
module ElmFormat.Render.Text where
import Data.Coapplicative
import Elm.Utils ((|>))
import ElmVersion (ElmVersion)
import AST.Structure
import AST.V0_16
import AST.Module (Module)
import qualified Box
import qualified Data.Text as Text
import qualified ElmFormat.Render.Box as Render
rend... | avh4/elm-format | elm-format-lib/src/ElmFormat/Render/Text.hs | bsd-3-clause | 839 | 0 | 11 | 129 | 208 | 118 | 90 | 21 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Snap.Internal.Http.Parser.Benchmark
( benchmarks )
where
import Control.Monad
import Criterion.Main hiding (run)
import q... | k-bx/snap-server | benchmark/Snap/Internal/Http/Parser/Benchmark.hs | bsd-3-clause | 843 | 0 | 10 | 270 | 159 | 93 | 66 | 20 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Cloud.AWS.EC2.Types.Subnets
( CreateSubnetRequest(..)
, Subnet(..)
, SubnetState
) where
import Cloud.AWS.EC2.Types.Common (ResourceTag)
import Cloud.AWS.Lib.FromText (deriveFromText)
import Data.IP (AddrRange, IPv4)
import Data.Text (Text)
data CreateSubnetReq... | worksap-ate/aws-sdk | Cloud/AWS/EC2/Types/Subnets.hs | bsd-3-clause | 1,061 | 0 | 9 | 204 | 254 | 154 | 100 | 30 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Google.Drive.UploadSpec
( main
, spec
) where
import SpecHelper
import Data.Conduit (($$+-))
import Data.Conduit.Binary (sinkLbs)
import qualified Data.ByteString.Lazy.Char8 as C8
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "Network.Goog... | pbrisbin/google-drive | test/Network/Google/Drive/UploadSpec.hs | mit | 1,344 | 0 | 20 | 413 | 364 | 187 | 177 | 32 | 1 |
{- Copyright © 2012, Vincent Elisha Lee Frey. All rights reserved.
- This is open source software distributed under a MIT license.
- See the file 'LICENSE' for further information.
-}
module System.Console.CmdTheLine.Util
(
-- * File path validation
-- ** Existing path check
fileExists, dirExists, pathE... | glutamate/cmdtheline | src/System/Console/CmdTheLine/Util.hs | mit | 3,036 | 0 | 10 | 559 | 596 | 319 | 277 | 40 | 2 |
--------------------------------------------------------------------------------
{-| Module : Events
Copyright : (c) Daan Leijen 2003
(c) Shelarcy (shelarcy@gmail.com) 2006
License : wxWindows
Maintainer : wxhaskell-devel@lists.sourceforge.net
Stability : provisional
Portabilit... | ekmett/wxHaskell | wx/src/Graphics/UI/WX/Events.hs | lgpl-2.1 | 11,138 | 0 | 13 | 2,802 | 2,244 | 1,185 | 1,059 | 172 | 2 |
{- |
Module : $Header$
Description : MatchCAD program
Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010
License : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
Maintainer : ewaryst.schulz@dfki.de
Stability : experimental
Portability : non-portable (via imports)
Program for matching to Has... | keithodulaigh/Hets | HasCASL/MatchCAD.hs | gpl-2.0 | 4,665 | 0 | 13 | 1,460 | 1,197 | 652 | 545 | 103 | 7 |
{-# LANGUAGE BangPatterns #-}
{- $Id: Parser.hs,v 1.2 2003/11/10 21:28:58 antony Exp $
******************************************************************************
* I N V A D E R S *
* ... | snowmantw/Frag | src/Parser.hs | gpl-2.0 | 14,087 | 36 | 24 | 5,188 | 2,962 | 1,675 | 1,287 | 225 | 8 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE... | sopvop/heist | src/Heist/Internal/Types.hs | bsd-3-clause | 9,076 | 0 | 14 | 1,752 | 1,564 | 842 | 722 | 110 | 1 |
{-|
Module : System.GPIO.Linux.Sysfs.Types
Description : Types for Linux @sysfs@ GPIO
Copyright : (c) 2019, Drew Hess
License : BSD3
Maintainer : Drew Hess <src@drewhess.com>
Stability : experimental
Portability : non-portable
Types used by the various Linux @sysfs@ GPIO implementations.
-}
{-# LANGUAG... | dhess/gpio | src/System/GPIO/Linux/Sysfs/Types.hs | bsd-3-clause | 5,362 | 0 | 6 | 1,035 | 466 | 305 | 161 | 57 | 1 |
-- | benchmarking Base.Animation.pickAnimationFrame
import Utils.Tests
import Base.Animation
import Test.QuickCheck
import Criterion.Main
main = do
quickCheck $ equalImplementation pickAnimationFrameNaive pickAnimationFrameOld
quickCheck $ equalImplementation pickAnimationFrameNaive
(\ a b c -> ... | geocurnoff/nikki | src/benchmarks/pickAnimationFrame.hs | lgpl-3.0 | 1,332 | 2 | 13 | 304 | 466 | 245 | 221 | 33 | 1 |
{-
values:
eq :: (Bool, Bool) -> Bool
le :: (Bool, Bool) -> Bool
ne :: (Bool, Bool) -> Bool
neg :: Bool -> Bool
vee :: (Bool, Bool) -> Bool
wedge :: (Bool, Bool) -> Bool
scope:
Prelude.eq |-> Prelude.eq, Value
Prelude.le |-> Prelude.le, Value
Prelude.ne |-> Prelude.ne, Value
Prelude.neg |-> Prelude.neg, Value
Prelude... | keithodulaigh/Hets | ToHaskell/test/BoolEx.hascasl.hs | gpl-2.0 | 1,138 | 0 | 10 | 288 | 334 | 189 | 145 | 21 | 4 |
-- | A test for ensuring that GHC's supporting language extensions remains in
-- sync with Cabal's own extension list.
--
-- If you have ended up here due to a test failure, please see
-- Note [Adding a language extension] in compiler/main/DynFlags.hs.
module Main (main) where
import Control.Monad
import Data.List
im... | tjakway/ghcjvm | testsuite/tests/driver/T4437.hs | bsd-3-clause | 2,262 | 0 | 16 | 824 | 336 | 179 | 157 | 43 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.Commands
-- Copyright : (c) David Glasser 2007
-- License : BSD3
--
-- Maintainer : glasser@mit.edu
-- Stability : stable
-- Portability : portable
--
-- Allows you to run internal xmonad co... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/Commands.hs | bsd-2-clause | 5,060 | 0 | 12 | 1,879 | 848 | 493 | 355 | 55 | 1 |
module Main (main) where
import Data.List
main :: IO ()
main = do print (genericLength [1..10000000] :: Int)
print (genericLength [1..10000000] :: Integer)
| urbanslug/ghc | libraries/base/tests/length001.hs | bsd-3-clause | 169 | 0 | 10 | 36 | 69 | 37 | 32 | 5 | 1 |
module Main () where
import JSONClass
import PrettyJSON
import Prettify
main = putStrLn (pretty 10 value) where
value = renderJValue (toJValue (JObj [("f", JNumber 1), ("q", JNumber 10)]))
| pauldoo/scratch | RealWorldHaskell/ch06/Main.hs | isc | 201 | 0 | 14 | 40 | 78 | 44 | 34 | 6 | 1 |
{-# LANGUAGE TypeOperators
, EmptyDataDecls
, MultiParamTypeClasses
, FunctionalDependencies
, FlexibleInstances
, UndecidableInstances
, ScopedTypeVariables
#-}
module Measures.Unit.Internal (
) where
import Measures.Unit
import Measures.I... | fehu/hgt | core-universe/src/Measures/Unit/Internal.hs | mit | 3,951 | 0 | 13 | 985 | 893 | 460 | 433 | -1 | -1 |
type Rotor = [(Int,Int)]
type RotorArray = [Rotor]
type Key = [Int]
charRotor = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ [' ']
charLimit = length charRotor - 1
initRotor = [(x, charLimit - x)|x<-[0..charLimit]]
{- Functions To Simulate the Operation of Rotors -}
setupRotors :: Key -> RotorArray
setupRotors [] = [... | KeithKirk/haskell-ciphers | rotor.hs | mit | 2,738 | 0 | 13 | 533 | 990 | 521 | 469 | 49 | 2 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
--------------------------------------... | Multi-Axis/habbix | app/main.hs | mit | 15,730 | 0 | 20 | 5,042 | 4,155 | 2,194 | 1,961 | 259 | 20 |
{-|
Module: Flaw.Graphics.GLSL
Description: GLSL generator for OpenGL/WebGL graphics.
License: MIT
-}
{-# LANGUAGE DeriveGeneric, GADTs, OverloadedStrings, TypeFamilies #-}
module Flaw.Graphics.GLSL
( GlslConfig(..)
, GlslAttribute(..)
, GlslUniformBlock(..)
, GlslUniform(..)
, GlslSampler(..)
, GlslFragm... | quyse/flaw | flaw-gl/Flaw/Graphics/GLSL.hs | mit | 24,512 | 0 | 31 | 6,161 | 6,466 | 3,304 | 3,162 | 513 | 147 |
import Drawing
main = drawPicture myPicture
myPicture points =
coordinates &
drawPoints [a,b,a',b'] &
drawLabels [a,b,a',b'] ["A","B","A'","B'"] &
drawSegment (a,b) &
message "Translation of AB 3 units right and 1 unit down"
where
[a,b] = [(1,1),(2,2)]
a' = translate a ... | alphalambda/k12math | contrib/MHills/GeometryLessons/code/student/lesson8a.hs | mit | 439 | 3 | 10 | 138 | 212 | 119 | 93 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.API.Mandrill.Tags where
import Network.API.Mandrill.Response
import Network.API.Mandrill.Types
import Network.API.Mandrill.Utils
-- | Return all of the user-defined tag information
list :: (MonadIO m) => MandrillT m (Either ApiError [Stat])
list = performRequest "/ta... | krgn/hamdrill | src/Network/API/Mandrill/Tags.hs | mit | 1,394 | 0 | 9 | 280 | 271 | 149 | 122 | 21 | 1 |
module Soundwave.Persistence where
import Soundwave.Data
import qualified Soundwave.Logger as L
import SoundwaveProtos.Datum
import SoundwaveProtos.Value
import SoundwaveProtos.Request
import SoundwaveProtos.Response
import SoundwaveProtos.Snapshot
import Text.ProtocolBuffers.WireMessage (messageGet, messagePut)
impor... | mrb/soundwave | Soundwave/Persistence.hs | mit | 2,576 | 0 | 25 | 582 | 898 | 470 | 428 | 59 | 3 |
{-# LANGUAGE FlexibleContexts #-}
module Chimera.Scripts.Common where
import FreeGame
import Control.Lens
import Data.Default (def)
import qualified Data.Vector as V
import qualified Data.IntMap as IM
import Data.Reflection (Given, given)
import Chimera.State
import Chimera.Engine.Core
import Chimera.Engine.Scripts
... | myuon/Chimera | Chimera/Scripts/Common.hs | mit | 7,018 | 0 | 29 | 1,848 | 3,389 | 1,688 | 1,701 | 176 | 4 |
-- This binary sanitizes html-fragments passed in to avoid
-- cross-site scripting (XSS) attacks.
--
-- The string to be sanitized is read from stdin and the result is written
-- to stdout.
module Main where
import Data.Text.IO as D (hGetContents, hPutStr)
import Text.HTML.SanitizeXSS (sanitizeBalance)
i... | universal/rails_pandoc | haskell/sanitize.hs | mit | 535 | 0 | 10 | 113 | 116 | 67 | 49 | 9 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Data.Binary.Tagged.Internal
-- Copyright : (c) Justin Le 2015
-- License : MIT
--
-- Maintainer : justin@jle.im
-- Stability : unstable
-- Porta... | mstksg/tagged-binary | Data/Binary/Tagged/Internal.hs | mit | 5,732 | 0 | 12 | 1,281 | 722 | 412 | 310 | 70 | 2 |
import Data.List
import Data.Char
import qualified Data.Map as Map
numUnique :: (Eq a) => [a] -> Int
numUnique = length . nub
{- words "hey these are the words in this sentence" -}
{- group [1,1,1,1,2,2,2,2,3,3,2,2,2,5,6,7] -}
{- group ["boom", "bip", "bip", "boom", "boom"] -}
{- sort [5,4,3,7,2,1] -}
{- group $ so... | yhoshino11/learning_haskell | ch6/ch6.hs | mit | 4,115 | 4 | 10 | 799 | 776 | 439 | 337 | 38 | 1 |
module Salad ()
where
import Salad.Image
| ericvoorhis/glitch-replace | src/Salad.hs | mit | 43 | 0 | 4 | 8 | 12 | 8 | 4 | 2 | 0 |
module YML.LinearGradient
(
Parameters (..)
, LinearFunction
, nullF
, cost
, gradientDescent
)
where
import Data.List (intercalate)
import Data.Vector.Unboxed ((!))
import qualified Data.Vector.Unboxed as V
import YML.Dataset
-- swap comments to show debug ... | yogsototh/YML | src/YML/LinearGradient.hs | mit | 2,657 | 0 | 15 | 743 | 899 | 477 | 422 | 45 | 2 |
module Math.NumberTheory.PowersBench
( benchSuite
) where
import Criterion.Main
import System.Random
import Math.NumberTheory.Logarithms (integerLog2)
import Math.NumberTheory.Powers.Squares.Internal
genInteger :: Int -> Int -> Integer
genInteger salt bits
= head
. dropWhile ((< bits) . integerLog2)
... | cfredric/arithmoi | benchmark/Math/NumberTheory/PowersBench.hs | mit | 670 | 0 | 15 | 145 | 239 | 128 | 111 | 20 | 1 |
{- draw sprite with image clipping -}
{-# LANGUAGE OverloadedStrings #-}
module Lesson13 where
--
import qualified SDL
--
import Data.Monoid
import Data.Word (Word8(..))
import Linear.Affine (Point(..))
import Linear.V2 (V2(..))
import Linear.V3 (V3(..))
import Linear.V4 (V4(..))
import Foreign.C.Types (CInt)
--
import... | rueshyna/sdl2-examples | src/Lesson13.hs | mit | 3,368 | 0 | 20 | 836 | 1,095 | 546 | 549 | 78 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Response where
import Data.Aeson.TH
import Basal (Url, DateTime)
import Helper (snakise)
data Pronunciation = Pron {
_id :: Int,
_word :: String,
_pathogg :: Url,
_pathmp3 :: Url,
_country :: String,
_langname :: Strin... | lesguillemets/forvo-pronounce.hs | Response.hs | mit | 969 | 0 | 11 | 192 | 271 | 160 | 111 | 30 | 0 |
-- Copyright 2012 Mitchell Kember. Subject to the MIT License.
-- | The main module.
module Main (main) where
import System.Environment (getArgs)
import System.FilePath (replaceExtension)
import System.IO (hPutStrLn, stderr)
import Text.JSON (Result(..), decode)
import qualified Data.ByteString.Lazy as L
import Lumi... | mk12/luminosity | src/Main.hs | mit | 1,617 | 0 | 15 | 329 | 378 | 207 | 171 | 30 | 5 |
module Feature.PgVersion96Spec where
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Protolude hiding (get)
import SpecHelper
spec :: SpecWith Application
spec =
describe "features supported on PostgreSQL 9.6" $ do
context "GUC headers" $ do
it... | diogob/postgrest | test/Feature/PgVersion96Spec.hs | mit | 4,648 | 0 | 20 | 1,225 | 588 | 349 | 239 | -1 | -1 |
-- | Core module
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}
module T2A.Core
( AgdaSignature
( Signature
, ScopedSignature
)
, buildSignature
) where
import Data.List (isPrefixOf)
import Data.Map as M (l... | agomezl/tstp2agda | src/T2A/Core.hs | mit | 2,232 | 12 | 16 | 725 | 584 | 321 | 263 | 52 | 3 |
import Data.Numbers
import Data.Numbers.Primes
import Data.List
import qualified Data.Set as S
toIntegerList :: Integer -> [Integer]
toIntegerList n = map toInt (show n)
where toInt c = read (c:"") :: Integer
digitalSum n = foldr1 (+) (toIntegerList n)
quicksort [] = []
quicksort (x:xs) = quicksort [z... | stefan-j/ProjectEuler | q56.hs | mit | 438 | 1 | 10 | 97 | 230 | 121 | 109 | 11 | 1 |
--
-- Skeleton for Salsa parser
-- To be used at the exam for Advanced Programming, B1-2013
--
module SalsaParser
(
Program
, Error
, parseString
, parseFile
, reserved
) where
import SalsaAst
import SimpleParse
import Data.Char (isLetter, isDigit, isUpper, isLower)
-- A string is used... | borgsmidt/adv-prog-2013 | src/salsa/SalsaParser.hs | mit | 6,092 | 0 | 14 | 2,445 | 1,882 | 912 | 970 | 177 | 2 |
module CIS194.Week03.GolfSpec where
import CIS194.Week03.Golf
import Test.Hspec
spec :: Spec
spec = do
describe "skips" $ do
it "convert a list into a list of lists" $ do
skips "ABCD" `shouldBe` ["ABCD", "BD", "C", "D"]
skips "hello!" `shouldBe` ["hello!", "el!", "l!", "l", "o", "!"]
skips [... | acamino/cis-194-2013 | test/CIS194/Week03/GolfSpec.hs | mit | 1,649 | 0 | 15 | 941 | 390 | 225 | 165 | 29 | 1 |
-- ========================================================================== --
-- Main program
--------------------------------------------------------------------------------
module RS_Main where
import RS_MergeSort
-- import HeapSort (heapSort, bottomUpHeapSort)
-- import BraunHeap (braunSort, bottomUpBraunSort)... | gennady-em/haskel | src/RS_Main.hs | gpl-2.0 | 4,611 | 14 | 13 | 1,044 | 597 | 352 | 245 | 39 | 4 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Core
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups... | formrre/yi | yi-core/src/Yi/Core.hs | gpl-2.0 | 21,340 | 0 | 32 | 6,460 | 5,124 | 2,675 | 2,449 | -1 | -1 |
{-| Implementation of Ganeti Lock field queries
The actual computation of the field values is done by forwarding
the request; so only have a minimal field definition here.
-}
{-
Copyright (C) 2014 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General... | ribag/ganeti-experiments | src/Ganeti/Query/Locks.hs | gpl-2.0 | 3,104 | 0 | 15 | 638 | 468 | 266 | 202 | 37 | 1 |
{-# LANGUAGE CPP #-}
-- Copyright (c) Tuomo Valkonen 2004.
-- Copyright (c) Don Stewart 2004-5.
-- Copyright (c) Jean-Philippe Bernardy 2006,2007.
-- | This is the main module of Yi, called with configuration from the user.
-- Here we mainly process command line arguments.
module Yi.Main (main) where
import Prelude ... | codemac/yi-editor | src/Yi/Main.hs | gpl-2.0 | 4,903 | 0 | 20 | 1,375 | 1,174 | 629 | 545 | 86 | 11 |
module Main(main) where
import System.IO.Error hiding (catch)
import Control.Monad
import System.Directory
import Data.Maybe
import Data.List
import System.IO (hPutStrLn, stderr)
import System.FilePath
import Control.Exception
import Prelude hiding (catch)
import Data.Ord
import Data.Function
import System.Random
impo... | anttisalonen/freekick2 | src/Main.hs | gpl-3.0 | 17,364 | 0 | 28 | 4,591 | 6,303 | 3,248 | 3,055 | 389 | 5 |
{-
This file is part of HNH.
HNH 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
(at your option) any later version.
HNH is distributed in the hope that ... | fferreira/hnh | Compile.hs | gpl-3.0 | 3,189 | 0 | 20 | 986 | 635 | 328 | 307 | 57 | 2 |
import VM
main = putStrLn "aoeu" | MichaelBurge/vm | Main.hs | gpl-3.0 | 33 | 0 | 5 | 6 | 12 | 6 | 6 | 2 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-|
module : WebParsing.PrerequisiteParsing
Description : converts a T.Text representation of prerequisites into prereq format
Stability : experimental
Currently parses prerequisites for Arts & Science only. Attempts to preserve only the most
basic internal logic ... | cchens/courseography | hs/WebParsing/PrerequisiteParsing.hs | gpl-3.0 | 2,792 | 0 | 14 | 569 | 578 | 324 | 254 | 37 | 5 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/GlobalNetworkEndpointGroups/DetachNetworkEndpoints.hs | mpl-2.0 | 6,386 | 0 | 18 | 1,345 | 562 | 336 | 226 | 101 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.SafeBrowsin... | rueshyna/gogol | gogol-safebrowsing/gen/Network/Google/SafeBrowsing/Types/Product.hs | mpl-2.0 | 45,961 | 0 | 19 | 11,428 | 8,450 | 4,848 | 3,602 | 979 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Get.hs | mpl-2.0 | 4,860 | 0 | 16 | 1,048 | 550 | 327 | 223 | 89 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudiot/gen/Network/Google/Resource/CloudIOT/Projects/Locations/Registries/Patch.hs | mpl-2.0 | 6,247 | 0 | 17 | 1,366 | 864 | 505 | 359 | 128 | 1 |
module OSRIC.Main (main) where
import Safe
import System.Console.CmdArgs.Implicit hiding (args)
import EasyIRCBot hiding (logfile, channel, server, nick)
import OSRIC.Dice (rollDice)
import OSRIC.Voting
import OSRIC.DM
import OSRIC.State
data BotArgs = BotArgs { server :: String
, channel :: Str... | kaashif/hs-irc-osric | lib/OSRIC/Main.hs | agpl-3.0 | 3,298 | 0 | 16 | 1,430 | 848 | 434 | 414 | 62 | 13 |
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------------------
-- See end of this file for licence information.
--------------------------------------------------------------------------------
-- |
-- Module : Swish.RDF.Vocabulary.Provenance
-- Copyright ... | DougBurke/swish | src/Swish/RDF/Vocabulary/Provenance.hs | lgpl-2.1 | 9,686 | 0 | 8 | 1,289 | 848 | 520 | 328 | 131 | 1 |
module Zipping where
myZip :: [a] -> [b] -> [(a,b)]
myZip (x1:xs1) (x2:xs2) = (x1,x2) : myZip xs1 xs2
myZip _ [] = []
myZip [] _ = []
myZipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
myZipWith f (x1:xs1) (x2:xs2) = f x1 x2 : myZipWith f xs1 xs2
myZipWith _ _ [] = []
myZipWith _ [] _ = []
| thewoolleyman/haskellbook | 09/11/maor/zipping.hs | unlicense | 290 | 0 | 8 | 69 | 210 | 113 | 97 | 9 | 1 |
module External.A274923 (a274923) where
import HelperSequences.A001057 (a001057)
import HelperSequences.A002061 (a002061)
import HelperSequences.A002522 (a002522)
import HelperSequences.A003059 (a003059)
a274923 :: Int -> Integer
a274923 1 = 0
a274923 n'
| a002061 k <= n && n <= a002522 k = a001057 (k - 1)
| even ... | peterokagey/haskellOEIS | src/External/A274923.hs | apache-2.0 | 509 | 0 | 11 | 148 | 203 | 105 | 98 | 14 | 1 |
-- |
-- Module : Spark.Context
--
-- Context defines the stratum on which the distributed process will
-- be based.
module Spark.Context where
import Control.Distributed.Process
import Control.Distributed.Static
data Strategy = Distributed { masterNode :: NodeId
, slaveNodes :: [NodeId] }... | yogeshsajanikar/hspark | src/Spark/Context.hs | apache-2.0 | 1,081 | 0 | 9 | 264 | 125 | 78 | 47 | 9 | 1 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes, TypeFamilies, GADTs #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Model where
import Prelude
import Yesod
import Data.Text (Text)
import Text.Blaze (ToHtml(toHtml))
-- You can define all of your database entities in the entities file.
-- Yo... | cutsea110/tut | Model.hs | bsd-2-clause | 691 | 0 | 8 | 107 | 131 | 74 | 57 | 14 | 0 |
module Data.Mathematica.Job where
startJob :: IO ()
startJob = do
putStrLn "job started"
| wavewave/mathematica-data | lib/Data/Mathematica/Job.hs | bsd-2-clause | 94 | 0 | 7 | 18 | 28 | 15 | 13 | 4 | 1 |
-- | Paragon Abstract Syntax Tree. Modifiers.
module Language.Java.Paragon.Syntax.Modifiers
(
module Language.Java.Paragon.Syntax.Modifiers
, module Language.Java.Paragon.Syntax.Expressions
) where
import Language.Java.Paragon.Syntax.Expressions
import Language.Java.Paragon.Annotation
import Language.Java.P... | bvdelft/paragon | src/Language/Java/Paragon/Syntax/Modifiers.hs | bsd-3-clause | 1,816 | 0 | 8 | 516 | 466 | 267 | 199 | 48 | 0 |
-- | Re-export "Database.Persist.Sql" without any clashes with
-- @esqueleto@.
module Database.Esqueleto.Internal.PersistentImport
( module Database.Persist.Sql
) where
import Database.Persist.Sql hiding
( BackendSpecificFilter, Filter(..), PersistQuery(..), SelectOpt(..)
, Update(..), delete, deleteWhereCount... | fpco/esqueleto | src/Database/Esqueleto/Internal/PersistentImport.hs | bsd-3-clause | 575 | 0 | 6 | 75 | 165 | 122 | 43 | 9 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Ivory.Language (
-- * Kinds
Area(..)
, Proc(..)
-- ... | Hodapp87/ivory | ivory/src/Ivory/Language.hs | bsd-3-clause | 5,204 | 0 | 5 | 1,022 | 1,202 | 851 | 351 | 276 | 0 |
module Mock where
import Bluetooth (UUID)
import Bluetooth.Internal.Interfaces (bluezName, bluezPath)
import Data.IORef
import Paths_ble
import System.IO
import qualified System.Process as P
withAService :: IO a -> IO a
withAService ... | plow-technologies/ble | test/Mock.hs | bsd-3-clause | 948 | 0 | 13 | 209 | 225 | 116 | 109 | 26 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
************************************************************************
* *
\section[OccurAnal]{Occurrence analysis pass}
* ... | shlevy/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | 116,076 | 0 | 17 | 32,730 | 12,441 | 6,776 | 5,665 | 942 | 11 |
module PaneInteractionServer
( interactions
) where
import Control.Monad (unless)
import Network
import Data.List (span)
import System.IO
import Parser
import Base
import Nettle.OpenFlow
import System.Time
import System.Log.Logger.TH (deriveLoggers)
import qualified System.Log.Logger as Logger
$(deriveLoggers "Lo... | brownsys/pane | src/PaneInteractionServer.hs | bsd-3-clause | 1,997 | 0 | 16 | 498 | 663 | 329 | 334 | -1 | -1 |
module RE.Interpret (interpret) where
import Control.Monad.Free
import Control.Monad.State
import qualified Data.Map as M
import Data.Maybe
import RE.Insn
import RE.Program
doJump :: Program [InsnF String ()] -> String -> Program [InsnF String ()]
doJump (Program _ tab) idx = Program (fromJust $ M.lookup idx tab) ta... | forestbelton/revm | src/RE/Interpret.hs | bsd-3-clause | 961 | 0 | 13 | 307 | 369 | 186 | 183 | 23 | 7 |
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-- |
-- Module : Crypto.Encrypt.Stream.ChaCha20
-- Copyright : (c) Austin Seipp 2011-2014
-- License : BSD3
--
-- Maintainer : aseipp@pobox.com
-- Stability : experimental
-- Portability : portable
--
-- Fast streaming enc... | thoughtpolice/hs-nacl | src/Crypto/Encrypt/Stream/ChaCha20.hs | bsd-3-clause | 5,873 | 0 | 20 | 1,402 | 659 | 392 | 267 | -1 | -1 |
module Syntax where
import Data.Set (union)
import qualified Data.Set as S
import Data.Foldable (foldl')
type SymName = String
data BinOp
= Add
| Sub
| Mul
| Div
| Lt
| Lte
| Gt
| Gte
| Eq
deriving (Eq, Ord, Show)
str2binOp :: [(String, BinOp)]
str2binOp =
[ ("+" , Add)
, ("-" , Sub)
, ... | talw/crisp-compiler | src/Syntax.hs | bsd-3-clause | 2,467 | 0 | 12 | 660 | 896 | 536 | 360 | 102 | 8 |
module System.IO.Streams.Logging.Deferred
( DeferredLogger
, makeDeferredLogger
, stopDeferredLogger
) where
------------------------------------------------------------------------------
import Blaze.ByteString.Builder (Builder)
import qualified Blaze.ByteString.Builder ... | snapframework/logging-streams | src/System/IO/Streams/Logging/Deferred.hs | bsd-3-clause | 1,525 | 0 | 12 | 477 | 275 | 159 | 116 | 34 | 1 |
-- | Simulates the @isSpaceChar@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isSpaceChar%28int%29>
module Language.Java.Character.IsSpaceChar
(
IsSpaceChar(..)
) where
import Data.Char
import Data.Word
import Data.Set.Diet(Diet)
import qualified Data.Set.Diet as S
-- | Instances ... | tonymorris/java-character | src/Language/Java/Character/IsSpaceChar.hs | bsd-3-clause | 1,447 | 0 | 10 | 361 | 376 | 214 | 162 | 52 | 1 |
-- © 2002 Peter Thiemann
-- |Implements RFC 2045 MIME coding.
module WASH.Utility.Base64
(encode, encode', decode, decode'
,alphabet_list
)
where
import Data.Array
import Data.Char
--
-- |Yields encoded input cropped to lines of less than 76 characters. Directly
-- usable as email body.
en... | nh2/WashNGo | WASH/Utility/Base64.hs | bsd-3-clause | 3,461 | 17 | 13 | 708 | 993 | 582 | 411 | 86 | 3 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.IO.Zodiac.TSRP.Data.Symmetric where
import Disorder.Core.IO (testIO)
import Disorder.Core.Property (failWith)
import Disorder.Core.Run (ExpectedTestSpeed(..), disorderCheckEn... | ambiata/zodiac | zodiac-tsrp/test/Test/IO/Zodiac/TSRP/Data/Symmetric.hs | bsd-3-clause | 1,079 | 0 | 14 | 217 | 200 | 114 | 86 | 23 | 2 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE Rank2Types #-}
#endif
#if __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Graph
-- Copyright : (c) The University of Glasgow 2002
-- Licen... | ekmett/containers | Data/Graph.hs | bsd-3-clause | 15,628 | 2 | 14 | 4,535 | 3,325 | 1,832 | 1,493 | 179 | 4 |
module Weak (module System.Mem.Weak) where
import System.Mem.Weak
| OS2World/DEV-UTIL-HUGS | oldlib/Weak.hs | bsd-3-clause | 66 | 0 | 5 | 7 | 19 | 13 | 6 | 2 | 0 |
{-# LANGUAGE PatternGuards #-}
module Prolog2 (
ask,
Fact,
Rule(..),
Term(..),
TwoD(..),
Result
) where
import PrologTools
import Data.Maybe
ask :: (TwoD sc, Eq sc, Eq s) =>
sc -> Result sc s -> Fact sc s -> [Rule sc s] -> [Result sc s]
ask sc ret q rs
| is@(Is : _) <- q sc = maybeToList $ applyIs is ret
| ... | YoshikuniJujo/lojysamban | src/Prolog2.hs | bsd-3-clause | 1,223 | 18 | 14 | 295 | 566 | 294 | 272 | 28 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
-- Here we use Template Haskell to generate a test suite for the Aeson wrappers
-- from the DSL description of same.
module Data.API.Tools.JSONTests
( jsonTestsTool
, prop_decodesTo
, prop_res... | adinapoli/api-tools | src/Data/API/Tools/JSONTests.hs | bsd-3-clause | 2,048 | 0 | 12 | 523 | 352 | 203 | 149 | 29 | 2 |
-- Ensure that we can derive Functor, Foldable, and Traversable using only
-- an import of Data.Singletons.TH
module FunctorLikeDeriving where
import Data.Kind
import Data.Singletons.Base.TH
$(singletons [d|
data T x a
= MkT1 x a (Maybe a) (Maybe (Maybe a))
| MkT2 (Maybe x)
deriving (Functor, Foldable, ... | goldfirere/singletons | singletons-base/tests/compile-and-dump/Singletons/FunctorLikeDeriving.hs | bsd-3-clause | 411 | 0 | 7 | 82 | 32 | 21 | 11 | -1 | -1 |
-- Copyright (c) 2014-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is distributed under the terms of a BSD license,
-- found in the LICENSE file.
{-# LANGUAGE RebindableSyntax, OverloadedStrings #-}
module BatchTests (tests) where
import TestTypes
import TestUtils
import MockTAO
import Cont... | jiayuanmark/Haxl | tests/BatchTests.hs | bsd-3-clause | 8,782 | 0 | 16 | 2,025 | 2,861 | 1,415 | 1,446 | 193 | 6 |
-- | Basic table building for prettier futhark-test output.
module Futhark.Util.Table
( buildTable,
mkEntry,
Entry,
)
where
import Data.List (intercalate, transpose)
import Futhark.Util (maxinum)
import Futhark.Util.Console (color)
import System.Console.ANSI
data RowTemplate = RowTemplate [Int] Int derivi... | diku-dk/futhark | src/Futhark/Util/Table.hs | isc | 1,993 | 0 | 14 | 405 | 594 | 319 | 275 | 36 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module Analysis.ParallelIndependent where
import Abstract.Category
import Abstract.Category.Adhesive
import Abstract.Category.FindMorphism
import Abstract.Category.Finitary
import Abstract.Catego... | rodrigo-machado/verigraph | src/library/Analysis/ParallelIndependent.hs | gpl-3.0 | 2,408 | 0 | 12 | 479 | 630 | 338 | 292 | 35 | 4 |
module Lambda1 where
main :: Int
main = (\1 (x:xs) -> x) 1 [3]
| roberth/uu-helium | test/correct/Lambda1.hs | gpl-3.0 | 64 | 0 | 9 | 15 | 39 | 23 | 16 | 3 | 1 |
module Sound.Tidal.Utils where
{-
Utils.hs - A library of handy Haskell utility functions
Copyright (C) 2020, Alex McLean and contributors
This library 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 Fou... | bgold-cosmos/Tidal | src/Sound/Tidal/Utils.hs | gpl-3.0 | 2,924 | 0 | 11 | 745 | 1,059 | 581 | 478 | 49 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Shelduck.LogParser where
import Control.Lens
import Data.Aeson
import Data.ByteString.Lazy
import Data.HashMap.Strict
import Data.Maybe
import qualified Data.Text as T
import Data.Text.Encoding
import ... | bobjflong/scalpel | src/Shelduck/LogParser.hs | apache-2.0 | 2,190 | 0 | 10 | 716 | 474 | 247 | 227 | 46 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Sensor_msgs.CompressedImage where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Inter... | acowley/roshask | msgs/Sensor_msgs/Ros/Sensor_msgs/CompressedImage.hs | bsd-3-clause | 1,588 | 1 | 10 | 322 | 402 | 236 | 166 | 37 | 0 |
-- |
-- Module : Crypto.Hash.Tiger
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Module containing the binding functions to work with the
-- Tiger cryptographic hash.
--
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANG... | vincenthz/cryptonite | Crypto/Hash/Tiger.hs | bsd-3-clause | 1,430 | 0 | 10 | 341 | 275 | 155 | 120 | 27 | 0 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Control/Monad/Trans/Resource.hs" #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies... | phischu/fragnix | tests/packages/scotty/Control.Monad.Trans.Resource.hs | bsd-3-clause | 12,558 | 0 | 21 | 2,669 | 2,264 | 1,249 | 1,015 | 167 | 3 |
{-# LANGUAGE DeriveGeneric #-}
module Tinc.Config (
getAdditionalDependencies
, configFile
) where
import GHC.Generics
import Hpack.Config
import Hpack.Yaml
import System.Directory
import Tinc.Fail
data Config = Config {
configDependencies :: Dependencies
} deriv... | sol/tinc | src/Tinc/Config.hs | mit | 732 | 0 | 10 | 156 | 172 | 94 | 78 | 23 | 2 |
module System.Mesos.Raw.ExecutorId where
import System.Mesos.Internal
type ExecutorIDPtr = Ptr ExecutorID
foreign import ccall unsafe "ext/types.h toExecutorID" c_toExecutorID :: ToID ExecutorIDPtr
foreign import ccall unsafe "ext/types.h fromExecutorID" c_fromExecutorID :: FromID ExecutorIDPtr
foreign im... | Atidot/hs-mesos | src/System/Mesos/Raw/ExecutorId.hs | mit | 730 | 2 | 12 | 130 | 190 | 96 | 94 | 15 | 0 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE Safe #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DeriveGeneric #-}
module Cryptol.Utils.PP where
import ... | beni55/cryptol | src/Cryptol/Utils/PP.hs | bsd-3-clause | 6,389 | 0 | 16 | 1,677 | 2,410 | 1,267 | 1,143 | 157 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
module Data.IP.Range where
import Control.Monad
import Data.Bits
import Data.Data (Data)
import Data.IP.Addr
import Data.IP.Mask
import Data.String
import Data.Typeable (Typeable)
import Text.Appar.String
import... | kazu-yamamoto/iproute | Data/IP/Range.hs | bsd-3-clause | 4,173 | 0 | 13 | 839 | 1,075 | 577 | 498 | 78 | 3 |
{-#LANGUAGE OverloadedStrings#-}
import Shelly
import Prelude hiding (FilePath)
import System.Environment
import Data.String
configure = command_ "cabal" ["configure"] . map fromString
haddock = command_ "cabal" ["haddock"] []
moveToTemp = command_ "mv" ["-f","dist/doc","/tmp"] []
cleanTmp = command... | TomMD/CV | makedocs.hs | bsd-3-clause | 968 | 0 | 11 | 239 | 273 | 138 | 135 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Form.I18n.Russian where
import Yesod.Form.Types (FormMessage (..))
import Data.Monoid (mappend)
import Data.Text (Text)
russianFormMessage :: FormMessage -> Text
russianFormMessage (MsgInvalidInteger t) = "Неверно записано целое число: " `Data.Monoid.mappend` t
russianF... | psibi/yesod | yesod-form/Yesod/Form/I18n/Russian.hs | mit | 1,993 | 0 | 7 | 182 | 320 | 178 | 142 | 24 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE GADTs #-}
#if __GLASGOW_HASKELL__ >= 707
{-# LANGUAGE DeriveDataTypeable #-}
#endif
{-# OPTIONS_GHC -Wall #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Applicative.Trans.Free
-- Copyright :... | dalaing/free | src/Control/Applicative/Trans/Free.hs | bsd-3-clause | 7,641 | 0 | 13 | 1,725 | 2,204 | 1,164 | 1,040 | 113 | 2 |
<?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="ms-MY">
<title>Front-End Scanner | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<m... | thc202/zap-extensions | addOns/frontendscanner/src/main/javahelp/org/zaproxy/zap/extension/frontendscanner/resources/help_ms_MY/helpset_ms_MY.hs | apache-2.0 | 978 | 78 | 67 | 159 | 417 | 211 | 206 | -1 | -1 |
import Foo.Bar
import qualified Foo.Baz as Z
main = putStrLn "hello"
baz = Z.bar + bar1
| RefactoringTools/HaRe | test/testdata/cabal/foo/src/Main.expected.hs | bsd-3-clause | 92 | 0 | 6 | 20 | 33 | 19 | 14 | 4 | 1 |
module Demote.WhereIn1 where
--A definition can be demoted to the local 'where' binding of a friend declaration,
--if it is only used by this friend declaration.
--Demoting a definition narrows down the scope of the definition.
--In this example, demote the top level 'sq' to 'sumSquares'
--This example also aims to t... | kmate/HaRe | test/testdata/Demote/WhereIn1.hs | bsd-3-clause | 469 | 0 | 7 | 107 | 83 | 44 | 39 | 7 | 1 |
{-# LANGUAGE PolyKinds, TypeFamilies, MagicHash, DataKinds, RankNTypes #-}
module T11473 where
import GHC.Exts
import GHC.Types
type family Boxed (a :: k) :: *
type instance Boxed Char# = Char
type instance Boxed Char = Char
class BoxIt (a :: TYPE lev) where
boxed :: a -> Boxed a
instance BoxIt Char# where bo... | sdiehl/ghc | testsuite/tests/dependent/should_fail/T11473.hs | bsd-3-clause | 609 | 0 | 9 | 143 | 223 | 117 | 106 | 20 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
{-# LANGUAGE MagicHash #-}
#if !defined(__PARALLEL_HASKELL__)
{-# LANGUAGE UnboxedTuples #-}
#endif
#endif
-----------------------------------------------------------------------------
-... | jtojnar/haste-compiler | libraries/ghc-7.8/base/System/Mem/StableName.hs | bsd-3-clause | 4,172 | 2 | 8 | 742 | 259 | 168 | 91 | -1 | -1 |
module Main where
bmiTell :: (RealFloat a) => a -> a -> String
bmiTell weight height
| bmi <= skinny = "You're underweight, you emo, you!"
| bmi <= normal = "You're supposedly normal. Pffft, I bet you're ugly!"
| bmi <= fat = "You're fat! Lose some weight, fatty!"
| otherwise = "You're... | rglew/lyah | bmi.hs | mit | 462 | 0 | 8 | 151 | 111 | 57 | 54 | 11 | 1 |
{-# LANGUAGE RebindableSyntax, OverloadedStrings #-}
module Main (main) where
import Prelude hiding ((>>), return)
import Data.String
import Data.Void
import React
import React.DOM
import React.GHCJS
import React.Rebindable
import Cochon.Imports
import Cochon.Model
import Cochon.Reactify
import DisplayLang.DisplayTm... | kwangkim/pigment | src-web/hs/DesignMode.hs | mit | 2,390 | 0 | 19 | 620 | 736 | 364 | 372 | 71 | 1 |
import Control.Applicative
import Sat
import System.Environment
main :: IO ()
main = do
args <- getArgs
case args of
[a, b, c, d] -> putStr =<< printDimacs <$> makeCmty (read a) (read b) (read c) (fromIntegral(read d) / 100)
_ -> error "Unknown argument s, must be <vars> <clauses> ... | JLiangWaterloo/sat | Haskell/CmtyWithInteger.hs | mit | 334 | 0 | 16 | 89 | 121 | 62 | 59 | 9 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.